3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { const ABSTRACT_CONST = self::ABSTRACT_CONST; } class b extends a { const ABSTRACT_CONST = 'a'; } class c extends a {} echo b::ABSTRACT_CONST, c::ABSTRACT_CONST;
Output for git.master_jit, git.master
a Fatal error: Uncaught Error: Cannot declare self-referencing constant self::ABSTRACT_CONST in /in/N37YP:3 Stack trace: #0 {main} thrown in /in/N37YP on line 3
Process exited with code 255.
Output for rfc.property-hooks
a Fatal error: Uncaught Error: Cannot declare self-referencing constant self::ABSTRACT_CONST in /in/N37YP:3 Stack trace: #0 /in/N37YP(8): [constant expression]() #1 {main} thrown in /in/N37YP on line 3
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:
37.27 ms | 401 KiB | 8 Q