Recursive functions with dynamic names?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Recursive functions with dynamic names?

Post by Chris Corbyn »

Is there a way to make a function call itself (recursing) without hard-coding the function name in procedural code?

I do use recursion a fair bit and it would be quite useful when it comes to renaming function etc if I dont have to search+replace for the function calls :)

I'm almost certain it's not possible although I do recall somebody referring to "dynamically named functions"...

Thanks guys,

-- Tired here at work *yawn* :cry:
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Yep that helps thanks :)
Post Reply