3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Tester { private $code = 0; static private $instance; private function __construct() { } static public function getInstance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; } private $errors = array(); public function addError($txt, $code = 1) { $this->errors[] = ['txt' => $txt, 'code' => $code, 'tm' => date('Y-m-d H:i:s')]; if ($this->code === 0) { $this->code = $code; } } public function countErrors() { return count($this->errors); } public function valid() { return empty($this->errors) ? '0' : ($this->code != 0 ? $this->code : '999'); } public function showErrors() { return print_r($this->errors,1); } public function __toString() { return $this->showErrors(); } } $tester = Tester::getInstance(); $s = serialize($tester); $d = deserialize($s); var_dump($d);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function deserialize() in /in/T32Nn:58 Stack trace: #0 {main} thrown in /in/T32Nn on line 58
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
47.73 ms | 401 KiB | 8 Q