3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
$x = 'cat';$closure = function () use (&$x) { return $x == 'dog'; };var_dump($closure);$x = 'dog';var_dump($closure);<?php
Output for 5.4.0 - 5.5.15
Parse error: syntax error, unexpected end of file in /in/cdaG5 on line 1
Process exited with code 255.
Output for 4.3.0 - 5.3.29
$x = 'cat';$closure = function () use (&$x) { return $x == 'dog'; };var_dump($closure);$x = 'dog';var_dump($closure);<?php