3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class xqwwq{ private $qqqq = true; public function __construct() { $this->params = new SplFileObject('/etc/passwd'); } } print serialize(new xqwwq());
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: Serialization of 'SplFileObject' is not allowed in /in/5poaW:13 Stack trace: #0 /in/5poaW(13): serialize(Object(xqwwq)) #1 {main} thrown in /in/5poaW on line 13
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'SplFileObject' is not allowed' in /in/5poaW:13 Stack trace: #0 /in/5poaW(13): serialize(Object(xqwwq)) #1 {main} thrown in /in/5poaW on line 13
Process exited with code 255.
Output for 5.1.0 - 5.2.17
O:5:"xqwwq":2:{s:11:"xqwwqqqqq";b:1;s:6:"params";O:13:"SplFileObject":0:{}}
Output for 5.0.0 - 5.0.5
Fatal error: Class 'SplFileObject' not found in /in/5poaW 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/5poaW on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/5poaW 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/5poaW on line 5
Process exited with code 255.