3v4l.org

run code in 500+ PHP versions simultaneously
<?php const A = 1; class C { public const D = 1; private const E = 1; } use const A as B; // global constants var_dump(defined('A')); var_dump(defined('\A')); var_dump(defined('\\A')); // good joke var_dump(defined('B')); // false var_dump(defined(A)); // checking the constant value // class constants var_dump(defined('C::D')); var_dump(defined('C::E')); // including visibility
Output for git.master_jit
bool(true) bool(true) bool(true) bool(false) bool(false) bool(true) bool(false)
Output for git.master

Process exited with code 139.

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:
45.25 ms | 529 KiB | 4 Q