3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $callArgs = array( 0 => "%s is called %d time instead of %d", 1 => "%s is called %d times instead of %d", 2 => 0, 3 => "54180a72890e8", 4 => 0, 5 => 1 ); $thisArgs = array( 0 => "%s is called %d time instead of %d", 1 => "%s is called %d times instead of %d", 2 => 0, 3 => "54180a72890e8", 4 => 0, 5 => 1 ); $callback = function($a, $b) { return ($a == $b ? 0 : -1); }; var_dump(array_uintersect_uassoc($callArgs, $thisArgs, $callback, $callback));
Output for 5.3.0 - 7.1.0
array(6) { [0]=> string(34) "%s is called %d time instead of %d" [1]=> string(35) "%s is called %d times instead of %d" [2]=> int(0) [3]=> string(13) "54180a72890e8" [4]=> int(0) [5]=> int(1) }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/sn9ev on line 21
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/sn9ev on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/sn9ev on line 21
Process exited with code 255.