3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new stdclass(); $a->somenumber = 1; $a->name = 'edson'; $b = new stdclass(); $b->somenumber = 1; $b->name = 'chuck'; $c = new stdclass(); $c->somenumber = 1; $c->name = 'edson'; $z = [$a, $b, $c]; print_r (array_unique ($z));
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Object of class stdClass could not be converted to string in /in/rC9Ys on line 17
Process exited with code 255.
Output for 5.4.2 - 7.0.20
Catchable fatal error: Object of class stdClass could not be converted to string in /in/rC9Ys on line 17
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/rC9Ys on line 15
Process exited with code 255.