3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a=array(2=>"14"); $b=&$a[2]['foo']; var_dump($a);
based on EBAvI
Output for 7.1.0 - 7.2.0
Warning: Illegal string offset 'foo' in /in/l3iPo on line 3 Fatal error: Uncaught Error: Cannot create references to/from string offsets in /in/l3iPo:3 Stack trace: #0 {main} thrown in /in/l3iPo on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Warning: Illegal string offset 'foo' in /in/l3iPo on line 3 Fatal error: Uncaught Error: Cannot create references to/from string offsets nor overloaded objects in /in/l3iPo:3 Stack trace: #0 {main} thrown in /in/l3iPo on line 3
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Warning: Illegal string offset 'foo' in /in/l3iPo on line 3 Fatal error: Cannot create references to/from string offsets nor overloaded objects in /in/l3iPo on line 3
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Fatal error: Cannot create references to/from string offsets nor overloaded objects in /in/l3iPo on line 3
Process exited with code 255.