3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fnc = create_function('$a', 'eval("\$GOLBALS[\'get\'] = $a;");'); function set1 ($value) { global $fnc; if(preg_match('/^[0-9]{1,9}$/D', $value) === 1) $fnc($value); } function get1 () { echo $GOLBALS['get']; } if (preg_match('/^.*1$/D', $_GET['set']) === 1) $_GET['set'](unserialize($_GET['parm1']));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 23
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/6pqpZ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $fnc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'create_function'
          1        SEND_VAL_EX                                              '%24a'
          2        SEND_VAL_EX                                              'eval%28%22%5C%24GOLBALS%5B%27get%27%5D+%3D+%24a%3B%22%29%3B'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
   16     5        INIT_FCALL                                               'preg_match'
          6        SEND_VAL                                                 '%2F%5E.%2A1%24%2FD'
          7        FETCH_R                      global              ~3      '_GET'
          8        FETCH_DIM_R                                      ~4      ~3, 'set'
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                         $5      
         11        IS_IDENTICAL                                             $5, 1
         12      > JMPZ                                                     ~6, ->23
   17    13    >   FETCH_R                      global              ~7      '_GET'
         14        FETCH_DIM_R                                      ~8      ~7, 'set'
         15        INIT_DYNAMIC_CALL                                        ~8
         16        INIT_FCALL                                               'unserialize'
         17        FETCH_R                      global              ~9      '_GET'
         18        FETCH_DIM_R                                      ~10     ~9, 'parm1'
         19        SEND_VAL                                                 ~10
         20        DO_ICALL                                         $11     
         21        SEND_VAR_NO_REF_EX                                       $11
         22        DO_FCALL                                      0          
         23    > > RETURN                                                   1

Function set1:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/6pqpZ
function name:  set1
number of ops:  12
compiled vars:  !0 = $value, !1 = $fnc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        BIND_GLOBAL                                              !1, 'fnc'
    8     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%5E%5B0-9%5D%7B1%2C9%7D%24%2FD'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        IS_IDENTICAL                                             $2, 1
          7      > JMPZ                                                     ~3, ->11
    9     8    >   INIT_DYNAMIC_CALL                                        !1
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
   10    11    > > RETURN                                                   null

End of function set1

Function get1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6pqpZ
function name:  get1
number of ops:  3
compiled vars:  !0 = $GOLBALS
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_DIM_R                                      ~1      !0, 'get'
          1        ECHO                                                     ~1
   14     2      > RETURN                                                   null

End of function get1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.62 ms | 1400 KiB | 20 Q