<?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); }
You have javascript disabled. You will not be able to edit any code.