3v4l.org

run code in 300+ PHP versions simultaneously
<?php $int = 3; $exponent = 0; $count = 1; for ($i = 2; $i <= $int; $i++) { echo $i . PHP_EOL; echo pow(2, $exponent) . PHP_EOL; if ($i > pow(2, $exponent) + 1) { echo 'here' . PHP_EOL; $count++; $exponent++; } } echo $count;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 5
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 5
Branch analysis from position: 26
Branch analysis from position: 5
Branch analysis from position: 23
filename:       /in/5cCQj
function name:  (null)
number of ops:  28
compiled vars:  !0 = $int, !1 = $exponent, !2 = $count, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 3
    4     1        ASSIGN                                                   !1, 0
    5     2        ASSIGN                                                   !2, 1
    7     3        ASSIGN                                                   !3, 2
          4      > JMP                                                      ->24
    8     5    >   CONCAT                                           ~8      !3, '%0A'
          6        ECHO                                                     ~8
    9     7        INIT_FCALL                                               'pow'
          8        SEND_VAL                                                 2
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $9      
         11        CONCAT                                           ~10     $9, '%0A'
         12        ECHO                                                     ~10
   10    13        INIT_FCALL                                               'pow'
         14        SEND_VAL                                                 2
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $11     
         17        ADD                                              ~12     $11, 1
         18        IS_SMALLER                                               ~12, !3
         19      > JMPZ                                                     ~13, ->23
   11    20    >   ECHO                                                     'here%0A'
   12    21        PRE_INC                                                  !2
   13    22        PRE_INC                                                  !1
    7    23    >   PRE_INC                                                  !3
         24    >   IS_SMALLER_OR_EQUAL                                      !3, !0
         25      > JMPNZ                                                    ~17, ->5
   17    26    >   ECHO                                                     !2
   18    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.1 ms | 1396 KiB | 15 Q