3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { const CONSTANT = 'constant value'; function showConstant() { echo self::CONSTANT . "\n"; } } echo MyClass::CONSTANT . "\n"; /*$classname = "MyClass"; echo $classname::CONSTANT . "\n"; // As of PHP 5.3.0 $class = new MyClass(); $class->showConstant(); echo $class::CONSTANT."\n"; // As of PHP 5.3.0/*/ ?>

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.0070.01116.63
8.3.50.0260.00421.85
8.3.40.0070.00718.55
8.3.30.0130.00319.04
8.3.20.0070.00020.24
8.3.10.0040.00423.65
8.3.00.0000.00818.94
8.2.180.0110.01118.29
8.2.170.0170.00322.96
8.2.160.0100.00320.39
8.2.150.0000.00824.18
8.2.140.0090.00024.66
8.2.130.0050.00226.16
8.2.120.0040.00420.75
8.2.110.0060.00320.83
8.2.100.0070.00417.72
8.2.90.0090.00017.72
8.2.80.0080.00017.97
8.2.70.0050.00317.63
8.2.60.0000.00717.93
8.2.50.0030.00618.07
8.2.40.0050.00319.83
8.2.30.0040.00418.04
8.2.20.0030.00617.44
8.2.10.0000.00717.99
8.2.00.0000.00817.59
8.1.280.0150.00625.92
8.1.270.0030.00523.81
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00320.70
8.1.230.0040.00720.95
8.1.220.0080.00017.74
8.1.210.0000.00818.86
8.1.200.0030.00717.23
8.1.190.0000.00817.10
8.1.180.0050.00318.10
8.1.170.0050.00318.49
8.1.160.0000.00721.91
8.1.150.0040.00418.55
8.1.140.0000.01017.22
8.1.130.0030.00317.82
8.1.120.0030.00317.35
8.1.110.0050.00317.22
8.1.100.0060.00317.40
8.1.90.0080.00017.16
8.1.80.0000.00717.32
8.1.70.0040.00417.32
8.1.60.0000.00817.33
8.1.50.0060.00317.42
8.1.40.0030.00617.38
8.1.30.0040.00417.50
8.1.20.0040.00417.51
8.1.10.0030.00517.42
8.1.00.0040.00417.37
8.0.300.0080.00019.91
8.0.290.0040.00417.16
8.0.280.0030.00318.43
8.0.270.0000.00717.09
8.0.260.0000.00717.17
8.0.250.0040.00416.81
8.0.240.0000.00716.81
8.0.230.0040.00416.85
8.0.220.0000.00716.64
8.0.210.0000.00716.76
8.0.200.0030.00316.84
8.0.190.0030.00616.72
8.0.180.0000.00716.76
8.0.170.0030.00616.69
8.0.160.0000.00716.77
8.0.150.0040.00416.66
8.0.140.0000.00716.77
8.0.130.0070.00013.25
8.0.120.0040.00416.68
8.0.110.0000.00816.75
8.0.100.0040.00416.72
8.0.90.0050.00216.65
8.0.80.0180.00416.75
8.0.70.0040.00416.72
8.0.60.0030.00316.63
8.0.50.0050.00216.77
8.0.30.0110.00817.01
8.0.20.0090.01017.40
8.0.10.0000.00716.86
8.0.00.0100.00716.63
7.4.330.0030.00315.00
7.4.320.0030.00316.38
7.4.300.0060.00016.45
7.4.290.0080.00016.30
7.4.280.0080.00016.45
7.4.270.0030.00316.49
7.4.260.0040.00416.37
7.4.250.0000.00716.32
7.4.240.0050.00316.43
7.4.230.0030.00316.55
7.4.220.0090.00916.55
7.4.210.0060.00716.31
7.4.200.0030.00316.26
7.4.190.0000.00616.55
7.4.160.0120.00416.47
7.4.150.0180.00017.40
7.4.140.0120.00517.86
7.4.130.0100.00816.30
7.4.120.0130.00716.48
7.4.110.0100.00616.50
7.4.100.0120.00616.31
7.4.90.0100.01016.40
7.4.80.0150.00819.39
7.4.70.0060.01016.51
7.4.60.0030.01316.24
7.4.50.0080.00016.45
7.4.40.0130.00316.35
7.4.30.0130.00316.36
7.4.00.0100.00614.72
7.3.330.0050.00013.15
7.3.320.0050.00013.12
7.3.310.0030.00316.23
7.3.300.0070.00016.09
7.3.290.0030.01016.17
7.3.280.0130.00616.18
7.3.270.0060.01217.40
7.3.260.0110.00616.38
7.3.250.0170.00616.32
7.3.240.0100.00616.33
7.3.230.0060.01216.46
7.3.210.0100.00716.43
7.3.200.0120.00919.39
7.3.190.0100.00716.25
7.3.180.0080.00816.21
7.3.170.0130.00316.30
7.3.160.0090.00916.39
7.3.120.0050.00914.53
7.3.110.0040.01514.63
7.3.100.0090.00914.73
7.3.90.0070.00714.85
7.3.80.0000.01514.85
7.3.70.0080.00414.40
7.3.60.0050.00514.60
7.3.50.0030.01314.50
7.3.40.0070.00714.82
7.3.30.0060.00614.83
7.3.20.0100.00316.66
7.3.10.0070.00416.44
7.3.00.0070.01016.56
7.2.330.0070.01016.64
7.2.320.0160.00316.58
7.2.310.0210.00316.54
7.2.300.0140.00416.57
7.2.290.0090.01416.38
7.2.250.0000.01714.54
7.2.240.0060.01115.04
7.2.230.0070.01014.64
7.2.220.0000.01114.84
7.2.210.0030.01414.59
7.2.200.0030.01414.82
7.2.190.0110.00414.90
7.2.180.0070.00714.88
7.2.170.0040.01214.46
7.2.00.0030.01419.17
7.1.330.0000.01515.44
7.1.320.0030.00615.69
7.1.310.0040.00715.70
7.1.300.0000.00815.51
7.1.290.0110.00415.43
7.1.280.0080.00815.47
7.1.270.0030.01015.57
7.1.260.0070.00715.78
7.1.100.0040.00817.92
7.1.70.0000.00916.96
7.1.60.0090.01519.46
7.1.50.0100.01316.48
7.1.00.0070.07322.45
7.0.200.0040.01116.67
7.0.140.0030.07322.09
7.0.60.0100.07719.85
7.0.50.0030.08717.95
7.0.40.0100.08020.18
7.0.30.0270.07020.16
7.0.20.0330.07020.09
7.0.10.0100.07320.07
7.0.00.0030.07320.14
5.6.280.0070.07021.13
5.6.210.0030.04320.67
5.6.200.0100.07318.27
5.6.190.0070.04020.66
5.6.180.0030.04720.52
5.6.170.0200.04320.44
5.6.160.0030.06720.64
5.6.150.0030.08018.18
5.6.140.0130.06018.14
5.6.130.0070.04718.18
5.6.120.0130.07320.99
5.6.110.0070.07021.13
5.6.100.0100.05721.04
5.6.90.0170.07721.00
5.6.80.0130.03720.33
5.5.350.0000.08020.44
5.5.340.0030.05017.98
5.5.330.0030.05720.37
5.5.320.0270.04020.27
5.5.310.0370.07020.26
5.5.300.0070.05717.98
5.5.290.0000.06318.08
5.5.280.0070.08320.65
5.5.270.0100.07720.77
5.5.260.0070.04720.87
5.5.250.0330.06020.47
5.5.240.0000.03320.29
5.4.450.0470.07319.55
5.4.440.0800.05319.33
5.4.430.0300.06719.53
5.4.420.0170.05019.64
5.4.410.0200.07319.25
5.4.400.0230.06319.12
5.4.390.0170.07719.00
5.4.380.0130.05718.80
5.4.370.0200.04318.84
5.4.360.0200.05018.80
5.4.350.0130.05718.79
5.4.340.0100.05718.56
5.4.320.0100.03312.50
5.4.310.0030.04012.50
5.4.300.0040.03812.50
5.4.290.0110.05012.50
5.4.280.0090.04712.39
5.4.270.0140.05512.40
5.4.260.0090.05812.39
5.4.250.0060.04312.40
5.4.240.0080.04212.39
5.4.230.0090.04012.39
5.4.220.0100.05312.39
5.4.210.0140.04912.39
5.4.200.0090.04912.38
5.4.190.0050.04412.39
5.4.180.0110.03812.39
5.4.170.0090.04112.39
5.4.160.0080.03412.39
5.4.150.0050.04112.39
5.4.140.0050.03812.07
5.4.130.0040.04412.06
5.4.120.0080.03812.02
5.4.110.0070.04212.01
5.4.100.0100.05012.01
5.4.90.0060.05412.01
5.4.80.0100.04412.02
5.4.70.0080.03512.01
5.4.60.0070.04312.01
5.4.50.0050.03812.01
5.4.40.0070.03512.00
5.4.30.0050.04211.99
5.4.20.0080.04011.99
5.4.10.0120.03811.99
5.4.00.0060.03911.48
5.3.290.0100.05012.80
5.3.280.0070.03712.71
5.3.270.0090.03812.72
5.3.260.0080.04112.72
5.3.250.0100.03512.71
5.3.240.0090.04712.72
5.3.230.0050.04412.71
5.3.220.0060.03812.68
5.3.210.0050.04112.68
5.3.200.0090.04712.68
5.3.190.0050.05512.68
5.3.180.0060.05812.67
5.3.170.0060.04312.66
5.3.160.0040.04412.68
5.3.150.0090.05112.67
5.3.140.0060.03512.66
5.3.130.0090.04612.65
5.3.120.0080.04812.66
5.3.110.0080.04112.66
5.3.100.0090.04712.12
5.3.90.0100.03612.09
5.3.80.0080.03712.09
5.3.70.0040.04112.09
5.3.60.0080.03812.07
5.3.50.0080.03612.02
5.3.40.0060.03712.02
5.3.30.0080.03311.98
5.3.20.0090.03311.75
5.3.10.0050.03711.73
5.3.00.0060.03711.71
5.2.170.0010.0349.21
5.2.160.0030.0309.21
5.2.150.0090.0279.21
5.2.140.0040.0339.21
5.2.130.0050.0309.17
5.2.120.0060.0419.17
5.2.110.0070.0359.18
5.2.100.0070.0329.17
5.2.90.0050.0349.17
5.2.80.0060.0329.17
5.2.70.0030.0319.16
5.2.60.0040.0319.13
5.2.50.0060.0379.09
5.2.40.0070.0279.07
5.2.30.0040.0319.04
5.2.20.0030.0319.03
5.2.10.0040.0318.93
5.2.00.0040.0358.80
5.1.60.0030.0318.09
5.1.50.0080.0248.09
5.1.40.0050.0248.06
5.1.30.0030.0288.41
5.1.20.0030.0308.43
5.1.10.0040.0268.16
5.1.00.0040.0268.16
5.0.50.0040.0206.63
5.0.40.0060.0176.50
5.0.30.0060.0296.31
5.0.20.0040.0216.27
5.0.10.0050.0206.25
5.0.00.0060.0356.24
4.4.90.0020.0244.78
4.4.80.0030.0224.76
4.4.70.0050.0204.76
4.4.60.0050.0154.76
4.4.50.0020.0164.77
4.4.40.0020.0264.70
4.4.30.0030.0154.76
4.4.20.0040.0144.84
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0020.0174.67
4.3.100.0010.0164.66
4.3.90.0040.0134.64
4.3.80.0030.0244.59
4.3.70.0030.0134.63
4.3.60.0010.0164.63
4.3.50.0050.0164.63
4.3.40.0050.0274.54
4.3.30.0010.0173.30
4.3.20.0010.0173.28
4.3.10.0020.0163.24
4.3.00.0030.0207.27

preferences:
47.41 ms | 401 KiB | 5 Q