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, ), '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.70.0070.00718.18
8.3.60.0100.01016.50
8.3.50.0120.00721.99
8.3.40.0070.00718.67
8.3.30.0000.01418.85
8.3.20.0000.00820.21
8.3.10.0000.00821.60
8.3.00.0080.00017.68
8.2.180.0060.01216.38
8.2.170.0040.01122.96
8.2.160.0110.00620.38
8.2.150.0040.00424.18
8.2.140.0100.00324.66
8.2.130.0000.00726.16
8.2.120.0040.00420.99
8.2.110.0090.00022.15
8.2.100.0110.00018.22
8.2.90.0000.00719.17
8.2.80.0030.00617.97
8.2.70.0000.00817.63
8.2.60.0000.00817.91
8.2.50.0040.00418.07
8.2.40.0030.00518.16
8.2.30.0030.00318.17
8.2.20.0050.00317.52
8.2.10.0040.00417.96
8.2.00.0080.00017.58
8.1.280.0120.00425.92
8.1.270.0100.00023.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.75
8.1.230.0030.00719.21
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0060.00317.11
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0050.00318.50
8.1.160.0040.00421.93
8.1.150.0000.00718.84
8.1.140.0030.00517.48
8.1.130.0070.00017.67
8.1.120.0040.00417.29
8.1.110.0000.00817.39
8.1.100.0000.00717.28
8.1.90.0100.00017.23
8.1.80.0050.00317.27
8.1.70.0070.00017.32
8.1.60.0000.00717.47
8.1.50.0000.00817.42
8.1.40.0000.00917.43
8.1.30.0050.00317.39
8.1.20.0040.00417.54
8.1.10.0000.00817.51
8.1.00.0040.00417.34
8.0.300.0080.00018.77
8.0.290.0040.00416.59
8.0.280.0030.00318.48
8.0.270.0050.00317.19
8.0.260.0030.00317.12
8.0.250.0000.00716.90
8.0.240.0030.00316.75
8.0.230.0050.00316.79
8.0.220.0030.00316.80
8.0.210.0050.00216.85
8.0.200.0030.00516.82
8.0.190.0030.00316.84
8.0.180.0000.00716.87
8.0.170.0080.00016.82
8.0.160.0030.00316.66
8.0.150.0070.00416.65
8.0.140.0000.00716.70
8.0.130.0070.00313.20
8.0.120.0060.00316.71
8.0.110.0040.00416.86
8.0.100.0040.00416.78
8.0.90.0040.00416.70
8.0.80.0030.01716.80
8.0.70.0040.00416.77
8.0.60.0040.00416.73
8.0.50.0000.00716.87
8.0.30.0120.01016.99
8.0.20.0150.00717.40
8.0.10.0040.00416.89
8.0.00.0060.01216.79
7.4.330.0000.00515.08
7.4.320.0000.00616.53
7.4.300.0040.00416.48
7.4.290.0040.00416.46
7.4.280.0080.00016.47
7.4.270.0030.00416.44
7.4.260.0030.00316.27
7.4.250.0080.00016.49
7.4.240.0030.00316.46
7.4.230.0030.00316.62
7.4.220.0030.01616.45
7.4.210.0090.00616.57
7.4.200.0000.00716.54
7.4.160.0110.00416.20
7.4.150.0150.00317.40
7.4.140.0120.00617.86
7.4.130.0110.01016.39
7.4.120.0070.01016.60
7.4.110.0150.03216.31
7.4.100.0130.00316.46
7.4.90.0370.01916.41
7.4.80.0110.01219.39
7.4.70.0090.01316.62
7.4.60.0100.01016.35
7.4.50.0000.00816.53
7.4.40.0140.00616.39
7.4.30.0060.01516.34
7.4.00.0000.01415.02
7.3.330.0030.00313.01
7.3.320.0050.00012.86
7.3.310.0000.00716.32
7.3.300.0070.00016.14
7.3.290.0030.01216.09
7.3.280.0090.00816.09
7.3.270.0130.00517.40
7.3.260.0130.00616.22
7.3.250.0050.01316.17
7.3.240.0120.00616.24
7.3.230.0110.01116.41
7.3.210.0120.00616.30
7.3.200.0090.00916.15
7.3.190.0030.01316.34
7.3.180.0110.00416.18
7.3.170.0150.00016.27
7.3.160.0100.00616.33
7.3.120.0100.00614.68
7.2.330.0080.00816.54
7.2.320.0070.01116.57
7.2.310.0040.01416.70
7.2.300.0060.00916.36
7.2.290.0080.00816.48
7.2.00.0000.01319.53
7.1.100.0070.01017.88
7.1.70.0070.00317.14
7.1.60.0090.00919.70
7.1.50.0000.01616.90
7.1.00.0000.08022.35
7.0.200.0000.00816.85
7.0.140.0100.07022.08
7.0.60.0100.06020.00
7.0.50.0030.04017.80
7.0.40.0000.08719.90
7.0.30.0370.04320.34
7.0.20.0370.08020.28
7.0.10.0100.06320.18
7.0.00.0100.05320.11
5.6.280.0030.07020.98
5.6.210.0100.04020.66
5.6.200.0070.04718.21
5.6.190.0070.08720.43
5.6.180.0270.05720.33
5.6.170.0200.04020.55
5.6.160.0030.04320.50
5.6.150.0000.04318.19
5.6.140.0030.08318.09
5.6.130.0070.08318.11
5.6.120.0000.04321.09
5.6.110.0100.08321.10
5.6.100.0030.04321.08
5.6.90.0030.04321.09
5.6.80.0100.06320.25
5.5.350.0370.06320.35
5.5.340.0100.07317.89
5.5.330.0200.07320.43
5.5.320.0230.04020.51
5.5.310.0170.04020.13
5.5.300.0030.03717.90
5.5.290.0000.04717.91
5.5.280.0070.08320.80
5.5.270.0130.08320.76
5.5.260.0100.03720.87
5.5.250.0000.04320.66
5.5.240.0030.08020.15
5.4.450.0600.06319.64
5.4.440.0570.05019.45
5.4.430.0130.05319.09
5.4.420.0230.06019.60
5.4.410.0200.04318.64
5.4.400.0300.05318.61
5.4.390.0270.06018.79
5.4.380.0170.05018.50
5.4.370.0100.04018.44
5.4.360.0000.04318.71
5.4.350.0080.03411.97
5.4.340.0050.03911.97
5.4.320.0040.04512.45
5.4.310.0060.03812.45
5.4.300.0060.03512.46
5.4.290.0080.03412.45
5.4.280.0060.03412.35
5.4.270.0040.03712.35
5.4.260.0080.03412.35
5.4.250.0070.03612.35
5.4.240.0070.03312.35
5.4.230.0030.04012.34
5.4.220.0060.03512.34
5.4.210.0100.04012.34
5.4.200.0040.03812.34
5.4.190.0060.03512.34
5.4.180.0020.03912.34
5.4.170.0070.03412.35
5.4.160.0040.03712.35
5.4.150.0090.03212.34
5.4.140.0070.03412.02
5.4.130.0060.03512.01
5.4.120.0070.03411.97
5.4.110.0070.03611.97
5.4.100.0070.03411.97
5.4.90.0080.03611.97
5.4.80.0090.03511.96
5.4.70.0010.03911.96
5.4.60.0040.03511.96
5.4.50.0070.03211.96
5.4.40.0070.03211.95
5.4.30.0070.04311.95
5.4.20.0090.03811.95
5.4.10.0060.03311.95
5.4.00.0100.04011.45
5.3.290.0060.05012.80
5.3.280.0080.04712.70
5.3.270.0070.04212.72
5.3.260.0050.04212.72
5.3.250.0080.03612.71
5.3.240.0060.03712.72
5.3.230.0050.03712.71
5.3.220.0080.03912.68
5.3.210.0060.04312.68
5.3.200.0060.03512.68
5.3.190.0040.03812.68
5.3.180.0080.03612.67
5.3.170.0060.03712.66
5.3.160.0050.04012.67
5.3.150.0100.03812.68
5.3.140.0090.03112.66
5.3.130.0030.04012.66
5.3.120.0070.03612.65
5.3.110.0070.03712.66
5.3.100.0050.03512.12
5.3.90.0060.03412.08
5.3.80.0060.03512.07
5.3.70.0080.04212.07
5.3.60.0040.04212.07
5.3.50.0080.04512.00
5.3.40.0050.03712.00
5.3.30.0060.03711.95
5.3.20.0040.04111.72
5.3.10.0060.03411.70
5.3.00.0070.03411.68
5.2.170.0070.0289.18
5.2.160.0040.0299.18
5.2.150.0050.0299.18
5.2.140.0060.0309.18
5.2.130.0040.0359.14
5.2.120.0060.0299.14
5.2.110.0070.0269.15
5.2.100.0050.0279.14
5.2.90.0020.0319.14
5.2.80.0020.0329.14
5.2.70.0100.0279.14
5.2.60.0060.0279.09
5.2.50.0030.0309.07
5.2.40.0050.0299.04
5.2.30.0040.0379.02
5.2.20.0040.0289.00
5.2.10.0070.0258.94
5.2.00.0070.0318.80
5.1.60.0030.0268.09
5.1.50.0060.0228.08
5.1.40.0050.0238.07
5.1.30.0010.0328.41
5.1.20.0060.0278.44
5.1.10.0040.0298.16
5.1.00.0040.0288.16
5.0.50.0010.0226.64
5.0.40.0010.0206.50
5.0.30.0030.0356.32
5.0.20.0030.0276.28
5.0.10.0050.0276.26
5.0.00.0060.0306.25
4.4.90.0020.0164.78
4.4.80.0060.0144.76
4.4.70.0020.0184.75
4.4.60.0010.0174.76
4.4.50.0040.0204.77
4.4.40.0020.0244.71
4.4.30.0030.0154.76
4.4.20.0030.0164.84
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0020.0214.67
4.3.100.0020.0164.66
4.3.90.0030.0144.63
4.3.80.0030.0244.59
4.3.70.0020.0144.63
4.3.60.0070.0104.62
4.3.50.0040.0154.62
4.3.40.0010.0264.54
4.3.30.0040.0173.30
4.3.20.0030.0153.28
4.3.10.0030.0193.24
4.3.00.0100.0237.18

preferences:
47.83 ms | 401 KiB | 5 Q