3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function yourMom(){ echo "Your mom "; } function isSoFat(){ echo "is so fat..."; } $array = array("yourMom", "isSoFat"); foreach($array as $funt) $funct();
based on Cjubl
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: funct in /in/GMQkq on line 13 Fatal error: Uncaught Error: Function name must be a string in /in/GMQkq:13 Stack trace: #0 {main} thrown in /in/GMQkq on line 13
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Notice: Undefined variable: funct in /in/GMQkq on line 13 Fatal error: Function name must be a string in /in/GMQkq on line 13
Process exited with code 255.