3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class User { public $username; public $password; public $loginsToday; public function __sleep() { // (Clean up; close database handles, etc) return array_keys( get_object_vars( $this ) ); } public function __wakeup() { echo “Yawn... what’s for breakfast?<br />”; } } $user = new User; $userString = serialize( $user ); $obj = unserialize( $userString );
Output for 5.3.0 - 5.4.16
Parse error: syntax error, unexpected '.' in /in/QURdl on line 12
Process exited with code 255.