3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Profile { public $n; }; $p1 = new Profile(); $p1->n = "Profile #1"; $p2 = new Profile(); $p2->n = "Profile #2"; $p3 = new Profile(); $p3->n = "Profile #3"; $a1 = array($p1, $p2); $a2 = array($p2, $p3); var_dump(array_udiff($a1, $a2, function ($a, $b) { var_dump($a->n, $b->n, $a === $b); return $a === $b ? 0 : 1; }));
Output for git.master, git.master_jit, rfc.property-hooks
string(10) "Profile #1" string(10) "Profile #2" bool(false) string(10) "Profile #2" string(10) "Profile #3" bool(false) string(10) "Profile #2" string(10) "Profile #3" bool(false) string(10) "Profile #2" string(10) "Profile #2" bool(true) string(10) "Profile #2" string(10) "Profile #1" bool(false) array(1) { [0]=> object(Profile)#1 (1) { ["n"]=> string(10) "Profile #1" } }

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:
55.81 ms | 402 KiB | 8 Q