3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $templates = 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_map( function($template) { print_r($template); }, $templates);
Output for 5.3.0 - 7.1.0
Array ( [product.category_overview] => Family Overview No Parallax [product.category_overview_slideshow] => Family Overview W/ Slideshow ) Array ( [product.category_detail] => Category Overview ) Array ( [product.group] => Group w/ 1 Line Art [product.group_multi] => Group w/ 2 Line Art ) Array ( [product.detail] => Product Detail ) Array ( [content.home] => Basic Content Home [content.about] => Basic Content About ) Array ( [detail] => Product Detail )
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/5kfD9 on line 28
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_FUNCTION, expecting ')' in /in/5kfD9 on line 28
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/5kfD9 on line 28
Process exited with code 255.