3v4l.org

run code in 300+ PHP versions simultaneously
<?php $assoc_array = array( array( 'firstname' => 'John', 'lastname' => 'Doe', 'age' => 26 ), array( 'firstname' => 'Sophia', 'lastname' => 'Smith', 'age' => 30 ) ); $array = array( 'firstname' => 'John', 'lastname' => 'Doe' ); foreach($assoc_array as $sub){ $match = array_intersect($sub, $array); if($match) $new[] = $sub; } var_dump($new);

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.70.0090.00916.61
8.3.60.0070.01018.56
8.3.50.0160.00618.29
8.3.40.0040.01118.70
8.3.30.0150.00018.57
8.3.20.0040.00418.98
8.3.10.0040.00423.56
8.3.00.0040.00420.58
8.2.190.0070.01016.58
8.2.180.0100.00718.41
8.2.170.0100.00722.96
8.2.160.0070.00722.12
8.2.150.0070.00024.18
8.2.140.0030.00624.66
8.2.130.0080.00019.84
8.2.120.0070.00026.35
8.2.110.0040.00721.09
8.2.100.0040.00818.03
8.2.90.0040.00419.46
8.2.80.0030.00517.97
8.2.70.0000.00817.93
8.2.60.0050.00318.22
8.2.50.0000.00918.10
8.2.40.0080.00019.53
8.2.30.0040.00419.29
8.2.20.0040.00418.24
8.2.10.0050.00318.13
8.2.00.0040.00417.64
8.1.280.0080.00825.92
8.1.270.0090.00023.91
8.1.260.0030.00526.35
8.1.250.0030.00628.09
8.1.240.0060.00322.05
8.1.230.0060.00620.79
8.1.220.0000.00817.74
8.1.210.0000.00818.99
8.1.200.0040.00417.35
8.1.190.0060.00317.13
8.1.180.0050.00318.10
8.1.170.0040.00418.46
8.1.160.0000.00718.99
8.1.150.0040.00418.88
8.1.140.0020.00522.25
8.1.130.0040.00420.21
8.1.120.0060.00317.47
8.1.110.0030.00517.30
8.1.100.0040.00417.43
8.1.90.0080.00017.45
8.1.80.0030.00517.46
8.1.70.0070.00317.39
8.1.60.0000.00817.55
8.1.50.0130.00017.52
8.1.40.0080.00017.58
8.1.30.0060.00317.58
8.1.20.0040.00417.65
8.1.10.0030.00517.45
8.1.00.0070.00317.36
8.0.300.0000.00820.04
8.0.290.0040.00416.63
8.0.280.0030.00318.46
8.0.270.0050.00317.11
8.0.260.0040.00418.39
8.0.250.0000.00816.89
8.0.240.0040.00416.88
8.0.230.0030.00316.88
8.0.220.0030.00316.81
8.0.210.0030.00316.94
8.0.200.0030.00316.98
8.0.190.0030.00516.82
8.0.180.0040.00416.93
8.0.170.0000.00816.90
8.0.160.0100.00016.91
8.0.150.0070.00016.75
8.0.140.0070.00016.72
8.0.130.0030.00313.33
8.0.120.0080.00016.84
8.0.110.0030.00316.83
8.0.100.0070.00016.79
8.0.90.0030.00316.82
8.0.80.0110.00316.81
8.0.70.0000.00716.87
8.0.60.0040.00416.78
8.0.50.0060.00316.85
8.0.30.0090.00817.03
8.0.20.0100.01017.40
8.0.10.0030.00517.08
8.0.00.0130.00616.73
7.4.330.0000.00515.55
7.4.320.0000.00616.46
7.4.300.0000.00616.59
7.4.290.0030.00316.55
7.4.280.0000.00816.64
7.4.270.0000.00716.66
7.4.260.0040.00416.61
7.4.250.0000.00716.48
7.4.240.0070.00016.47
7.4.230.0030.00316.59
7.4.220.0040.00416.46
7.4.210.0060.01216.60
7.4.200.0040.00416.50
7.4.160.0100.00716.44
7.4.140.0070.01117.86
7.4.130.0110.00716.56
7.4.120.0110.00916.53
7.4.110.0140.00316.63
7.4.100.0040.02116.55
7.4.90.0060.01716.55
7.4.80.0050.01519.39
7.4.70.0070.01016.61
7.4.60.0130.01016.47
7.4.50.0070.01016.25
7.4.40.0090.00616.41
7.4.00.0100.00714.69
7.3.330.0030.00313.25
7.3.320.0000.00612.97
7.3.310.0000.00816.11
7.3.300.0040.00416.24
7.3.290.0070.00016.30
7.3.280.0080.00616.25
7.3.260.0100.00816.47
7.3.240.0080.00916.42
7.3.230.0080.00816.45
7.3.210.0070.01016.35
7.3.200.0100.00616.47
7.3.190.0000.02216.53
7.3.180.0060.01516.34
7.3.170.0120.01116.23
7.3.160.0090.00616.26
7.2.330.0270.00316.37
7.2.320.0100.01016.75
7.2.310.0030.01516.44
7.2.300.0030.01316.64
7.2.290.0180.00316.73
7.2.110.0360.00314.77
7.2.100.0170.00714.61
7.2.90.0650.00914.81
7.2.80.0070.00914.53
7.2.70.0450.01015.00
7.2.60.0300.00315.20
7.2.50.0980.00714.82
7.2.40.0090.00915.04
7.2.30.0100.00314.84
7.2.20.0370.00715.09
7.2.10.0110.00614.97
7.2.00.1010.00315.14
7.1.230.0600.00013.73
7.1.220.0490.00613.74
7.1.210.1190.01314.13
7.1.200.0120.00314.17
7.1.190.0090.00913.83
7.1.180.0830.01013.88
7.1.170.0030.01213.98
7.1.160.0620.01313.70
7.1.150.0030.01213.50
7.1.140.0060.01013.77
7.1.130.0960.00714.01
7.1.120.1680.00313.63
7.1.110.0090.00913.87
7.1.100.0090.00913.74
7.1.90.0090.00613.95
7.1.80.0930.00613.97
7.1.70.1320.01013.98
7.1.60.1420.01031.77
7.1.50.1320.01931.95
7.1.40.1690.01031.52
7.1.30.1400.01031.84
7.1.20.1690.01331.54
7.1.10.1580.00613.80
7.1.00.1170.01013.67
5.6.380.0110.00614.23

preferences:
19.15 ms | 401 KiB | 5 Q