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.0150.00018.33
8.3.50.0050.01321.88
8.3.40.0090.00618.84
8.3.30.0120.00319.08
8.3.20.0070.00020.29
8.3.10.0050.00323.72
8.3.00.0080.00019.17
8.2.180.0070.00718.16
8.2.170.0000.01422.96
8.2.160.0030.01220.34
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0080.00020.89
8.2.110.0000.00922.07
8.2.100.0040.00819.45
8.2.90.0040.00419.23
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0050.00317.93
8.2.50.0000.00918.07
8.2.40.0030.00619.88
8.2.30.0090.00018.37
8.2.20.0070.00017.61
8.2.10.0070.00018.20
8.2.00.0000.00817.87
8.1.280.0140.00325.92
8.1.270.0100.00323.92
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00724.01
8.1.230.0090.00319.15
8.1.220.0050.00317.78
8.1.210.0060.00318.77
8.1.200.0030.00717.35
8.1.190.0040.00417.23
8.1.180.0030.00718.10
8.1.170.0070.00418.50
8.1.160.0000.00722.05
8.1.150.0040.00418.70
8.1.140.0070.00317.47
8.1.130.0000.00717.81
8.1.120.0000.00717.48
8.1.110.0070.00017.47
8.1.100.0040.00417.51
8.1.90.0030.00317.31
8.1.80.0000.00817.51
8.1.70.0030.00317.45
8.1.60.0030.00617.52
8.1.50.0000.00817.48
8.1.40.0040.00417.44
8.1.30.0040.00417.71
8.1.20.0080.00017.61
8.1.10.0040.00417.59
8.1.00.0080.00017.41
8.0.300.0050.00318.77
8.0.290.0070.00017.05
8.0.280.0000.00718.44
8.0.270.0020.00517.18
8.0.260.0030.00317.27
8.0.250.0070.00017.03
8.0.240.0000.00716.95
8.0.230.0030.00316.97
8.0.220.0070.00016.77
8.0.210.0030.00316.96
8.0.200.0060.00016.88
8.0.190.0030.00516.87
8.0.180.0000.00716.82
8.0.170.0060.00316.92
8.0.160.0030.00516.87
8.0.150.0040.00416.78
8.0.140.0070.00016.90
8.0.130.0030.00313.29
8.0.120.0040.00416.82
8.0.110.0000.00916.75
8.0.100.0030.00616.78
8.0.90.0040.00416.91
8.0.80.0100.01016.91
8.0.70.0000.00816.78
8.0.60.0040.00416.79
8.0.50.0040.00416.78
8.0.30.0110.00717.17
8.0.20.0150.00317.40
8.0.10.0040.00417.07
8.0.00.0090.01116.65
7.4.330.0030.00315.00
7.4.320.0060.00016.52
7.4.300.0060.00016.59
7.4.290.0030.00316.62
7.4.280.0040.00416.52
7.4.270.0040.00416.57
7.4.260.0030.00516.46
7.4.250.0030.00516.58
7.4.240.0050.00216.52
7.4.230.0030.00316.68
7.4.220.0100.00716.57
7.4.210.0060.00916.53
7.4.200.0000.00816.36
7.4.190.0050.00316.61
7.4.160.0140.00416.65
7.4.150.0170.00017.40
7.4.140.0080.00917.86
7.4.130.0090.01116.52
7.4.120.0090.00716.54
7.4.110.0100.00716.44
7.4.100.0030.01516.51
7.4.90.0070.01016.45
7.4.80.0130.00819.39
7.4.70.0100.00716.38
7.4.60.0100.00716.49
7.4.50.0060.00316.46
7.4.40.0130.00316.23
7.4.30.0090.00616.66
7.4.00.0090.00315.11
7.3.330.0070.00013.33
7.3.320.0020.00213.31
7.3.310.0040.00416.22
7.3.300.0030.00316.37
7.3.290.0110.00716.25
7.3.280.0080.00816.38
7.3.270.0090.00917.40
7.3.260.0200.00316.32
7.3.250.0070.01116.34
7.3.240.0110.00716.43
7.3.230.0040.01216.47
7.3.210.0150.00916.55
7.3.200.0100.01019.39
7.3.190.0160.00716.45
7.3.180.0080.00816.70
7.3.170.0100.00616.71
7.3.160.0060.01516.55
7.3.120.0120.00314.86
7.3.110.0100.00614.81
7.3.100.0040.00814.64
7.3.90.0030.01014.80
7.3.80.0030.00915.04
7.3.70.0060.00614.79
7.3.60.0030.00914.90
7.3.50.0090.00614.82
7.3.40.0100.00014.92
7.3.30.0040.00814.73
7.3.20.0090.00616.64
7.3.10.0030.00616.42
7.3.00.0030.01216.44
7.2.330.0070.01016.73
7.2.320.0090.00916.83
7.2.310.0090.01216.29
7.2.300.0120.00616.81
7.2.290.0030.01316.31
7.2.240.0040.01514.59
7.2.230.0000.01815.13
7.2.220.0060.00915.07
7.2.210.0070.00715.32
7.2.200.0000.01415.12
7.2.190.0000.01414.81
7.2.180.0030.01215.20
7.2.170.0050.00514.89
7.2.160.0030.00615.12
7.2.150.0030.01016.75
7.2.140.0060.01016.80
7.2.130.0060.00816.94
7.2.120.0030.01216.85
7.2.110.0080.00517.03
7.2.100.0060.01217.06
7.2.90.0070.00717.20
7.2.80.0030.00716.60
7.2.70.0040.01116.84
7.2.60.0110.00016.80
7.2.50.0090.00316.86
7.2.40.0060.00916.96
7.2.30.0040.01116.88
7.2.20.0040.01116.98
7.2.10.0030.01016.75
7.2.00.0050.00516.71
7.1.330.0100.00715.82
7.1.320.0040.01515.81
7.1.310.0000.01515.64
7.1.300.0040.01115.47
7.1.290.0070.00715.63
7.1.280.0060.00615.66
7.1.270.0120.00315.49
7.1.260.0080.00315.73
7.1.250.0060.00615.84
7.1.70.0030.01217.11
7.1.60.0070.01819.46
7.1.50.0120.01216.58
7.1.00.0100.07022.57
7.0.200.0000.00716.76
7.0.140.0070.07021.93
7.0.60.0100.06720.08
7.0.50.0100.07717.84
7.0.40.0070.06720.39
7.0.30.0270.04320.09
7.0.20.0270.07020.11
7.0.10.0200.06720.34
7.0.00.0030.04320.09
5.6.280.0030.07321.07
5.6.210.0030.08720.70
5.6.200.0070.05718.16
5.6.190.0030.04320.68
5.6.180.0370.06720.61
5.6.170.0230.08020.41
5.6.160.0100.07720.62
5.6.150.0070.07318.19
5.6.140.0070.08318.21
5.6.130.0030.04018.15
5.6.120.0100.08020.90
5.6.110.0030.04020.99
5.6.100.0000.04720.98
5.6.90.0030.04020.93
5.6.80.0130.07320.38
5.5.350.0230.08320.50
5.5.340.0000.07017.95
5.5.330.0030.04020.43
5.5.320.0300.07020.29
5.5.310.0170.04020.34
5.5.300.0070.04718.01
5.5.290.0070.08317.98
5.5.280.0100.03320.88
5.5.270.0030.09020.87
5.5.260.0130.07020.75
5.5.250.0100.07720.69
5.5.240.0100.03720.03
5.4.450.0830.06719.63
5.4.440.0400.05019.34
5.4.430.0230.07019.49
5.4.420.0230.06719.53
5.4.410.0200.06019.25
5.4.400.0200.04719.12
5.4.390.0170.07318.99
5.4.380.0170.07318.56
5.4.370.0070.05718.69
5.4.360.0100.05318.47
5.4.350.0270.04318.48
5.4.340.0130.05318.47
5.4.320.0040.03812.50
5.4.310.0100.04512.49
5.4.300.0060.03812.50
5.4.290.0070.05212.50
5.4.280.0120.04312.39
5.4.270.0060.04912.40
5.4.260.0080.05012.40
5.4.250.0100.04812.39
5.4.240.0100.04912.40
5.4.230.0120.04812.38
5.4.220.0080.04312.38
5.4.210.0090.04812.39
5.4.200.0100.04412.39
5.4.190.0100.05312.38
5.4.180.0100.03812.38
5.4.170.0070.04312.39
5.4.160.0050.03812.39
5.4.150.0040.04212.39
5.4.140.0040.04112.07
5.4.130.0040.03912.06
5.4.120.0100.04012.02
5.4.110.0080.05112.01
5.4.100.0050.04512.01
5.4.90.0070.04012.01
5.4.80.0070.03712.01
5.4.70.0060.04512.00
5.4.60.0030.03812.01
5.4.50.0070.03512.01
5.4.40.0060.03512.00
5.4.30.0050.03912.00
5.4.20.0100.04011.99
5.4.10.0080.04312.00
5.4.00.0070.04311.48
5.3.290.0060.03912.80
5.3.280.0050.04612.71
5.3.270.0090.04012.73
5.3.260.0120.04112.72
5.3.250.0040.04812.72
5.3.240.0050.04212.71
5.3.230.0080.04312.71
5.3.220.0110.03612.68
5.3.210.0060.04012.68
5.3.200.0020.04312.68
5.3.190.0090.03712.68
5.3.180.0030.04212.67
5.3.170.0060.03912.67
5.3.160.0100.03612.67
5.3.150.0030.05312.68
5.3.140.0060.03612.66
5.3.130.0040.04112.66
5.3.120.0080.03612.66
5.3.110.0030.04412.66
5.3.100.0070.03912.12
5.3.90.0080.03412.10
5.3.80.0100.04412.09
5.3.70.0130.04612.09
5.3.60.0050.05312.07
5.3.50.0060.05112.02
5.3.40.0060.04112.02
5.3.30.0080.03711.98
5.3.20.0090.03511.76
5.3.10.0040.03911.72
5.3.00.0080.03811.71
5.2.170.0010.0359.22
5.2.160.0070.0309.22
5.2.150.0030.0369.22
5.2.140.0040.0339.21
5.2.130.0070.0319.17
5.2.120.0040.0389.18
5.2.110.0040.0319.18
5.2.100.0020.0319.18
5.2.90.0060.0309.18
5.2.80.0050.0319.18
5.2.70.0050.0339.17
5.2.60.0080.0289.13
5.2.50.0030.0319.10
5.2.40.0040.0299.07
5.2.30.0060.0289.04
5.2.20.0030.0309.04
5.2.10.0040.0328.95
5.2.00.0040.0298.80
5.1.60.0020.0278.09
5.1.50.0040.0268.09
5.1.40.0080.0218.06
5.1.30.0050.0278.42
5.1.20.0060.0268.44
5.1.10.0060.0318.17
5.1.00.0100.0248.17
5.0.50.0050.0196.64
5.0.40.0020.0216.50
5.0.30.0030.0346.31
5.0.20.0030.0216.28
5.0.10.0060.0196.26
5.0.00.0030.0316.25
4.4.90.0030.0234.77
4.4.80.0010.0184.76
4.4.70.0020.0234.76
4.4.60.0030.0164.75
4.4.50.0050.0164.77
4.4.40.0030.0344.71
4.4.30.0050.0204.76
4.4.20.0070.0214.85
4.4.10.0030.0194.85
4.4.00.0080.0264.76
4.3.110.0040.0184.67
4.3.100.0040.0164.66
4.3.90.0050.0194.64
4.3.80.0030.0264.59
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0030.0154.63
4.3.40.0010.0264.54
4.3.30.0020.0163.30
4.3.20.0010.0173.28
4.3.10.0010.0173.24
4.3.00.0130.0277.27

preferences:
45.16 ms | 401 KiB | 5 Q