3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compare2D($topic, $nomination): int { if (is_array($nomination)) { return in_array($topic, $nomination) ? 1 : 0; } if (is_array($topic)) { return in_array($nomination, $topic) ? 1 : 0; } return strcmp($topic, $nomination) === 0 ? 1 : 0; } $topic = ['SECURE', 'REMOTE', 'test3']; $arr = [['REMOTE', 'REMOTE_PREMIUM'], 'SECURE', ['test1', ['test2', 'test3']]]; $res = array_uintersect($topic, $arr, 'compare2D'); var_dump($res);

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.0110.00617.49
8.5.20.0070.01019.38
8.5.10.0100.00816.83
8.5.00.0130.00919.68
8.4.180.0110.01021.59
8.4.170.0120.00923.91
8.4.160.0140.01021.44
8.4.150.0080.00416.84
8.4.140.0130.00817.52
8.4.130.0080.00117.93
8.4.120.0090.00920.79
8.4.110.0120.00920.64
8.4.100.0080.00217.61
8.4.90.0130.00817.79
8.4.80.0110.00817.85
8.4.70.0060.00219.62
8.4.60.0120.00818.87
8.4.50.0110.00819.57
8.4.40.0130.00717.39
8.4.30.0130.00620.36
8.4.20.0140.00719.52
8.4.10.0000.01017.44
8.3.300.0110.00820.75
8.3.290.0160.00620.75
8.3.280.0090.01118.24
8.3.270.0130.00716.75
8.3.260.0110.00716.28
8.3.250.0100.00818.88
8.3.240.0060.01216.23
8.3.230.0100.00916.46
8.3.220.0120.00616.89
8.3.210.0090.00616.47
8.3.200.0060.00316.30
8.3.190.0110.00717.13
8.3.180.0060.00216.37
8.3.170.0070.00316.88
8.3.160.0130.00618.11
8.3.150.0030.01618.76
8.3.140.0040.01116.39
8.3.130.0060.00316.34
8.3.120.0060.00318.87
8.3.110.0030.00616.49
8.3.100.0070.00324.06
8.3.90.0040.00426.77
8.3.80.0030.00616.38
8.3.70.0060.01216.63
8.3.60.0110.00416.50
8.3.50.0140.00319.47
8.3.40.0110.00420.83
8.3.30.0070.00718.71
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.300.0130.00718.88
8.2.290.0120.00718.68
8.2.280.0040.00618.43
8.2.270.0140.00417.35
8.2.260.0100.00718.96
8.2.250.0040.00416.48
8.2.240.0030.00617.01
8.2.230.0080.00020.94
8.2.220.0000.00937.54
8.2.210.0040.00426.77
8.2.200.0060.00316.75
8.2.190.0100.01016.63
8.2.180.0100.01025.92
8.2.170.0110.00418.87
8.2.160.0070.00722.96
8.2.150.0050.00225.66
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00020.89
8.2.110.0030.00720.50
8.2.100.0100.00017.59
8.2.90.0080.00017.77
8.2.80.0030.00617.97
8.2.70.0060.00317.50
8.2.60.0040.00417.50
8.2.50.0000.00817.80
8.2.40.0050.00319.66
8.2.30.0040.00417.68
8.2.20.0000.00717.89
8.2.10.0000.00818.89
8.2.00.0000.00819.13
8.1.340.0140.00721.70
8.1.330.0060.00316.01
8.1.320.0150.01015.92
8.1.310.0140.00016.83
8.1.300.0120.00620.31
8.1.290.0060.00318.88
8.1.280.0100.00325.92
8.1.270.0000.00823.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0090.00020.70
8.1.230.0070.00422.08
8.1.220.0060.00317.74
8.1.210.0040.00418.91
8.1.200.0060.00317.36
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0100.00017.62
8.1.160.0040.00418.73
8.1.150.0040.00418.46
8.1.140.0030.00617.32
8.1.130.0070.00018.83
8.1.120.0070.00017.33
8.1.110.0000.00717.27
8.1.100.0000.00817.36
8.1.90.0070.00017.43
8.1.80.0080.00317.41
8.1.70.0030.00317.29
8.1.60.0060.00317.43
8.1.50.0000.00817.53
8.1.40.0040.00717.50
8.1.30.0060.00317.55
8.1.20.0080.00017.61
8.1.10.0000.00817.51
8.1.00.0030.00517.52
8.0.300.0000.00920.04
8.0.290.0040.00416.63
8.0.280.0030.00618.38
8.0.270.0000.00716.69
8.0.260.0030.00318.30
8.0.250.0070.00016.91
8.0.240.0020.00516.91
8.0.230.0000.00716.77
8.0.220.0000.00716.87
8.0.210.0030.00616.77
8.0.200.0000.00716.90
8.0.190.0000.00816.90
8.0.180.0000.00716.77
8.0.170.0080.00016.83
8.0.160.0070.00016.87
8.0.150.0030.00716.77
8.0.140.0000.00716.78
8.0.130.0000.00613.22
8.0.120.0050.00316.80
8.0.110.0040.00416.70
8.0.100.0070.00016.70
8.0.90.0000.00716.79
8.0.80.0030.00316.92
8.0.70.0030.00316.84
8.0.60.0070.00016.69
8.0.50.0030.00316.69
8.0.30.0000.00716.86
8.0.20.0000.00716.85
8.0.10.0070.00016.80
8.0.00.0070.00017.00
7.4.330.0000.00515.55
7.4.320.0060.00016.60
7.4.300.0030.00316.64
7.4.290.0070.00016.42
7.4.280.0000.00816.63
7.4.270.0030.00516.58
7.4.260.0050.00013.33
7.4.250.0000.00816.58
7.4.240.0000.00616.43
7.4.230.0000.00616.56
7.4.220.0030.00316.39
7.4.210.0030.00316.67
7.4.200.0030.00316.68
7.4.190.0000.00616.71
7.4.180.0070.00016.66
7.4.160.0030.00316.66
7.4.150.0040.00416.58
7.4.140.0000.00716.48
7.4.130.0000.00716.27
7.4.120.0030.00316.26
7.4.110.0030.00316.48
7.4.100.0000.00616.70
7.4.90.0030.00316.56
7.4.80.0000.00616.13
7.4.70.0030.00316.47
7.4.60.0000.00616.09
7.4.50.0030.00316.41
7.4.40.0000.00616.06
7.4.30.0060.00016.45
7.4.20.0070.00016.46
7.4.10.0080.00016.43
7.4.00.0080.00016.33
7.3.330.0030.00416.34
7.3.320.0060.00013.30
7.3.310.0030.00316.13
7.3.300.0070.00016.35
7.3.290.0040.00416.20
7.3.280.0040.00416.25
7.3.270.0000.00716.20
7.3.260.0040.00416.25
7.3.250.0030.00516.29
7.3.240.0070.00016.21
7.3.230.0000.00816.25
7.3.220.0090.00016.29
7.3.210.0020.00516.08
7.3.200.0050.00316.29
7.3.190.0040.00416.23
7.3.180.0040.00416.15
7.3.170.0070.00016.20
7.3.160.0040.00416.18
7.3.150.0040.00416.19
7.3.140.0040.00416.25
7.3.130.0020.00516.28
7.3.120.0000.00716.14
7.3.110.0060.00016.17
7.3.100.0030.00316.00
7.3.90.0030.00316.29
7.3.80.0000.00716.04
7.3.70.0030.00316.15
7.3.60.0060.00016.34
7.3.50.0030.00316.22
7.3.40.0050.00216.22
7.3.30.0030.00316.41
7.3.20.0030.00318.16
7.3.10.0030.00318.14
7.3.00.0070.00017.99
7.1.330.0000.00817.34

preferences:
46.48 ms | 1407 KiB | 5 Q