3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isQuadtree($bits, &$i = 0){ if ($i >= str_length($bits)) return false; if ($bits[$i] === "1") { isQuadtree($bits, $i++); isQuadtree($bits, $i++); isQuadtree($bits, $i++); return isQuadtree($bits, $i++); } return true; } var_dump(isQuadtree("110000"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jvqLl
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'isquadtree'
          2        SEND_VAL                                                 '110000'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function isquadtree:
Finding entry points
Branch analysis from position: 0
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
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 32
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jvqLl
function name:  isQuadtree
number of ops:  34
compiled vars:  !0 = $bits, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
    4     2        INIT_FCALL_BY_NAME                                       'str_length'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5        IS_SMALLER_OR_EQUAL                                      $2, !1
          6      > JMPZ                                                     ~3, ->8
          7    > > RETURN                                                   <false>
    5     8    >   FETCH_DIM_R                                      ~4      !0, !1
          9        IS_IDENTICAL                                             ~4, '1'
         10      > JMPZ                                                     ~5, ->32
    6    11    >   INIT_FCALL_BY_NAME                                       'isQuadtree'
         12        SEND_VAR_EX                                              !0
         13        POST_INC                                         ~6      !1
         14        SEND_VAL_EX                                              ~6
         15        DO_FCALL                                      0          
    7    16        INIT_FCALL_BY_NAME                                       'isQuadtree'
         17        SEND_VAR_EX                                              !0
         18        POST_INC                                         ~8      !1
         19        SEND_VAL_EX                                              ~8
         20        DO_FCALL                                      0          
    8    21        INIT_FCALL_BY_NAME                                       'isQuadtree'
         22        SEND_VAR_EX                                              !0
         23        POST_INC                                         ~10     !1
         24        SEND_VAL_EX                                              ~10
         25        DO_FCALL                                      0          
    9    26        INIT_FCALL_BY_NAME                                       'isQuadtree'
         27        SEND_VAR_EX                                              !0
         28        POST_INC                                         ~12     !1
         29        SEND_VAL_EX                                              ~12
         30        DO_FCALL                                      0  $13     
         31      > RETURN                                                   $13
   11    32    > > RETURN                                                   <true>
   12    33*     > RETURN                                                   null

End of function isquadtree

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.86 ms | 1017 KiB | 15 Q