<?php
error_reporting(E_ALL);
class Foo {
public function __set() {
throw new Exception('Immutable');
}
}
$foo = new Foo();
$foo->property = 'trigger';
Fatal error: Method Foo::__set() must take exactly 2 arguments in /in/9FtSf on line 9
Process exited with code 255.
Output for 5.0.0
Fatal error: Uncaught exception 'Exception' with message 'Immutable' in /in/9FtSf:8
Stack trace:
#0 /in/9FtSf(14): Foo->__set()
#1 /in/9FtSf(14): unknown()
#2 {main}
thrown in /in/9FtSf on line 8
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/9FtSf on line 7
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/9FtSf on line 7
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/9FtSf on line 7
Process exited with code 255.