3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Valid_Magic_Methods { public function __set( $name, $value ) {} public function __get( $name ) {} public function __isset( $name ) {} public function __unset( $name ) {} public function __call($name, $arguments) {} public static function __callStatic($name, $args) {} public static function __set_state( $properties ) {} } class Invalid_Magic_Methods { public function __set() {} public function __get() {} public function __isset() {} public function __unset() {} public function __call() {} public static function __callStatic($name) {} public static function __set_state() {} }
Output for 5.0.1 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.27, 7.3.0 - 7.3.14, 7.4.0 - 7.4.2
Fatal error: Method Invalid_Magic_Methods::__set() must take exactly 2 arguments in /in/g55Or on line 17
Process exited with code 255.
Output for 5.0.0
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/g55Or on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/g55Or on line 6
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/g55Or on line 6
Process exited with code 255.

preferences:
200.27 ms | 1013 KiB | 7 Q