3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function exec(array $context) { $context['bla'] = 'hoi'; } } class B extends A { public function exec(array $context) { parent::exec(&$context); var_dump($context); } } $b = new B(); $b->exec([]);
based on 7FluW
Output for 5.4.2 - 5.6.14
Fatal error: Call-time pass-by-reference has been removed in /in/ai9mg on line 11
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/ai9mg on line 11 Parse error: syntax error, unexpected '[', expecting ')' in /in/ai9mg on line 17
Process exited with code 255.