3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test{ private $options = array(1,3,4); public function __construct(){ return array($this->optionParts(0), $this->optionsParts(2)); } private function optionParts($num){ echo $this->options[$num]; } } $t = new test(); print_r($t); //$t->optionParts(1);

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.43
8.3.50.0150.00722.91
8.3.40.0110.00418.82
8.3.30.0070.00719.27
8.3.20.0000.00820.34
8.3.10.0050.00321.89
8.3.00.0060.00619.68
8.2.180.0110.00716.38
8.2.170.0140.00722.96
8.2.160.0120.00320.35
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00021.11
8.2.110.0060.00320.38
8.2.100.0050.00517.91
8.2.90.0000.00819.39
8.2.80.0050.00317.97
8.2.70.0000.00817.62
8.2.60.0070.00317.80
8.2.50.0100.00018.07
8.2.40.0000.00718.16
8.2.30.0040.00418.11
8.2.20.0070.00017.81
8.2.10.0040.00418.11
8.2.00.0030.00517.68
8.1.280.0070.00725.92
8.1.270.0000.00824.01
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00322.51
8.1.230.0070.00420.91
8.1.220.0000.00818.77
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0050.00317.10
8.1.180.0000.00818.10
8.1.170.0000.00818.54
8.1.160.0070.00021.95
8.1.150.0040.00418.77
8.1.140.0030.00517.45
8.1.130.0000.00717.83
8.1.120.0080.00017.42
8.1.110.0030.00517.34
8.1.100.0000.00717.39
8.1.90.0040.00417.38
8.1.80.0000.00817.46
8.1.70.0030.00317.34
8.1.60.0040.00417.50
8.1.50.0040.00417.46
8.1.40.0000.00717.34
8.1.30.0000.00917.52
8.1.20.0000.00717.50
8.1.10.0040.00417.55
8.1.00.0000.00717.45
8.0.300.0040.00419.89
8.0.290.0000.00716.75
8.0.280.0000.00818.44
8.0.270.0050.00217.24
8.0.260.0030.00317.25
8.0.250.0000.00617.00
8.0.240.0040.00417.03
8.0.230.0050.00317.01
8.0.220.0000.00816.84
8.0.210.0070.00016.92
8.0.200.0000.00717.02
8.0.190.0040.00416.93
8.0.180.0040.00416.88
8.0.170.0040.00416.88
8.0.160.0040.00816.89
8.0.150.0070.00016.94
8.0.140.0040.00416.81
8.0.130.0030.00313.36
8.0.120.0000.00816.88
8.0.110.0000.00717.00
8.0.100.0000.00816.76
8.0.90.0040.00416.89
8.0.80.0070.01017.02
8.0.70.0000.00716.98
8.0.60.0000.00716.77
8.0.50.0000.00717.02
8.0.30.0080.01716.95
8.0.20.0090.01117.40
8.0.10.0030.00516.99
8.0.00.0100.00716.86
7.4.330.0050.00015.13
7.4.320.0030.00316.46
7.4.300.0000.00616.38
7.4.290.0070.00016.44
7.4.280.0030.00716.46
7.4.270.0040.00316.46
7.4.260.0000.00716.42
7.4.250.0040.00316.55
7.4.240.0020.00516.48
7.4.230.0030.00316.63
7.4.220.0130.00316.52
7.4.210.0100.00616.52
7.4.200.0030.00316.56
7.4.160.0110.00716.34
7.4.150.0090.00917.40
7.4.140.0020.01517.86
7.4.130.0060.01216.39
7.4.120.0090.01016.36
7.4.110.0110.00816.50
7.4.100.0150.00316.36
7.4.90.0120.00616.54
7.4.80.0070.01019.39
7.4.70.0200.00016.38
7.4.60.0090.00916.38
7.4.50.0000.00416.38
7.4.40.0060.01216.53
7.4.30.0030.01616.46
7.4.00.0030.01114.76
7.3.330.0000.00513.20
7.3.320.0030.00313.42
7.3.310.0040.00416.44
7.3.300.0040.00416.26
7.3.290.0090.00616.35
7.3.280.0090.01016.38
7.3.270.0140.00317.40
7.3.260.0170.00016.59
7.3.250.0100.00816.43
7.3.240.0090.00816.54
7.3.230.0110.00416.55
7.3.210.0090.00916.32
7.3.200.0090.00919.39
7.3.190.0140.00316.25
7.3.180.0030.01316.49
7.3.170.0000.01516.38
7.3.160.0040.01316.54
7.2.330.0170.00016.46
7.2.320.0100.01116.70
7.2.310.0040.01816.73
7.2.300.0030.01316.72
7.2.290.0080.00816.50
7.2.60.0030.00916.88
7.1.200.0030.01015.89
7.1.70.0030.00916.77
7.1.60.0100.01419.40
7.1.50.0130.00916.95
7.1.00.0030.07722.52
7.0.200.0070.00316.89
7.0.140.0030.07322.07
7.0.60.0030.04320.04
7.0.50.0000.04717.87
7.0.40.0200.08020.24
7.0.30.0400.05020.25
7.0.20.0170.09020.19
7.0.10.0370.07020.15
7.0.00.0000.07720.23
5.6.280.0030.07321.08
5.6.210.0000.09320.77
5.6.200.0030.04318.25
5.6.190.0070.09320.61
5.6.180.0270.03720.48
5.6.170.0370.07720.39
5.6.160.0070.09020.54
5.6.150.0070.04018.21
5.6.140.0070.03718.16
5.6.130.0100.07018.15
5.6.120.0030.09321.02
5.6.110.0200.07321.04
5.6.100.0100.06320.89
5.6.90.0130.07720.97
5.6.80.0170.06320.53
5.6.70.3170.03320.46
5.5.350.0170.07720.48
5.5.340.0070.08317.98
5.5.330.0070.06020.34
5.5.320.0430.05720.30
5.5.310.0270.07320.34
5.5.300.0070.07717.94
5.5.290.0070.03718.03
5.5.280.0170.07320.78
5.5.270.0070.04320.73
5.5.260.0070.04720.98
5.5.250.0030.06320.66
5.5.240.3430.04320.07
5.4.450.0430.04719.27
5.4.440.0200.05019.32
5.4.430.0100.04319.40
5.4.420.0500.03319.19
5.4.410.0300.04719.14
5.4.400.0270.03019.09
5.4.390.0400.04019.06
5.4.380.0230.06318.70
5.4.370.0330.04718.59
5.4.360.0330.04318.70
5.4.350.0230.06718.83
5.4.340.0430.04718.70
5.4.320.0060.04112.50
5.4.310.0070.03712.50
5.4.300.0070.03712.50
5.4.290.0080.03712.50
5.4.280.0070.03512.40
5.4.270.0100.03412.40
5.4.260.0070.03712.40
5.4.250.0070.04012.40
5.4.240.0060.03512.40
5.4.230.0040.04012.39
5.4.220.0050.03712.39
5.4.210.0070.03812.39
5.4.200.0090.03412.39
5.4.190.0040.03912.39
5.4.180.0050.03712.39
5.4.170.0070.03512.40
5.4.160.0090.03312.40
5.4.150.0070.04012.39
5.4.140.0050.03712.07
5.4.130.0050.03612.06
5.4.120.0070.03812.02
5.4.110.0070.03612.02
5.4.100.0040.03712.02
5.4.90.0090.03512.02
5.4.80.0050.03912.02
5.4.70.0040.03812.02
5.4.60.0130.02912.02
5.4.50.0050.03812.01
5.4.40.0090.03612.00
5.4.30.0100.04512.00
5.4.20.0060.04412.00
5.4.10.0060.03512.00
5.4.00.0030.03911.49
5.3.290.0040.03912.80
5.3.280.0080.03612.71
5.3.270.0080.03812.73
5.3.260.0060.04012.72
5.3.250.0080.03512.72
5.3.240.0060.04012.72
5.3.230.0080.03712.70
5.3.220.0070.03812.68
5.3.210.0100.04112.68
5.3.200.0100.03412.68
5.3.190.0100.03812.68
5.3.180.0080.04112.67
5.3.170.0080.03612.67
5.3.160.0060.03812.67
5.3.150.0040.03912.67
5.3.140.0090.03412.66
5.3.130.0080.04112.66
5.3.120.0040.04212.66
5.3.110.0080.04212.66
5.3.100.0050.04212.13
5.3.90.0070.03512.11
5.3.80.0060.03712.10
5.3.70.0080.04112.10
5.3.60.0050.03712.08
5.3.50.0080.04112.03
5.3.40.0080.03912.04
5.3.30.0060.03611.99
5.3.20.0100.03211.77
5.3.10.0080.03411.73
5.3.00.0060.03711.73
5.2.170.0040.0329.23
5.2.160.0060.0299.23
5.2.150.0070.0299.23
5.2.140.0050.0319.23
5.2.130.0070.0289.19
5.2.120.0050.0299.19
5.2.110.0080.0319.20
5.2.100.0080.0289.18
5.2.90.0070.0279.18
5.2.80.0050.0319.18
5.2.70.0050.0319.18
5.2.60.0080.0329.14
5.2.50.0060.0369.10
5.2.40.0030.0369.08
5.2.30.0030.0339.06
5.2.20.0060.0329.04
5.2.10.0080.0328.95
5.2.00.0050.0308.82
5.1.60.0070.0248.09
5.1.50.0030.0288.09
5.1.40.0040.0248.07
5.1.30.0070.0258.42
5.1.20.0030.0288.44
5.1.10.0050.0268.17
5.1.00.0090.0218.17
5.0.50.0040.0206.65
5.0.40.0030.0226.50
5.0.30.0030.0326.31
5.0.20.0040.0196.29
5.0.10.0030.0206.27
5.0.00.0050.0336.25
4.4.90.0040.0154.78
4.4.80.0030.0174.75
4.4.70.0040.0164.75
4.4.60.0040.0224.75
4.4.50.0050.0184.77
4.4.40.0060.0234.70
4.4.30.0080.0124.76
4.4.20.0060.0164.85
4.4.10.0050.0134.85
4.4.00.0040.0244.76
4.3.110.0030.0184.67
4.3.100.0020.0164.67
4.3.90.0020.0154.64
4.3.80.0020.0284.58
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0020.0164.63
4.3.40.0020.0274.54
4.3.30.0040.0213.30
4.3.20.0030.0163.28
4.3.10.0030.0153.24
4.3.00.0070.01315.89

preferences:
48.67 ms | 401 KiB | 5 Q