3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function returnArray() { return ['some' => 'array']; } echo returnArray['some'];
Output for 7.2.6 - 7.3.0rc3
Warning: Use of undefined constant returnArray - assumed 'returnArray' (this will throw an Error in a future version of PHP) in /in/MGq75 on line 8 Warning: Illegal string offset 'some' in /in/MGq75 on line 8 r
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.20
Notice: Use of undefined constant returnArray - assumed 'returnArray' in /in/MGq75 on line 8 Warning: Illegal string offset 'some' in /in/MGq75 on line 8 r
Output for hhvm-3.22.0
Notice: Use of undefined constant returnArray - assumed 'returnArray' in /in/MGq75 on line -1 r
Output for hhvm-3.18.5 - 3.21.3
Notice: Use of undefined constant returnArray - assumed 'returnArray' in /in/MGq75 on line 8 r