3v4l.org

run code in 300+ PHP versions simultaneously
<?php function contextCheck( $context = false ) { # URL Paremeter Checker # If the infomation passed is a string and isn't empty, grab URL paremeter if( !empty( $context ) and is_string( $context ) ) { # Check if the URL Parameter even exists if ( isset( $_GET["{$context}"] ) ) { $URL_Parameter = $_GET["{$context}"]; # If the URL Parameter is a string and isn't empty, return true if( ( strlen( $URL_Parameter ) > 0 ) and is_string( $URL_Parameter )) { return $URL_Parameter; } } } else { return false; } } $_GET['foo'] = '12'; $_GET['bar'] = '0'; print( contextCheck( 'foo' ) ); print( contextCheck( 'bar' ) ); # This doesn't output :[ ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FsGFd
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   FETCH_W                      global              $0      '_GET'
          1        ASSIGN_DIM                                               $0, 'foo'
          2        OP_DATA                                                  '12'
   24     3        FETCH_W                      global              $2      '_GET'
          4        ASSIGN_DIM                                               $2, 'bar'
          5        OP_DATA                                                  '0'
   26     6        INIT_FCALL                                               'contextcheck'
          7        SEND_VAL                                                 'foo'
          8        DO_FCALL                                      0  $4      
          9        ECHO                                                     $4
   27    10        INIT_FCALL                                               'contextcheck'
         11        SEND_VAL                                                 'bar'
         12        DO_FCALL                                      0  $5      
         13        ECHO                                                     $5
   29    14      > RETURN                                                   1

Function contextcheck:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 23
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 22
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/FsGFd
function name:  contextCheck
number of ops:  25
compiled vars:  !0 = $context, !1 = $URL_Parameter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <false>
    7     1        ISSET_ISEMPTY_CV                                 ~2      !0
          2        BOOL_NOT                                         ~3      ~2
          3      > JMPZ_EX                                          ~3      ~3, ->6
          4    >   TYPE_CHECK                                   64  ~4      !0
          5        BOOL                                             ~3      ~4
          6    > > JMPZ                                                     ~3, ->23
   10     7    >   CAST                                          6  ~6      !0
          8        FETCH_IS                                         ~5      '_GET'
          9        ISSET_ISEMPTY_DIM_OBJ                         0          ~5, ~6
         10      > JMPZ                                                     ~7, ->22
   11    11    >   CAST                                          6  ~9      !0
         12        FETCH_R                      global              ~8      '_GET'
         13        FETCH_DIM_R                                      ~10     ~8, ~9
         14        ASSIGN                                                   !1, ~10
   14    15        STRLEN                                           ~12     !1
         16        IS_SMALLER                                       ~13     0, ~12
         17      > JMPZ_EX                                          ~13     ~13, ->20
         18    >   TYPE_CHECK                                   64  ~14     !1
         19        BOOL                                             ~13     ~14
         20    > > JMPZ                                                     ~13, ->22
   15    21    > > RETURN                                                   !1
         22    > > JMP                                                      ->24
   19    23    > > RETURN                                                   <false>
   21    24    > > RETURN                                                   null

End of function contextcheck

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.24 ms | 1402 KiB | 15 Q