3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('LOG_FILE_PATH', '/var/log/sekurak/'); class Logger { private $logfile; public function __construct() { $this->logfile = LOG_FILE_PATH . "logger.log.tmp"; touch($this->logfile); } public function __destruct() { echo "Usuwamy ".($this->logfile)."...\n"; unlink($this->logfile); } } $logger = new Logger(); var_export(serialize($logger));
Output for 5.2.6 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Warning: touch(): Unable to create file /var/log/sekurak/logger.log.tmp because No such file or directory in /in/gfboF on line 10 'O:6:"Logger":1:{s:15:"' . "\0" . 'Logger' . "\0" . 'logfile";s:31:"/var/log/sekurak/logger.log.tmp";}'Usuwamy /var/log/sekurak/logger.log.tmp... Warning: unlink(/var/log/sekurak/logger.log.tmp): No such file or directory in /in/gfboF on line 15
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.0 - 5.2.5
Warning: touch(): Unable to create file /var/log/sekurak/logger.log.tmp because No such file or directory in /in/gfboF on line 10 'O:6:"Logger":1:{s:15:"\000Logger\000logfile";s:31:"/var/log/sekurak/logger.log.tmp";}'Usuwamy /var/log/sekurak/logger.log.tmp... Warning: unlink(/var/log/sekurak/logger.log.tmp): No such file or directory in /in/gfboF on line 15
Output for 5.0.0 - 5.1.6
Warning: touch(): Unable to create file /var/log/sekurak/logger.log.tmp because No such file or directory in /in/gfboF on line 10 'O:6:"Logger":1:{s:15:"Loggerlogfile";s:31:"/var/log/sekurak/logger.log.tmp";}'Usuwamy /var/log/sekurak/logger.log.tmp... Warning: unlink(/var/log/sekurak/logger.log.tmp): No such file or directory in /in/gfboF on line 15
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/gfboF 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/gfboF 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/gfboF on line 5
Process exited with code 255.