codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php // sample code for variable functions in php5 function me($name) { return 'I am me name ='.$name; } function i() { return 'I am i'; } $funVar = 'i'; echo $funVar()."\n"; $funVar = 'me'; echo $funVar('roy')."\n"; // note this does not work with language constructs // echo() print() isset() unset() include() require() empty() $funVar = 'print'; $funvar('i m not getting print'); ?>
Private
[
?
]
Run code