3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); /* data actually came from POST */ $_POST = array( 'product_id' => 'libgd<script>', 'component' => '10', 'versions' => '2.0.33', 'testarray' => array('2', '23', '10', '12'), 'testscalar' => '2', ); $args = array( 'product_id' => FILTER_SANITIZE_ENCODED, 'component' => array('filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_REQUIRE_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_REQUIRE_ARRAY, ) ); $myinputs = filter_input_array(INPUT_POST, $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.0170.00318.55
8.3.50.0090.00618.14
8.3.40.0120.00918.70
8.3.30.0120.00318.74
8.3.20.0040.00421.60
8.3.10.0040.00421.97
8.3.00.0100.00723.66
8.2.180.0110.01118.29
8.2.170.0030.01222.96
8.2.160.0090.00619.83
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00021.05
8.2.120.0060.00326.35
8.2.110.0030.00622.13
8.2.100.0090.00317.72
8.2.90.0050.00318.16
8.2.80.0050.00318.22
8.2.70.0050.00317.80
8.2.60.0060.00317.90
8.2.50.0000.00718.22
8.2.40.0070.00019.08
8.2.30.0000.00821.09
8.2.20.0050.00318.18
8.2.10.0000.00718.05
8.2.00.0060.00319.18
8.1.280.0120.00325.92
8.1.270.0000.00823.91
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00019.06
8.1.230.0060.00622.64
8.1.220.0040.00417.78
8.1.210.0060.00318.77
8.1.200.0060.00317.36
8.1.190.0030.00617.25
8.1.180.0000.00718.10
8.1.170.0040.00418.64
8.1.160.0040.00418.84
8.1.150.0000.00818.98
8.1.140.0040.00417.71
8.1.130.0040.00420.69
8.1.120.0070.00017.44
8.1.110.0040.00417.40
8.1.100.0090.00017.45
8.1.90.0000.00717.44
8.1.80.0050.00317.51
8.1.70.0000.00717.41
8.1.60.0000.01017.58
8.1.50.0030.00517.41
8.1.40.0050.00317.44
8.1.30.0030.00617.51
8.1.20.0000.00817.69
8.1.10.0040.00417.52
8.1.00.0070.00017.45
8.0.300.0040.00419.98
8.0.290.0040.00416.75
8.0.280.0030.00318.44
8.0.270.0000.00717.36
8.0.260.0080.00017.24
8.0.250.0030.00316.83
8.0.240.0030.00316.91
8.0.230.0090.00016.95
8.0.220.0000.00716.85
8.0.210.0030.00316.87
8.0.200.0000.00716.82
8.0.190.0040.00416.85
8.0.180.0040.00416.81
8.0.170.0040.00416.94
8.0.160.0030.00516.86
8.0.150.0030.00516.80
8.0.140.0000.00716.74
8.0.130.0000.00513.31
8.0.120.0000.00816.88
8.0.110.0030.00416.77
8.0.100.0080.00016.88
8.0.90.0050.00217.00
8.0.80.0090.00616.85
8.0.70.0000.00716.89
8.0.60.0000.00716.93
8.0.50.0040.00416.77
8.0.30.0130.00517.08
8.0.20.0160.00317.40
8.0.10.0030.00517.08
8.0.00.0140.00816.76
7.4.330.0030.00315.55
7.4.320.0000.00616.59
7.4.300.0000.00616.57
7.4.290.0000.00716.38
7.4.280.0050.00316.59
7.4.270.0050.00516.59
7.4.260.0000.00716.54
7.4.250.0000.00716.32
7.4.240.0080.00016.65
7.4.230.0000.00716.48
7.4.220.0040.00416.68
7.4.210.0070.00716.47
7.4.200.0030.00316.67
7.4.160.0100.00616.53
7.4.140.0130.00517.86
7.4.130.0140.00316.24
7.4.120.0100.00716.53
7.4.110.0080.00816.55
7.4.100.0080.00816.43
7.4.90.0030.01316.51
7.4.80.0180.00019.39
7.4.70.0080.00816.45
7.4.60.0040.01116.31
7.4.50.0030.01216.36
7.4.40.0070.01016.30
7.4.00.0030.01314.83
7.3.330.0000.00712.98
7.3.320.0030.00313.05
7.3.310.0050.00316.13
7.3.300.0000.00716.16
7.3.290.0070.00016.09
7.3.280.0120.00516.15
7.3.260.0110.00616.32
7.3.240.0080.01016.38
7.3.230.0060.01216.31
7.3.210.0100.00616.45
7.3.200.0070.01016.15
7.3.190.0040.01516.36
7.3.180.0060.01016.25
7.3.170.0110.00716.15
7.3.160.0070.01116.33
7.2.330.0140.00416.78
7.2.320.0100.00716.29
7.2.310.0100.01116.29
7.2.300.0170.00716.70
7.2.290.0080.00816.51
7.2.60.0040.01116.85
7.2.40.0930.00917.56
7.2.30.1070.00817.99
7.2.20.0590.01017.93
7.2.10.0650.00517.86
7.2.00.0720.00718.00
7.1.200.0070.00415.74
7.1.160.0810.00916.93
7.1.150.0800.01516.88
7.1.140.0590.00716.64
7.1.130.0590.00916.78
7.1.120.0720.00916.27
7.1.110.0940.00916.27
7.1.100.1010.01016.20
7.1.90.1370.00715.97
7.1.80.1300.00716.03
7.1.70.0740.00915.20
7.1.60.1140.01433.35
7.1.50.0930.01132.61
7.1.40.0930.01232.71
7.1.30.1800.02732.59
7.1.20.1630.00732.63
7.1.10.0840.00814.88
7.1.00.0950.00914.83
7.0.290.0720.00916.40
7.0.270.0630.00816.68
7.0.260.0730.01216.42
7.0.250.1350.00915.99
7.0.240.1500.00915.93
7.0.230.1210.00915.90
7.0.220.0810.00815.72
7.0.210.1620.01014.91
7.0.200.0900.00914.72
7.0.190.0960.01114.80
7.0.180.0840.00614.39
7.0.170.1960.01114.21
7.0.160.1140.00714.42
7.0.150.1030.00714.42
7.0.140.0910.00714.47
7.0.130.0880.00814.60
7.0.120.0780.01114.61
7.0.110.1020.00914.32
7.0.100.1290.01014.47
7.0.90.0990.00814.29
7.0.80.0060.01114.62
7.0.70.0500.01214.61
7.0.60.0090.00714.34
7.0.50.1050.01214.53
7.0.40.1240.01314.52
7.0.30.1100.01214.57
7.0.20.0140.00814.57
7.0.10.0960.00414.73
7.0.00.1000.00914.58
5.6.300.0200.05420.87
5.6.290.0210.05720.97
5.6.280.0160.05420.77
5.6.270.0180.05420.79
5.6.260.0170.05521.02
5.6.250.0220.05120.75
5.6.240.0130.05820.76
5.6.230.0190.05520.84
5.6.220.0200.07220.69
5.6.210.0250.05220.52
5.6.200.0110.06120.75
5.6.190.0170.07920.72
5.6.180.0250.06620.88
5.6.170.0150.06020.74
5.6.160.0160.05920.91
5.6.150.0160.05720.91
5.6.140.0160.07620.75
5.6.130.0180.05220.69
5.6.120.0200.06620.75
5.6.110.0210.05720.75
5.6.100.0190.06020.64
5.6.90.0170.07620.86
5.6.80.0240.04520.10
5.6.70.0180.05020.05
5.6.60.0170.05720.08
5.6.50.0130.07620.36
5.6.40.0120.05620.23
5.6.30.0140.05620.34
5.6.20.0080.05920.09
5.6.10.0130.05520.07
5.6.00.0190.05220.21
5.5.380.0220.06217.56
5.5.370.0230.04717.43
5.5.360.0200.05117.39
5.5.350.0160.06517.44
5.5.340.0210.05517.96
5.5.330.0130.05617.91
5.5.320.0180.07017.78
5.5.310.0200.06117.81
5.5.300.0180.06618.04
5.5.290.0160.05318.10
5.5.280.0150.05617.70
5.5.270.0220.05017.70
5.5.260.0260.07017.77
5.5.250.0130.05417.78
5.5.240.0150.07417.18
5.5.230.0160.06017.35
5.5.220.0220.05517.35
5.5.210.0130.06017.08
5.5.200.0080.05817.35
5.5.190.0130.06717.09
5.5.180.0200.06217.05
5.5.160.0130.05817.14
5.5.150.0110.05217.39
5.5.140.0120.05317.23
5.5.130.0180.06217.05
5.5.120.0130.05017.11
5.5.110.0130.05617.08
5.5.100.0140.05517.23
5.5.90.0130.05017.25
5.5.80.0190.06417.22
5.5.70.0130.05417.23
5.5.60.0130.05617.23
5.5.50.0140.05017.24
5.5.40.0150.06617.12
5.5.30.0090.05616.94
5.5.20.0190.07217.22
5.5.10.0120.05717.13
5.5.00.0140.05616.93
5.4.450.0230.05719.29
5.4.440.0150.05519.19
5.4.430.0200.06519.06
5.4.420.0110.07819.34
5.4.410.0150.05419.18
5.4.400.0160.05918.83
5.4.390.0140.05518.93
5.4.380.0110.06418.94
5.4.370.0180.05619.05
5.4.360.0160.05219.11
5.4.350.0180.04719.05
5.4.340.0200.06318.94
5.4.320.0150.05518.94
5.4.310.0110.05218.74
5.4.300.0170.04919.02
5.4.290.0110.05319.14
5.4.280.0120.05418.82
5.4.270.0120.05219.02
5.4.260.0160.05218.74
5.4.250.0190.06618.93
5.4.240.0180.06918.71
5.4.230.0180.05619.02
5.4.220.0150.05018.92
5.4.210.0090.05518.82
5.4.200.0190.04618.85
5.4.190.0140.05318.93
5.4.180.0190.06718.92
5.4.170.0120.05318.96
5.4.160.0140.05818.91
5.4.150.0150.06718.91
5.4.140.0130.05016.53
5.4.130.0130.04716.31
5.4.120.0070.05316.36
5.4.110.0140.04616.57
5.4.100.0110.05816.34
5.4.90.0160.04416.30
5.4.80.0150.04616.29
5.4.70.0110.05216.29
5.4.60.0210.05516.44
5.4.50.0180.06316.32
5.4.40.0110.05016.57
5.4.30.0130.05016.43
5.4.20.0160.04816.41
5.4.10.0170.04716.56
5.4.00.0120.04815.92
5.3.290.0100.05314.86
5.3.280.0140.04814.73
5.3.270.0200.05914.59
5.3.260.0160.06714.56
5.3.250.0120.04914.67
5.3.240.0180.05814.59
5.3.230.0120.05114.70
5.3.220.0120.05014.75
5.3.210.0140.04814.70
5.3.200.0190.04314.72
5.3.190.0120.05214.50
5.3.180.0150.04814.55
5.3.170.0130.04814.52
5.3.160.0160.04814.72
5.3.150.0110.05414.56
5.3.140.0170.06414.70
5.3.130.0150.04814.48
5.3.120.0280.05514.69
5.3.110.0130.06114.69
5.3.100.0100.05114.13
5.3.90.0150.04614.17
5.3.80.0170.06014.17
5.3.70.0140.06113.99
5.3.60.0180.06214.11
5.3.50.0080.05214.11
5.3.40.0130.05014.03
5.3.30.0130.04614.00
5.3.20.0170.05313.50
5.3.10.0170.04313.71
5.3.00.0130.04813.45
5.2.170.0120.04211.20
5.2.160.0120.04011.16
5.2.150.0090.04911.37
5.2.140.0080.04411.29
5.2.130.0170.03511.09
5.2.120.0110.04411.34
5.2.110.0170.03611.04
5.2.100.0130.05310.91
5.2.90.0120.03611.24
5.2.80.0100.05211.20
5.2.70.0130.04910.90
5.2.60.0100.04411.18
5.2.50.0100.03910.81
5.2.40.0110.04711.17
5.2.30.0200.03810.95
5.2.20.0100.05210.96
5.2.10.0080.04210.98
5.2.00.0070.04010.98
5.1.60.0110.02910.20
5.1.50.0090.03810.00
5.1.40.0130.0319.85
5.1.30.0100.03410.50
5.1.20.0070.04910.22
5.1.10.0180.03410.38
5.1.00.0100.03210.28
5.0.50.0080.0278.42
5.0.40.0100.0238.46
5.0.30.0090.0428.50
5.0.20.0070.0268.24
5.0.10.0050.0308.26
5.0.00.0070.0448.41
4.4.90.0040.0228.24
4.4.80.0050.0218.24
4.4.70.0110.0178.24
4.4.60.0060.0228.24
4.4.50.0080.0208.24
4.4.40.0130.0388.24
4.4.30.0090.0178.24
4.4.20.0060.0208.24
4.4.10.0060.0198.24
4.4.00.0060.0328.24
4.3.110.0050.0208.24
4.3.100.0050.0208.24
4.3.90.0050.0208.24
4.3.80.0040.0338.24
4.3.70.0040.0218.24
4.3.60.0070.0208.24
4.3.50.0050.0208.24
4.3.40.0040.0328.24
4.3.30.0070.0268.24
4.3.20.0090.0238.24
4.3.10.0070.0218.24
4.3.00.0090.0378.24

preferences:
68.36 ms | 401 KiB | 5 Q