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; })); var_dump(array_udiff($a1, $a2, function ($a, $b) { var_dump($a->n, $b->n, $a === $b); if ($a === $b) return 0; return $a > $b ? 1 : -1;}))
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
Parse error: syntax error, unexpected end of file in /in/4McPn on line 13
Process exited with code 255.

preferences:
164.31 ms | 1395 KiB | 22 Q