3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arraySession = [ 'sampleA' => ['1', '2', '3'], 'sampleB' => ['1', '2', '3'], ]; $arrayPost = [ 'sampleA' => ['1'], 'sampleB' => ['1','2'], ]; $result = []; foreach ($arraySession as $k => $row) { $result[$k] = array_diff($row, $arrayPost[$k] ?? []); } 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.5.00.0140.00819.66
8.4.150.0020.00114.05
8.4.140.0100.01117.66
8.4.130.0130.00717.84
8.4.120.0030.00622.30
8.4.110.0120.00718.54
8.4.100.0110.01117.86
8.4.90.0110.00617.72
8.4.80.0030.00517.83
8.4.70.0130.00717.60
8.4.60.0110.01017.76
8.4.50.0120.00820.41
8.4.40.0030.01620.70
8.4.30.0130.00720.24
8.4.20.0200.00021.30
8.4.10.0090.00019.50
8.3.280.0100.01218.58
8.3.270.0130.00616.42
8.3.260.0130.00616.54
8.3.250.0090.00918.78
8.3.240.0080.00816.45
8.3.230.0120.00816.76
8.3.220.0100.01117.14
8.3.210.0110.00316.63
8.3.200.0060.00316.80
8.3.190.0090.00917.09
8.3.180.0100.00218.88
8.3.170.0140.00417.08
8.3.160.0090.00918.32
8.3.150.0110.00817.17
8.3.140.0000.00716.44
8.3.130.0340.00816.52
8.3.120.0320.00816.30
8.3.110.0400.00016.57
8.3.100.0330.01216.53
8.3.90.0320.01316.30
8.3.80.0350.00716.30
8.3.70.0370.00916.42
8.3.60.0290.01216.67
8.3.50.0310.01116.33
8.3.40.0210.01217.34
8.3.30.0290.00917.29
8.3.20.0340.01017.45
8.3.10.0410.00617.23
8.3.00.0100.01717.24
8.2.290.0090.00920.54
8.2.280.0130.00616.80
8.2.270.0070.01116.51
8.2.260.0100.00716.95
8.2.250.0250.01216.36
8.2.240.0260.01316.46
8.2.230.0330.00416.18
8.2.220.0310.00716.20
8.2.210.0310.00616.73
8.2.200.0310.00716.18
8.2.190.0270.01016.32
8.2.180.0270.00916.37
8.2.170.0310.00917.69
8.2.160.0370.00417.59
8.2.150.0400.00017.66
8.2.140.0280.01117.43
8.2.130.0300.00317.75
8.2.120.0310.00617.69
8.2.110.0260.01317.82
8.2.100.0270.00817.52
8.2.90.0210.01017.44
8.2.80.0290.01017.38
8.2.70.0320.00317.57
8.2.60.0300.00317.56
8.2.50.0320.00617.53
8.2.40.0300.00317.64
8.2.30.0330.00017.59
8.2.20.0310.00717.41
8.2.10.0330.00617.51
8.2.00.0340.00617.66
8.1.330.0090.01116.56
8.1.320.0140.00616.23
8.1.310.0110.00316.86
8.1.300.0360.00716.18
8.1.290.0330.01116.18
8.1.280.0280.00716.18
8.1.270.0400.00717.39
8.1.260.0230.00617.52
8.1.250.0280.01217.28
8.1.240.0260.01517.23
8.1.230.0330.00817.09
8.1.220.0400.00017.24
8.1.210.0240.01017.10
8.1.200.0220.01017.23
8.1.190.0300.00817.11
8.1.180.0230.01917.02
8.1.170.0290.00617.01
8.1.160.0290.00317.30
8.1.150.0330.00417.12
8.1.140.0210.01717.21
8.1.130.0240.01217.02
8.1.120.0290.00617.34
8.1.110.0250.01117.14
8.1.100.0240.01217.20
8.1.90.0350.00017.12
8.1.80.0260.00917.11
8.1.70.0230.01317.06
8.1.60.0320.00617.18
8.1.50.0350.00717.38
8.1.40.0290.01417.45
8.1.30.0330.00417.09
8.1.20.0380.00617.13
8.1.10.0450.00017.06
8.1.00.0330.00717.19

preferences:
53.37 ms | 403 KiB | 5 Q