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( 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/AQoK0
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 = 19
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/AQoK0
function name:  contextCheck
number of ops:  21
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, ->19
   10     7    >   CAST                                          6  ~6      !0
          8        FETCH_IS                                         ~5      '_GET'
          9        ISSET_ISEMPTY_DIM_OBJ                         0          ~5, ~6
         10      > JMPZ                                                     ~7, ->18
   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        TYPE_CHECK                                   64          !1
         16      > JMPZ                                                     ~12, ->18
   15    17    > > RETURN                                                   !1
         18    > > JMP                                                      ->20
   19    19    > > RETURN                                                   <false>
   21    20    > > RETURN                                                   null

End of function contextcheck

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.59 ms | 1403 KiB | 15 Q