3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FOO { const BAR = 'hi'; } $cls = 'FOO'; $const = 'BAR'; var_dump(defined($cls.'::'.$const)); var_dump(constant($cls.'::'.$const));

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.3.60.0100.01018.30
8.3.50.0100.01017.90
8.3.40.0170.00318.77
8.3.30.0090.00618.69
8.3.20.0040.00420.25
8.3.10.0080.00020.65
8.3.00.0000.00820.83
8.2.180.0040.01118.43
8.2.170.0110.00322.96
8.2.160.0110.00419.46
8.2.150.0060.00325.66
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00419.84
8.2.110.0070.00322.30
8.2.100.0030.00917.78
8.2.90.0000.00918.03
8.2.80.0000.00818.03
8.2.70.0050.00317.63
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0000.00820.01
8.2.30.0040.00417.93
8.2.20.0050.00218.06
8.2.10.0000.00717.95
8.2.00.0030.00517.97
8.1.280.0070.01025.92
8.1.270.0040.00422.19
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0070.00322.52
8.1.230.0060.00620.89
8.1.220.0000.00817.78
8.1.210.0080.00018.97
8.1.200.0000.01117.35
8.1.190.0050.00317.23
8.1.180.0000.00818.61
8.1.170.0080.00018.84
8.1.160.0070.00018.87
8.1.150.0000.00718.89
8.1.140.0050.00219.45
8.1.130.0000.00720.63
8.1.120.0040.00417.46
8.1.110.0060.00317.41
8.1.100.0070.00317.48
8.1.90.0040.00417.45
8.1.80.0000.00717.40
8.1.70.0040.00417.43
8.1.60.0000.00817.59
8.1.50.0040.00417.54
8.1.40.0000.00717.40
8.1.30.0000.00817.54
8.1.20.0040.00417.56
8.1.10.0000.00717.51
8.1.00.0080.00017.51
8.0.300.0050.00220.03
8.0.290.0000.00716.63
8.0.280.0000.00718.36
8.0.270.0030.00317.25
8.0.260.0030.00318.88
8.0.250.0040.00416.85
8.0.240.0030.00516.99
8.0.230.0000.00816.94
8.0.220.0000.00716.79
8.0.210.0060.00016.91
8.0.200.0000.00716.95
8.0.190.0030.00616.88
8.0.180.0070.00316.75
8.0.170.0000.00716.88
8.0.160.0070.00016.89
8.0.150.0000.00716.82
8.0.140.0000.00816.87
8.0.130.0060.00313.29
8.0.120.0040.00416.88
8.0.110.0040.00416.88
8.0.100.0050.00216.84
8.0.90.0000.00716.89
8.0.80.0110.00416.94
8.0.70.0040.00416.75
8.0.60.0000.00816.91
8.0.50.0040.00416.95
8.0.30.0070.01016.87
8.0.20.0110.00917.40
8.0.10.0070.00016.98
8.0.00.0070.01016.66
7.4.330.0040.00015.55
7.4.320.0060.00016.65
7.4.300.0030.00316.64
7.4.290.0040.00416.58
7.4.280.0040.00416.51
7.4.270.0080.00016.53
7.4.260.0030.00316.52
7.4.250.0000.00716.39
7.4.240.0040.00416.41
7.4.230.0000.00716.56
7.4.220.0120.00916.51
7.4.210.0080.00816.39
7.4.200.0000.00716.36
7.4.160.0110.00816.38
7.4.150.0070.01017.40
7.4.140.0130.00717.86
7.4.130.0040.01616.43
7.4.120.0090.01116.44
7.4.110.0130.00916.43
7.4.100.0060.01616.57
7.4.90.0100.01016.33
7.4.80.0140.00819.39
7.4.70.0100.01316.50
7.4.60.0030.01316.52
7.4.50.0030.01416.41
7.4.40.0120.00416.46
7.4.30.0150.00316.33
7.4.00.0030.01214.79
7.3.330.0000.00613.23
7.3.320.0060.00013.23
7.3.310.0080.00016.09
7.3.300.0040.00416.18
7.3.290.0030.01016.29
7.3.280.0090.00716.22
7.3.270.0100.00717.40
7.3.260.0140.00716.36
7.3.250.0120.01016.31
7.3.240.0120.00816.29
7.3.230.0060.01016.34
7.3.210.0060.01216.25
7.3.200.0080.00816.37
7.3.190.0070.01016.26
7.3.180.0100.00616.31
7.3.170.0060.00916.23
7.3.160.0090.00616.32
7.2.330.0080.00816.50
7.2.320.0160.00616.31
7.2.310.0060.01016.22
7.2.300.0180.00316.41
7.2.290.0040.01016.27
7.2.60.0090.00616.64
7.1.200.0140.00015.86
7.1.80.0080.01118.02
7.1.70.0090.00817.04
7.1.60.0230.01135.00
7.1.50.0190.01634.61
7.1.40.0240.01334.35
7.1.30.0190.01834.36
7.1.20.0240.01234.45
7.1.10.0050.01316.43
7.1.00.0040.01116.66
7.0.200.0070.01016.56
7.0.190.0050.01216.63
7.0.180.0060.01316.16
7.0.170.0090.00816.09
7.0.160.0080.00916.15
7.0.150.0070.01116.25
7.0.140.0040.01116.20
7.0.130.0040.01316.37
7.0.120.0080.00916.40
7.0.110.0060.01016.22
7.0.100.0040.01316.32
7.0.90.0030.01316.34
7.0.80.0050.01316.30
7.0.70.0070.00816.38
7.0.60.0110.00516.05
7.0.50.0070.00916.16
7.0.40.0050.01216.52
7.0.30.0060.01116.54
7.0.20.0070.01016.43
7.0.10.0070.01016.40
7.0.00.0050.01216.31

preferences:
65.04 ms | 400 KiB | 5 Q