3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP MyClass::myFunction(MyClass::MYCONST); // THIS GIVES THE ERROR // This is the class.. class MyClass { const MYCONST = 'BLA'; public static function myFunction($key) { if (!defined(this::$key)) { throw new Exception("$key is not defined as a constant"); } } }

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.0140.00718.43
8.3.50.0110.01121.11
8.3.40.0120.00918.68
8.3.30.0110.00419.13
8.3.20.0030.01220.19
8.3.10.0150.00423.70
8.3.00.0080.00019.25
8.2.180.0130.01016.50
8.2.170.0030.01322.96
8.2.160.0070.01420.58
8.2.150.0110.00724.18
8.2.140.0090.00924.66
8.2.130.0070.00326.16
8.2.120.0120.00018.80
8.2.110.0050.00322.29
8.2.100.0060.00617.75
8.2.90.0040.00419.05
8.2.80.0060.00317.97
8.2.70.0000.00817.75
8.2.60.0040.00417.93
8.2.50.0070.00318.07
8.2.40.0080.00020.00
8.2.30.0000.00918.17
8.2.20.0030.00517.78
8.2.10.0000.00817.98
8.2.00.0040.00417.85
8.1.280.0110.00725.92
8.1.270.0100.01022.05
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.83
8.1.230.0120.00019.01
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0060.00317.25
8.1.190.0000.00817.36
8.1.180.0030.00918.10
8.1.170.0090.00018.53
8.1.160.0030.00521.93
8.1.150.0040.00418.87
8.1.140.0030.00517.33
8.1.130.0050.00317.67
8.1.120.0050.00217.44
8.1.110.0000.00717.39
8.1.100.0030.00317.39
8.1.90.0050.00217.34
8.1.80.0000.00817.28
8.1.70.0000.00717.20
8.1.60.0040.00417.53
8.1.50.0000.00717.48
8.1.40.0040.00417.30
8.1.30.0040.00417.60
8.1.20.0000.00817.45
8.1.10.0040.00417.44
8.1.00.0060.00317.49
8.0.300.0050.00218.77
8.0.290.0000.00716.88
8.0.280.0000.00718.32
8.0.270.0030.00317.20
8.0.260.0060.00017.16
8.0.250.0030.00317.03
8.0.240.0000.00716.94
8.0.230.0030.00316.90
8.0.220.0000.00816.97
8.0.210.0040.00416.91
8.0.200.0030.00317.02
8.0.190.0070.00317.08
8.0.180.0040.00416.97
8.0.170.0020.00516.89
8.0.160.0040.00416.87
8.0.150.0040.00416.88
8.0.140.0000.00716.94
8.0.130.0030.00313.41
8.0.120.0000.00816.93
8.0.110.0000.00716.87
8.0.100.0000.00716.75
8.0.90.0050.00316.91
8.0.80.0000.01516.87
8.0.70.0050.00316.81
8.0.60.0070.00016.93
8.0.50.0040.00416.86
8.0.30.0110.00817.03
8.0.20.0060.01317.40
8.0.10.0060.00316.98
8.0.00.0100.00816.96
7.4.330.0050.00015.08
7.4.320.0000.00616.40
7.4.300.0070.00016.39
7.4.290.0000.00716.36
7.4.280.0030.00316.44
7.4.270.0060.00016.30
7.4.260.0060.00316.52
7.4.250.0000.00816.44
7.4.240.0040.00316.30
7.4.230.0000.00716.52
7.4.220.0140.00716.42
7.4.210.0060.01316.40
7.4.200.0040.00416.65
7.4.160.0030.01316.69
7.4.150.0070.01017.40
7.4.140.0150.00617.86
7.4.130.0110.00616.54
7.4.120.0080.00816.42
7.4.110.0120.00616.55
7.4.100.0030.01716.64
7.4.90.0070.01016.60
7.4.80.0060.01319.39
7.4.70.0060.01416.30
7.4.60.0100.01016.57
7.4.50.0060.00316.56
7.4.40.0070.01016.24
7.4.30.0080.00816.55
7.4.00.0090.00814.93
7.3.330.0050.00013.28
7.3.320.0000.00513.36
7.3.310.0050.00216.39
7.3.300.0000.00716.22
7.3.290.0050.01216.33
7.3.280.0110.00816.35
7.3.270.0100.00717.40
7.3.260.0100.00716.52
7.3.250.0090.00916.43
7.3.240.0090.01516.32
7.3.230.0070.01016.39
7.3.210.0130.00316.23
7.3.200.0090.00919.39
7.3.190.0130.00316.41
7.3.180.0120.00316.48
7.3.170.0080.01116.49
7.3.160.0100.00616.43
7.3.120.0090.00914.64
7.3.110.0060.01314.73
7.3.100.0100.00714.82
7.3.90.0150.00414.76
7.3.80.0090.00614.91
7.3.70.0000.01414.96
7.3.60.0030.00714.78
7.3.50.0120.00315.00
7.3.40.0030.00914.80
7.3.30.0000.00914.78
7.3.20.0000.01416.74
7.3.10.0060.00816.48
7.3.00.0060.01016.44
7.2.330.0110.00616.72
7.2.320.0140.00316.68
7.2.310.0120.00616.52
7.2.300.0090.00916.39
7.2.290.0030.01616.43
7.2.250.0040.01515.02
7.2.240.0100.01015.10
7.2.230.0070.01314.81
7.2.220.0090.00914.94
7.2.210.0060.01214.97
7.2.200.0090.00614.75
7.2.190.0060.01015.05
7.2.180.0070.01014.76
7.2.170.0000.01414.73
7.2.130.0130.00316.41
7.2.120.0100.01016.43
7.2.110.0080.00816.90
7.2.100.0120.00616.42
7.2.90.0130.01016.78
7.2.80.0160.00716.46
7.2.70.0110.00416.83
7.2.60.0070.00616.71
7.2.50.0110.00816.57
7.2.40.0070.00716.69
7.2.30.0190.00816.68
7.2.20.0160.01216.80
7.2.10.0210.00016.74
7.2.00.0080.00817.91
7.1.330.0060.01115.52
7.1.320.0150.00015.78
7.1.310.0040.01215.71
7.1.300.0000.01215.79
7.1.290.0030.00615.67
7.1.280.0120.00315.45
7.1.270.0030.01015.33
7.1.260.0040.00815.79
7.1.250.0170.00615.30
7.1.200.0080.00415.70
7.1.100.0040.00817.85
7.1.70.0110.01116.84
7.1.60.0060.01819.11
7.1.50.0210.00316.34
7.1.00.0030.07722.43
7.0.200.0000.01016.80
7.0.140.0030.07722.15
7.0.60.0130.08019.96
7.0.50.0070.03717.87
7.0.40.0030.08720.26
7.0.30.0200.05020.20
7.0.20.0330.08320.06
7.0.10.0100.08020.07
7.0.00.0130.06720.24
5.6.280.0100.06721.08
5.6.210.0100.07720.52
5.6.200.0030.05718.25
5.6.190.0000.08720.61
5.6.180.0370.06720.63
5.6.170.1370.04720.47
5.6.160.0200.06320.48
5.6.150.0000.04018.33
5.6.140.0070.07018.27
5.6.130.0030.04318.14
5.6.120.0070.08320.74
5.6.110.0100.03721.00
5.6.100.0170.06321.04
5.6.90.0030.05021.04
5.6.80.0170.07020.39
5.5.350.0230.07020.43
5.5.340.0070.07718.02
5.5.330.0070.03720.35
5.5.320.0370.06320.30
5.5.310.0270.06320.27
5.5.300.0100.03717.98
5.5.290.0200.06318.04
5.5.280.0030.04020.77
5.5.270.0100.07320.78
5.5.260.0170.05720.96
5.5.250.0100.07020.79
5.5.240.0130.07020.16
5.4.450.0700.05719.39
5.4.440.0730.05719.42
5.4.430.0200.04319.45
5.4.420.0630.00019.55
5.4.410.0630.00019.52
5.4.400.0630.00019.27
5.4.390.0630.00019.11
5.4.380.0870.00018.98
5.4.370.0700.00018.98
5.4.360.0600.00019.12
5.4.350.0770.00019.16
5.4.340.0050.03912.02
5.4.320.0090.03912.50
5.4.310.0040.03912.50
5.4.300.0070.04212.50
5.4.290.0080.04412.50
5.4.280.0060.03612.39
5.4.270.0100.04212.39
5.4.260.0060.03712.39
5.4.250.0060.03712.39
5.4.240.0070.03512.39
5.4.230.0040.03812.39
5.4.220.0070.03412.38
5.4.210.0070.03812.39
5.4.200.0100.03612.39
5.4.190.0070.04512.38
5.4.180.0060.03512.39
5.4.170.0050.04012.39
5.4.160.0100.03912.39
5.4.150.0080.03912.39
5.4.140.0100.03812.07
5.4.130.0080.03512.05
5.4.120.0060.03812.02
5.4.110.0060.03412.01
5.4.100.0060.04112.01
5.4.90.0070.04112.01
5.4.80.0050.04112.01
5.4.70.0070.03712.01
5.4.60.0050.03512.01
5.4.50.0050.03512.01
5.4.40.0090.03412.00
5.4.30.0050.03512.00
5.4.20.0080.04011.99
5.4.10.0050.03812.00
5.4.00.0060.04311.49
5.3.290.0050.03912.80
5.3.280.0050.03712.71
5.3.270.0050.03912.72
5.3.260.0060.04012.71
5.3.250.0050.03712.72
5.3.240.0060.03712.72
5.3.230.0080.04412.71
5.3.220.0050.04212.68
5.3.210.0080.03612.68
5.3.200.0060.04212.68
5.3.190.0050.04312.68
5.3.180.0070.04012.67
5.3.170.0120.03012.67
5.3.160.0100.03212.68
5.3.150.0080.03412.67
5.3.140.0060.03912.66
5.3.130.0100.03812.66
5.3.120.0080.04312.66
5.3.110.0100.04112.66
5.3.100.0070.03712.12
5.3.90.0050.03612.10
5.3.80.0030.04312.09
5.3.70.0040.03612.09
5.3.60.0030.03812.08
5.3.50.0050.03712.02
5.3.40.0070.03712.02
5.3.30.0070.03611.98
5.3.20.0080.03411.76
5.3.10.0110.03811.73
5.3.00.0080.04111.72
5.2.170.0050.0309.22
5.2.160.0050.0379.23
5.2.150.0090.0329.22
5.2.140.0070.0369.22
5.2.130.0100.0259.18
5.2.120.0070.0289.18
5.2.110.0100.0259.19
5.2.100.0050.0309.18
5.2.90.0050.0349.18
5.2.80.0060.0429.17
5.2.70.0090.0389.17
5.2.60.0060.0339.13
5.2.50.0060.0389.10
5.2.40.0050.0309.07
5.2.30.0100.0259.05
5.2.20.0050.0289.04
5.2.10.0020.0308.95
5.2.00.0050.0368.81
5.1.60.0040.0248.09
5.1.50.0050.0248.09
5.1.40.0060.0238.07
5.1.30.0040.0268.42
5.1.20.0060.0268.44
5.1.10.0040.0288.16
5.1.00.0060.0238.17
5.0.50.0050.0196.64
5.0.40.0040.0206.50
5.0.30.0030.0316.31
5.0.20.0020.0236.28
5.0.10.0030.0246.26
5.0.00.0050.0346.25
4.4.90.0030.0174.78
4.4.80.0040.0154.75
4.4.70.0050.0174.75
4.4.60.0040.0184.76
4.4.50.0050.0134.77
4.4.40.0020.0294.71
4.4.30.0030.0154.76
4.4.20.0030.0184.84
4.4.10.0050.0164.85
4.4.00.0050.0244.75
4.3.110.0070.0154.67
4.3.100.0050.0184.66
4.3.90.0030.0174.63
4.3.80.0060.0224.58
4.3.70.0000.0194.63
4.3.60.0050.0174.63
4.3.50.0030.0174.63
4.3.40.0020.0244.54
4.3.30.0040.0163.28
4.3.20.0020.0163.27
4.3.10.0030.0143.22
4.3.00.0170.0237.43

preferences:
54.02 ms | 401 KiB | 5 Q