3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public string $x; } var_dump(property_exists($A,'x'));//true var_dump($A); //class A#1 (1) {} // - it counts the property, but hides it var_dump(new stdClass()); //class stdClass#1 (0) {} - empty object
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $A in /in/vjSWN on line 7 Fatal error: Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /in/vjSWN:7 Stack trace: #0 /in/vjSWN(7): property_exists(NULL, 'x') #1 {main} thrown in /in/vjSWN on line 7
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:
64.04 ms | 401 KiB | 8 Q