3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = $tt = 2044; $w = $ww = 1212; while (($w / $t) < .60) { $w++; $t++; } echo "w = $w, t = $t\n"; echo "streak: " . ($t - $tt), "\n"; $t = $tt; $w = $ww; $n = 0; $c = 0; while (($w / $t) < .60) { $w++; $t++; $n++; if ($n == 5) { $n = 0; $t++; $c++; } } echo "runs of five: ", $c;
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 = 10, Position 2 = 5
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 25
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 33
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 25
Branch analysis from position: 36
Branch analysis from position: 25
Branch analysis from position: 33
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/LGtfu
function name:  (null)
number of ops:  39
compiled vars:  !0 = $t, !1 = $tt, !2 = $w, !3 = $ww, !4 = $n, !5 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                           ~6      !1, 2044
          1        ASSIGN                                                   !0, ~6
    4     2        ASSIGN                                           ~8      !3, 1212
          3        ASSIGN                                                   !2, ~8
    6     4      > JMP                                                      ->7
    7     5    >   PRE_INC                                                  !2
    8     6        PRE_INC                                                  !0
    6     7    >   DIV                                              ~12     !2, !0
          8        IS_SMALLER                                               ~12, 0.6
          9      > JMPNZ                                                    ~13, ->5
   11    10    >   ROPE_INIT                                     5  ~15     'w+%3D+'
         11        ROPE_ADD                                      1  ~15     ~15, !2
         12        ROPE_ADD                                      2  ~15     ~15, '%2C+t+%3D+'
         13        ROPE_ADD                                      3  ~15     ~15, !0
         14        ROPE_END                                      4  ~14     ~15, '%0A'
         15        ECHO                                                     ~14
   12    16        SUB                                              ~18     !0, !1
         17        CONCAT                                           ~19     'streak%3A+', ~18
         18        ECHO                                                     ~19
         19        ECHO                                                     '%0A'
   14    20        ASSIGN                                                   !0, !1
   15    21        ASSIGN                                                   !2, !3
   17    22        ASSIGN                                                   !4, 0
         23        ASSIGN                                                   !5, 0
   18    24      > JMP                                                      ->33
   19    25    >   PRE_INC                                                  !2
   20    26        PRE_INC                                                  !0
   21    27        PRE_INC                                                  !4
   22    28        IS_EQUAL                                                 !4, 5
         29      > JMPZ                                                     ~27, ->33
   23    30    >   ASSIGN                                                   !4, 0
   24    31        PRE_INC                                                  !0
   25    32        PRE_INC                                                  !5
   18    33    >   DIV                                              ~31     !2, !0
         34        IS_SMALLER                                               ~31, 0.6
         35      > JMPNZ                                                    ~32, ->25
   29    36    >   ECHO                                                     'runs+of+five%3A+'
         37        ECHO                                                     !5
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.75 ms | 1399 KiB | 13 Q