3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $a; public $b; public function __construct($a, $b) { $this->a = $a; $this->b = $b; } } $aObj = new Test(18, 'str'); $a = array('a', $aObj); $bObj = new Test(42, 'str'); $bObj->a = 18; $b = array('a', $bObj); var_dump($a == $b);

preferences:
37.19 ms | 402 KiB | 5 Q