3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $id; /** * @var array */ private $other; public function __construct($id,$other) { $this->id = $id; $this->other = $other; } } $a = new A(1, array( 'truc', 'bidule' => array( 'something' ) )); $b = new A(1, array( 'truc', 'bidule' => array( 'something' ) )); $c = new A(1, array( 'truc', 'bidule' => array( 'something else' ) )); var_dump($a === $b); var_dump($a == $b); var_dump($a === $c); var_dump($a == $c;
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.21, 5.5.0 - 5.5.5
Parse error: syntax error, unexpected ';' in /in/XvDPL on line 46
Process exited with code 255.

preferences:
181.03 ms | 1395 KiB | 63 Q