3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); $r = new class() { public int $int; public float $float; public bool $bool; public array $array; public string $string; public stdClass $std; public function __construct(){ var_dump($this->string); echo $this->string += 10; var_dump($this->string); } }; var_dump($r); $foo = null; $foo .= "baz"; var_dump($foo);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Typed property class@anonymous::$string must not be accessed before initialization in /in/pFd1t:12 Stack trace: #0 /in/pFd1t(3): class@anonymous->__construct() #1 {main} thrown in /in/pFd1t on line 12
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:
69.98 ms | 406 KiB | 5 Q