3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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_SANITIZE_NUMBER_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";
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/0B2Em
function name:  (null)
number of ops:  15
compiled vars:  !0 = $data, !1 = $args, !2 = $myinputs
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   INIT_FCALL                                               'error_reporting'
         1        SEND_VAL                                                 32767
         2        DO_ICALL                                                 
   5     3        ASSIGN                                                   !0, <array>
  13     4        ASSIGN                                                   !1, <array>
  31     5        INIT_FCALL                                               'filter_var_array'
         6        SEND_VAR                                                 !0
         7        SEND_VAR                                                 !1
         8        DO_ICALL                                         $6      
         9        ASSIGN                                                   !2, $6
  33    10        INIT_FCALL                                               'var_dump'
        11        SEND_VAR                                                 !2
        12        DO_ICALL                                                 
  34    13        ECHO                                                     '%0A'
        14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0