3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function Bar($n1 = 09, $n2 = 9){ return 0; } } $r = new ReflectionObject(new Foo()); $m = $r->getMethod("Bar"); $p1 = $m->getParameters()[0]; $p2 = $m->getParameters()[1]; echo "p1=".$p1->getDefaultValue(); //not ok. expected = 9, returning 0. echo "<br>"; echo "p2=".$p2->getDefaultValue(); //ok = 9 ?>
Output for git.master, git.master_jit
Parse error: Invalid numeric literal in /in/vqqMY on line 4
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:
47.2 ms | 675 KiB | 3 Q