3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array=array( [0] => array ( 'id' => 1, 'title' => 'ficton' 'modules' => array( [0] => array( 'other_id' => 1 'other_title' => 'James Clavell' ), [1] => array( 'other_id' => 2 'other_title' => 'Terry Pratchett' ), [2] => array( 'other_id' => 3 'other_title' => 'Robert Ludlum' ), ), [1] => array ( 'id' => 2, 'title' => 'non-ficton' 'modules' => array( [1] => array( 'other_id' => 5 'other_title' => 'An excessive book of excessively interesting things' ), [2] => array( 'other_id' => 6 'other_title' => 'It\'s late, I can\'t think of what to put here' ), ) ) ); print_r($array);
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected ''modules'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/vFB0J on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[', expecting ')' in /in/vFB0J on line 3
Process exited with code 255.