3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dog { public function __construct(protected bool $woof){} public function __isset(string $name) { if ($name === 'woof') { return $this->woof; } return FALSE; } public function __get(string $name) { if ($name === 'woof') { return $this->woof; } return FALSE; } } $f = new Dog(TRUE); var_export(empty($f->woof)); echo PHP_EOL; var_export(isset($f->woof));
Output for git.master_jit, git.master
false true

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:
30.92 ms | 405 KiB | 5 Q