3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dogs= [ ['name'=>'jippy','age'=>12 ,'address'=>'bhaktapur', size=>[ 'weight'=>52, heght =>.5'2]]; ['name'=>'jipu','age'=>2 ,'address'=>'pur', size=>[ 'weight'=>52, heght =>.5'2]]; } foreach($dogs as $key=> $item){ echo $key .' '. $item['name']; }
based on LO6T0
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.7
Parse error: syntax error, unexpected ''2]];' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in /in/YNqCa on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /in/YNqCa:4 Stack trace: #0 {main}
Process exited with code 255.