3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Model { private $id; } $time = microtime(true); for ($i = 0; $i < 500000; $i++) { $model = new Model; $refl = new ReflectionClass('Model'); $property = $refl->getProperty('id'); $property->setAccessible(true); $property->setValue($model, 'test'); } $time = microtime(true) - $time; echo 'ReflectionClass took ' . number_format($time, 3) . ' seconds\n";
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '' seconds\n";' (T_ENCAPSED_AND_WHITESPACE) in /in/c3mKr on line 19
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /in/c3mKr on line 19
Process exited with code 255.