3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '/render/shell'; function f($char) { switch ($char) { case '/' || '?': return $char; default: return false; } } var_dump(f($s[0]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lIUVj
function name:  (null)
number of ops:  9
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Frender%2Fshell'
   13     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'f'
          3        FETCH_DIM_R                                      ~2      !0, 0
          4        SEND_VAL                                                 ~2
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lIUVj
function name:  f
number of ops:  7
compiled vars:  !0 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        IS_EQUAL                                                 !0, <true>
          2      > JMPNZ                                                    ~1, ->4
          3    > > JMP                                                      ->5
    7     4    > > RETURN                                                   !0
    9     5    > > RETURN                                                   <false>
   11     6*     > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
247.08 ms | 1397 KiB | 17 Q