3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( "name" => "peter griffin", "age" => "41", "email" => "peter@example.com", ); $filters = array ( "name" => array ( "filter"=>FILTER_CALLBACK, "flags"=>FILTER_FORCE_ARRAY, "options"=>"ucwords" ), "age" => array ( "filter"=>FILTER_VALIDATE_INT, "options"=>array ( "min_range"=>1, "max_range"=>120 ) ), "email"=> FILTER_VALIDATE_EMAIL, ); print_r(filter_var_array($arr, $filters)); ?>

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.60.0040.01118.80
8.3.50.0100.01021.46
8.3.40.0080.00819.05
8.3.30.0130.00619.01
8.3.20.0060.00319.14
8.3.10.0040.00421.03
8.3.00.0030.00524.04
8.2.180.0120.00417.00
8.2.170.0060.01022.96
8.2.160.0060.00920.81
8.2.150.0000.00924.18
8.2.140.0030.00724.66
8.2.130.0090.00026.16
8.2.120.0040.00419.73
8.2.110.0080.00321.12
8.2.100.0080.00418.22
8.2.90.0090.00019.66
8.2.80.0000.00819.75
8.2.70.0060.00318.13
8.2.60.0090.00018.18
8.2.50.0040.00418.28
8.2.40.0060.00318.34
8.2.30.0030.00520.22
8.2.20.0080.00018.16
8.2.10.0030.00518.16
8.2.00.0040.00418.12
8.1.280.0090.01225.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00322.83
8.1.230.0090.00321.25
8.1.220.0080.00018.02
8.1.210.0080.00019.34
8.1.200.0040.00817.73
8.1.190.0080.00018.03
8.1.180.0080.00018.10
8.1.170.0050.00519.14
8.1.160.0080.00019.14
8.1.150.0040.00418.98
8.1.140.0060.00317.84
8.1.130.0040.00418.10
8.1.120.0080.00017.73
8.1.110.0080.00017.74
8.1.100.0050.00317.74
8.1.90.0040.00417.66
8.1.80.0000.00817.78
8.1.70.0000.00717.64
8.1.60.0000.00817.76
8.1.50.0060.00317.78
8.1.40.0040.00417.72
8.1.30.0040.00417.88
8.1.20.0030.00617.81
8.1.10.0000.00817.69
8.1.00.0080.00419.83
8.0.300.0000.00820.10
8.0.290.0040.00416.75
8.0.280.0070.00018.55
8.0.270.0050.00217.25
8.0.260.0020.00516.96
8.0.250.0040.00417.15
8.0.240.0000.01217.06
8.0.230.0080.00017.06
8.0.220.0000.00717.25
8.0.210.0040.00416.99
8.0.200.0040.00417.21
8.0.190.0060.00317.20
8.0.180.0030.00517.17
8.0.170.0080.00017.04
8.0.160.0000.00917.20
8.0.150.0040.00417.09
8.0.140.0040.00416.99
8.0.130.0050.00513.56
8.0.120.0040.00417.20
8.0.110.0050.00317.25
8.0.100.0000.00817.03
8.0.90.0000.00817.05
8.0.80.0100.00717.21
8.0.70.0000.00817.05
8.0.60.0040.00417.08
8.0.50.0030.00517.22
8.0.30.0130.01617.26
8.0.20.0070.01517.40
8.0.10.0030.00617.34
8.0.00.0100.01017.02
7.4.330.0000.00615.04
7.4.320.0070.00316.96
7.4.300.0000.00816.93
7.4.290.0060.00316.86
7.4.280.0080.00016.95
7.4.270.0000.00716.79
7.4.260.0030.00313.69
7.4.250.0030.00616.87
7.4.240.0000.00816.87
7.4.230.0070.00016.79
7.4.220.0090.01916.94
7.4.210.0080.01016.98
7.4.200.0050.00216.76
7.4.190.0070.00016.76
7.4.160.0170.00016.82
7.4.150.0130.00717.40
7.4.140.0090.00917.86
7.4.130.0140.00616.84
7.4.120.0090.00816.90
7.4.110.0090.01516.77
7.4.100.0140.00516.79
7.4.90.0120.00616.63
7.4.80.0090.01219.04
7.4.70.0110.01416.86
7.4.60.0140.00516.71
7.4.50.0000.01016.69
7.4.40.0090.00922.27
7.4.30.0130.00316.73
7.4.00.0100.00715.01
7.3.330.0000.00513.25
7.3.320.0000.00613.24
7.3.310.0000.00816.45
7.3.300.0040.00416.38
7.3.290.0150.00616.54
7.3.280.0100.00916.52
7.3.270.0070.01117.40
7.3.260.0070.01218.24
7.3.250.0140.00716.69
7.3.240.0070.01116.72
7.3.230.0100.00716.56
7.3.210.0090.00916.49
7.3.200.0060.01219.39
7.3.190.0120.00916.67
7.3.180.0090.00916.53
7.3.170.0110.00716.89
7.3.160.0140.00916.39
7.3.120.0000.01214.76
7.2.330.0190.00716.77
7.2.320.0100.00716.79
7.2.310.0090.00916.81
7.2.300.0100.01316.50
7.2.290.0100.01016.74
7.2.00.0080.00819.58
7.1.100.0080.00418.43
7.1.70.0040.00717.27
7.1.60.0140.01119.40
7.1.50.0200.00035.15
7.1.00.0000.05022.53
7.0.200.0030.00616.71
7.0.140.0070.07322.43
7.0.60.0100.07020.16
7.0.50.0130.08317.93
7.0.40.0130.05717.93
7.0.30.0070.04017.87
7.0.20.0030.04317.83
7.0.10.0070.03717.93
7.0.00.0130.03317.88
5.6.280.0070.07021.03
5.6.210.0170.04020.54
5.6.200.0100.05018.29
5.6.190.0130.06718.24
5.6.180.0100.08318.27
5.6.170.0070.03718.22
5.6.160.0030.04018.23
5.6.150.0000.04318.27
5.6.140.0000.04318.21
5.6.130.0070.03718.23
5.6.120.0000.04318.20
5.6.110.0030.04018.22
5.6.100.0070.03718.24
5.6.90.0000.04318.12
5.6.80.0000.04017.56
5.6.70.0070.03317.55
5.6.60.0000.04017.52
5.6.50.0000.04017.65
5.6.40.0070.04317.63
5.6.30.0100.03017.57
5.6.20.0130.02717.48
5.6.10.0000.04017.52
5.6.00.0070.03317.47
5.5.350.4200.04020.34
5.5.340.0070.05018.05
5.5.330.0100.07018.00
5.5.320.0000.05718.00
5.5.310.0070.03718.05
5.5.300.0070.03718.03
5.5.290.0070.03718.07
5.5.280.0030.04018.08
5.5.270.0030.04018.00
5.5.260.0000.04318.04
5.5.250.0100.03017.81
5.5.240.0070.03317.35
5.5.230.0000.04017.38
5.5.220.0000.04017.34
5.5.210.0000.04017.35
5.5.200.0000.04017.35
5.5.190.0030.03717.38
5.5.180.0030.04017.29
5.5.160.0100.03717.42
5.5.150.0030.03717.40
5.5.140.0030.03717.42
5.5.130.0070.07717.31
5.5.120.0070.07717.38
5.5.110.0130.04317.39
5.5.100.0130.07317.29
5.5.90.0070.07717.25
5.5.80.0100.05317.26
5.5.70.0030.04317.21
5.5.60.0030.06317.28
5.5.50.0170.05317.22
5.5.40.0030.06017.32
5.5.30.0070.08317.17
5.5.20.0100.07317.22
5.5.10.0000.04717.27
5.5.00.0030.05717.16
5.4.450.0070.04719.50
5.4.440.0000.04319.50
5.4.430.0030.03719.57
5.4.420.0070.03319.46
5.4.410.0030.03719.23
5.4.400.0070.03319.18
5.4.390.0000.04019.09
5.4.380.0030.03719.07
5.4.370.0070.03319.26
5.4.360.0030.03719.05
5.4.350.0000.04319.18
5.4.340.0000.04018.88
5.4.320.0070.04018.95
5.4.310.0130.02718.88
5.4.300.0030.06019.05
5.4.290.0100.04719.19
5.4.280.0100.07719.19
5.4.270.0070.04719.00
5.4.260.0000.05719.02
5.4.250.0070.05319.16
5.4.240.0070.03319.17
5.4.230.0070.08019.14
5.4.220.0070.07319.02
5.4.210.0100.07319.06
5.4.200.0070.07319.08
5.4.190.0070.04019.17
5.4.180.0070.05019.00
5.4.170.0070.06019.07
5.4.160.0100.08019.16
5.4.150.0100.04719.13
5.4.140.0070.07316.34
5.4.130.0030.07016.48
5.4.120.0070.07716.18
5.4.110.0030.04016.30
5.4.100.0070.07316.41
5.4.90.0100.07016.29
5.4.80.0070.05316.25
5.4.70.0030.04716.40
5.4.60.0130.06316.27
5.4.50.0030.08016.26
5.4.40.0130.07316.50
5.4.30.0170.05316.43
5.4.20.0030.07316.36
5.4.10.0100.07016.26
5.4.00.0030.05015.74
5.3.290.0070.03314.68
5.3.280.0130.03014.59
5.3.270.0070.05314.65
5.3.260.0030.08014.63
5.3.250.0100.07014.63
5.3.240.0170.04014.59
5.3.230.0070.07014.40
5.3.220.0070.06714.41
5.3.210.0030.05014.60
5.3.200.0030.04014.58
5.3.190.0070.06314.60
5.3.180.0030.07314.40
5.3.170.0100.05014.54
5.3.160.0070.07314.48
5.3.150.0030.07314.57
5.3.140.0070.07714.61
5.3.130.0030.07014.56
5.3.120.0130.07014.58
5.3.110.0030.08014.58
5.3.100.0070.07713.93
5.3.90.0130.05313.85
5.3.80.0130.06713.84
5.3.70.0100.04014.00
5.3.60.0070.07714.02
5.3.50.0130.06713.92
5.3.40.0030.07714.08
5.3.30.0030.08013.88
5.3.20.0100.04713.66
5.3.10.0070.05713.72
5.3.00.0070.06313.58
5.2.170.0030.06311.18
5.2.160.0000.05311.23
5.2.150.0030.05711.02
5.2.140.0070.05711.09
5.2.130.0000.03311.24
5.2.120.0130.02311.24
5.2.110.0000.05711.09
5.2.100.0070.06011.08
5.2.90.0100.05711.00
5.2.80.0070.04011.23
5.2.70.0030.06711.03
5.2.60.0030.06711.04
5.2.50.0030.06310.99
5.2.40.0100.03310.84
5.2.30.0070.06310.76
5.2.20.0070.06310.96
5.2.10.0030.06710.70
5.2.00.0030.06010.55
5.1.60.0100.0339.98
5.1.50.0070.0439.97
5.1.40.0030.0539.96
5.1.30.0000.06710.34
5.1.20.0100.04010.39
5.1.10.0030.03310.05
5.1.00.0070.05310.04
5.0.50.0030.0308.68
5.0.40.0030.0238.48
5.0.30.0000.0708.26
5.0.20.0030.0438.21
5.0.10.0070.0308.15
5.0.00.0070.0678.20
4.4.90.0070.0307.84
4.4.80.0030.0337.84
4.4.70.0070.0337.84
4.4.60.0070.0277.84
4.4.50.0070.0307.84
4.4.40.0030.0377.84
4.4.30.0030.0337.84
4.4.20.0030.0237.84
4.4.10.0070.0177.84
4.4.00.0030.0377.84
4.3.110.0030.0237.84
4.3.100.0000.0337.84
4.3.90.0000.0377.84
4.3.80.0070.0477.84
4.3.70.0100.0277.84
4.3.60.0030.0337.84
4.3.50.0000.0337.84
4.3.40.0030.0477.84
4.3.30.0000.0377.84
4.3.20.0030.0277.84
4.3.10.0000.0307.84
4.3.00.0030.0277.84

preferences:
43.79 ms | 401 KiB | 5 Q