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.0140.00718.34
8.3.50.0310.00721.08
8.3.40.0070.01418.97
8.3.30.0040.01119.27
8.3.20.0040.00420.18
8.3.10.0030.00623.65
8.3.00.0080.00019.17
8.2.180.0100.01016.75
8.2.170.0110.00322.96
8.2.160.0070.00720.34
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0100.00019.12
8.2.110.0090.00022.00
8.2.100.0000.01117.50
8.2.90.0080.00019.07
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0030.00617.90
8.2.50.0070.00318.07
8.2.40.0050.00319.88
8.2.30.0000.00818.01
8.2.20.0000.00817.70
8.2.10.0050.00217.88
8.2.00.0060.00317.69
8.1.280.0070.01425.92
8.1.270.0000.00822.19
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0030.00623.87
8.1.230.0060.00619.07
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0090.00017.23
8.1.190.0040.00417.23
8.1.180.0000.00718.10
8.1.170.0030.00518.52
8.1.160.0000.00721.91
8.1.150.0070.00018.71
8.1.140.0040.00417.40
8.1.130.0050.00317.89
8.1.120.0040.00417.41
8.1.110.0040.00417.29
8.1.100.0000.00817.33
8.1.90.0050.00317.32
8.1.80.0000.00817.36
8.1.70.0000.00817.41
8.1.60.0030.00617.48
8.1.50.0000.00817.59
8.1.40.0040.00417.54
8.1.30.0030.00517.62
8.1.20.0030.00517.56
8.1.10.0040.00417.62
8.1.00.0000.00817.38
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0070.00018.33
8.0.270.0030.00317.20
8.0.260.0000.00717.19
8.0.250.0070.00017.00
8.0.240.0080.00016.96
8.0.230.0070.00016.94
8.0.220.0040.00416.90
8.0.210.0070.00016.87
8.0.200.0000.00616.98
8.0.190.0000.00717.03
8.0.180.0050.00316.93
8.0.170.0000.00816.95
8.0.160.0040.00416.94
8.0.150.0070.00016.73
8.0.140.0040.00416.79
8.0.130.0000.00513.26
8.0.120.0000.00716.89
8.0.110.0030.00516.93
8.0.100.0050.00316.73
8.0.90.0040.00416.87
8.0.80.0030.01216.96
8.0.70.0050.00216.91
8.0.60.0050.00216.88
8.0.50.0020.00517.00
8.0.30.0120.00717.06
8.0.20.0060.01417.40
8.0.10.0000.00917.05
8.0.00.0060.01216.71
7.4.330.0000.00515.02
7.4.320.0030.00616.56
7.4.300.0000.00616.61
7.4.290.0030.00316.61
7.4.280.0000.00816.62
7.4.270.0030.00316.46
7.4.260.0000.00716.47
7.4.250.0040.00416.40
7.4.240.0040.00416.49
7.4.230.0030.00316.39
7.4.220.0100.00716.57
7.4.210.0120.00616.44
7.4.200.0030.00316.27
7.4.160.0090.00616.72
7.4.150.0210.00317.40
7.4.140.0170.01517.86
7.4.130.0090.00916.52
7.4.120.0070.01316.70
7.4.110.0000.01716.43
7.4.100.0120.00616.60
7.4.90.0100.00616.54
7.4.80.0050.00719.39
7.4.70.0140.00416.51
7.4.60.0030.01416.36
7.4.50.0000.00516.58
7.4.40.0030.01316.57
7.4.30.0060.00916.53
7.4.00.0030.01415.11
7.3.330.0050.00013.30
7.3.320.0030.00313.33
7.3.310.0000.00716.40
7.3.300.0000.00616.41
7.3.290.0120.00516.37
7.3.280.0120.00616.34
7.3.270.0130.00517.40
7.3.260.0140.00316.56
7.3.250.0100.00816.52
7.3.240.0100.00616.29
7.3.230.0150.00416.43
7.3.210.0030.01416.32
7.3.200.0090.01219.39
7.3.190.0120.00616.39
7.3.180.0200.00316.48
7.3.170.0090.00916.57
7.3.160.0070.01016.40
7.3.120.0090.00614.77
7.3.110.0040.01514.97
7.3.100.0060.00314.76
7.3.90.0040.01114.60
7.3.80.0090.00614.65
7.3.70.0100.00314.65
7.3.60.0090.00614.86
7.3.50.0060.01014.54
7.3.40.0130.00014.87
7.3.30.0030.01214.73
7.3.20.0040.01116.70
7.3.10.0030.01216.50
7.3.00.0040.00416.51
7.2.330.0170.00716.44
7.2.320.0130.00716.74
7.2.310.0000.01616.53
7.2.300.0120.00616.57
7.2.290.0130.01016.52
7.2.250.0030.01514.73
7.2.240.0100.00714.64
7.2.230.0110.00715.17
7.2.220.0060.01014.86
7.2.210.0090.00614.86
7.2.200.0030.01014.94
7.2.190.0120.00314.93
7.2.180.0030.01215.00
7.2.170.0030.01314.77
7.2.60.0120.00616.59
7.2.00.0030.01019.52
7.1.330.0110.00415.48
7.1.320.0100.00715.77
7.1.310.0140.00015.80
7.1.300.0000.01215.52
7.1.290.0000.01115.71
7.1.280.0100.00715.57
7.1.270.0030.00715.76
7.1.260.0000.00915.54
7.1.200.0070.00315.43
7.1.100.0000.01117.86
7.1.70.0100.00016.65
7.1.60.0130.01019.32
7.1.50.0070.01416.93
7.1.00.0030.07722.56
7.0.200.0040.00416.63
7.0.140.0100.06721.91
7.0.60.0100.08019.96
7.0.50.0030.05717.88
7.0.40.0200.03720.12
7.0.30.0330.06020.07
7.0.20.0100.05320.16
7.0.10.0070.06720.18
7.0.00.0070.08020.08
5.6.280.0100.06721.13
5.6.210.0100.07320.57
5.6.200.0030.08018.28
5.6.190.0100.07020.42
5.6.180.0130.04320.77
5.6.170.0270.05320.51
5.6.160.0070.08720.57
5.6.150.0100.07718.23
5.6.140.0070.08018.18
5.6.130.0070.07318.11
5.6.120.0070.08320.97
5.6.110.0070.09021.15
5.6.100.0100.07020.98
5.6.90.0070.03721.00
5.6.80.0170.03720.37
5.5.350.0000.04720.42
5.5.340.0070.08317.96
5.5.330.0030.09020.41
5.5.320.0300.04720.32
5.5.310.0330.05020.41
5.5.300.0100.07718.07
5.5.290.0030.04017.91
5.5.280.0100.07720.81
5.5.270.0100.08020.76
5.5.260.0270.07720.85
5.5.250.0030.04320.50
5.5.240.0130.06720.36
5.4.450.0130.05319.47
5.4.440.0900.06019.55
5.4.430.1070.06019.59
5.4.420.0170.07319.61
5.4.410.1070.05019.03
5.4.400.0670.06319.29
5.4.390.0930.07719.02
5.4.380.0630.06019.30
5.4.370.0730.05719.23
5.4.360.0830.06319.24
5.4.350.1030.05319.33
5.4.340.0110.06012.03
5.4.320.0090.05412.52
5.4.310.0080.04812.52
5.4.300.0090.05512.52
5.4.290.0100.06012.52
5.4.280.0090.04212.41
5.4.270.0140.07212.41
5.4.260.0140.06312.41
5.4.250.0070.05812.41
5.4.240.0120.05512.41
5.4.230.0050.04612.41
5.4.220.0100.04412.40
5.4.210.0090.04112.41
5.4.200.0040.04012.40
5.4.190.0070.03612.40
5.4.180.0090.03612.40
5.4.170.0070.04212.41
5.4.160.0060.03512.40
5.4.150.0070.03512.40
5.4.140.0080.03412.09
5.4.130.0050.03512.07
5.4.120.0100.03212.04
5.4.110.0060.03912.04
5.4.100.0030.03812.03
5.4.90.0100.04212.04
5.4.80.0080.04512.04
5.4.70.0070.05512.04
5.4.60.0080.03612.03
5.4.50.0050.03612.03
5.4.40.0090.03112.02
5.4.30.0040.03712.02
5.4.20.0070.04312.01
5.4.10.0070.03412.02
5.4.00.0060.04711.51
5.3.290.0160.08712.80
5.3.280.0110.05312.71
5.3.270.0090.06912.72
5.3.260.0100.04412.72
5.3.250.0080.03712.71
5.3.240.0070.04512.72
5.3.230.0080.04912.71
5.3.220.0050.04512.68
5.3.210.0040.04212.68
5.3.200.0050.03912.68
5.3.190.0070.04612.67
5.3.180.0070.03712.68
5.3.170.0090.03512.67
5.3.160.0050.03812.67
5.3.150.0060.03812.68
5.3.140.0090.03512.66
5.3.130.0110.03612.66
5.3.120.0220.03912.66
5.3.110.0050.04212.66
5.3.100.0090.03512.13
5.3.90.0090.03512.11
5.3.80.0080.04012.09
5.3.70.0080.03512.10
5.3.60.0080.03412.08
5.3.50.0060.03612.03
5.3.40.0040.03912.03
5.3.30.0060.03611.99
5.3.20.0040.03711.77
5.3.10.0080.03311.73
5.3.00.0050.04111.72
5.2.170.0040.0339.22
5.2.160.0070.0289.23
5.2.150.0060.0309.22
5.2.140.0060.0329.22
5.2.130.0060.0349.18
5.2.120.0040.0319.18
5.2.110.0030.0319.19
5.2.100.0050.0319.19
5.2.90.0080.0279.19
5.2.80.0060.0329.18
5.2.70.0080.0329.18
5.2.60.0100.0319.13
5.2.50.0070.0309.10
5.2.40.0100.0339.08
5.2.30.0030.0319.05
5.2.20.0050.0289.05
5.2.10.0070.0268.95
5.2.00.0070.0348.82
5.1.60.0040.0268.09
5.1.50.0030.0268.09
5.1.40.0080.0258.07
5.1.30.0080.0228.42
5.1.20.0030.0288.45
5.1.10.0070.0238.17
5.1.00.0050.0258.17
5.0.50.0040.0206.65
5.0.40.0030.0206.50
5.0.30.0060.0286.32
5.0.20.0030.0206.29
5.0.10.0040.0206.27
5.0.00.0030.0326.26
4.4.90.0040.0144.78
4.4.80.0040.0234.76
4.4.70.0050.0174.75
4.4.60.0020.0174.75
4.4.50.0020.0184.77
4.4.40.0030.0274.71
4.4.30.0030.0154.76
4.4.20.0030.0164.84
4.4.10.0050.0154.85
4.4.00.0060.0254.76
4.3.110.0050.0184.66
4.3.100.0010.0174.67
4.3.90.0050.0144.63
4.3.80.0020.0254.59
4.3.70.0010.0174.63
4.3.60.0020.0154.63
4.3.50.0040.0144.63
4.3.40.0020.0254.54
4.3.30.0030.0153.30
4.3.20.0020.0153.28
4.3.10.0030.0153.24
4.3.00.0030.0277.03

preferences:
44.94 ms | 401 KiB | 5 Q