3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const B = 'A::B is a constant'.PHP_EOL; } class C { const B = 'C::B is a constant'.PHP_EOL; } const C = new A; echo C::B; // C is the class echo (C)::B; // C is the constant // C is a class here var_dump(new C instanceof C); // (C) is the constant, var_dump(new C instanceof (C)); // instanceof works with objects too var_dump(new C instanceof (new C)); // but this is invalid syntax //var_dump(new C instanceof new C); ?>

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.30.0050.00419.71
8.5.20.0090.00719.11
8.5.10.0090.00516.51
8.5.00.0100.01220.06
8.4.180.0070.00619.52
8.4.170.0170.00520.38
8.4.160.0170.00723.91
8.4.150.0040.00416.84
8.4.140.0130.01217.59
8.4.130.0130.00817.95
8.4.120.0120.00722.56
8.4.110.0110.01022.80
8.4.100.0110.00918.63
8.4.90.0160.00518.88
8.4.80.0080.00518.64
8.4.70.0020.00617.95
8.4.60.0160.00618.82
8.4.50.0110.00919.44
8.4.40.0390.01017.76
8.4.30.0370.01117.07
8.4.20.0400.00817.24
8.4.10.0390.00917.46
8.3.300.0080.01220.63
8.3.290.0120.00920.61
8.3.280.0140.01118.14
8.3.270.0120.00716.70
8.3.260.0120.00716.39
8.3.250.0130.00618.84
8.3.240.0100.00717.05
8.3.230.0070.00416.85
8.3.220.0120.00618.82
8.3.210.0100.00816.85
8.3.200.0050.00416.52
8.3.190.0100.00517.33
8.3.180.0030.00518.61
8.3.170.0380.00716.45
8.3.160.0340.01216.49
8.3.150.0400.00716.53
8.3.140.0400.00916.39
8.3.130.0300.00716.33
8.3.120.0370.00516.27
8.3.110.0350.00816.15
8.3.100.0410.00716.21
8.3.90.0350.01016.73
8.3.80.0380.00716.39
8.3.70.0390.00716.59
8.3.60.0380.00816.29
8.3.50.0370.00916.30
8.3.40.0290.00517.39
8.3.30.0290.00817.24
8.3.20.0360.01017.24
8.3.10.0330.00817.33
8.3.00.0200.00717.41
8.2.300.0120.01022.11
8.2.290.0070.00920.48
8.2.280.0110.01018.35
8.2.270.0270.01216.42
8.2.260.0290.00916.44
8.2.250.0280.01016.56
8.2.240.0280.01116.36
8.2.230.0330.00616.21
8.2.220.0320.00716.36
8.2.210.0340.00516.59
8.2.200.0300.00816.54
8.2.190.0120.00616.44
8.2.180.0250.00416.25
8.2.170.0120.00617.71
8.2.160.0310.00817.43
8.2.150.0250.00217.53
8.2.140.0320.00417.34
8.2.130.0310.00717.36
8.2.120.0340.00517.34
8.2.110.0310.01117.35
8.2.100.0390.00817.29
8.2.90.0340.01117.53
8.2.80.0430.00517.31
8.2.70.0340.00617.27
8.2.60.0330.00617.53
8.2.50.0290.00417.51
8.2.40.0220.00317.31
8.2.30.0150.00917.46
8.2.20.0320.00617.51
8.2.10.0520.00417.21
8.2.00.0280.00717.28
8.1.340.0100.01021.45
8.1.320.0100.00916.20

preferences:
53.37 ms | 850 KiB | 5 Q