3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lesson = array("143" => array("315", "311", "176", "145"), "13" => array("27", "25") ); $user = array( array("143" => array("145" => "1", "176" => "1")), array("13" => array("25" => "1")) ); $result = array(); foreach($user as $key => $value){ foreach($value as $key2 => $value2){ $result[$key2] = array_diff($lesson[$key2], array_keys($value2)); } } echo '<pre>'; print_r($result); echo '</pre>';
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [143] => Array ( [0] => 315 [1] => 311 ) [13] => Array ( [0] => 27 ) ) </pre>

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