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

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.70.0090.00916.80
8.5.60.0070.01016.74
8.5.50.0100.00816.51
8.5.30.0090.01116.46
8.4.220.0090.01025.49
8.4.210.0120.00919.28
8.4.90.0100.00617.81
8.3.310.0110.00818.45
8.3.180.0040.00316.82
8.3.50.0130.00616.62
8.2.310.0100.00917.93

preferences:
56.6 ms | 529 KiB | 5 Q