Forum Moderators: coopster

Message Too Old, No Replies

Function pointer?

         

hawksbill

4:14 pm on Aug 14, 2007 (gmt 0)

10+ Year Member



Does PHP have anything like a C/C++ function pointer?

eelixduppy

4:17 pm on Aug 14, 2007 (gmt 0)



pointers? - not that I know of. It has references [us.php.net], though, if you are still interested.

whoisgregg

9:30 pm on Aug 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never coded in C or C++, but from what little I've read in the last five minutes about function pointers, you may be interested in variable functions [us3.php.net]. :)

Habtom

11:36 am on Aug 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is no as such Function pointer in PHP as far as I go, but a C equivalent of pointers can be achieved by passing a function name as an argument to a second function. Then you can call the function which you just passed on.