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

End of function contextcheck

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.78 ms | 1403 KiB | 17 Q