3v4l.org

run code in 300+ PHP versions simultaneously
<?php function arrayReplace($a1, $a2) { foreach($a2 as $k=>$v) { $a1[$k]=$v; } return $a1; } function arrayDiffFull() { $numArrays=func_num_args(); $totalA=array(); $returnA=array(); $arg_list = func_get_args(); foreach($arg_list as $i=>$eachArray) { foreach($eachArray as $k=>$value) { $totalA[$k][$i]=strtolower($value); } } foreach($totalA as $k=>$eachKArray) { if ( count($eachKArray)!=$numArrays || count(array_unique($eachKArray))!=1 ) { $returnA[$k]=arrayReplace( array_fill(0,$numArrays,''), $eachKArray ); } } return $returnA; } $a1 = array(0 => 1, 1 => "b", 3 => "carrot"); $a2 = array(1 => "c", 2 => "d", 3 => "apple"); print_r(arrayDiffFull($a1, $a2));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => 1 [1] => ) [1] => Array ( [0] => b [1] => c ) [3] => Array ( [0] => carrot [1] => apple ) [2] => Array ( [0] => [1] => d ) )

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