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) { $row = 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.10.0110.00916.61
8.5.00.0120.00919.76
8.4.150.0010.00114.05
8.4.140.0120.00917.39
8.4.130.0130.00717.93
8.4.120.0090.00720.54
8.4.110.0060.00218.88
8.4.100.0110.00917.61
8.4.90.0130.00717.54
8.4.80.0130.00717.71
8.4.70.0100.00617.95
8.4.60.0120.00917.82
8.4.50.0080.01220.29
8.4.40.0040.01118.96
8.4.30.0060.01020.34
8.4.20.0100.01021.12
8.4.10.0030.00619.27
8.3.280.0120.00718.53
8.3.270.0130.00716.64
8.3.260.0100.00916.27
8.3.250.0100.01118.82
8.3.240.0130.00616.74
8.3.230.0110.00616.56
8.3.220.0040.00317.38
8.3.210.0140.00516.48
8.3.200.0140.00516.41
8.3.190.0110.00817.11
8.3.180.0020.00618.88
8.3.170.0110.00717.02
8.3.160.0110.00018.40
8.3.150.0040.01117.07
8.3.140.0000.00816.72
8.3.130.0330.00916.49
8.3.120.0300.00716.42
8.3.110.0240.00716.47
8.3.100.0310.00516.29
8.3.90.0330.00316.32
8.3.80.0310.01016.37
8.3.70.0340.01116.27
8.3.60.0350.00716.29
8.3.50.0350.00916.20
8.3.40.0290.00917.18
8.3.30.0280.00617.26
8.3.20.0300.00317.24
8.3.10.0230.01017.40
8.3.00.0120.01117.05
8.2.290.0090.00920.42
8.2.280.0090.01016.92
8.2.270.0150.00416.97
8.2.260.0100.00717.16
8.2.250.0300.00816.35
8.2.240.0260.00716.46
8.2.230.0240.00616.27
8.2.220.0230.00716.47
8.2.210.0210.01216.32
8.2.200.0320.00416.25
8.2.190.0250.01216.48
8.2.180.0290.00716.45
8.2.170.0330.00617.46
8.2.160.0320.00617.44
8.2.150.0350.00417.42
8.2.140.0290.00917.49
8.2.130.0300.00717.44
8.2.120.0300.00717.50
8.2.110.0320.00317.43
8.2.100.0320.00517.29
8.2.90.0330.00517.54
8.2.80.0320.00517.36
8.2.70.0320.01017.42
8.2.60.0370.00617.51
8.2.50.0300.00817.40
8.2.40.0270.00817.36
8.2.30.0280.00217.39
8.2.20.0270.00117.38
8.2.10.0260.01317.56
8.2.00.0290.00917.55
8.1.330.0110.00916.43
8.1.320.0080.01015.77
8.1.310.0110.00416.73
8.1.300.0310.00816.19
8.1.290.0360.00516.18
8.1.280.0300.00316.21
8.1.270.0220.00717.11
8.1.260.0120.00917.67
8.1.250.0230.00617.31
8.1.240.0300.01117.32
8.1.230.0240.00317.21
8.1.220.0210.00717.22
8.1.210.0270.00617.13
8.1.200.0230.01017.39
8.1.190.0230.00917.22
8.1.180.0290.00617.21
8.1.170.0250.00817.16
8.1.160.0300.00317.14
8.1.150.0270.00717.14
8.1.140.0260.00517.29
8.1.130.0260.00917.19
8.1.120.0240.01117.31
8.1.110.0280.00617.25
8.1.100.0400.00217.22
8.1.90.0270.00817.13
8.1.80.0240.01617.17
8.1.70.0240.01117.11
8.1.60.0320.00717.30
8.1.50.0310.00717.41
8.1.40.0340.00417.31
8.1.30.0350.00417.43
8.1.20.0360.00217.42
8.1.10.0280.00917.32
8.1.00.0290.01017.08

preferences:
72.61 ms | 403 KiB | 5 Q