3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 1 => [ 'A' => ['AA' => 3, 'AB' => 5], 'B' => ['BA' => 2] ], 2 => [ 'C' => ['CA' => 4], 'D' => ['DA' => 1, 'DB' => 2] ], 3 => [ 'E' => ['EA' => 1, 'EB' => 2, 'EC' => 3], 'F' => ['FA' => 0, 'FB' => 7, 'FC' => 7] ] ]; var_export( array_map( fn($set) => array_sum(array_merge(...array_values($set))), $array ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 1 => 10, 2 => 7, 3 => 20, )

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:
32.79 ms | 405 KiB | 5 Q