3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $foo = 'foo'; public function iterate(Foo $thing) { $r = []; foreach ($thing as $prop) { $r[] = $prop; } return $r; } } class Bar extends Foo { protected $bar = 'bar'; } class Baz extends Foo { protected $baz = 'baz'; } var_dump((new Foo)->iterate(new Foo)); var_dump((new Bar)->iterate(new Bar)); var_dump((new Baz)->iterate(new Baz)); var_dump((new Bar)->iterate(new Baz)); var_dump((new Baz)->iterate(new Bar));

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.0040.01118.68
8.3.50.0080.01222.12
8.3.40.0110.00418.53
8.3.30.0000.01518.94
8.3.20.0140.00020.29
8.3.10.0100.00021.74
8.3.00.0080.00019.26
8.2.180.0070.01418.28
8.2.170.0140.00022.96
8.2.160.0170.00020.39
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00822.12
8.2.110.0110.00021.24
8.2.100.0060.00617.63
8.2.90.0030.00519.17
8.2.80.0000.00917.97
8.2.70.0030.00617.50
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0030.00518.21
8.2.30.0070.00018.20
8.2.20.0040.00417.87
8.2.10.0030.00518.21
8.2.00.0000.00817.64
8.1.280.0040.01125.92
8.1.270.0030.00519.01
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0100.00020.96
8.1.230.0040.00717.89
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0000.01017.25
8.1.190.0060.00317.10
8.1.180.0040.00418.10
8.1.170.0030.00518.50
8.1.160.0030.00618.91
8.1.150.0030.00618.94
8.1.140.0070.00317.38
8.1.130.0000.00717.82
8.1.120.0030.00417.49
8.1.110.0050.00317.43
8.1.100.0000.00717.34
8.1.90.0000.00817.40
8.1.80.0060.00317.41
8.1.70.0030.00317.51
8.1.60.0080.00017.65
8.1.50.0040.00417.46
8.1.40.0080.00017.53
8.1.30.0000.00817.68
8.1.20.0030.00617.71
8.1.10.0040.00417.54
8.1.00.0030.00517.40
8.0.300.0150.00218.77
8.0.290.0000.00816.88
8.0.280.0000.00718.34
8.0.270.0030.00317.19
8.0.260.0060.00317.20
8.0.250.0000.00717.05
8.0.240.0000.00817.07
8.0.230.0030.00316.94
8.0.220.0070.00016.88
8.0.210.0040.00416.96
8.0.200.0050.00517.05
8.0.190.0000.00816.92
8.0.180.0080.00317.00
8.0.170.0000.00716.98
8.0.160.0000.00917.05
8.0.150.0000.00716.94
8.0.140.0050.00316.97
8.0.130.0000.00613.39
8.0.120.0050.00316.88
8.0.110.0030.00516.91
8.0.100.0030.00516.86
8.0.90.0040.00416.89
8.0.80.0140.00316.94
8.0.70.0070.00017.00
8.0.60.0050.00316.88
8.0.50.0000.00816.75
8.0.30.0130.00717.09
8.0.20.0130.01017.40
8.0.10.0000.00716.96
8.0.00.0060.01016.89
7.4.330.0000.00415.03
7.4.320.0000.00616.47
7.4.300.0030.00316.52
7.4.290.0070.00016.61
7.4.280.0040.00416.50
7.4.270.0080.00016.55
7.4.260.0060.00316.60
7.4.250.0070.00016.51
7.4.240.0000.00716.59
7.4.230.0070.00016.41
7.4.220.0100.01316.63
7.4.210.0070.00916.55
7.4.200.0030.00316.53
7.4.160.0080.00816.63
7.4.150.0110.01617.40
7.4.140.0110.00917.86
7.4.130.0170.00516.46
7.4.120.0100.00716.59
7.4.110.0110.01116.53
7.4.100.0090.00916.46
7.4.90.0060.01116.40
7.4.80.0100.01019.39
7.4.70.0060.01016.52
7.4.60.0000.01616.58
7.4.50.0000.00816.54
7.4.40.0090.00616.61
7.4.30.0060.01216.62
7.4.00.0120.00315.04
7.3.330.0000.00613.32
7.3.320.0050.00013.32
7.3.310.0080.00016.27
7.3.300.0040.00416.28
7.3.290.0070.00016.37
7.3.280.0110.00716.28
7.3.270.0100.00717.40
7.3.260.0200.00016.54
7.3.250.0080.01316.50
7.3.240.0150.00316.50
7.3.230.0100.00616.47
7.3.210.0080.00816.64
7.3.200.0120.01116.33
7.3.190.0200.00416.29
7.3.180.0100.00516.66
7.3.170.0080.00816.45
7.3.160.0110.00516.54
7.2.330.0090.00916.63
7.2.320.0150.00316.78
7.2.310.0120.01216.80
7.2.300.0070.01016.82
7.2.290.0110.00516.69
7.2.00.0000.01219.42
7.1.100.0080.00318.25
7.1.70.0000.00917.22
7.1.60.0070.01819.57
7.1.50.0040.01916.93
7.1.00.0070.07022.51
7.0.200.0030.00616.72
7.0.140.0030.03321.92
7.0.110.0100.08019.92
7.0.100.0030.05319.99
7.0.90.0030.05319.94
7.0.80.0100.04320.07
7.0.70.0700.07319.88
7.0.60.0600.09319.71
7.0.50.0670.06719.99
7.0.40.0000.04019.85
7.0.30.0170.07719.70
7.0.20.0070.07319.77
7.0.10.0000.04019.64
7.0.00.0100.03019.73
5.6.280.0000.07320.90
5.6.260.0000.04720.67
5.6.250.0200.03020.70
5.6.240.0100.06720.57
5.6.230.0070.04720.67
5.6.220.0100.08020.85
5.6.210.0130.07020.68
5.6.200.0070.08020.68
5.6.190.0130.07020.57
5.6.180.0130.07020.71
5.6.170.0030.08320.71
5.6.160.0030.04020.63
5.6.150.0070.03020.67
5.6.140.0000.08020.57
5.6.130.0070.07020.61
5.6.120.0070.07320.62
5.6.110.0000.07720.65
5.6.100.0100.06720.55
5.6.90.0000.06020.67
5.6.80.0170.06019.94
5.6.70.0070.06719.93
5.6.60.0000.08320.04
5.6.50.0000.06720.00
5.6.40.0100.07720.00
5.6.30.0030.07319.98
5.6.20.0000.04719.95
5.6.10.0100.04020.05
5.6.00.0070.06319.83
5.5.380.0000.05017.68
5.5.370.0070.08017.60
5.5.360.0100.06317.51
5.5.350.0030.06717.64
5.5.340.0100.06318.11
5.5.330.0100.07017.93
5.5.320.0130.03318.14
5.5.310.0000.04018.10
5.5.300.0030.04018.25
5.5.290.0100.06318.09
5.5.280.0030.08317.93
5.5.270.0030.06318.05
5.5.260.0070.07318.09
5.5.250.0100.07317.91
5.5.240.0070.06717.61
5.5.230.0030.07017.45
5.5.220.0130.06317.46
5.5.210.0100.07717.43
5.5.200.0030.08017.29
5.5.190.0100.07317.45
5.5.180.0000.04017.61
5.5.160.0100.03017.44
5.5.150.0000.03717.44
5.5.140.0000.05717.17
5.5.130.0030.07317.30
5.5.120.0070.05317.45
5.5.110.0070.05717.47
5.5.100.0000.04017.34
5.5.90.0000.05017.17
5.5.80.0100.05317.18
5.5.70.0030.03717.34
5.5.60.0000.03317.30
5.5.50.0100.05017.16
5.5.40.0130.06717.34
5.5.30.0030.05017.36
5.5.20.0000.04017.33
5.5.10.0000.07017.34
5.5.00.0070.03317.32
5.4.450.0070.03719.36
5.4.440.0070.07719.31
5.4.430.0070.08319.32
5.4.420.0070.08719.30
5.4.410.0030.07019.42
5.4.400.0070.06719.00
5.4.390.0100.03019.14
5.4.380.0070.04719.00
5.4.370.0070.06319.18
5.4.360.0130.05719.02
5.4.350.0070.06719.23
5.4.340.0070.05019.37
5.4.320.0030.03719.34
5.4.310.0070.04019.18
5.4.300.0000.04019.00
5.4.290.0030.03719.31
5.4.280.0000.04719.00
5.4.270.0030.03319.22
5.4.260.0000.05019.17
5.4.250.0030.04019.33
5.4.240.0030.07318.94
5.4.230.0030.04018.96
5.4.220.0000.06718.99
5.4.210.0070.03719.23
5.4.200.0030.03718.98
5.4.190.0070.03319.30
5.4.180.0070.05019.02
5.4.170.0070.03019.17
5.4.160.0100.02719.22
5.4.150.0030.03719.12
5.4.140.0070.06716.41
5.4.130.0100.04316.58
5.4.120.0030.06316.60
5.4.110.0170.02016.46
5.4.100.0070.03016.48
5.4.90.0070.05716.50
5.4.80.0000.07016.54
5.4.70.0030.06716.46
5.4.60.0030.05016.44
5.4.50.0000.04716.54
5.4.40.0100.03016.39
5.4.30.0030.06316.43
5.4.20.0130.06716.51
5.4.10.0030.08316.41
5.4.00.0030.08016.00
5.3.290.0000.05714.90
5.3.280.0100.04714.63
5.3.270.0070.03714.62
5.3.260.0070.08014.73
5.3.250.0000.04314.63
5.3.240.0030.03714.84
5.3.230.0030.04714.61
5.3.220.0070.03714.57
5.3.210.0170.06014.79
5.3.200.0000.03314.71
5.3.190.0070.07714.56
5.3.180.0000.04014.71
5.3.170.0130.06714.69
5.3.160.0070.03714.56
5.3.150.0030.07314.69
5.3.140.0100.06714.68
5.3.130.0100.06014.54
5.3.120.0030.07314.58
5.3.110.0130.07314.55
5.3.100.0170.06714.05
5.3.90.0070.07713.88
5.3.80.0030.07714.00
5.3.70.0070.07714.03
5.3.60.0030.07314.01
5.3.50.0170.06013.95
5.3.40.0070.05713.98
5.3.30.0030.04314.15
5.3.20.0030.05313.65
5.3.10.0030.06013.67
5.3.00.0000.03713.78
5.2.170.0000.07011.96
5.2.160.0130.02011.96
5.2.150.0030.06311.96
5.2.140.0130.03711.96
5.2.130.0030.04711.96
5.2.120.0000.03711.96
5.2.110.0030.04711.96
5.2.100.0030.04311.96
5.2.90.0100.05711.96
5.2.80.0070.03311.96
5.2.70.0070.06311.96
5.2.60.0000.03311.96
5.2.50.0000.03311.96
5.2.40.0070.03011.96
5.2.30.0030.03011.96
5.2.20.0170.03711.96
5.2.10.0100.03011.96
5.2.00.0030.06011.96
5.1.60.0000.03011.96
5.1.50.0000.02711.96
5.1.40.0000.02711.96
5.1.30.0030.03011.96
5.1.20.0030.04311.96
5.1.10.0000.02711.96
5.1.00.0100.03311.96
5.0.50.0030.03011.96
5.0.40.0000.02011.96
5.0.30.0000.02711.96
5.0.20.0030.01711.96
5.0.10.0000.02011.96
5.0.00.0030.02711.96
4.4.90.0000.04011.96
4.4.80.0000.03711.96
4.4.70.0030.01311.96
4.4.60.0030.03011.96
4.4.50.0000.01711.96
4.4.40.0100.04011.96
4.4.30.0030.01311.96
4.4.20.0030.02311.96
4.4.10.0000.01711.96
4.4.00.0070.02011.96
4.3.110.0000.01711.96
4.3.100.0000.02011.96
4.3.90.0000.01311.96
4.3.80.0000.02311.96
4.3.70.0030.01311.96
4.3.60.0000.01311.96
4.3.50.0030.01311.96
4.3.40.0030.01711.96
4.3.30.0000.01311.96
4.3.20.0000.01311.96
4.3.10.0000.01311.96
4.3.00.0000.01311.96

preferences:
63.49 ms | 400 KiB | 5 Q