3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $comething = 42; $closure = function &(string $str) use (&$something) : int { $something = strlen($str); return $something; }; echo $closure("hello");
based on IvHgT
Output for 7.0.0 - 7.2.0
5
Output for 5.3.20 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/XTSNY on line 4
Process exited with code 255.