3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const K_PATH = "world"; const PDF_GO = "hello"; } class Bar { protected $Conf; public function __constructor($config) { $this->Conf = $config; } public function say(){ echo "We are the " . constant($this->Conf . 'K_PATH'); } } $foo = new Foo(); $bar = new Bar($foo); $bar->say();

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.00718.27
8.3.50.0140.00921.14
8.3.40.0150.00019.02
8.3.30.0070.00719.18
8.3.20.0070.00020.33
8.3.10.0040.00423.70
8.3.00.0000.00819.22
8.2.180.0030.01316.75
8.2.170.0130.00722.96
8.2.160.0070.00719.21
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00421.06
8.2.110.0120.00619.39
8.2.100.0090.00317.78
8.2.90.0000.00719.05
8.2.80.0030.00517.97
8.2.70.0030.00517.74
8.2.60.0000.00917.80
8.2.50.0000.01018.07
8.2.40.0030.00619.95
8.2.30.0000.00717.98
8.2.20.0050.00217.68
8.2.10.0050.00317.95
8.2.00.0000.00717.75
8.1.280.0090.00925.92
8.1.270.0040.00422.16
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0050.00322.19
8.1.230.0090.00318.95
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0030.00517.23
8.1.180.0000.00818.10
8.1.170.0100.00018.55
8.1.160.0040.00422.15
8.1.150.0030.00518.90
8.1.140.0050.00217.46
8.1.130.0030.00317.84
8.1.120.0000.00717.45
8.1.110.0050.00217.44
8.1.100.0070.00017.36
8.1.90.0040.00417.38
8.1.80.0000.00717.42
8.1.70.0030.00317.34
8.1.60.0030.00617.55
8.1.50.0060.00317.53
8.1.40.0040.00417.58
8.1.30.0000.00817.68
8.1.20.0030.00617.64
8.1.10.0040.00417.58
8.1.00.0040.00417.41
8.0.300.0030.00620.16
8.0.290.0050.00216.75
8.0.280.0070.00018.39
8.0.270.0040.00417.26
8.0.260.0040.00417.26
8.0.250.0080.00017.04
8.0.240.0000.00817.05
8.0.230.0030.00316.91
8.0.220.0030.00317.03
8.0.210.0030.00316.97
8.0.200.0060.00016.92
8.0.190.0000.00717.00
8.0.180.0070.00417.03
8.0.170.0000.00816.97
8.0.160.0040.00416.87
8.0.150.0030.00316.93
8.0.140.0000.00716.94
8.0.130.0030.00313.41
8.0.120.0070.00016.99
8.0.110.0000.00716.86
8.0.100.0000.00716.79
8.0.90.0040.00417.00
8.0.80.0120.00317.03
8.0.70.0040.00416.85
8.0.60.0040.00416.98
8.0.50.0050.00216.86
8.0.30.0110.00917.05
8.0.20.0130.00717.40
8.0.10.0030.00516.92
8.0.00.0090.00816.87
7.4.330.0030.00315.09
7.4.320.0040.00416.60
7.4.300.0000.00616.57
7.4.290.0000.00716.57
7.4.280.0000.00816.50
7.4.270.0030.00316.52
7.4.260.0000.00716.60
7.4.250.0050.00216.46
7.4.240.0040.00416.50
7.4.230.0000.00716.59
7.4.220.0070.01116.41
7.4.210.0060.01216.55
7.4.200.0000.00716.63
7.4.160.0150.00916.50
7.4.150.0120.00617.40
7.4.140.0090.01017.86
7.4.130.0100.01116.56
7.4.120.0090.00716.61
7.4.110.0090.01016.46
7.4.100.0120.00616.59
7.4.90.0160.00616.52
7.4.80.0100.00719.39
7.4.70.0140.01016.48
7.4.60.0090.00616.60
7.4.50.0000.00716.30
7.4.40.0080.00816.31
7.4.30.0110.00416.54
7.4.00.0020.00515.23
7.3.330.0000.00513.29
7.3.320.0060.00013.33
7.3.310.0070.00016.39
7.3.300.0040.00416.23
7.3.290.0050.00916.37
7.3.280.0060.00916.38
7.3.270.0120.00617.40
7.3.260.0110.00616.41
7.3.250.0100.00716.53
7.3.240.0130.00316.27
7.3.230.0070.01016.39
7.3.210.0080.00816.49
7.3.200.0040.01219.39
7.3.190.0090.01216.73
7.3.180.0110.00616.31
7.3.170.0180.00416.36
7.3.160.0100.00716.58
7.2.330.0030.01516.53
7.2.320.0070.01016.59
7.2.310.0140.00316.71
7.2.300.0120.00916.77
7.2.290.0110.01116.41
7.2.00.0060.00319.16
7.1.100.0000.01118.17
7.1.70.0000.01017.31
7.1.60.0030.02019.32
7.1.50.0160.01016.71
7.1.00.0070.07322.48
7.0.200.0030.00616.72
7.0.140.0030.07321.97
7.0.60.0070.06720.05
7.0.50.0030.08317.88
7.0.40.0230.07020.21
7.0.30.0230.04320.23
7.0.20.0200.03720.26
7.0.10.0100.08020.09
7.0.00.0030.07020.10
5.6.280.0130.06321.11
5.6.210.0130.06720.73
5.6.200.0000.05318.29
5.6.190.0070.06320.55
5.6.180.0170.07720.55
5.6.170.0200.04320.50
5.6.160.0000.09320.48
5.6.150.0070.06018.19
5.6.140.0130.07718.24
5.6.130.0030.04318.32
5.6.120.0170.05721.13
5.6.110.0130.07321.02
5.6.100.0100.07720.96
5.6.90.0130.05321.02
5.6.80.0070.03720.38
5.6.70.4670.04020.37
5.5.350.0300.06720.34
5.5.340.0070.08317.96
5.5.330.0070.06720.40
5.5.320.0230.04020.52
5.5.310.0230.07020.34
5.5.300.0130.03318.08
5.5.290.0030.06317.98
5.5.280.0130.03720.76
5.5.270.0130.05720.65
5.5.260.0000.04320.74
5.5.250.0100.06720.60
5.5.240.4170.04020.27
5.4.450.0870.04319.63
5.4.440.0670.06319.38
5.4.430.0970.05019.30
5.4.420.0870.06319.44
5.4.410.0930.04719.25
5.4.400.0430.04719.29
5.4.390.0870.06318.88
5.4.380.0070.05319.14
5.4.370.0830.06318.84
5.4.360.0730.06019.26
5.4.350.0900.04719.15
5.4.340.0040.03712.02
5.4.320.0080.03412.50
5.4.310.0040.04012.50
5.4.300.0050.03812.51
5.4.290.0070.03812.50
5.4.280.0060.03512.40
5.4.270.0080.03712.40
5.4.260.0080.04112.40
5.4.250.0070.03612.40
5.4.240.0070.04412.39
5.4.230.0060.03812.39
5.4.220.0040.03812.39
5.4.210.0070.03712.39
5.4.200.0050.04012.39
5.4.190.0080.04212.39
5.4.180.0050.04212.38
5.4.170.0070.03412.40
5.4.160.0060.03512.39
5.4.150.0080.04112.39
5.4.140.0070.04112.08
5.4.130.0080.03712.06
5.4.120.0040.04612.02
5.4.110.0070.04312.01
5.4.100.0080.03412.02
5.4.90.0080.03412.02
5.4.80.0070.04712.02
5.4.70.0090.04712.01
5.4.60.0060.03812.01
5.4.50.0060.03712.01
5.4.40.0060.04112.00
5.4.30.0070.03412.00
5.4.20.0060.03512.00
5.4.10.0030.04012.00
5.4.00.0080.03611.49
5.3.290.0050.04112.80
5.3.280.0050.04012.71
5.3.270.0070.03812.72
5.3.260.0070.03912.72
5.3.250.0060.04212.72
5.3.240.0060.03912.72
5.3.230.0070.03712.71
5.3.220.0080.03612.68
5.3.210.0050.04112.68
5.3.200.0070.03612.68
5.3.190.0070.03612.68
5.3.180.0090.03312.67
5.3.170.0080.03612.67
5.3.160.0100.03812.67
5.3.150.0090.04312.67
5.3.140.0080.04312.66
5.3.130.0040.04212.66
5.3.120.0070.04412.66
5.3.110.0100.03612.66
5.3.100.0060.03812.13
5.3.90.0060.03712.11
5.3.80.0050.03812.09
5.3.70.0050.04012.10
5.3.60.0050.03812.08
5.3.50.0050.03712.03
5.3.40.0060.03812.03
5.3.30.0050.03611.99
5.3.20.0080.04411.76
5.3.10.0080.03211.74
5.3.00.0060.03611.72
5.2.170.0040.0319.22
5.2.160.0060.0339.21
5.2.150.0070.0349.22
5.2.140.0060.0299.21
5.2.130.0050.0319.18
5.2.120.0050.0289.18
5.2.110.0020.0399.18
5.2.100.0050.0319.18
5.2.90.0050.0329.19
5.2.80.0060.0319.18
5.2.70.0060.0299.18
5.2.60.0050.0319.14
5.2.50.0070.0289.10
5.2.40.0020.0319.08
5.2.30.0060.0309.05
5.2.20.0070.0329.04
5.2.10.0050.0288.95
5.2.00.0100.0388.81
5.1.60.0040.0248.10
5.1.50.0060.0238.09
5.1.40.0110.0218.07
5.1.30.0050.0258.42
5.1.20.0070.0288.44
5.1.10.0070.0248.17
5.1.00.0020.0298.17
5.0.50.0040.0226.64
5.0.40.0050.0196.51
5.0.30.0030.0316.32
5.0.20.0030.0196.29
5.0.10.0040.0216.27
5.0.00.0050.0296.26
4.4.90.0040.0174.78
4.4.80.0020.0174.75
4.4.70.0020.0164.75
4.4.60.0050.0184.76
4.4.50.0020.0164.77
4.4.40.0010.0274.71
4.4.30.0040.0144.76
4.4.20.0030.0184.84
4.4.10.0050.0144.85
4.4.00.0030.0284.76
4.3.110.0030.0204.67
4.3.100.0020.0154.66
4.3.90.0020.0154.63
4.3.80.0040.0334.59
4.3.70.0050.0124.63
4.3.60.0050.0134.63
4.3.50.0060.0124.63
4.3.40.0020.0284.53
4.3.30.0010.0193.30
4.3.20.0020.0163.28
4.3.10.0030.0143.24
4.3.00.0170.0176.99

preferences:
66.39 ms | 401 KiB | 5 Q