3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $systemTemplates = array( 'family' => array( 'product.category_overview' => 'Family Overview', 'product.category_overview_slideshow' => 'Family Overview W/ Slideshow', 'product.category_overview' => 'Family Overview No Parallax' ), 'category' => array( 'product.category_detail' => 'Category Overview' ), 'group' => array( 'product.group' => 'Group w/ 1 Line Art', 'product.group_multi' => 'Group w/ 2 Line Art' ), 'product' => array( 'product.detail' => 'Product Detail' ), 'content' => array( 'content.home' => 'Basic Content Home', 'content.about' => 'Basic Content About' ), 'legacy' => array( 'detail' => 'Product Detail' ) ); $templates = array(); foreach($systemTemplates AS $name => $detail) { //$templates[$name] = ucwords($name); array_push($name => ucwords($name, $templates)); } print_r($templates);
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /in/ETqkb on line 33
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.28
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /in/ETqkb on line 33
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_DOUBLE_ARROW in /in/ETqkb on line 33
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ETqkb on line 33
Process exited with code 255.