3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p = 80; $c = 0.05; $s = 837; $f = 15; $h = 0; $j = 0; for ($i=0; $i<$s * $p; $i++) { if (mt_rand(0, 100) <= $c * 100) { $h = max($h, $j); $j = 0; } else { $j += $f; } } var_dump($h);
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 = 27, Position 2 = 8
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 8
Branch analysis from position: 27
Branch analysis from position: 8
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 8
Branch analysis from position: 27
Branch analysis from position: 8
filename:       /in/TcKKH
function name:  (null)
number of ops:  31
compiled vars:  !0 = $p, !1 = $c, !2 = $s, !3 = $f, !4 = $h, !5 = $j, !6 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 80
    4     1        ASSIGN                                                   !1, 0.05
    5     2        ASSIGN                                                   !2, 837
    6     3        ASSIGN                                                   !3, 15
    8     4        ASSIGN                                                   !4, 0
   10     5        ASSIGN                                                   !5, 0
   11     6        ASSIGN                                                   !6, 0
          7      > JMP                                                      ->24
   12     8    >   INIT_FCALL                                               'mt_rand'
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 100
         11        DO_ICALL                                         $14     
         12        MUL                                              ~15     !1, 100
         13        IS_SMALLER_OR_EQUAL                                      $14, ~15
         14      > JMPZ                                                     ~16, ->22
   13    15    >   INIT_FCALL                                               'max'
         16        SEND_VAR                                                 !4
         17        SEND_VAR                                                 !5
         18        DO_ICALL                                         $17     
         19        ASSIGN                                                   !4, $17
   14    20        ASSIGN                                                   !5, 0
         21      > JMP                                                      ->23
   16    22    >   ASSIGN_OP                                     1          !5, !3
   11    23    >   PRE_INC                                                  !6
         24    >   MUL                                              ~22     !2, !0
         25        IS_SMALLER                                               !6, ~22
         26      > JMPNZ                                                    ~23, ->8
   20    27    >   INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !4
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.64 ms | 1396 KiB | 19 Q