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' => '10', '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.60.0130.00618.18
8.3.50.0080.01022.11
8.3.40.0170.00318.61
8.3.30.0100.00318.97
8.3.20.0050.00220.09
8.3.10.0000.00821.92
8.3.00.0040.00422.45
8.2.180.0120.00916.38
8.2.170.0120.00322.96
8.2.160.0150.00320.95
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0070.00726.16
8.2.120.0090.00017.60
8.2.110.0060.00322.21
8.2.100.0110.00017.91
8.2.90.0080.00018.03
8.2.80.0050.00317.50
8.2.70.0040.00417.25
8.2.60.0000.00818.03
8.2.50.0040.00418.07
8.2.40.0060.00321.13
8.2.30.0000.00717.97
8.2.20.0050.00317.63
8.2.10.0040.00417.60
8.2.00.0080.00317.71
8.1.280.0060.00925.92
8.1.270.0090.00022.02
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.59
8.1.230.0060.00622.66
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0030.00617.22
8.1.190.0040.00417.35
8.1.180.0000.01018.10
8.1.170.0000.00818.53
8.1.160.0000.00718.81
8.1.150.0080.00018.50
8.1.140.0000.00717.25
8.1.130.0000.00717.84
8.1.120.0070.00417.39
8.1.110.0060.00317.39
8.1.100.0000.00717.23
8.1.90.0040.00417.45
8.1.80.0000.00717.38
8.1.70.0000.00717.39
8.1.60.0030.00617.46
8.1.50.0000.00817.39
8.1.40.0040.00417.31
8.1.30.0050.00317.44
8.1.20.0000.00817.53
8.1.10.0000.00717.48
8.1.00.0040.00417.48
8.0.300.0070.00020.04
8.0.290.0000.00716.63
8.0.280.0040.00418.42
8.0.270.0040.00417.98
8.0.260.0030.00316.73
8.0.250.0040.00416.89
8.0.240.0040.00416.79
8.0.230.0000.00716.91
8.0.220.0070.00016.74
8.0.210.0030.00616.74
8.0.200.0030.00316.86
8.0.190.0040.00416.87
8.0.180.0000.00816.87
8.0.170.0070.00016.88
8.0.160.0040.00416.80
8.0.150.0030.00316.76
8.0.140.0040.00416.66
8.0.130.0000.00513.20
8.0.120.0020.00516.66
8.0.110.0000.00816.73
8.0.100.0040.00416.82
8.0.90.0000.00816.71
8.0.80.0040.01316.83
8.0.70.0040.00416.80
8.0.60.0030.00316.72
8.0.50.0000.00716.79
8.0.30.0160.00317.00
8.0.20.0140.00517.40
8.0.10.0000.00717.05
8.0.00.0090.00916.80
7.4.330.0000.00515.00
7.4.320.0060.00016.57
7.4.300.0000.00616.41
7.4.290.0030.00316.34
7.4.280.0040.00416.43
7.4.270.0000.00716.43
7.4.260.0070.00016.33
7.4.250.0040.00416.48
7.4.240.0060.00116.35
7.4.230.0050.00316.62
7.4.220.0140.00716.48
7.4.210.0100.00816.53
7.4.200.0040.00416.59
7.4.190.0000.00816.32
7.4.160.0030.01416.45
7.4.150.0110.00617.40
7.4.140.0110.00717.86
7.4.130.0110.00816.37
7.4.120.0100.00816.38
7.4.110.0060.01216.46
7.4.100.0160.00616.49
7.4.90.0120.00616.43
7.4.80.0090.01219.39
7.4.70.0070.01016.48
7.4.60.0110.00716.51
7.4.50.0030.00516.33
7.4.40.0100.00622.77
7.4.30.0090.00616.44
7.4.00.0000.01514.76
7.3.330.0000.00512.97
7.3.320.0050.00012.97
7.3.310.0040.00415.98
7.3.300.0000.00716.16
7.3.290.0060.00816.17
7.3.280.0090.00816.20
7.3.270.0150.00717.40
7.3.260.0150.00616.30
7.3.250.0120.00716.28
7.3.240.0080.00816.23
7.3.230.0100.00716.39
7.3.210.0060.01916.30
7.3.200.0070.01419.39
7.3.190.0100.00716.45
7.3.180.0080.00816.03
7.3.170.0060.01516.27
7.3.160.0030.01816.31
7.3.120.0040.01114.90
7.3.10.0030.00916.27
7.3.00.0030.00616.45
7.2.330.0110.00716.32
7.2.320.0040.01816.65
7.2.310.0100.00616.79
7.2.300.0040.01216.59
7.2.290.0090.00916.63
7.2.130.0100.00016.66
7.2.120.0090.00316.63
7.2.110.0050.00716.48
7.2.100.0060.00316.43
7.2.90.0150.00316.70
7.2.80.0060.00916.78
7.2.70.0120.00916.96
7.2.60.0070.01016.67
7.2.50.0000.01416.64
7.2.40.0100.00716.59
7.2.30.0000.01016.80
7.2.20.0000.01516.93
7.2.10.0090.00616.90
7.2.00.0070.00718.06
7.1.250.0070.00715.54
7.1.100.0090.00617.91
7.1.70.0040.00417.14
7.1.60.0140.01019.82
7.1.50.0140.01016.91
7.1.00.0100.07022.42
7.0.200.0260.00016.32
7.0.140.0100.06722.12
7.0.100.0030.04319.92
7.0.90.0070.04719.98
7.0.80.0070.08319.91
7.0.70.0130.06719.88
7.0.60.0230.04719.87
7.0.50.0100.07320.30
7.0.40.0070.07720.17
7.0.30.0030.08020.00
7.0.20.0200.07720.10
7.0.10.0100.07020.09
7.0.00.0100.07720.02
5.6.280.0070.06720.95
5.6.250.0130.03720.77
5.6.240.0070.08320.49
5.6.230.0070.07020.63
5.6.220.0130.04020.67
5.6.210.0070.06320.75
5.6.200.0270.05321.06
5.6.190.0100.03721.08
5.6.180.0030.07720.93
5.6.170.0070.07021.06
5.6.160.0030.05021.02
5.6.150.0000.09021.01
5.6.140.0130.05721.11
5.6.130.0100.04320.95
5.6.120.0200.04321.00
5.6.110.0070.06021.06
5.6.100.0200.07021.00
5.6.90.0070.04721.05
5.6.80.0130.07320.48
5.6.70.0030.06020.54
5.6.60.0000.05320.31
5.6.50.0100.07320.49
5.6.40.0130.04020.36
5.6.30.0030.04720.46
5.6.20.0070.03720.43
5.6.10.0000.04020.30
5.6.00.0030.04020.35
5.5.380.0100.04320.44
5.5.370.0070.04020.49
5.5.360.0100.04320.33
5.5.350.0170.07320.41
5.5.340.0030.04720.80
5.5.330.0100.04020.89
5.5.320.0070.07720.64
5.5.310.0070.06320.88
5.5.300.0070.07020.78
5.5.290.0030.04720.90
5.5.280.0100.08720.88
5.5.270.0170.07320.84
5.5.260.0030.05020.86
5.5.250.0130.07020.61
5.5.240.0000.05020.23
5.5.230.0070.04720.30
5.5.220.0130.05720.29
5.5.210.0130.07020.26
5.5.200.0170.07320.22
5.5.190.0030.05720.18
5.5.180.0070.04020.25
5.5.160.0030.04020.08
5.5.150.0100.03320.22
5.5.140.0070.04019.98
5.5.130.0000.04320.14
5.5.120.0100.05020.23
5.5.110.0030.04019.98
5.5.100.0070.04020.07
5.5.90.0070.05020.16
5.5.80.0030.04320.05
5.5.70.0030.04719.96
5.5.60.0130.02720.05
5.5.50.0030.04020.15
5.5.40.0070.03720.09
5.5.30.0000.04319.99
5.5.20.0100.04320.09
5.5.10.0030.03720.12
5.5.00.0030.04020.12
5.4.450.0030.04719.27
5.4.440.0070.04319.57
5.4.430.0130.03719.44
5.4.420.0070.07019.37
5.4.410.0130.06019.31
5.4.400.0170.06719.07
5.4.390.0130.07019.03
5.4.380.0000.07719.12
5.4.370.0100.05719.08
5.4.360.0070.03719.05
5.4.350.0130.05318.90
5.4.340.0000.04319.04
5.4.320.0030.04018.78
5.4.310.0000.04319.07
5.4.300.0000.04019.08
5.4.290.0030.03718.81
5.4.280.0070.04018.97
5.4.270.0000.03319.03
5.4.260.0030.04019.12
5.4.250.0070.03318.77
5.4.240.0070.03318.78
5.4.230.0070.03018.97
5.4.220.0030.03319.07
5.4.210.0000.04019.02
5.4.200.0030.04719.02
5.4.190.0030.04019.01
5.4.180.0070.03019.13
5.4.170.0030.03318.77
5.4.160.0000.04019.05
5.4.150.0000.04019.20
5.4.140.0030.04016.30
5.4.130.0000.04016.21
5.4.120.0070.03316.23
5.4.110.0000.04716.20
5.4.100.0030.03716.36
5.4.90.0030.03716.44
5.4.80.0100.03716.36
5.4.70.0070.03316.36
5.4.60.0130.04016.38
5.4.50.0030.03316.18
5.4.40.0030.06016.40
5.4.30.0000.04316.35
5.4.20.0030.03716.23
5.4.10.0030.03716.18
5.4.00.0070.03315.67
5.3.290.0000.04314.50
5.3.280.0100.07314.59
5.3.270.0070.03314.59
5.3.260.0000.04014.60
5.3.250.0000.03314.45
5.3.240.0030.03014.55
5.3.230.0000.03714.61
5.3.220.0000.04314.53
5.3.210.0000.04014.53
5.3.200.0130.02714.55
5.3.190.0000.03314.43
5.3.180.0030.03314.47
5.3.170.0000.04714.42
5.3.160.0070.03014.55
5.3.150.0000.04014.42
5.3.140.0030.04314.47
5.3.130.0030.03714.52
5.3.120.0100.04314.37
5.3.110.0000.04014.41
5.3.100.0030.03714.03
5.3.90.0030.03713.93
5.3.80.0070.08014.02
5.3.70.0100.07014.00
5.3.60.0030.07013.99
5.3.50.0070.06313.94
5.3.40.0000.04013.80
5.3.30.0070.07713.70
5.3.20.0000.06713.66
5.3.10.0070.03013.64
5.3.00.0100.08713.50
5.2.170.0070.05312.25
5.2.160.0070.05012.25
5.2.150.0070.06312.25
5.2.140.0100.06012.25
5.2.130.0130.05712.25
5.2.120.0070.05012.25
5.2.110.0030.06712.25
5.2.100.0000.03312.25
5.2.90.0100.06012.25
5.2.80.0000.03712.25
5.2.70.0000.06012.25
5.2.60.0070.04712.25
5.2.50.0070.03012.25
5.2.40.0070.05312.25
5.2.30.0070.04712.25
5.2.20.0130.03312.25
5.2.10.0070.04012.25
5.2.00.0070.04712.25
5.1.60.0030.05712.25
5.1.50.0000.03012.25
5.1.40.0030.02712.25
5.1.30.0000.05712.25
5.1.20.0070.02012.25
5.1.10.0000.05012.25
5.1.00.0070.03712.25
5.0.50.0030.04712.25
5.0.40.0030.05012.25
5.0.30.0000.06712.25
5.0.20.0030.04312.25
5.0.10.0000.04312.25
5.0.00.0030.03012.25
4.4.90.0000.03712.25
4.4.80.0000.01712.25
4.4.70.0030.01712.25
4.4.60.0070.03012.25
4.4.50.0000.01712.25
4.4.40.0030.05012.25
4.4.30.0000.02712.25
4.4.20.0100.02712.25
4.4.10.0000.01712.25
4.4.00.0000.05312.25
4.3.110.0000.02712.25
4.3.100.0030.01312.25
4.3.90.0030.02712.25
4.3.80.0030.05012.25
4.3.70.0000.03312.25
4.3.60.0000.01312.25
4.3.50.0000.03712.25
4.3.40.0000.06012.25
4.3.30.0030.02312.25
4.3.20.0030.02012.25
4.3.10.0030.03312.25
4.3.00.0000.02712.25

preferences:
33.66 ms | 401 KiB | 5 Q