3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class TestClass { private $_private; protected $_protected; public $_public; public function __construct(){ } protected function _test(){ } } echo serialize(new TestClass);
Output for 5.0.0 - 7.1.0
O:9:"TestClass":3:{s:19:"TestClass_private";N;s:13:"*_protected";N;s:7:"_public";N;}
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/TRDtZ on line 3
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/TRDtZ on line 3
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/TRDtZ on line 3
Process exited with code 255.