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 $var) { var_dump($var); } die; echo $var, PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 2
Branch analysis from position: 33
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 = 26
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 26
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 12
filename:       /in/Q59uk
function name:  (null)
number of ops:  34
compiled vars:  !0 = $i, !1 = $Fizz, !2 = $Buzz, !3 = $FizzBuzz, !4 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->31
    7     2    >   MOD                                              ~6      !0, 3
          3        IS_IDENTICAL                                     ~7      ~6, 0
          4        ASSIGN                                                   !1, ~7
    8     5        MOD                                              ~9      !0, 5
          6        IS_IDENTICAL                                     ~10     ~9, 0
          7        ASSIGN                                                   !2, ~10
    9     8        TYPE_CHECK                                    8  ~12     !1
          9      > JMPZ_EX                                          ~12     ~12, ->12
         10    >   TYPE_CHECK                                    8  ~13     !2
         11        BOOL                                             ~12     ~13
         12    >   ASSIGN                                                   !3, ~12
   11    13        INIT_FCALL                                               'array_splice'
         14        INIT_FCALL                                               'get_defined_vars'
         15        DO_ICALL                                         $15     
         16        SEND_VAR_NO_REF                               0          $15
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 2
         19        DO_ICALL                                         $16     
         20      > FE_RESET_R                                       $17     $16, ->26
         21    > > FE_FETCH_R                                               $17, !4, ->26
   13    22    >   INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
   11    25      > JMP                                                      ->21
         26    >   FE_FREE                                                  $17
   16    27      > EXIT                                                     
   18    28*       ECHO                                                     !4
         29*       ECHO                                                     '%0A'
    5    30*       PRE_INC                                                  !0
         31    >   IS_SMALLER_OR_EQUAL                                      !0, 100
         32      > JMPNZ                                                    ~20, ->2
   19    33    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.38 ms | 1396 KiB | 19 Q