3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $foo = 'foo'; protected $bar = 'two'; private $baz = 'three'; } $b = (array) new Foo(); foreach ($b as $key => $value){ trim($key); print $key."".$value."<br>"; } var_dump($b["foo"]); var_dump($b["\0*\0bar"]); var_dump($b["\0Foo\0baz"]);

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.0120.00616.38
8.3.50.0060.01222.84
8.3.40.0110.00418.84
8.3.30.0030.01019.12
8.3.20.0000.00820.43
8.3.10.0000.00723.51
8.3.00.0050.00319.38
8.2.180.0070.00716.38
8.2.170.0140.00022.96
8.2.160.0070.00720.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00320.90
8.2.110.0040.00422.24
8.2.100.0110.00017.90
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0040.00418.02
8.2.20.0040.00417.73
8.2.10.0040.00418.03
8.2.00.0000.00717.72
8.1.280.0100.00325.92
8.1.270.0090.00923.92
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00723.80
8.1.230.0040.00819.04
8.1.220.0060.00317.79
8.1.210.0080.00018.77
8.1.200.0060.00317.10
8.1.190.0060.00317.10
8.1.180.0050.00318.10
8.1.170.0100.00018.53
8.1.160.0000.00722.00
8.1.150.0040.00718.73
8.1.140.0080.00017.44
8.1.130.0030.00317.82
8.1.120.0040.00417.50
8.1.110.0080.00017.47
8.1.100.0050.00317.45
8.1.90.0000.00817.37
8.1.80.0000.00717.33
8.1.70.0060.00017.43
8.1.60.0080.00017.46
8.1.50.0000.00817.38
8.1.40.0030.00617.36
8.1.30.0000.00817.62
8.1.20.0050.00217.46
8.1.10.0070.00017.46
8.1.00.0120.00017.47
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.34
8.0.270.0000.00717.12
8.0.260.0040.00417.29
8.0.250.0070.00016.84
8.0.240.0000.00716.93
8.0.230.0000.00816.81
8.0.220.0000.00716.77
8.0.210.0040.00416.89
8.0.200.0030.00316.82
8.0.190.0000.00817.00
8.0.180.0000.00716.88
8.0.170.0050.00316.86
8.0.160.0000.00716.84
8.0.150.0040.00416.83
8.0.140.0080.00016.77
8.0.130.0030.00313.24
8.0.120.0000.00816.79
8.0.110.0080.00016.83
8.0.100.0040.00416.77
8.0.90.0040.00416.82
8.0.80.0030.01316.83
8.0.70.0080.00016.95
8.0.60.0040.00416.71
8.0.50.0020.00516.90
8.0.30.0120.00717.18
8.0.20.0140.00917.40
8.0.10.0000.00716.98
8.0.00.0090.00816.70
7.4.330.0070.00015.00
7.4.320.0060.00016.50
7.4.300.0030.00616.39
7.4.290.0000.00716.35
7.4.280.0060.00316.56
7.4.270.0070.00016.62
7.4.260.0000.00716.49
7.4.250.0070.00016.53
7.4.240.0050.00216.57
7.4.230.0050.00216.43
7.4.220.0110.00816.67
7.4.210.0090.00616.60
7.4.200.0070.00016.70
7.4.160.0110.00616.56
7.4.150.0070.01317.40
7.4.140.0100.01017.86
7.4.130.0170.00316.69
7.4.120.0090.01116.49
7.4.110.0090.01216.32
7.4.100.0100.00716.58
7.4.90.0120.00616.47
7.4.80.0080.00819.39
7.4.70.0110.00516.48
7.4.60.0100.01016.57
7.4.50.0000.00816.41
7.4.40.0100.00616.42
7.4.30.0060.00916.45
7.4.00.0050.01314.70
7.3.330.0000.00713.22
7.3.320.0000.00513.22
7.3.310.0070.00016.23
7.3.300.0030.00316.31
7.3.290.0000.01316.29
7.3.280.0070.01016.31
7.3.270.0120.00617.40
7.3.260.0100.00716.31
7.3.250.0130.00616.34
7.3.240.0100.01316.56
7.3.230.0060.01116.39
7.3.210.0120.00416.39
7.3.200.0060.01619.39
7.3.190.0040.01116.56
7.3.180.0040.01116.36
7.3.170.0100.00716.43
7.3.160.0070.00716.54
7.3.120.0050.01215.01
7.3.110.0050.01014.69
7.3.100.0030.01014.66
7.3.90.0060.00514.83
7.3.80.0070.00614.58
7.3.70.0080.00514.89
7.3.60.0030.01214.72
7.3.50.0080.00214.85
7.3.40.0070.00914.62
7.3.30.0050.00714.67
7.3.20.0100.00516.38
7.3.10.0100.00716.61
7.3.00.0070.01016.67
7.2.330.0130.01016.76
7.2.320.0070.01316.57
7.2.310.0100.00716.50
7.2.300.0140.00416.51
7.2.290.0030.01316.53
7.2.250.0090.00915.10
7.2.240.0050.01315.11
7.2.230.0050.01114.81
7.2.220.0040.00814.92
7.2.210.0020.01415.15
7.2.200.0060.00715.02
7.2.190.0080.00614.97
7.2.180.0100.00515.13
7.2.170.0030.01215.04
7.2.160.0040.01115.11
7.2.150.0170.00016.66
7.2.140.0060.00916.96
7.2.130.0000.01316.94
7.2.120.0060.00916.95
7.2.110.0120.00317.03
7.2.100.0100.00616.69
7.2.90.0080.00816.77
7.2.80.0070.01116.92
7.2.70.0070.01017.09
7.2.60.0060.00917.00
7.2.50.0040.01417.00
7.2.40.0030.01317.09
7.2.30.0100.00716.73
7.2.20.0100.00316.96
7.2.10.0040.01116.93
7.2.00.0050.00718.32
7.1.330.0080.00815.93
7.1.320.0010.01315.75
7.1.310.0070.00615.92
7.1.300.0000.01315.87
7.1.290.0050.01015.96
7.1.280.0070.00915.94
7.1.270.0070.00715.72
7.1.260.0090.00615.82
7.1.250.0040.01215.83
7.1.100.0030.01017.75
7.1.70.0000.00716.93
7.1.60.0100.01319.40
7.1.50.0090.01516.95
7.1.00.0000.08022.34
7.0.200.0040.00416.42
7.0.140.0070.07022.18
7.0.60.0000.09319.89
7.0.50.0100.05317.88
7.0.40.0070.08320.15
7.0.30.0370.07320.24
7.0.20.0400.07020.15
7.0.10.0100.07020.08
7.0.00.0070.07020.23
5.6.280.0070.06721.07
5.6.210.0070.07020.75
5.6.200.0100.03718.28
5.6.190.0100.04720.48
5.6.180.0200.04720.55
5.6.170.0370.06020.50
5.6.160.0030.05020.57
5.6.150.0070.05718.14
5.6.140.0130.07318.28
5.6.130.0030.04018.21
5.6.120.0030.04720.99
5.6.110.0130.08020.88
5.6.100.0270.07321.07
5.6.90.0030.06720.98
5.6.80.0070.08720.51
5.5.350.4430.04020.30
5.5.340.0100.08018.09
5.5.330.0070.08020.47
5.5.320.0300.04320.21
5.5.310.0330.05720.23
5.5.300.0070.06717.98
5.5.290.0030.04017.98
5.5.280.0100.08320.87
5.5.270.0100.08320.87
5.5.260.0030.06020.86
5.5.250.0030.04020.46
5.5.240.0000.08720.26
5.4.450.0900.06719.59
5.4.440.0770.05319.53
5.4.430.0670.06019.64
5.4.420.0730.04019.49
5.4.410.0000.06019.22
5.4.400.0700.05718.99
5.4.390.0670.06319.29
5.4.380.0130.05318.62
5.4.370.0130.04018.47
5.4.360.0170.05018.59
5.4.350.0110.04712.01
5.4.340.0100.03512.01
5.4.320.0040.03812.50
5.4.310.0080.03712.49
5.4.300.0070.04212.50
5.4.290.0050.03912.49
5.4.280.0080.03512.39
5.4.270.0100.04912.39
5.4.260.0060.03812.39
5.4.250.0050.03912.39
5.4.240.0070.03812.39
5.4.230.0040.04212.38
5.4.220.0040.03712.39
5.4.210.0070.03312.38
5.4.200.0050.03712.38
5.4.190.0040.03812.38
5.4.180.0080.03312.38
5.4.170.0080.03312.39
5.4.160.0070.03512.39
5.4.150.0040.03812.38
5.4.140.0070.03712.07
5.4.130.0070.03412.05
5.4.120.0070.03512.02
5.4.110.0040.03912.01
5.4.100.0060.03612.01
5.4.90.0040.04412.01
5.4.80.0060.03712.01
5.4.70.0070.03412.00
5.4.60.0030.03912.00
5.4.50.0080.03412.00
5.4.40.0090.04812.00
5.4.30.0080.03511.99
5.4.20.0080.03511.99
5.4.10.0070.03611.99
5.4.00.0080.03411.48
5.3.290.0060.04112.80
5.3.280.0090.04012.70
5.3.270.0070.04412.73
5.3.260.0100.04012.72
5.3.250.0090.04012.72
5.3.240.0050.04612.72
5.3.230.0070.04012.71
5.3.220.0060.04012.68
5.3.210.0050.04512.68
5.3.200.0040.03912.68
5.3.190.0100.04712.68
5.3.180.0070.03912.67
5.3.170.0060.03812.67
5.3.160.0100.03912.68
5.3.150.0100.03412.68
5.3.140.0080.03912.66
5.3.130.0060.06012.65
5.3.120.0100.04012.66
5.3.110.0120.04812.66
5.3.100.0060.04412.12
5.3.90.0060.03712.09
5.3.80.0080.03612.08
5.3.70.0090.03312.08
5.3.60.0080.04012.07
5.3.50.0060.03612.02
5.3.40.0110.03312.02
5.3.30.0080.03611.98
5.3.20.0110.04211.76
5.3.10.0050.03511.72
5.3.00.0060.03511.71
5.2.170.0040.0309.21
5.2.160.0050.0299.21
5.2.150.0040.0329.21
5.2.140.0060.0309.21
5.2.130.0060.0339.17
5.2.120.0030.0329.17
5.2.110.0050.0309.18
5.2.100.0060.0279.17
5.2.90.0050.0289.17
5.2.80.0040.0319.17
5.2.70.0030.0329.17
5.2.60.0020.0339.12
5.2.50.0050.0319.09
5.2.40.0040.0299.07
5.2.30.0030.0319.04
5.2.20.0030.0319.03
5.2.10.0040.0288.93
5.2.00.0060.0278.80
5.1.60.0060.0348.08
5.1.50.0060.0238.08
5.1.40.0010.0298.06
5.1.30.0070.0278.41
5.1.20.0090.0238.43
5.1.10.0020.0328.16
5.1.00.0040.0278.16
5.0.50.0040.0206.64
5.0.40.0060.0256.49
5.0.30.0030.0376.31
5.0.20.0050.0186.27
5.0.10.0040.0196.25
5.0.00.0040.0306.24
4.4.90.0030.0144.78
4.4.80.0040.0244.75
4.4.70.0020.0164.76
4.4.60.0010.0164.76
4.4.50.0040.0144.77
4.4.40.0040.0264.71
4.4.30.0020.0154.76
4.4.20.0030.0154.84
4.4.10.0020.0164.85
4.4.00.0010.0304.76
4.3.110.0010.0184.67
4.3.100.0000.0174.66
4.3.90.0050.0164.63
4.3.80.0050.0264.58
4.3.70.0030.0134.63
4.3.60.0010.0154.63
4.3.50.0030.0194.63
4.3.40.0020.0244.54
4.3.30.0030.0153.30
4.3.20.0020.0253.28
4.3.10.0010.0163.24
4.3.00.0170.0208.44

preferences:
46.62 ms | 401 KiB | 5 Q