3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class A{ const NAME=null; static function f(){ return static::NAME; } } class B extends A{ const NAME='B'; } B::f(); abstract class A{ const NAME=null; static function f(){ return static::NAME; } } class B extends A{ const NAME='B'; } B::f();
Output for git.master_jit, git.master
Fatal error: Cannot redeclare class A (previously declared in /in/6dd8Q:3) in /in/6dd8Q on line 16
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Cannot declare class A, because the name is already in use in /in/6dd8Q on line 16
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:
129.45 ms | 406 KiB | 5 Q