3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'a' => 'b', 'c' => 'd', 'h' => 'e', 'i' => 'm' ], [ 'a' => 'b', 'f' => 'g', 'c' => 'f' ], [ 'a' => 'd', 'c' => 'd' ], [ 'i' => 'm' ] ]; for ($i = 1, $count = count($array); $i < $count; ++$i) { $array[$i] = array_diff_assoc( $array[$i], ...array_slice($array, 0, $i, true) ); } var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'a' => 'b', 'c' => 'd', 'h' => 'e', 'i' => 'm', ), 1 => array ( 'f' => 'g', 'c' => 'f', ), 2 => array ( 'a' => 'd', ), 3 => array ( ), )

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:
58.79 ms | 406 KiB | 5 Q