3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! error_reporting(E_ALL | E_STRICT); $data = array( 'product_id' => 'libgd<script>', 'component' => '11', 'versions' => '2.0.33', 'testscalar' => array('2', '23', '10', '12'), 'testarray' => '2', ); $args = array( 'product_id' => FILTER_SANITIZE_ENCODED, 'component' => array('filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_FORCE_ARRAY, 'options' => array('min_range' => 1, 'max_range' => 10) ), 'versions' => FILTER_SANITIZE_ENCODED, 'doesnotexist' => FILTER_VALIDATE_INT, 'testscalar' => array( 'filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_REQUIRE_SCALAR, ), 'testarray' => array( 'filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_FORCE_ARRAY, ) ); $myinputs = filter_var_array($data, $args); var_dump($myinputs); echo "\n";

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.40.0060.00918.59
8.3.30.0150.00018.42
8.3.20.0090.00018.35
8.3.10.0040.00420.36
8.3.00.0190.00019.09
8.2.170.0090.00622.96
8.2.160.0130.00021.05
8.2.150.0110.00324.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0080.00019.48
8.2.110.0030.00621.11
8.2.100.0000.01317.79
8.2.90.0030.00618.22
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0000.00817.80
8.2.50.0050.00318.10
8.2.40.0030.00622.31
8.2.30.0090.00017.95
8.2.20.0030.00517.68
8.2.10.0080.00017.66
8.2.00.0040.00417.59
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.01022.01
8.1.230.0060.00621.03
8.1.220.0040.00417.79
8.1.210.0040.00420.08
8.1.200.0040.00417.23
8.1.190.0000.00817.10
8.1.180.0050.00318.10
8.1.170.0040.00418.66
8.1.160.0040.00418.80
8.1.150.0000.00718.61
8.1.140.0020.00517.47
8.1.130.0030.00517.86
8.1.120.0080.00017.45
8.1.110.0040.00417.25
8.1.100.0040.00417.37
8.1.90.0000.00817.26
8.1.80.0000.00817.35
8.1.70.0000.00817.31
8.1.60.0040.00417.54
8.1.50.0040.00417.37
8.1.40.0030.00517.41
8.1.30.0040.00417.48
8.1.20.0030.00617.60
8.1.10.0000.00717.41
8.1.00.0000.00817.33
8.0.300.0030.00319.94
8.0.290.0070.00016.75
8.0.280.0000.00718.46
8.0.270.0030.00317.29
8.0.260.0040.00416.86
8.0.250.0030.00616.87
8.0.240.0030.00516.75
8.0.230.0000.00716.89
8.0.220.0060.00016.80
8.0.210.0000.00816.78
8.0.200.0060.00016.89
8.0.190.0080.00016.83
8.0.180.0060.00316.74
8.0.170.0060.00316.81
8.0.160.0040.00416.71
8.0.150.0030.00516.64
8.0.140.0030.00616.82
8.0.130.0040.00413.28
8.0.120.0000.00816.75
8.0.110.0050.00316.82
8.0.100.0000.00716.85
8.0.90.0040.00416.82
8.0.80.0070.01016.78
8.0.70.0000.00716.61
8.0.60.0040.00416.83
8.0.50.0000.00716.81
8.0.30.0120.00916.84
8.0.20.0130.01016.96
8.0.10.0050.00216.91
8.0.00.0130.00816.70
7.4.330.0020.00213.03
7.4.320.0030.00316.34
7.4.300.0060.00016.47
7.4.290.0040.00416.56
7.4.280.0000.00816.49
7.4.270.0030.00516.33
7.4.260.0050.00313.20
7.4.250.0060.00316.31
7.4.240.0000.00716.52
7.4.230.0000.00716.45
7.4.220.0060.01216.52
7.4.210.0070.00916.47
7.4.200.0000.00716.51
7.4.190.0000.00816.51
7.4.160.0080.00816.28
7.4.150.0100.00716.45
7.4.140.0060.01816.38
7.4.130.0070.01016.34
7.4.120.0110.00716.49
7.4.110.0040.01216.31
7.4.100.0110.00716.33
7.4.90.0070.01716.24
7.4.80.0110.01119.39
7.4.70.0060.01116.52
7.4.60.0080.01616.47
7.4.50.0000.00916.08
7.4.40.0030.01016.47
7.4.30.0120.00416.50
7.4.00.0000.01714.80
7.3.330.0000.00612.96
7.3.320.0030.00612.98
7.3.310.0030.00316.12
7.3.300.0000.00616.13
7.3.290.0110.00416.07
7.3.280.0070.01116.10
7.3.270.0330.01516.33
7.3.260.0130.01016.16
7.3.250.0130.00316.31
7.3.240.0120.00616.10
7.3.230.0080.00816.27
7.3.210.0120.00616.41
7.3.200.0110.00716.32
7.3.190.0160.00616.35
7.3.180.0120.00316.30
7.3.170.0080.00816.30
7.3.160.0060.00916.43
7.3.120.0060.00914.69
7.3.10.0060.00816.62
7.3.00.0050.00716.54
7.2.330.0000.02016.71
7.2.320.0130.00316.61
7.2.310.0100.01316.32
7.2.300.0060.01216.64
7.2.290.0120.00616.63
7.2.130.0090.00616.74
7.2.120.0110.00416.74
7.2.110.0060.00716.68
7.2.100.0030.00916.75
7.2.90.0050.01016.63
7.2.80.0110.00416.79
7.2.70.0060.00916.80
7.2.60.0090.00716.83
7.2.50.0100.00316.63
7.2.40.0070.01016.65
7.2.30.0060.01016.83
7.2.20.0090.00616.68
7.2.10.0090.00716.66
7.2.00.0050.00817.41
7.1.250.0060.00515.67
7.1.100.0030.01118.13
7.1.70.0110.00416.87
7.1.60.0060.01619.40
7.1.50.0040.01816.55
7.1.00.0070.06022.33
7.0.200.0060.00314.61
7.0.140.0000.07722.09
7.0.120.0030.07022.09
7.0.60.0130.07719.96
7.0.50.0030.04717.71
7.0.40.0000.04720.27
7.0.30.0330.08020.34
7.0.20.0270.05720.13
7.0.10.0270.05020.20
7.0.00.0070.06320.09
5.6.280.0030.07020.89
5.6.210.0100.08020.75
5.6.200.0070.03718.22
5.6.190.0200.04320.67
5.6.180.0600.07720.45
5.6.170.0300.05720.52
5.6.160.0000.04320.48
5.6.150.0030.07318.12
5.6.140.0100.03318.22
5.6.130.0070.04718.09
5.6.120.0130.04721.03
5.6.110.0000.09320.98
5.6.100.0070.08721.01
5.6.90.0070.03721.09
5.6.80.0100.07320.52
5.6.70.0400.05720.47
5.5.350.0270.07720.40
5.5.340.0070.08017.96
5.5.330.0100.05720.20
5.5.320.0100.08720.24
5.5.310.0170.05020.32
5.5.300.0130.03317.92
5.5.290.0000.04317.92
5.5.280.0100.08020.88
5.5.270.0130.04720.89
5.5.260.0030.04020.87
5.5.250.0130.08020.60
5.5.240.0000.04320.06
5.4.450.0070.03719.26
5.4.440.0100.07319.50
5.4.430.0070.08319.50
5.4.420.0070.08019.48
5.4.410.0030.05019.38
5.4.400.0100.06719.00
5.4.390.0100.05319.15
5.4.380.0000.05319.17
5.4.370.0070.07319.12
5.4.360.0030.07719.19
5.4.350.0130.07319.18
5.4.340.0100.06319.08
5.4.320.0100.07019.10
5.4.310.0070.06018.80
5.4.300.0130.06319.08
5.4.290.0070.07718.77
5.4.280.0030.07719.13
5.4.270.0030.05319.13
5.4.260.0100.06319.14
5.4.250.0070.06719.17
5.4.240.0100.06719.07
5.4.230.0070.07319.19
5.4.220.0030.06018.99
5.4.210.0030.05718.91
5.4.200.0070.07018.79
5.4.190.0070.04318.80
5.4.180.0170.07018.76
5.4.170.0030.05019.09
5.4.160.0030.04018.77
5.4.150.0030.04018.98
5.4.140.0130.07016.29
5.4.130.0030.04016.38
5.4.120.0030.05316.43
5.4.110.0000.05016.27
5.4.100.0070.05316.15
5.4.90.0000.07716.34
5.4.80.0130.03716.22
5.4.70.0100.06316.29
5.4.60.0030.05716.38
5.4.50.0030.07316.13
5.4.40.0070.04716.37
5.4.30.0030.07016.30
5.4.20.0100.03316.24
5.4.10.0130.05716.38
5.4.00.0030.04715.93
5.3.290.0030.07714.49
5.3.280.0070.08014.54
5.3.270.0030.06014.53
5.3.260.0100.07314.70
5.3.250.0070.03714.51
5.3.240.0100.07014.54
5.3.230.0070.06014.54
5.3.220.0030.08314.53
5.3.210.0030.06314.50
5.3.200.0200.06314.66
5.3.190.0100.07314.50
5.3.180.0030.04714.53
5.3.170.0100.05314.36
5.3.160.0030.07714.38
5.3.150.0100.07014.36
5.3.140.0030.05314.52
5.3.130.0100.04714.49
5.3.120.0030.07714.49
5.3.110.0170.05714.49
5.3.100.0100.07013.91
5.3.90.0070.04313.96
5.3.80.0070.07313.97
5.3.70.0030.05714.11
5.3.60.0070.04014.10
5.3.50.0070.03313.77
5.3.40.0100.03013.89
5.3.30.0030.05013.86
5.3.20.0070.05013.62
5.3.10.0170.04313.59
5.3.00.0130.07013.56
5.2.170.0000.07011.30
5.2.160.0030.03011.05
5.2.150.0000.07011.10
5.2.140.0030.06011.01
5.2.130.0000.04011.00
5.2.120.0000.06711.04
5.2.110.0070.05711.26
5.2.100.0100.03311.09
5.2.90.0100.05311.04
5.2.80.0170.03310.98
5.2.70.0030.06311.09
5.2.60.0000.03310.94
5.2.50.0030.05310.95
5.2.40.0030.03710.93
5.2.30.0000.03710.87
5.2.20.0030.06310.95
5.2.10.0170.05010.85
5.2.00.0030.05010.61
5.1.60.0100.05010.04
5.1.50.0000.0439.90
5.1.40.0030.0539.88
5.1.30.0100.02710.35
5.1.20.0030.06310.36
5.1.10.0070.05710.13
5.1.00.0070.04310.05
5.0.50.0000.0478.70
5.0.40.0070.0338.48
5.0.30.0000.0408.20
5.0.20.0100.0308.20
5.0.10.0030.0308.17
5.0.00.0000.0438.07
4.4.90.0000.0177.89
4.4.80.0000.0207.89
4.4.70.0030.0337.89
4.4.60.0030.0277.89
4.4.50.0000.0237.89
4.4.40.0000.0577.89
4.4.30.0000.0207.89
4.4.20.0030.0337.89
4.4.10.0000.0377.89
4.4.00.0100.0477.89
4.3.110.0000.0277.89
4.3.100.0030.0307.89
4.3.90.0000.0377.89
4.3.80.0070.0377.89
4.3.70.0000.0237.89
4.3.60.0030.0207.89
4.3.50.0000.0207.89
4.3.40.0070.0277.89
4.3.30.0030.0337.89
4.3.20.0070.0277.89
4.3.10.0100.0237.89
4.3.00.0000.0277.89

preferences:
43.61 ms | 400 KiB | 5 Q