3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_REQUEST["name"] = [ null, "myName", " ", "test1" ]; $_REQUEST["email"] = [ null, "myEmail", "" ]; $keys = [ "name", "email" ]; $result = array_map(function ($x) { if (is_array($x)) { return array_filter($x, function($y){ return null !== $y && "" !== trim($y); }); } return $x; }, array_intersect_key($_REQUEST, array_flip($keys))); print_r($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.73
8.4.150.0020.00014.05
8.4.140.0120.01117.41
8.4.130.0060.00817.87
8.4.120.0090.01222.44
8.4.110.0150.00522.43
8.4.100.0070.01020.64
8.4.90.0110.01018.67
8.4.80.0050.00519.34
8.4.70.0090.01218.00
8.4.60.0110.01018.61
8.4.50.0110.01023.93
8.4.40.0120.00919.52
8.4.30.0100.00619.62
8.4.20.0130.00720.52
8.4.10.0060.00317.71
8.3.280.0110.01018.29
8.3.270.0140.00516.63
8.3.260.0100.00916.48
8.3.250.0100.00718.87
8.3.240.0110.00816.59
8.3.230.0100.01016.80
8.3.220.0130.00517.18
8.3.210.0100.00616.58
8.3.200.0040.00416.76
8.3.190.0130.00617.08
8.3.180.0090.00817.12
8.3.170.0040.01117.10
8.3.160.0110.00718.30
8.3.150.0120.00616.95
8.3.140.0050.00517.03
8.3.130.0030.00518.45
8.3.120.0060.00620.79
8.3.110.0090.00620.94
8.3.100.0070.00324.06
8.3.90.0080.00026.77
8.3.80.0060.00318.43
8.3.70.0150.00616.50
8.3.60.0110.00718.56
8.3.50.0100.00617.29
8.3.40.0070.01118.69
8.3.30.0140.00418.47
8.3.20.0030.00619.23
8.3.10.0030.00523.61
8.3.00.0040.00421.02
8.2.290.0130.00620.33
8.2.280.0100.00818.46
8.2.270.0090.00917.11
8.2.260.0120.00618.73
8.2.250.0080.00016.79
8.2.240.0110.00016.93
8.2.230.0090.00022.58
8.2.220.0050.00337.54
8.2.210.0100.00026.77
8.2.200.0030.00616.63
8.2.190.0140.00018.33
8.2.180.0120.00918.20
8.2.170.0090.00622.96
8.2.160.0100.00322.26
8.2.150.0030.00624.18
8.2.140.0000.00824.66
8.2.130.0040.00421.06
8.2.120.0040.00426.35
8.2.110.0030.00621.05
8.2.100.0090.00318.22
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0000.00917.75
8.2.60.0040.00417.63
8.2.50.0030.00517.63
8.2.40.0060.00318.15
8.2.30.0000.00719.39
8.2.20.0080.00018.13
8.2.10.0000.00718.19
8.2.00.0030.00619.52
8.1.330.0060.00221.90
8.1.320.0120.00916.02
8.1.310.0080.00016.84
8.1.300.0110.00820.09
8.1.290.0000.01130.84
8.1.280.0070.01025.92
8.1.270.0040.00423.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00421.29
8.1.230.0030.00922.02
8.1.220.0060.00617.76
8.1.210.0040.00418.77
8.1.200.0090.00017.79
8.1.190.0030.00717.35
8.1.180.0040.00418.10
8.1.170.0000.01017.62
8.1.160.0000.00818.81
8.1.150.0000.00718.89
8.1.140.0000.00722.20
8.1.130.0000.00817.50
8.1.120.0030.00317.34
8.1.110.0000.00717.53
8.1.100.0080.00017.48
8.1.90.0100.00017.52
8.1.80.0000.00717.34
8.1.70.0000.00717.42
8.1.60.0040.00417.48
8.1.50.0040.00417.43
8.1.40.0040.00417.39
8.1.30.0040.00417.64
8.1.20.0000.00717.64
8.1.10.0000.00717.50
8.1.00.0000.00817.55
8.0.300.0070.00018.77
8.0.290.0000.00816.75
8.0.280.0030.00318.50
8.0.270.0040.00416.84
8.0.260.0040.00416.84
8.0.250.0030.00316.97
8.0.240.0080.00016.93
8.0.230.0000.00716.90
8.0.220.0060.00316.87
8.0.210.0030.00516.85
8.0.200.0030.00316.98
8.0.190.0000.00816.96
8.0.180.0000.00816.94
8.0.170.0090.00016.99
8.0.160.0000.00716.91
8.0.150.0000.00816.79
8.0.140.0080.00416.86
8.0.130.0030.00313.34
8.0.120.0000.00716.86
8.0.110.0080.00016.86
8.0.100.0040.00416.85
8.0.90.0070.00016.97
8.0.80.0040.01116.92
8.0.70.0000.00716.80
8.0.60.0000.00816.89
8.0.50.0000.00716.96
8.0.30.0110.00817.33
8.0.20.0160.00617.40
8.0.10.0070.00017.07
8.0.00.0110.00716.80
7.4.330.0000.00515.55
7.4.320.0030.00316.59
7.4.300.0030.00316.60
7.4.290.0000.00716.48
7.4.280.0080.00016.57
7.4.270.0000.00716.53
7.4.260.0070.00016.42
7.4.250.0030.00316.53
7.4.240.0000.00716.64
7.4.230.0000.00816.64
7.4.220.0080.00016.41
7.4.210.0070.01016.64
7.4.200.0030.00316.36
7.4.160.0100.00916.52
7.4.140.0050.01417.86
7.4.130.0000.01716.45
7.4.120.0110.00616.51
7.4.110.0120.01216.34
7.4.100.0070.01016.45
7.4.90.0060.01216.45
7.4.80.0080.00819.39
7.4.70.0100.00716.58
7.4.60.0090.00816.48
7.4.50.0040.01416.50
7.4.40.0160.00016.35
7.4.00.0020.01714.98
7.3.330.0020.00213.31
7.3.320.0030.00313.22
7.3.310.0030.00516.35
7.3.300.0000.00716.33
7.3.290.0030.00316.36
7.3.280.0080.01216.25
7.3.260.0100.00816.51
7.3.240.0100.00716.46
7.3.230.0090.00916.57
7.3.210.0070.01516.55
7.3.200.0140.00316.55
7.3.190.0070.01616.39
7.3.180.0110.00516.52
7.3.170.0060.01216.43
7.3.160.0060.00916.40
7.3.120.0030.01714.82
7.3.110.0040.01114.80
7.3.100.0070.00715.18
7.3.90.0000.01515.05
7.3.80.0040.00814.75
7.3.70.0060.00614.72
7.3.60.0030.00914.95
7.3.50.0000.01214.82
7.3.40.0030.01014.61
7.3.30.0030.00714.87
7.3.20.0090.00316.72
7.3.10.0090.00616.69
7.3.00.0070.00716.59
7.2.330.0080.00816.41
7.2.320.0090.00916.84
7.2.310.0040.01416.82
7.2.300.0030.01316.81
7.2.290.0060.01516.60
7.2.250.0070.01315.24
7.2.240.0100.01015.07
7.2.230.0060.00914.93
7.2.220.0090.00615.06
7.2.210.0030.01115.10
7.2.200.0060.01215.20
7.2.190.0040.00715.19
7.2.180.0040.00714.80
7.2.170.0110.00414.95
7.2.120.0080.00516.74
7.2.110.0030.00916.67
7.2.100.0160.00016.44
7.2.90.0460.00416.60
7.2.80.0350.00714.87
7.2.70.0030.00916.84
7.2.60.0030.01016.77
7.2.50.0130.00316.56
7.2.40.0360.00416.68
7.2.30.0140.00617.02
7.2.20.0450.01115.16
7.2.10.0110.00316.86
7.2.00.0500.00716.70
7.1.330.0030.01015.96
7.1.320.0000.01115.71
7.1.310.0070.01115.96
7.1.300.0040.00815.82
7.1.290.0080.00515.81
7.1.280.0030.00715.96
7.1.270.0030.01215.59
7.1.260.0000.01415.59
7.1.240.0560.00315.63
7.1.230.0110.00515.98
7.1.220.0150.00015.54
7.1.210.0320.00613.88
7.1.200.0100.00715.83
7.1.190.0090.00315.88
7.1.180.0110.00315.66
7.1.170.0030.01215.77
7.1.160.0060.00915.63
7.1.150.0380.00015.47
7.1.140.0120.00315.57
7.1.130.0420.01613.87
7.1.120.0350.00613.84
7.1.110.0100.00315.63
7.1.100.0330.00915.86
7.1.90.0040.01015.70
7.1.80.0400.00715.47
7.1.70.0240.00915.73
7.1.60.0330.00315.79
7.1.50.0080.00815.65
7.1.40.0120.00315.55
7.1.30.0420.00613.88
7.1.20.0040.01115.73
7.1.10.0060.00615.34
7.1.00.0060.00615.64
5.6.380.0050.01014.27

preferences:
31.92 ms | 403 KiB | 5 Q