3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Name\Space { function bar() { echo "bar over here!"; } } //set_error_handler(function() { return true; }); class Foo { const bar = 'yo'; function baz() { $this->bar = function() {echo 'im a callable bar';}; use function Name\Space\bar; } } $foo = new Foo(); $foo->baz(); $foo->bar();
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'use' (T_USE) in /in/qnoi4 on line 17
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_USE in /in/qnoi4 on line 17
Process exited with code 255.