3v4l.org

run code in 300+ PHP versions simultaneously
<?php $query = "{${phpinfo()}}"; $query = filter_string($query); function check_string($str) { return preg_match("/^\w+$/", (string)$str); } function filter_string($str) { return preg_replace('/^(.*)$/ie', "filter_function(\"\\1\")", $str); } function filter_function($str) { // do encoding / filtering etc. here return $str; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UAG0j
function name:  (null)
number of ops:  10
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'phpinfo'
          1        DO_ICALL                                         $1      
          2        FETCH_R                      local               ~2      $1
          3        CAST                                          6  ~3      ~2
          4        ASSIGN                                                   !0, ~3
    3     5        INIT_FCALL_BY_NAME                                       'filter_string'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !0, $5
   15     9      > RETURN                                                   1

Function check_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UAG0j
function name:  check_string
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5Cw%2B%24%2F'
          3        CAST                                          6  ~1      !0
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
    7     7*     > RETURN                                                   null

End of function check_string

Function filter_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UAG0j
function name:  filter_string
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5E%28.%2A%29%24%2Fie'
          3        SEND_VAL                                                 'filter_function%28%22%5C1%22%29'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
   10     7*     > RETURN                                                   null

End of function filter_string

Function filter_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UAG0j
function name:  filter_function
number of ops:  3
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1      > RETURN                                                   !0
   14     2*     > RETURN                                                   null

End of function filter_function

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.42 ms | 1396 KiB | 19 Q