3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = [ ['id'=>182, 'data'=>'foo'], ['id'=>300, 'data'=>'bar'], ['id'=>8, 'data'=>'baz'], ['id'=>52, 'data'=>'bee'] ]; $two = [52, 300]; $result = array_uintersect($one, $two, function($x, $y) { $x = !is_array($x)?:$x['id']; $y = !is_array($y)?:$y['id']; var_dump($x, $y); return $x-$y; }); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
int(182) int(300) int(300) int(8) int(182) int(8) int(300) int(52) int(182) int(52) int(8) int(52) bool(true) bool(true) int(8) bool(true) int(8) bool(true) array(0) { }

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:
46.01 ms | 405 KiB | 9 Q