hinom 5 Denunciar post Postado Outubro 23, 2008 Exercise 25 Variable functions in PHP don't work directly with: A. echo() B. isset() C. print() D. All of the above Compartilhar este post Link para o post Compartilhar em outros sites
hinom 5 Denunciar post Postado Outubro 23, 2008 Answer: D Explanation Variable functions won't work with language constructs such as echo(), print(), unset(), isset(), empty(), include(), require() and the like. Utilize wrapper functions to make use of any of these constructs as variable functions. <?php function foo() { echo "bar"; } $func = 'foo'; $func(); // This calls foo() ?> <?php $func = 'rand'; echo $func(1,5); // This calls rand() ?> <?php $func = 'echo'; $func('foo bar'); // This is invalid ?> http://php.net/manual/functions.variable-functions.php Compartilhar este post Link para o post Compartilhar em outros sites