3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { } class D { protected function test1() { echo "called\n"; return 'BLAH'; } public function test($class_name) { return new $class_name($this->test1()); } } $D = new D; var_dump($D->test('A')); var_dump($D->test('C'));
Output for git.master, git.master_jit, rfc.property-hooks
called object(A)#2 (0) { } Fatal error: Uncaught Error: Class "C" not found in /in/PWWN1:17 Stack trace: #0 /in/PWWN1(23): D->test('C') #1 {main} thrown in /in/PWWN1 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:
44.22 ms | 401 KiB | 8 Q