3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public string $name { get => $this->name; set => $this->name = ucfirst(trim($value)); } } class Employee extends Person { public function displayName(): string { // getName() was getter before return $this->getName(); } } $employee = new Employee(); $employee->name = 'John'; var_dump($employee->displayName());
Output for git.master, git.master_jit
Fatal error: Uncaught Error: Call to undefined method Employee::getName() in /in/HIHXs:17 Stack trace: #0 /in/HIHXs(25): Employee->displayName() #1 {main} thrown in /in/HIHXs on line 17
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.81 ms | 1011 KiB | 7 Q