run code in 200+ php & hhvm versions
Bugs & Features
<?php function myprelog(string $content, ...$args) { mylog($content, $args); } function mylog(string $msg, ...$args) { echo vsprintf($msg, $args); } mylog('test', 'abc', 'def');
based on j1Iv8
Output for hhvm-3.15.4, 7.0.0 - 7.3.0beta1
Output for 5.6.0 - 5.6.30
Catchable fatal error: Argument 1 passed to mylog() must be an instance of string, string given, called in /in/9Cehe on line 12 and defined in /in/9Cehe on line 8
Process exited with code 255.