3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo($text = "Bar") { echo "\r\n$text"; } // Pass the function to the array. Do not use () here. $array = array( 'func' => "foo" ); // And call it. $array['func'](); // Outputs: "Bar" $array['func']("Foo Bar"); // Outputs: "Foo Bar"
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
Bar Foo Bar
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/18ISI on line 14
Process exited with code 255.