3v4l.org

run code in 300+ PHP versions simultaneously
<?php $collection = [ [1 => 10.0, 2 => 20.0, 3 => 50.0, 4 => 80.0, 5 => 100.0], [3 => 20.0, 5 => 20.0, 6 => 100.0, 7 => 10.0], [1 => 30.0, 3 => 30.0, 5 => 10.0, 8 => 10.0] ]; var_export( array_reduce( array_keys( array_intersect_ukey( ...array_merge( $collection, [fn($a, $b) => $a <=> $b] ) ) ), fn($result, $k) => $result + [$k => array_sum(array_column($collection, $k)) / count($collection)], [] ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 3 => 33.333333333333336, 5 => 43.333333333333336, )

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