3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface czlowiek { function a(); function b(); }; class dupa implements czlowiek{ public function a() {} public function b(){} public $a; public static $NICE = 'STATIC_VALUE'; public function __construct($param) { $this->a = $param; echo '+_construct'.$this->a.self::$NICE; } public static function statek(){ echo "\nWywolano metode statyczna"; } public function __call($a, $b) { echo "\n".'Wywolano metodÄ™ \''.$a.'\' z parametrami:'."\n"; foreach($b as $i=>$val) { echo 'indeks: '.$i.' wartosc: '.$val."\n"; } } public function setA($a) { $this->a = $a; } }; $a = new dupa('blabla'); echo $a->a; $b = new dupa(''); echo $b->a; $b->setA('bb'); $b->setb('bb',8,true); echo dupa::$NICE; dupa::statek(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
+_constructblablaSTATIC_VALUEblabla+_constructSTATIC_VALUE Wywolano metodÄ™ 'setb' z parametrami: indeks: 0 wartosc: bb indeks: 1 wartosc: 8 indeks: 2 wartosc: 1 STATIC_VALUE Wywolano metode statyczna

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:
41.87 ms | 401 KiB | 8 Q