3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function test($tableau) { var_dump($tableau); return true; } } class B extends A{ public function test($tableau) { $limit = 5; $res = true; $size = count($tableau); if( $size > $limit ) { for ($i=0; $i < round($size/$limit) ; $i++) { echo ($i*$limit); $res &= parent::test(array_splice($tableau,($i*$limit),$limit)); } } return $res; } } $ar = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o'); echo count($ar)."\n----------\n"; $b = new B(); B->test($ar);
Output for git.master, git.master_jit, rfc.property-hooks
15 ---------- Fatal error: Uncaught Error: Undefined constant "B" in /in/1MrhS:30 Stack trace: #0 {main} thrown in /in/1MrhS on line 30
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.95 ms | 401 KiB | 8 Q