3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $data = array('foo' => 'bar'); public function get($key) { return array_key_exists($key, $this->data) ? $this->data[$key] : NULL; } } $foo = new Foo(); $result = !empty($foo->get('foo')); var_export($result); $result = !empty($foo->get('bar')); var_export($result);

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.0060.01018.55
8.3.50.0170.01021.98
8.3.40.0040.01418.70
8.3.30.0140.00718.82
8.3.20.0000.00820.21
8.3.10.0040.00421.91
8.3.00.0040.00419.56
8.2.180.0090.01218.27
8.2.170.0090.00622.96
8.2.160.0070.00720.32
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0160.00326.16
8.2.120.0040.00421.03
8.2.110.0040.00722.07
8.2.100.0090.00317.91
8.2.90.0030.00619.27
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0050.00318.16
8.2.30.0040.00418.00
8.2.20.0080.00017.87
8.2.10.0070.00018.14
8.2.00.0050.00217.76
8.1.280.0170.00325.92
8.1.270.0040.00422.19
8.1.260.0070.00026.35
8.1.250.0110.00728.09
8.1.240.0060.00323.86
8.1.230.0040.00819.06
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0090.00317.35
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0050.00318.64
8.1.160.0060.00322.02
8.1.150.0000.00818.79
8.1.140.0060.00617.45
8.1.130.0000.00717.88
8.1.120.0000.00717.43
8.1.110.0040.00417.37
8.1.100.0070.00017.42
8.1.90.0040.00417.50
8.1.80.0030.00317.48
8.1.70.0040.00417.45
8.1.60.0090.00017.51
8.1.50.0080.00017.55
8.1.40.0040.00417.44
8.1.30.0030.00617.56
8.1.20.0040.00417.58
8.1.10.0050.00217.58
8.1.00.0000.00717.42
8.0.300.0000.00718.77
8.0.290.0020.00516.75
8.0.280.0030.00318.45
8.0.270.0040.00417.27
8.0.260.0070.00017.19
8.0.250.0030.00316.87
8.0.240.0070.00017.01
8.0.230.0030.00316.99
8.0.220.0030.00316.89
8.0.210.0050.00216.95
8.0.200.0030.00316.93
8.0.190.0070.00016.99
8.0.180.0000.00816.88
8.0.170.0050.00316.93
8.0.160.0030.00316.93
8.0.150.0040.00416.84
8.0.140.0030.00616.87
8.0.130.0000.00513.42
8.0.120.0030.00616.91
8.0.110.0040.00416.82
8.0.100.0030.00316.81
8.0.90.0040.00416.82
8.0.80.0150.00616.84
8.0.70.0040.00416.70
8.0.60.0000.00916.77
8.0.50.0040.00416.94
8.0.30.0100.01217.21
8.0.20.0140.00517.40
8.0.10.0030.00316.88
8.0.00.0080.00916.78
7.4.330.0050.00015.08
7.4.320.0000.00716.57
7.4.300.0060.00016.51
7.4.290.0000.00716.47
7.4.280.0070.00016.53
7.4.270.0040.00416.51
7.4.260.0030.00316.58
7.4.250.0030.00316.60
7.4.240.0030.00316.58
7.4.230.0040.00416.71
7.4.220.0110.00816.54
7.4.210.0080.00816.57
7.4.200.0000.00716.71
7.4.160.0090.00616.52
7.4.150.0030.01617.40
7.4.140.0090.00817.86
7.4.130.0130.00516.66
7.4.120.0090.00916.60
7.4.110.0080.00816.54
7.4.100.0100.00716.62
7.4.90.0090.00916.43
7.4.80.0080.01219.39
7.4.70.0130.00316.46
7.4.60.0070.01116.62
7.4.50.0030.00316.59
7.4.40.0060.01016.45
7.4.30.0100.00716.45
7.4.00.0040.00914.86
7.3.330.0000.00513.14
7.3.320.0060.00013.25
7.3.310.0030.00316.37
7.3.300.0070.00016.31
7.3.290.0040.01516.30
7.3.280.0090.00716.32
7.3.270.0090.00917.40
7.3.260.0140.00416.54
7.3.250.0120.00716.46
7.3.240.0110.00716.41
7.3.230.0070.01016.39
7.3.210.0130.00416.35
7.3.200.0100.00719.39
7.3.190.0080.00816.55
7.3.180.0070.01016.50
7.3.170.0090.01316.36
7.3.160.0100.00516.39
7.3.120.0100.00314.93
7.2.330.0070.01016.38
7.2.320.0040.01816.64
7.2.310.0080.00816.76
7.2.300.0070.01016.68
7.2.290.0110.00516.55
7.2.60.0040.01116.84
7.2.00.0100.00319.30
7.1.200.0040.01215.77
7.1.100.0110.00718.29
7.1.70.0070.00016.93
7.1.60.0070.01719.25
7.1.50.0060.00616.69
7.1.00.0000.07722.31
7.0.200.0060.00916.45
7.0.140.0100.06321.96
7.0.60.0030.06719.93
7.0.50.0070.04717.99
7.0.40.0070.08020.15
7.0.30.0570.06320.17
7.0.20.0300.05320.21
7.0.10.0330.03720.05
7.0.00.0030.06020.10
5.6.280.0000.07720.91
5.6.210.0100.08720.63
5.6.200.0100.07718.20
5.6.190.0130.05020.64
5.6.180.4130.04320.47
5.6.170.0200.04720.46
5.6.160.0070.04020.45
5.6.150.0030.03718.14
5.6.140.0130.06718.18
5.6.130.0000.05718.15
5.6.120.0030.08720.99
5.6.110.0070.08320.98
5.6.100.0000.07021.03
5.6.90.0130.07720.97
5.6.80.0100.07320.29
5.6.70.0230.07320.36
5.5.350.0330.07320.48
5.5.340.0030.04017.99
5.5.330.0070.06020.21
5.5.320.0430.04720.46
5.5.310.0230.05320.26
5.5.300.0000.05017.91
5.5.290.0000.05017.94
5.5.280.0030.08320.90
5.5.270.0070.04020.80
5.5.260.0070.04020.89
5.5.250.0070.04020.62
5.5.240.0000.03320.36
5.4.450.0730.06019.62
5.4.440.0170.05719.68
5.4.430.0170.06019.32
5.4.420.0270.06719.66
5.4.410.0300.06719.08
5.4.400.0770.06318.84
5.4.390.0970.06018.74
5.4.380.0030.06018.73
5.4.370.0200.03718.72
5.4.360.0270.03018.47
5.4.350.0200.06012.03
5.4.340.0070.04012.03
5.4.320.0080.03712.51
5.4.310.0100.03212.51
5.4.300.0060.03612.51
5.4.290.0080.03912.51
5.4.280.0040.03512.40
5.4.270.0080.03512.41
5.4.260.0040.03812.40
5.4.250.0050.03912.41
5.4.240.0080.03512.40
5.4.230.0050.04412.39
5.4.220.0090.04212.39
5.4.210.0070.03412.40
5.4.200.0070.03812.40
5.4.190.0060.03512.39
5.4.180.0050.03612.39
5.4.170.0060.03512.40
5.4.160.0060.03512.40
5.4.150.0040.03612.39
5.4.140.0040.03812.08
5.4.130.0050.03512.07
5.4.120.0030.03612.03
5.4.110.0030.03812.02
5.4.100.0050.03512.02
5.4.90.0040.03912.02
5.4.80.0040.03812.02
5.4.70.0050.03412.02
5.4.60.0050.03412.02
5.4.50.0030.03812.02
5.4.40.0040.03512.00
5.4.30.0040.03612.00
5.4.20.0060.03412.00
5.4.10.0070.03312.00
5.4.00.0070.03411.50
5.3.290.0080.03912.80
5.3.280.0070.03612.71
5.3.270.0060.03812.73
5.3.260.0110.04012.72
5.3.250.0040.04012.72
5.3.240.0070.03612.72
5.3.230.0050.03912.71
5.3.220.0070.04012.68
5.3.210.0030.04412.68
5.3.200.0040.03812.68
5.3.190.0050.03812.68
5.3.180.0030.03912.67
5.3.170.0060.03512.67
5.3.160.0040.03812.68
5.3.150.0090.03412.67
5.3.140.0080.03412.66
5.3.130.0050.04012.66
5.3.120.0060.03812.66
5.3.110.0080.05412.66
5.3.100.0060.03912.13
5.3.90.0070.04012.11
5.3.80.0040.03812.09
5.3.70.0050.03612.09
5.3.60.0060.03512.07
5.3.50.0070.03412.03
5.3.40.0060.03612.03
5.3.30.0060.03511.99
5.3.20.0040.03711.77
5.3.10.0070.03211.73
5.3.00.0050.03511.72
5.2.170.0040.0319.22
5.2.160.0040.0299.22
5.2.150.0090.0289.22
5.2.140.0060.0289.22
5.2.130.0060.0279.18
5.2.120.0060.0279.18
5.2.110.0040.0299.19
5.2.100.0040.0309.18
5.2.90.0050.0299.18
5.2.80.0070.0279.18
5.2.70.0050.0299.18
5.2.60.0030.0319.13
5.2.50.0030.0339.09
5.2.40.0030.0379.07
5.2.30.0040.0329.05
5.2.20.0030.0309.04
5.2.10.0040.0298.95
5.2.00.0020.0318.81
5.1.60.0030.0298.09
5.1.50.0030.0268.08
5.1.40.0020.0338.07
5.1.30.0040.0288.43
5.1.20.0060.0248.44
5.1.10.0040.0258.16
5.1.00.0050.0258.17
5.0.50.0040.0206.64
5.0.40.0020.0206.50
5.0.30.0030.0326.31
5.0.20.0030.0216.28
5.0.10.0040.0196.26
5.0.00.0060.0286.25
4.4.90.0030.0164.78
4.4.80.0030.0154.76
4.4.70.0020.0164.76
4.4.60.0020.0154.76
4.4.50.0030.0164.77
4.4.40.0030.0254.71
4.4.30.0020.0164.76
4.4.20.0030.0154.84
4.4.10.0020.0164.84
4.4.00.0040.0254.75
4.3.110.0030.0224.67
4.3.100.0030.0154.67
4.3.90.0010.0174.63
4.3.80.0020.0254.58
4.3.70.0040.0164.63
4.3.60.0020.0214.63
4.3.50.0030.0224.63
4.3.40.0030.0264.54
4.3.30.0000.0183.30
4.3.20.0020.0163.28
4.3.10.0030.0153.23
4.3.00.0100.0237.08

preferences:
41.2 ms | 401 KiB | 5 Q