3v4l.org

run code in 300+ PHP versions simultaneously
<?php $poop = array(); $p = @validateMode($poop['titties']); var_dump($p); function validateMode($mode="") { if(empty($mode) || !is_string($mode)) { return false; } switch($mode) { case 'wall': case 'forum': return true; default: return false; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4SSea
function name:  (null)
number of ops:  13
compiled vars:  !0 = $poop, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        BEGIN_SILENCE                                    ~3      
          2        INIT_FCALL_BY_NAME                                       'validateMode'
          3        CHECK_FUNC_ARG                                           
          4        FETCH_DIM_FUNC_ARG                               $4      !0, 'titties'
          5        SEND_FUNC_ARG                                            $4
          6        DO_FCALL                                      0  $5      
          7        END_SILENCE                                              ~3
          8        ASSIGN                                                   !1, $5
    5     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   18    12      > RETURN                                                   1

Function validatemode:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
4 jumps found. (Code = 188) Position 1 = 14, Position 2 = 14, Position 3 = 15, Position 4 = 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 14
Branch analysis from position: 14
Branch analysis from position: 6
filename:       /in/4SSea
function name:  validateMode
number of ops:  17
compiled vars:  !0 = $mode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                        !0      ''
    8     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2      > JMPNZ_EX                                         ~1      ~1, ->6
          3    >   TYPE_CHECK                                   64  ~2      !0
          4        BOOL_NOT                                         ~3      ~2
          5        BOOL                                             ~1      ~3
          6    > > JMPZ                                                     ~1, ->8
    9     7    > > RETURN                                                   <false>
   11     8    > > SWITCH_STRING                                            !0, [ 'wall':->14, 'forum':->14, ], ->15
   12     9    >   IS_EQUAL                                                 !0, 'wall'
         10      > JMPNZ                                                    ~4, ->14
   13    11    >   IS_EQUAL                                                 !0, 'forum'
         12      > JMPNZ                                                    ~4, ->14
         13    > > JMP                                                      ->15
   14    14    > > RETURN                                                   <true>
   16    15    > > RETURN                                                   <false>
   18    16*     > RETURN                                                   null

End of function validatemode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.06 ms | 1400 KiB | 15 Q