3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array( Array ( 0 => 3, 1 => 1 ), Array ( 0 => 3, 1 => 2 ), Array ( 0 => 3, 1 => 128 ), Array ( 0 => 39, 1 => 4 )); $col0 = array_unique(array_column($arr, 0)); Foreach($col0 as $val){ // $res[] = [$val, Var_dump(array_sum(array_intersect_key($arr, array_intersect($col0, [$val])))); } Var_dump($res);
Output for git.master_jit, git.master
int(0) int(0) Warning: Undefined variable $res in /in/OAJfJ on line 31 NULL
Output for rfc.property-hooks
Warning: array_sum(): Addition is not supported on type array in /in/OAJfJ on line 29 int(0) Warning: array_sum(): Addition is not supported on type array in /in/OAJfJ on line 29 int(0) Warning: Undefined variable $res in /in/OAJfJ on line 31 NULL

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:
72.45 ms | 401 KiB | 8 Q