3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $i = 0; public function __toString() { $this->i++; return "$this->i"; } } $a = new A; $b = ['100', $a]; var_dump(array_intersect($b, $b));

preferences:
44.81 ms | 402 KiB | 5 Q