3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Echo string */ function printString($i) { $str = ''; if ($i % 3 === 0) { $str .= 'Fizz'; } if ($i % 5 === 0) { $str .= 'Buzz'; } if (empty($str)) { $str .= $i; } return $str; } // Print Fizz/buzz for ($i = 1; $i <= 100; $i++) { echo printString($i); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/fDndv
function name:  (null)
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->7
   22     2    >   INIT_FCALL                                               'printstring'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
   21     6        PRE_INC                                                  !0
          7    >   IS_SMALLER_OR_EQUAL                                      !0, 100
          8      > JMPNZ                                                    ~4, ->2
   23     9    > > RETURN                                                   1

Function printstring:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 10
Branch analysis from position: 6
filename:       /in/fDndv
function name:  printString
number of ops:  15
compiled vars:  !0 = $i, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN                                                   !1, ''
    8     2        MOD                                              ~3      !0, 3
          3        IS_IDENTICAL                                             ~3, 0
          4      > JMPZ                                                     ~4, ->6
    9     5    >   ASSIGN_OP                                     8          !1, 'Fizz'
   11     6    >   MOD                                              ~6      !0, 5
          7        IS_IDENTICAL                                             ~6, 0
          8      > JMPZ                                                     ~7, ->10
   12     9    >   ASSIGN_OP                                     8          !1, 'Buzz'
   14    10    >   ISSET_ISEMPTY_CV                                         !1
         11      > JMPZ                                                     ~9, ->13
   15    12    >   ASSIGN_OP                                     8          !1, !0
   18    13    > > RETURN                                                   !1
   19    14*     > RETURN                                                   null

End of function printstring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.63 ms | 1399 KiB | 14 Q