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 ) && $context !== 0 ) { # 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( !empty( $URL_Parameter ) 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/68og5
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 = 9
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 26
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 25
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 25
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
Branch analysis from position: 9
filename:       /in/68og5
function name:  contextCheck
number of ops:  28
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, ->9
          4    >   TYPE_CHECK                                   64  ~4      !0
          5      > JMPZ_EX                                          ~4      ~4, ->8
          6    >   IS_NOT_IDENTICAL                                 ~5      !0, 0
          7        BOOL                                             ~4      ~5
          8    >   BOOL                                             ~3      ~4
          9    > > JMPZ                                                     ~3, ->26
   10    10    >   CAST                                          6  ~7      !0
         11        FETCH_IS                                         ~6      '_GET'
         12        ISSET_ISEMPTY_DIM_OBJ                         0          ~6, ~7
         13      > JMPZ                                                     ~8, ->25
   11    14    >   CAST                                          6  ~10     !0
         15        FETCH_R                      global              ~9      '_GET'
         16        FETCH_DIM_R                                      ~11     ~9, ~10
         17        ASSIGN                                                   !1, ~11
   14    18        ISSET_ISEMPTY_CV                                 ~13     !1
         19        BOOL_NOT                                         ~14     ~13
         20      > JMPZ_EX                                          ~14     ~14, ->23
         21    >   TYPE_CHECK                                   64  ~15     !1
         22        BOOL                                             ~14     ~15
         23    > > JMPZ                                                     ~14, ->25
   15    24    > > RETURN                                                   !1
         25    > > JMP                                                      ->27
   19    26    > > RETURN                                                   <false>
   21    27    > > RETURN                                                   null

End of function contextcheck

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.09 ms | 1403 KiB | 15 Q