3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Old = array(array("Subject"=>"Informatik 1", "Active"=>"1")); //$New = array(array("Subject"=>"Informatik 1", "Active"=>"0", "Subject"=>"Informatik 2", "Active"=>"1")); $New = array("Informatik 1~0", "Informatik 2~1"); var_dump(MergeOfReqs($Old, $New)); function MergeOfReqs($Old, $New) { echo"----<br/>"; foreach($Old as &$O) { $State = OffReqState($O, $New); $O["Active"] = ($State !== false) ? $State : 2; } foreach($New as $N) { echo print_r($N, true)."<br/>"; if(OffReqState($N, $Old) === false) { $Old[] = $N; } } echo"-----<br/><br/>"; return $Old; } //And another shitty/crappy name function OffReqState($Elem, $Array) { foreach($Array as $Element) { if(strcmp($Element["Subject"], $Elem["Subject"]) == 0) { return $Elem["Active"]; } } return false; }

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.0070.00718.39
8.3.50.0150.00016.50
8.3.40.0040.01118.71
8.3.30.0000.01419.21
8.3.20.0080.00020.16
8.3.10.0050.00323.45
8.3.00.0040.00419.50
8.2.180.0150.00016.63
8.2.170.0120.00322.96
8.2.160.0100.00320.47
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0030.00522.06
8.2.110.0060.00322.18
8.2.100.0090.00317.88
8.2.90.0040.00419.40
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0040.00418.20
8.2.20.0000.00817.74
8.2.10.0080.00018.13
8.2.00.0040.00417.88
8.1.280.0070.00725.92
8.1.270.0040.00423.97
8.1.260.0070.00026.35
8.1.250.0030.00628.09
8.1.240.0100.00023.92
8.1.230.0060.00619.01
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0030.00618.52
8.1.160.0040.00421.91
8.1.150.0040.00418.86
8.1.140.0070.00017.39
8.1.130.0030.00317.52
8.1.120.0000.00817.39
8.1.110.0000.00717.44
8.1.100.0000.00717.47
8.1.90.0070.00017.38
8.1.80.0040.00417.40
8.1.70.0040.00417.34
8.1.60.0040.00417.50
8.1.50.0000.00817.48
8.1.40.0040.00417.45
8.1.30.0040.00417.68
8.1.20.0030.00617.61
8.1.10.0040.00417.57
8.1.00.0070.00017.57
8.0.300.0030.00518.77
8.0.290.0030.00616.75
8.0.280.0000.00718.38
8.0.270.0080.00017.29
8.0.260.0040.00416.87
8.0.250.0030.00317.05
8.0.240.0040.00416.98
8.0.230.0050.00316.94
8.0.220.0040.00416.85
8.0.210.0070.00016.92
8.0.200.0030.00317.00
8.0.190.0040.00416.96
8.0.180.0000.00716.93
8.0.170.0000.00816.94
8.0.160.0000.00716.95
8.0.150.0050.00316.79
8.0.140.0040.00416.91
8.0.130.0060.00013.38
8.0.120.0030.00616.83
8.0.110.0070.00016.92
8.0.100.0000.00717.00
8.0.90.0040.00416.94
8.0.80.0060.01316.95
8.0.70.0040.00416.80
8.0.60.0030.00516.83
8.0.50.0050.00316.91
8.0.30.0100.01216.91
8.0.20.0060.01417.40
8.0.10.0040.00417.11
8.0.00.0080.01016.85
7.4.330.0050.00015.02
7.4.320.0070.00016.48
7.4.300.0000.00616.52
7.4.290.0040.00416.45
7.4.280.0030.00716.54
7.4.270.0060.00016.54
7.4.260.0000.00716.52
7.4.250.0040.00416.41
7.4.240.0040.00416.53
7.4.230.0000.00716.69
7.4.220.0100.01016.49
7.4.210.0070.01316.65
7.4.200.0070.00016.41
7.4.160.0090.00616.39
7.4.150.0040.01417.40
7.4.140.0130.00517.86
7.4.130.0090.00916.60
7.4.120.0110.00816.60
7.4.110.0070.01116.48
7.4.100.0100.00616.67
7.4.90.0060.00916.57
7.4.80.0070.01119.39
7.4.70.0130.00416.58
7.4.60.0100.00916.59
7.4.50.0090.00816.47
7.4.40.0190.00416.47
7.4.30.0180.00916.64
7.4.20.0100.01016.47
7.4.10.0120.00816.32
7.4.00.0090.00815.69
7.3.330.0060.00013.31
7.3.320.0000.00613.38
7.3.310.0030.00316.43
7.3.300.0070.00016.32
7.3.290.0070.00716.43
7.3.280.0060.01116.43
7.3.270.0130.00317.40
7.3.260.0100.00716.50
7.3.250.0070.01016.45
7.3.240.0120.00616.44
7.3.230.0120.00616.71
7.3.210.0080.00816.49
7.3.200.0110.00919.39
7.3.190.0080.00816.40
7.3.180.0090.01216.58
7.3.170.0110.01116.38
7.3.160.0100.01016.45
7.3.150.0060.01316.54
7.3.140.0120.00816.38
7.3.130.0140.00716.47
7.3.120.0120.00615.79
7.3.110.0090.01015.54
7.3.100.0100.00515.63
7.3.90.0080.00815.72
7.3.80.0050.01015.75
7.3.70.0130.00515.44
7.3.60.0070.01315.57
7.3.50.0100.00615.51
7.3.40.0100.00715.56
7.3.30.0120.00515.57
7.3.20.0060.01316.49
7.3.10.0110.00516.36
7.3.00.0100.00716.57
7.2.330.0070.01116.88
7.2.320.0100.00716.55
7.2.310.0110.00916.46
7.2.300.0160.00616.52
7.2.290.0090.01116.68
7.2.280.0180.00316.54
7.2.270.0110.00916.52
7.2.260.0080.01216.30
7.2.250.0050.01415.98
7.2.240.0050.01215.95
7.2.230.0060.01015.88
7.2.220.0080.00815.81
7.2.210.0170.00215.95
7.2.200.0050.01015.94
7.2.190.0080.01115.64
7.2.180.0080.00915.71
7.2.170.0090.00915.87
7.2.160.0150.01216.61
7.2.150.0130.00616.36
7.2.140.0110.00816.43
7.2.130.0160.00616.43
7.2.120.0080.00816.52
7.2.110.0140.00816.68
7.2.100.0120.00616.63
7.2.90.0070.01016.49
7.2.80.0110.00716.64
7.2.70.0030.01316.40
7.2.60.0110.00716.47
7.2.50.0150.00316.45
7.2.40.0090.00916.44
7.2.30.0100.00616.59
7.2.20.0070.01116.42
7.2.10.0140.00316.26
7.2.00.0180.00517.83
7.1.330.0220.00815.75
7.1.320.0110.00715.65
7.1.310.0120.00415.69
7.1.300.0090.00615.50
7.1.290.0090.00615.34
7.1.280.0090.01015.52
7.1.270.0100.00815.64
7.1.260.0080.00915.74
7.1.250.0030.01215.69
7.1.240.0180.00415.57
7.1.230.0040.01615.43
7.1.220.0160.00015.34
7.1.210.0160.00015.54
7.1.200.0110.01115.47
7.1.190.0090.00615.53
7.1.180.0100.00715.36
7.1.170.0130.00315.54
7.1.160.0100.00615.47
7.1.150.0030.01215.62
7.1.140.0070.00815.36
7.1.130.0300.00415.52
7.1.120.0080.00915.48
7.1.110.0110.00515.75
7.1.100.0090.00616.82
7.1.90.0060.01015.54
7.1.80.0060.01615.32
7.1.70.0100.00516.32
7.1.60.0030.01116.29
7.1.50.0060.01316.02
7.1.40.0050.01515.51
7.1.30.0050.01515.58
7.1.20.0120.00315.38
7.1.10.0130.00715.41
7.1.00.0020.04718.82
7.0.330.0090.00615.01
7.0.320.0360.01315.11
7.0.310.0130.00315.37
7.0.300.0030.01215.38
7.0.290.0130.00315.33
7.0.280.0080.00815.18
7.0.270.0030.01214.98
7.0.260.0080.00915.03
7.0.250.0030.01515.11
7.0.240.0000.01514.99
7.0.230.0100.01215.32
7.0.220.0110.00715.00
7.0.210.0150.00015.09
7.0.200.0030.01115.91
7.0.190.0120.00915.25
7.0.180.0080.00815.22
7.0.170.0080.00814.98
7.0.160.0130.00715.19
7.0.150.0090.01215.14
7.0.140.0120.03718.58
7.0.130.0090.00914.95
7.0.120.0060.00915.07
7.0.110.0120.00415.15
7.0.100.0040.01115.14
7.0.90.0090.00615.11
7.0.80.0100.00715.14
7.0.70.0100.00714.84
7.0.60.0130.04018.35
7.0.50.0060.03916.42
7.0.40.0060.03617.48
7.0.30.0190.04217.53
7.0.20.0190.02817.61
7.0.10.0170.04417.54
7.0.00.0100.04317.70
5.6.400.0030.01416.29
5.6.390.0110.00715.93
5.6.380.0040.01516.17
5.6.370.0060.01316.25
5.6.360.0150.00316.02
5.6.350.0090.00916.18
5.6.340.0140.00415.97
5.6.330.0070.01115.62
5.6.320.0190.00015.75
5.6.310.0070.01116.15
5.6.300.0030.02016.14
5.6.290.0100.01315.91
5.6.280.0110.03818.45
5.6.270.0090.00915.71
5.6.260.0120.00616.04
5.6.250.0100.01016.11
5.6.240.0030.01516.02
5.6.230.0050.01415.96
5.6.220.0100.01315.97
5.6.210.0100.04518.28
5.6.200.0030.03417.07
5.6.190.0070.04918.35
5.6.180.0260.03118.11
5.6.170.0170.04518.08
5.6.160.0070.02718.15
5.6.150.0030.03217.14
5.6.140.0050.04817.00
5.6.130.0080.03416.99
5.6.120.0060.02518.53
5.6.110.0090.04218.57
5.6.100.0050.04618.37
5.6.90.0090.04818.48
5.6.80.0130.04018.19
5.6.70.0090.00915.91
5.6.60.0060.01215.75
5.6.50.0100.01115.66
5.6.40.0070.01015.93
5.6.30.0040.01415.90
5.6.20.0090.00915.93
5.6.10.0100.01015.94
5.6.00.0080.01316.02
5.5.380.0060.01316.00
5.5.370.0120.00615.61
5.5.360.0150.00315.86
5.5.350.0110.03718.19
5.5.340.0070.02516.94
5.5.330.0090.03918.10
5.5.320.0180.03418.05
5.5.310.0130.02518.13
5.5.300.0090.03016.82
5.5.290.0090.04416.86
5.5.280.0100.04418.31
5.5.270.0050.04418.34
5.5.260.0130.04218.22
5.5.250.0060.05118.21
5.5.240.0240.03218.03
5.5.230.0060.01215.77
5.5.220.0000.01815.73
5.5.210.0070.01015.77
5.5.200.0110.00715.97
5.5.190.0120.00615.80
5.5.180.0100.00715.85
5.5.170.0080.01515.90
5.5.160.0140.00415.87
5.5.150.0130.00516.13
5.5.140.0060.01315.91
5.5.130.0060.01215.89
5.5.120.0060.01316.07
5.5.110.0110.00615.86
5.5.100.0030.01615.87
5.5.90.0000.01815.96
5.5.80.0100.01015.88
5.5.70.0040.01716.02
5.5.60.0120.00915.85
5.5.50.0140.00415.91
5.5.40.0100.01015.88
5.5.30.0090.00915.78
5.5.20.0120.00615.83
5.5.10.0090.00915.89
5.5.00.0150.01215.81
5.4.450.0050.03516.19
5.4.440.0260.03716.07
5.4.430.0390.02816.21
5.4.420.0350.00515.98
5.4.410.0390.00015.98
5.4.400.0370.00215.88
5.4.390.0370.00115.96
5.4.380.0410.00015.85
5.4.370.0390.00315.93
5.4.360.0320.00515.95
5.4.350.0370.00216.01
5.4.340.0050.02412.33
5.4.330.0070.01012.83
5.4.320.0100.02112.60
5.4.310.0100.01912.64
5.4.300.0090.02412.69
5.4.290.0070.02512.68
5.4.280.0070.02312.69
5.4.270.0100.01912.53
5.4.260.0040.02512.54
5.4.250.0070.02112.48
5.4.240.0040.02312.57
5.4.230.0080.02212.46
5.4.220.0060.02112.43
5.4.210.0050.02312.56
5.4.200.0040.02512.46
5.4.190.0050.02312.53
5.4.180.0050.03112.50
5.4.170.0060.02712.50
5.4.160.0090.02212.51
5.4.150.0100.01912.61
5.4.140.0060.02312.44
5.4.130.0070.02212.51
5.4.120.0080.02012.34
5.4.110.0090.01912.41
5.4.100.0080.02412.31
5.4.90.0050.02612.31
5.4.80.0090.02112.46
5.4.70.0070.02212.45
5.4.60.0070.02212.53
5.4.50.0080.02612.38
5.4.40.0070.02012.43
5.4.30.0120.01612.42
5.4.20.0100.02212.39
5.4.10.0070.02212.41
5.4.00.0100.01812.22
5.3.290.0070.02612.98
5.3.280.0080.02312.92
5.3.270.0040.02612.99
5.3.260.0050.02713.00
5.3.250.0120.02012.91
5.3.240.0060.02312.88
5.3.230.0060.02312.87
5.3.220.0030.02612.82
5.3.210.0070.02412.89
5.3.200.0060.02412.90
5.3.190.0110.02012.86
5.3.180.0060.02312.99
5.3.170.0040.02512.99
5.3.160.0090.02112.99
5.3.150.0050.02312.99
5.3.140.0060.02312.89
5.3.130.0100.02012.93
5.3.120.0080.02112.87
5.3.110.0050.02412.87
5.3.100.0090.02112.76
5.3.90.0080.02712.66
5.3.80.0080.02112.54
5.3.70.0040.02712.69
5.3.60.0080.02212.59
5.3.50.0070.02512.59
5.3.40.0090.02012.60
5.3.30.0090.01812.56
5.3.20.0060.02212.46
5.3.10.0050.02412.35
5.3.00.0090.02212.26
5.2.170.0060.01910.66
5.2.160.0050.01910.65
5.2.150.0040.02010.66
5.2.140.0040.02110.75
5.2.130.0050.02110.60
5.2.120.0120.01810.65
5.2.110.0070.01810.60
5.2.100.0080.01610.59
5.2.90.0090.01410.56
5.2.80.0050.01910.60
5.2.70.0020.02610.60
5.2.60.0060.01810.46
5.2.50.0070.01710.63
5.2.40.0080.01610.58
5.2.30.0040.02010.45
5.2.20.0070.01710.49
5.2.10.0020.02010.39
5.2.00.0090.01810.31
5.1.60.0020.0189.66
5.1.50.0060.0149.53
5.1.40.0040.0169.66
5.1.30.0030.0189.80
5.1.20.0040.0179.77
5.1.10.0060.0149.79
5.1.00.0040.0169.71
5.0.50.0050.0128.50
5.0.40.0040.0168.34
5.0.30.0040.0238.23
5.0.20.0090.0118.22
5.0.10.0030.0168.21
5.0.00.0030.0198.21
4.4.90.0010.0127.46
4.4.80.0030.0097.45
4.4.70.0030.0107.45
4.4.60.0020.0107.45
4.4.50.0020.0137.46
4.4.40.0040.0137.43
4.4.30.0040.0097.45
4.4.20.0010.0127.49
4.4.10.0040.0097.49
4.4.00.0020.0157.45
4.3.110.0040.0087.40
4.3.100.0050.0077.40
4.3.90.0050.0067.39
4.3.80.0030.0137.36
4.3.70.0030.0087.38
4.3.60.0020.0117.38
4.3.50.0020.0107.38
4.3.40.0040.0157.34
4.3.30.0020.0136.72
4.3.20.0010.0126.71
4.3.10.0030.0086.69
4.3.00.0050.0128.39

preferences:
61.18 ms | 400 KiB | 5 Q