3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace NMSPC; class Test2 { public $test1 = 'fooooo'; } class Test1 { public function doSth(\NMSPC\Test2 $test2) { echo $test2; } } (new \NMSPC\Test1())->doSth(new \StdClass());
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: NMSPC\Test1::doSth(): Argument #1 ($test2) must be of type NMSPC\Test2, stdClass given, called in /in/Z0pFY on line 18 and defined in /in/Z0pFY:12 Stack trace: #0 /in/Z0pFY(18): NMSPC\Test1->doSth(Object(stdClass)) #1 {main} thrown in /in/Z0pFY on line 12
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:
66.85 ms | 401 KiB | 8 Q