3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { class Baz{ function foo(){ print_r(debug_backtrace()); } } function assertTrue(){} class PHPUnitThing{ function testSomething(){ $baz = new Baz(); assertTrue($baz->foo()); // dirty backtrace } } (new PHPUnitThing)->testSomething(); // dirty backtrace $baz = new Baz; assertTrue($baz->foo()); // clean backtrace }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [file] => /in/BIut2 [line] => 15 [function] => foo [class] => Baz [object] => Baz Object ( ) [type] => -> [args] => Array ( ) ) [1] => Array ( [file] => /in/BIut2 [line] => 19 [function] => testSomething [class] => PHPUnitThing [object] => PHPUnitThing Object ( ) [type] => -> [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/BIut2 [line] => 22 [function] => foo [class] => Baz [object] => Baz Object ( ) [type] => -> [args] => Array ( ) ) )

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:
130.24 ms | 408 KiB | 5 Q