3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array(0 => 'fname',1 => 'lname' ,2 => 'email'); $array1 = array_flip($array1); $array2 = array( 'fname' => 'john', 'lname' => 'notdefined', 'email' => 'xyz@gmail.com', 'address' => 'london' ); $new = array_intersect_key($array2,$array1); print_r($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.4.140.0200.01117.23
8.4.130.0120.00818.59
8.4.120.0100.00824.08
8.4.110.0120.00918.81
8.4.100.0060.00218.57
8.4.90.0050.00320.71
8.4.80.0030.00618.52
8.4.70.0040.00418.88
8.4.60.0110.00818.79
8.4.50.0120.00918.32
8.4.40.0100.01017.50
8.4.30.0030.00620.29
8.4.20.0130.00619.37
8.4.10.0030.00717.49
8.3.270.0150.00416.50
8.3.260.0070.01216.59
8.3.250.0060.00218.59
8.3.240.0110.00717.01
8.3.230.0120.00716.37
8.3.220.0090.00918.92
8.3.210.0120.00816.59
8.3.200.0050.00416.60
8.3.190.0130.00516.79
8.3.180.0090.00618.88
8.3.170.0150.00418.95
8.3.160.0120.00617.29
8.3.150.0120.00616.45
8.3.140.0000.00817.27
8.3.130.0040.00418.47
8.3.120.0040.01120.54
8.3.110.0060.00320.94
8.3.100.0090.00616.36
8.3.90.0050.00326.77
8.3.80.0000.01016.50
8.3.70.0070.01118.36
8.3.60.0120.00618.27
8.3.50.0140.00718.22
8.3.40.0160.00320.09
8.3.30.0040.01218.45
8.3.20.0080.00024.18
8.3.10.0050.00224.66
8.3.00.0040.00426.16
8.2.290.0120.00520.24
8.2.280.0070.00718.44
8.2.270.0190.00016.67
8.2.260.0110.00716.63
8.2.250.0090.00616.59
8.2.240.0040.00417.06
8.2.230.0030.00722.58
8.2.220.0050.00324.06
8.2.210.0030.00526.77
8.2.200.0060.00316.75
8.2.190.0070.00716.58
8.2.180.0110.00425.92
8.2.170.0040.01118.91
8.2.160.0030.01022.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0070.00026.16
8.2.110.0040.00422.13
8.2.100.0100.00317.64
8.2.90.0000.00817.75
8.2.80.0000.00818.61
8.2.70.0090.00017.63
8.2.60.0000.00817.80
8.2.50.0040.00417.80
8.2.40.0030.00617.89
8.2.30.0000.00817.56
8.2.20.0030.00318.09
8.2.10.0040.00418.93
8.2.00.0000.00719.29
8.1.330.0150.00421.94
8.1.320.0100.01017.69
8.1.310.0080.00416.31
8.1.300.0080.00020.03
8.1.290.0060.00330.84
8.1.280.0110.00425.92
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00520.03
8.1.230.0080.00417.77
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0090.00618.10
8.1.170.0000.00817.62
8.1.160.0040.00418.80
8.1.150.0020.00518.58
8.1.140.0040.00617.42
8.1.130.0030.00318.87
8.1.120.0070.00017.39
8.1.110.0000.00717.39
8.1.100.0000.00817.39
8.1.90.0070.00017.38
8.1.80.0060.00317.40
8.1.70.0030.00317.26
8.1.60.0070.00017.40
8.1.50.0060.00317.34
8.1.40.0040.00417.48
8.1.30.0030.00517.58
8.1.20.0050.00317.63
8.1.10.0040.00417.47
8.1.00.0040.00417.36
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0080.00018.36
8.0.270.0070.00016.70
8.0.260.0030.00318.45
8.0.250.0030.00316.88
8.0.240.0070.00016.89
8.0.230.0000.00716.79
8.0.220.0070.00016.77
8.0.210.0000.00816.75
8.0.200.0000.00616.88
8.0.190.0060.00316.86
8.0.180.0030.00316.85
8.0.170.0000.00816.86
8.0.160.0070.00016.76
8.0.150.0000.00816.79
8.0.140.0030.00316.74
8.0.130.0050.00013.22
8.0.120.0050.00216.84
8.0.110.0000.00716.69
8.0.100.0080.00016.86
8.0.90.0030.00516.86
8.0.80.0000.00716.77
8.0.70.0080.00016.69
8.0.60.0030.00516.72
8.0.50.0040.00416.86
8.0.30.0030.00516.82
8.0.20.0000.00716.77
8.0.10.0050.00216.85
8.0.00.0030.00316.99
7.4.330.0000.00515.55
7.4.320.0000.00616.59
7.4.300.0070.00016.44
7.4.290.0000.00816.38
7.4.280.0000.00816.52
7.4.270.0030.00616.48
7.4.260.0050.00013.20
7.4.250.0000.00716.50
7.4.240.0040.00416.54
7.4.230.0000.00716.43
7.4.220.0030.00316.52
7.4.210.0050.00216.63
7.4.200.0030.00316.54
7.4.190.0030.00316.48
7.4.180.0000.00716.32
7.4.160.0000.00716.50
7.4.150.0050.00316.56
7.4.140.0070.00016.30
7.4.130.0000.00616.24
7.4.120.0030.00316.22
7.4.110.0020.00516.15
7.4.100.0020.00516.16
7.4.90.0000.00716.50
7.4.80.0040.00416.15
7.4.70.0050.00316.12
7.4.60.0030.00616.39
7.4.50.0050.00216.35
7.4.40.0040.00416.27
7.4.30.0050.00316.29
7.4.20.0040.00416.16
7.4.10.0030.00516.49
7.4.00.0080.00016.27
7.3.330.0040.00416.08
7.3.320.0030.00313.07
7.3.310.0000.00716.07
7.3.300.0000.00616.14
7.3.290.0000.00616.02
7.3.280.0000.00715.98
7.3.270.0040.00416.19
7.3.260.0080.00016.13
7.3.250.0060.00316.16
7.3.240.0070.00016.11
7.3.230.0030.00316.16
7.3.220.0070.00016.08
7.3.210.0000.00715.97
7.3.200.0040.00416.09
7.3.190.0030.00316.05
7.3.180.0040.00416.05
7.3.170.0050.00516.10
7.3.160.0000.00716.09
7.3.150.0070.00015.97
7.3.140.0030.00316.03
7.3.130.0040.00416.02
7.3.120.0070.00015.97
7.3.110.0040.00416.04
7.3.100.0070.00016.03
7.3.90.0000.00716.16
7.3.80.0000.00715.93
7.3.70.0070.00016.07
7.3.60.0030.00316.13
7.3.50.0040.00416.14
7.3.40.0000.00716.12
7.3.30.0040.00416.14
7.3.20.0030.00318.02
7.3.10.0030.00318.05
7.3.00.0030.00318.00

preferences:
125.67 ms | 403 KiB | 5 Q