3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public $name = 'Jackie'; public $job = 'PHP Developer'; } // Create instance $person = new Person(); $property = ['first' => 'name', 'second' => 'job']; echo "\nMy name is " . $person->{$property['first']} . "\n"; echo "\nMy job is " . $person->$property['second'] . "\n";
Output for git.master, git.master_jit
My name is Jackie Warning: Array to string conversion in /in/roEpt on line 12 Warning: Undefined property: Person::$Array in /in/roEpt on line 12 Warning: Trying to access array offset on value of type null in /in/roEpt on line 12 My job is
Output for rfc.property-hooks
My name is Jackie Warning: Array to string conversion in /in/roEpt on line 12 Warning: Undefined property: Person::$Array in /in/roEpt on line 12 Warning: Trying to access array offset on null in /in/roEpt on line 12 My job is

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:
59.95 ms | 401 KiB | 8 Q