3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t1 = array ( "basicInfo" => array ( "The Sineps", "December 25, 2010", "lemonpole" ), "overallRecord" => array ( 0, 0, 0, 0 ), "overallSeasons" => array ( "season1.cs" => array (0, 0, 0), "season2.cs" => array (0, 0, 0) ), "matches" => array ( "season1.cs" => array ( "week1" => array ("12", "3", "1"), "week2" => array ("8", "8" ,"0"), "week3" => array ("8", "8" ,"0") ), "season2.cs" => array ( "week1" => array ("9", "2", "5"), "week2" => array ("12", "2" ,"2") ) ) ); foreach ($t1['matches'] as $season => $weeks) { $t1['overallSeasons'][$season] = array_map( fn(...$col) => array_sum($col), ...array_values($t1['matches'][$season]) ); } var_export($t1);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'basicInfo' => array ( 0 => 'The Sineps', 1 => 'December 25, 2010', 2 => 'lemonpole', ), 'overallRecord' => array ( 0 => 0, 1 => 0, 2 => 0, 3 => 0, ), 'overallSeasons' => array ( 'season1.cs' => array ( 0 => 28, 1 => 19, 2 => 1, ), 'season2.cs' => array ( 0 => 21, 1 => 4, 2 => 7, ), ), 'matches' => array ( 'season1.cs' => array ( 'week1' => array ( 0 => '12', 1 => '3', 2 => '1', ), 'week2' => array ( 0 => '8', 1 => '8', 2 => '0', ), 'week3' => array ( 0 => '8', 1 => '8', 2 => '0', ), ), 'season2.cs' => array ( 'week1' => array ( 0 => '9', 1 => '2', 2 => '5', ), 'week2' => array ( 0 => '12', 1 => '2', 2 => '2', ), ), ), )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
55.66 ms | 408 KiB | 5 Q