3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { public $untypedPublic; protected $untypedProtected; private $untypedPrivate; public mixed $typedPublic; protected mixed $typedProtected; private mixed $typedPrivate; public string $hookedGetVirtual { get { return "virtual"; } } public int $hookedGetBacked { get { return $this->untypedPublic + 25; } } } $o = new T; foreach ($o as $prop) { var_dump($prop); } foreach (get_object_vars($o) as $prop) { var_dump($prop); }
Output for git.master
NULL string(7) "virtual" int(25) NULL string(7) "virtual" int(25)

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:
136.69 ms | 965 KiB | 7 Q