3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Kitchen { private $yummy = 'cake'; } $kitchen = new Kitchen(); $sweetsThief = new ReflectionProperty($kitchen, 'yummy'); $sweetsThief->setAccessible(true); var_dump($sweetsThief($sweetsThief->getValue($kitchen)));

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
Fatal error: Uncaught Error: Function name must be a string in /in/4thtl:13 Stack trace: #0 {main} thrown in /in/4thtl on line 13
Output for Array change keys
Fatal error: Uncaught Error: Function name must be a string in /in/4thtl:13 Stack trace: #0 {main} thrown in /in/4thtl on line 13
Output for Lexical anon
Fatal error: Function name must be a string in /in/4thtl on line 13

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