<?php
class Derp {
public $d;
public function __construct($d) {
$this->d = $d;
}
public function __toString() {
return '1';
}
}
$d = array(new Derp(1), new Derp(2), new Derp(3));
var_dump(array_unique($d));
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/F7Kei on line 5
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/F7Kei on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/F7Kei on line 5
Process exited with code 255.