3v4l.org

run code in 300+ PHP versions simultaneously
<?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 ''other_title'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/Kv7Qj on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[', expecting ')' in /in/Kv7Qj on line 3
Process exited with code 255.

preferences:
180 ms | 1386 KiB | 53 Q