You are here: address of function or a virtual function « PHP Programming Language « IT news, forums, messages
address of function or a virtual function

Posted by D_a_n_i_e_l on 08/16/07 15:00

Is there some way to implement something like a virtual function or
have something like a user defined function ? One solution I thought
might work: store a reference (address) of a function in a variable
and call it later if that variable has been set ? This seems to
compile OK, but produces funny results. Is this outside the scope of
php ?

function testfn()
{
....
return $result;
}

$myfn = &testfn; // set it too the address of the function
....
if (isset($myfn))
$result = @$myfn(); // call my function

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация