3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Programmer { public $name; public function __construct($name) { $this->name = $name; } } class Program { public $name; public function __construct($name) { $this->name = $name; } } function employ(Programmer $programmer, Company $company) { echo "Employing " . $programmer->name . " in " . $company->name; } $me = new Programmer("John"); $medicare = new Program("Medicare"); $enroll = employ($me, $medicare);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: employ(): Argument #2 ($company) must be of type Company, Program given, called in /in/sQuWM on line 24 and defined in /in/sQuWM:18 Stack trace: #0 /in/sQuWM(24): employ(Object(Programmer), Object(Program)) #1 {main} thrown in /in/sQuWM on line 18
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:
36.29 ms | 401 KiB | 8 Q