3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.5.5
Parse error: syntax error, unexpected ';' in /in/XvDPL on line 46
Process exited with code 255.