3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar1 = Array ( [73] => Array ( 'id' => 73, 'parent_id' => 0, 'title' => 'MENU_73', 'submenu' => Array ( [74] => Array ( 'id' => 74, 'parent_id' => 73, 'title' => 'MENU_73_74', 'submenu' => Array ( [75] => Array ( 'id' => 75, 'parent_id' => 74, 'title' => 'MENU_73_74_75', 'submenu' => Array ( ) ), [76] => Array ( 'id' => 76, 'parent_id' => 74, 'title' => 'MENU_73_74_76', 'submenu' => Array ( ) ), [77] => Array ( 'id' => 77, 'parent_id' => 74, 'title' => 'MENU_73_74_77', 'submenu' => Array ( ) ), ), ), [78] => Array ( 'id' => 78, 'parent_id' => 73, 'title' => 'MENU_73_78', 'submenu' => Array ( [79] => Array ( 'id' => 79, 'parent_id' => 78, 'title' => 'MENU_73_78_79', 'submenu' => Array ( ), ), ), ), [80] => Array ( 'id' => 80, 'parent_id' => 73, 'title' => 'MENU_73_80', 'submenu' => Array ( [84] => Array ( 'id' => 84, 'parent_id' => 80, 'title' => 'MENU_73_80_84', 'submenu' => Array ( ), ), [85] => Array ( 'id' => 85, 'parent_id' => 80, 'title' => 'MENU_73_80_85', 'submenu' => Array ( ), ), ), ), ), ), [81] => Array ( 'id' => 81, 'parent_id' => 0, 'title' => 'MENU_81', 'submenu' => Array ( [82] => Array ( 'id' => 82, 'parent_id' => 81, 'title' => 'MENU_81_82', 'submenu' => Array ( ), ), [83] => Array ( 'id' => 83, 'parent_id' => 81, 'title' => 'MENU_81_83', 'submenu' => Array ( ), ), ), ), ); var_dump($ar1); ?>
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Warning: Illegal offset type in /in/cB6au on line 27 Warning: Illegal offset type in /in/cB6au on line 38 Warning: Illegal offset type in /in/cB6au on line 49 Warning: Illegal offset type in /in/cB6au on line 53 Warning: Illegal offset type in /in/cB6au on line 71 Warning: Illegal offset type in /in/cB6au on line 75 Warning: Illegal offset type in /in/cB6au on line 93 Warning: Illegal offset type in /in/cB6au on line 104 Warning: Illegal offset type in /in/cB6au on line 108 Warning: Illegal offset type in /in/cB6au on line 112 Warning: Illegal offset type in /in/cB6au on line 130 Warning: Illegal offset type in /in/cB6au on line 141 Warning: Illegal offset type in /in/cB6au on line 145 array(0) { }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[', expecting ')' in /in/cB6au on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ')' in /in/cB6au on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/cB6au on line 4
Process exited with code 255.

preferences:
226.58 ms | 1386 KiB | 161 Q