3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testing { public string $ok_public; protected string $ok_protected; private string $ok_private; public protected(set) string $wrong_public_protected_set; public private(set) string $wrong_public_private_set; protected private(set) string $wrong_protected_private_set; } $r = new ReflectionClass('Testing'); foreach($r->getProperties() as $rp) { echo $rp->getName() . ": "; echo $rp->getModifiers() . ": "; echo implode(", ", Reflection::getModifierNames($rp->getModifiers())) . "\n"; }
Output for git.master_jit, git.master
ok_public: 1: public ok_protected: 2: protected ok_private: 4: private wrong_public_protected_set: 2049: public, protected(set) wrong_public_private_set: 4129: final, public, private(set) wrong_protected_private_set: 4130: final, protected, private(set)
Output for rfc.property-hooks
Fatal error: Multiple access type modifiers are not allowed in /in/2VF1L on line 9
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:
144.56 ms | 1000 KiB | 7 Q