3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static test() { $main_category_currency = 1; $children = array( array('id_category'=>10), array('id_category'=>15), ); function map($child) { return $child['id_category']; } return array_unique(array_merge( array($main_category_currency), array_map("map",$children) )); } } var_dump(Test::test());
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected 'test' (T_STRING), expecting variable (T_VARIABLE) in /in/FS9dn on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/FS9dn on line 4
Process exited with code 255.

preferences:
194.02 ms | 1395 KiB | 60 Q