3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dad { protected $name; protected $surname; public function __consruct(string $name, string $surname) { $this->name = $name; $this->surname = $surname; } public function run() { echo 'I run fast'; } protected function drive() { echo 'I drive a car'; } } class Son extends Dad { protected function goToSchool() { echo 'I go to school'; } public function whatIsMyName() { echo $this->name; } } $son = new Son('Nick', 'Long'); $son->whatIsMyName(); $son->drive();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to protected method Dad::drive() from global scope in /in/qEX7T:40 Stack trace: #0 {main} thrown in /in/qEX7T on line 40
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:
44.65 ms | 401 KiB | 8 Q