3v4l.org

run code in 300+ PHP versions simultaneously
<?hh class TestingMethods { public int get() { return (int) 1; } public function get($withParams) { return (int) 2; } public function getSomething(String $something) { return "something $something"; } public function getSomething() { return "something do with with no @params"; } } $t = new TestingMethods(); $one = $t->get(); $two = $t->get($withParams); $something = $t->getSomething("something..."); $something2 = $t->getSomething(); var_dump($one); var_dump($two); var_dump($something); var_dump($something2); ?>
Output for git.master, git.master_jit, rfc.property-hooks
<?hh class TestingMethods { public int get() { return (int) 1; } public function get($withParams) { return (int) 2; } public function getSomething(String $something) { return "something $something"; } public function getSomething() { return "something do with with no @params"; } } $t = new TestingMethods(); $one = $t->get(); $two = $t->get($withParams); $something = $t->getSomething("something..."); $something2 = $t->getSomething(); var_dump($one); var_dump($two); var_dump($something); var_dump($something2); ?>

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:
37.52 ms | 402 KiB | 8 Q