3v4l.org

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

preferences:
43.66 ms | 402 KiB | 5 Q