3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*The task is to print out numbers 1 through 100 but for multiples of 3 print out “Fizz” instead of the number and for multiples of 5 print “Buzz” instead. If the number happens to be divisble by both 3 and 5 print out “FizzBuzz” instead of the number.*/ for ($i = 1; $i <= 100; $i++) { $Fizz = ($i % 3 === 0); $Buzz = ($i % 5 === 0); $FizzBuzz = ($Fizz === true && $Buzz === true); foreach (array_splice(get_defined_vars(), 0, 2) as $key => $var) { var_dump($var); } die; echo $var, PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 27
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 12
filename:       /in/AA2qo
function name:  (null)
number of ops:  35
compiled vars:  !0 = $i, !1 = $Fizz, !2 = $Buzz, !3 = $FizzBuzz, !4 = $var, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->32
    7     2    >   MOD                                              ~7      !0, 3
          3        IS_IDENTICAL                                     ~8      ~7, 0
          4        ASSIGN                                                   !1, ~8
    8     5        MOD                                              ~10     !0, 5
          6        IS_IDENTICAL                                     ~11     ~10, 0
          7        ASSIGN                                                   !2, ~11
    9     8        TYPE_CHECK                                    8  ~13     !1
          9      > JMPZ_EX                                          ~13     ~13, ->12
         10    >   TYPE_CHECK                                    8  ~14     !2
         11        BOOL                                             ~13     ~14
         12    >   ASSIGN                                                   !3, ~13
   11    13        INIT_FCALL                                               'array_splice'
         14        INIT_FCALL                                               'get_defined_vars'
         15        DO_ICALL                                         $16     
         16        SEND_VAR_NO_REF                               0          $16
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 2
         19        DO_ICALL                                         $17     
         20      > FE_RESET_R                                       $18     $17, ->27
         21    > > FE_FETCH_R                                       ~19     $18, !4, ->27
         22    >   ASSIGN                                                   !5, ~19
   13    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                                 
   11    26      > JMP                                                      ->21
         27    >   FE_FREE                                                  $18
   16    28      > EXIT                                                     
   18    29*       ECHO                                                     !4
         30*       ECHO                                                     '%0A'
    5    31*       PRE_INC                                                  !0
         32    >   IS_SMALLER_OR_EQUAL                                      !0, 100
         33      > JMPNZ                                                    ~23, ->2
   19    34    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.25 ms | 1396 KiB | 19 Q