3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Red { public static function b_func() { static::a_func(); } public static function a_func() { echo "Colour is ",__CLASS__."\n"; } } class Blue extends Red { public static function run() { Red::b_func(); parent ::b_func(); self::b_func(); } public static function a_func() { echo "Colour is ",__CLASS___."\n"; } } class Green extends Blue { public static function a_func() { echo "Colour is ",___CLASS___."\n"; } } Green::run(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Colour is Red Colour is Fatal error: Uncaught Error: Undefined constant "___CLASS___" in /in/oSuKa:22 Stack trace: #0 /in/oSuKa(4): Green::a_func() #1 /in/oSuKa(13): Red::b_func() #2 /in/oSuKa(25): Blue::run() #3 {main} thrown in /in/oSuKa on line 22
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:
58.66 ms | 401 KiB | 8 Q