3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public string $youCantSeeMe { get => strtolower($this->bar); } public function __construct(public string $bar) {} } var_dump([ 'get_class_vars' => get_class_vars(Foo::class), 'get_object_vars' => get_object_vars(new Foo('toto')), ]);
Output for git.master, git.master_jit
array(2) { ["get_class_vars"]=> array(1) { ["bar"]=> NULL } ["get_object_vars"]=> array(2) { ["youCantSeeMe"]=> string(4) "toto" ["bar"]=> string(4) "toto" } }

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:
144.83 ms | 1003 KiB | 7 Q