3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { const MA_CONST = 1; public function get1() { return self::MA_CONST; } public function get2() { return static::MA_CONST; } } class B extends A { const MA_CONST = 2; } $o = new B(); var_dump($o->get1()); var_dump($o->get2()); var_dump(B::MA_CONST);

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Arrow functions
int(1) int(2) int(2)

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