3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stringHasOffset($string, &$i = 0) { var_dump($string, $string[$i], isset($string[$i])); if ($i === 0) { $i += 10; stringHasOffset($string, $i); } } stringHasOffset('doesThisStringHasChar10?');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ae7Kd
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'stringhasoffset'
          1        SEND_VAL                                                 'doesThisStringHasChar10%3F'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function stringhasoffset:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/Ae7Kd
function name:  stringHasOffset
number of ops:  17
compiled vars:  !0 = $string, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
    5     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        FETCH_DIM_R                                      ~2      !0, !1
          5        SEND_VAL                                                 ~2
          6        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      !0, !1
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                                 
    7     9        IS_IDENTICAL                                             !1, 0
         10      > JMPZ                                                     ~5, ->16
    9    11    >   ASSIGN_OP                                     1          !1, 10
   10    12        INIT_FCALL_BY_NAME                                       'stringHasOffset'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
   12    16    > > RETURN                                                   null

End of function stringhasoffset

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.09 ms | 1402 KiB | 16 Q