3v4l.org

run code in 300+ PHP versions simultaneously
<?php function contextCheck($context) { return (isset($_GET[$context]) && strlen($_GET[$context])) ? $_GET[$context] : false; } $_GET['foo'] = '12'; $_GET['bar'] = '0'; echo 'foo: ', var_export(contextCheck( 'foo' ), true ), "\n", 'bar: ', var_export( contextCheck( 'bar' ), true ); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kIHq7
function name:  (null)
number of ops:  26
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_W                      global              $0      '_GET'
          1        ASSIGN_DIM                                               $0, 'foo'
          2        OP_DATA                                                  '12'
    8     3        FETCH_W                      global              $2      '_GET'
          4        ASSIGN_DIM                                               $2, 'bar'
          5        OP_DATA                                                  '0'
   10     6        ECHO                                                     'foo%3A+'
          7        INIT_FCALL                                               'var_export'
          8        INIT_FCALL                                               'contextcheck'
          9        SEND_VAL                                                 'foo'
         10        DO_FCALL                                      0  $4      
         11        SEND_VAR                                                 $4
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $5      
         14        ECHO                                                     $5
         15        ECHO                                                     '%0A'
   11    16        ECHO                                                     'bar%3A+'
         17        INIT_FCALL                                               'var_export'
         18        INIT_FCALL                                               'contextcheck'
         19        SEND_VAL                                                 'bar'
         20        DO_FCALL                                      0  $6      
         21        SEND_VAR                                                 $6
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $7      
         24        ECHO                                                     $7
   13    25      > RETURN                                                   1

Function contextcheck:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/kIHq7
function name:  contextCheck
number of ops:  16
compiled vars:  !0 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        FETCH_IS                                         ~1      '_GET'
          2        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, !0
          3      > JMPZ_EX                                          ~2      ~2, ->8
          4    >   FETCH_R                      global              ~3      '_GET'
          5        FETCH_DIM_R                                      ~4      ~3, !0
          6        STRLEN                                           ~5      ~4
          7        BOOL                                             ~2      ~5
          8    > > JMPZ                                                     ~2, ->13
          9    >   FETCH_R                      global              ~6      '_GET'
         10        FETCH_DIM_R                                      ~7      ~6, !0
         11        QM_ASSIGN                                        ~8      ~7
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~8      <false>
         14    > > RETURN                                                   ~8
    5    15*     > RETURN                                                   null

End of function contextcheck

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.54 ms | 1403 KiB | 17 Q