3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function type(int &$a) { $a = 'string !!'; } $a = 42; type($a); var_dump($a);
Output for 7.0.0 - 7.2.0
string(9) "string !!"
Output for 5.3.18 - 5.6.28
Catchable fatal error: Argument 1 passed to type() must be an instance of int, integer given, called in /in/5IU7i on line 9 and defined in /in/5IU7i on line 3
Process exited with code 255.