3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php$value1 = 10;$value2 = 10;$value_condition = function() use($value1, $value2) { return $value1 === $value2;}if ($value_condition) { echo 'It works!';} else { echo 'It doesnt work.';}$value1 = 15;if ($value_condition) { echo 'It works!';} else { echo 'It doesnt work.';}
Output for 5.4.34
Parse error: syntax error, unexpected '$value1' (T_VARIABLE) in /in/PK9LF on line 1
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?php$value1 = 10;$value2 = 10;$value_condition = function() use($value1, $value2) { return $value1 === $value2;}if ($value_condition) { echo 'It works!';} else { echo 'It doesnt work.';}$value1 = 15;if ($value_condition) { echo 'It works!';} else { echo 'It doesnt work.';}