3v4l.org

run code in 300+ PHP versions simultaneously
<?php $updatedPapers = []; $count = 0; foreach ($this->paperList as $key => $paper) { $updatedPapers[$count] = $obj1; $count ++; if($paper->nup %2 != 0 && $paper->nup != 1){ $updatedPapers[$count] = $obj2; $count ++; } } ?> /** obj1 and obj2 get returned from a function with the below values. It seems the obj2 is overwriting obj1. obj1 ( [sheet_size_id] => 2 [sheet_size] => B1 [sheet_width] => 1020 [sheet_height] => 720 [printable_width] => 1005 [printable_height] => 704 [print_cost] => 5.69 [gsm] => 130 [thickness] => 95 [finish] => gloss [tonne_rate] => 660 [brand_name] => Chorus [brand_code] => Chorus [supplier_name] => EBBs [supplier_code] => EBBs [machine] => XL106 [machine_id] => 2 [method] => Litho [nup] => 9 [sections] => Array ( [0] => Array ( [leafs] => 2 [sheets] => 250 [method] => Work and Turn [plates] => 4 ) ) [totalPlates] => 4 [sheets] => 250 ) obj2 ( [sheet_size_id] => 2 [sheet_size] => B1 [sheet_width] => 1020 [sheet_height] => 720 [printable_width] => 1005 [printable_height] => 704 [print_cost] => 5.69 [gsm] => 130 [thickness] => 95 [finish] => gloss [tonne_rate] => 660 [brand_name] => Chorus [brand_code] => Chorus [supplier_name] => EBBs [supplier_code] => EBBs [machine] => XL106 [machine_id] => 2 [method] => Litho [nup] => 9 [sections] => Array ( [0] => Array ( [leafs] => 9 [sheets] => 223 [method] => Sheet Work [plates] => 8 ) ) [totalPlates] => 8 [sheets] => 1000 )

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.5.30.0080.00919.48
8.5.20.0100.00620.04
8.5.10.0110.00619.68
8.5.00.0130.00820.22
8.4.180.0140.00722.05
8.4.170.0110.00923.69
8.4.160.0150.00523.80
8.4.150.0050.00216.87
8.4.140.0150.00718.04
8.4.130.0100.01017.91
8.4.120.0110.00622.20
8.4.110.0100.00918.79
8.4.100.0130.00818.22
8.4.90.0140.00718.04
8.4.80.0050.00317.90
8.4.70.0110.00918.17
8.4.60.0080.00417.86
8.4.50.0130.00718.54
8.4.40.0040.00419.70
8.4.30.0100.01019.84
8.4.20.0040.00418.60
8.4.10.0070.01419.64
8.3.300.0120.01020.99
8.3.290.0040.00620.91
8.3.280.0090.01018.46
8.3.270.0100.01216.39
8.3.260.0110.00816.54
8.3.250.0060.00218.98
8.3.240.0050.00516.46
8.3.230.0090.01016.66
8.3.220.0090.00517.22
8.3.210.0110.00816.84
8.3.200.0120.00716.76
8.3.190.0110.00818.36
8.3.180.0040.00417.29
8.3.170.0150.00419.00
8.3.160.0180.00020.13
8.3.150.0000.00816.70
8.3.140.0060.01317.07
8.3.130.0080.00816.79
8.3.120.0090.00318.79
8.3.110.0040.00420.94
8.3.100.0000.00916.63
8.3.90.0080.00026.77
8.3.80.0090.00019.36
8.3.70.0040.01118.28
8.3.60.0060.01318.68
8.3.50.0130.00321.88
8.3.40.0090.00618.86
8.3.30.0040.01218.84
8.3.20.0080.00019.85
8.3.10.0040.00421.95
8.3.00.0090.00023.48
8.2.300.0070.00218.37
8.2.290.0120.00620.38
8.2.280.0060.00916.94
8.2.270.0140.00317.37
8.2.260.0060.00318.79
8.2.250.0080.00016.78
8.2.240.0140.00317.18
8.2.230.0060.00322.58
8.2.220.0070.00424.06
8.2.210.0050.00326.77
8.2.200.0090.00018.88
8.2.190.0030.01916.88
8.2.180.0070.01118.29
8.2.170.0070.01122.96
8.2.160.0030.01020.39
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0030.00620.80
8.2.110.0030.00622.12
8.2.100.0080.00417.84
8.2.90.0060.00317.84
8.2.80.0030.00619.95
8.2.70.0000.00817.50
8.2.60.0040.00417.63
8.2.50.0040.00419.28
8.2.40.0000.00820.45
8.2.30.0050.00220.52
8.2.20.0050.00218.00
8.2.10.0040.00418.08
8.2.00.0000.00718.29
8.1.340.0080.00119.93
8.1.330.0060.01316.89
8.1.320.0130.00816.36
8.1.310.0100.00318.36
8.1.300.0040.00416.82
8.1.290.0090.00030.84
8.1.280.0160.00425.92
8.1.270.0050.00323.79
8.1.260.0000.00826.35
8.1.250.0030.00628.09
8.1.240.0060.00320.96
8.1.230.0070.00421.03
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0000.00817.13
8.1.180.0000.00818.10
8.1.170.0090.00018.35
8.1.160.0000.00718.85
8.1.150.0030.00320.29
8.1.140.0040.00419.53
8.1.130.0030.00317.32
8.1.120.0000.00817.43
8.1.110.0060.00317.40
8.1.100.0040.00417.38
8.1.90.0000.00817.29
8.1.80.0080.00017.44
8.1.70.0070.00017.36
8.1.60.0050.00217.42
8.1.50.0080.00017.56
8.1.40.0050.00317.59
8.1.30.0040.00417.71
8.1.20.0040.00417.64
8.1.10.0000.00817.63
8.1.00.0040.00417.55
8.0.300.0080.00019.96
8.0.290.0040.00416.75
8.0.280.0000.00718.34
8.0.270.0040.00417.19
8.0.260.0030.00316.84
8.0.250.0030.00317.00
8.0.240.0050.00516.94
8.0.230.0040.00416.87
8.0.220.0070.00016.84
8.0.210.0040.00416.94
8.0.200.0060.00016.94
8.0.190.0080.00316.97
8.0.180.0040.00416.96
8.0.170.0000.00816.86
8.0.160.0000.00716.85
8.0.150.0030.00516.78
8.0.140.0030.00616.87
8.0.130.0060.00013.32
8.0.120.0070.00016.88
8.0.110.0030.00316.88
8.0.100.0000.00716.95
8.0.90.0000.00816.79
8.0.80.0060.00916.89
8.0.70.0040.00416.81
8.0.60.0030.00516.80
8.0.50.0040.00416.81
8.0.30.0070.01117.04
8.0.20.0070.01417.40
8.0.10.0050.00216.94
8.0.00.0120.00616.56
7.4.330.0000.00515.55
7.4.320.0000.00716.57
7.4.300.0000.00716.51
7.4.290.0070.00316.45
7.4.280.0000.00816.51
7.4.270.0060.00316.68
7.4.260.0000.00716.42
7.4.250.0000.00716.60
7.4.240.0030.00316.64
7.4.230.0050.00216.66
7.4.220.0140.01116.56
7.4.210.0090.00816.64
7.4.200.0030.00316.61
7.4.160.0050.01516.56
7.4.150.0160.00317.40
7.4.140.0090.01017.86
7.4.130.0080.01016.52
7.4.120.0120.00616.46
7.4.110.0140.01016.67
7.4.100.0120.00916.56
7.4.90.0110.00716.49
7.4.80.0130.00619.39
7.4.70.0070.01016.61
7.4.60.0060.01016.61
7.4.50.0030.01416.50
7.4.40.0080.01516.72
7.4.30.0100.00716.54
7.4.00.0040.01115.00
7.3.330.0050.00013.09
7.3.320.0000.00513.17
7.3.310.0020.00516.12
7.3.300.0000.00716.20
7.3.290.0030.00316.29
7.3.280.0110.00616.31
7.3.270.0090.00917.40
7.3.260.0090.00816.50
7.3.250.0070.00916.37
7.3.240.0110.01016.28
7.3.230.0130.00616.59
7.3.210.0120.00616.37
7.3.200.0070.01116.40
7.3.190.0090.01216.54
7.3.180.0100.00716.57
7.3.170.0140.00316.29
7.3.160.0060.01016.55
7.3.120.0000.01314.94
7.3.110.0030.01014.84
7.3.100.0030.01314.58
7.3.90.0060.00614.81
7.3.80.0060.00314.61
7.3.70.0030.00614.85
7.3.60.0110.00414.54
7.3.50.0000.01414.90
7.3.40.0070.01014.85
7.3.30.0060.00314.49
7.3.20.0070.00316.81
7.3.10.0000.01616.55
7.3.00.0060.00616.59
7.2.330.0150.00916.73
7.2.320.0000.01716.34
7.2.310.0100.00716.39
7.2.300.0070.01016.77
7.2.290.0110.00716.41
7.2.240.0110.00414.92
7.2.230.0080.00815.14
7.2.220.0000.01114.88
7.2.210.0000.01814.91
7.2.200.0060.00614.95
7.2.190.0000.01314.97
7.2.180.0060.00615.00
7.2.170.0130.00015.09
7.2.160.0090.00615.02
7.2.150.0030.01016.56
7.2.140.0070.00716.70
7.2.130.0060.00916.53
7.2.120.0030.01116.93
7.2.110.0030.00616.91
7.2.100.0030.01016.85
7.2.90.0100.00716.85
7.2.80.0040.01116.91
7.2.70.0040.01116.87
7.2.60.0030.01016.79
7.2.50.0060.00616.92
7.2.40.0090.00616.67
7.2.30.0030.01316.74
7.2.20.0150.00016.75
7.2.10.0000.01216.87
7.2.00.0030.01316.91
7.1.330.0060.00615.46
7.1.320.0040.01115.68
7.1.310.0030.01315.59
7.1.300.0040.01115.53
7.1.290.0060.00615.62
7.1.280.0070.00715.74
7.1.270.0030.01015.44
7.1.260.0000.01015.61
7.1.250.0070.00415.64
7.1.200.0150.00415.54
7.1.70.0030.01316.98
7.1.60.0070.01317.24
7.1.50.0030.01416.86
7.1.20.0170.08340.25
7.1.10.0100.06322.18
7.1.00.0030.07722.33
7.0.200.0050.00316.54
7.0.160.0100.07021.67
7.0.150.0100.06021.77
7.0.140.0030.06321.84
7.0.130.0030.07721.87
7.0.120.0130.06721.79
7.0.110.0130.06321.81
7.0.100.0200.06021.85
7.0.90.0130.06021.98
7.0.80.0870.06719.97
7.0.70.1300.05720.09
7.0.60.2400.06321.80
7.0.50.0030.08021.83
7.0.40.0030.06721.98
7.0.30.0170.06021.88
7.0.20.0130.08021.77
7.0.10.0070.06021.78
7.0.00.0070.06021.86

preferences:
46.78 ms | 1655 KiB | 5 Q