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 '[', expecting ')' in /in/BqVTc on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[', expecting ')' in /in/BqVTc on line 3
Process exited with code 255.

preferences:
177.88 ms | 1395 KiB | 53 Q