3v4l.org

run code in 300+ PHP versions simultaneously
<?php do{ $a = mt_rand(5, 75); $b = mt_rand(5, 75); $adjuster = mt_rand(2, 20); $decimal_selector = mt_rand(1, 6); if ($decimal_selector == 1){ $a = $a / 10; $b = $b / 10; } if ($decimal_selector == 2){ $a = $a / 10; $b = $b / 100; } if ($decimal_selector == 3){ $a = $a / 100; $b = $b / 10; } if ($decimal_selector == 4){ $a = $a / 100; $b = $b / 100; } if ($decimal_selector == 5){ $a = $a / 1000; $b = $b / 1000; } if ($decimal_selector == 6){ $a = $a / 1000; $b = $b / 100; } if($b < $a){ $b = $b + ($a - $b) + $adjuster; } echo "a: $a. b: $b. "; $c = $b - $a; if(round($c) == $c) { $c_is_int = 1; echo "c: $c (is int!)\n"; } else { $c_is_int = 0; echo "c: $c (is NOT int!)\n"; } } while($c_is_int == 1);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 38
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 44
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 50
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 56
Branch analysis from position: 52
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 62
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 75, Position 2 = 81
Branch analysis from position: 75
1 jumps found. (Code = 42) Position 1 = 86
Branch analysis from position: 86
2 jumps found. (Code = 44) Position 1 = 88, Position 2 = 0
Branch analysis from position: 88
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 0
Branch analysis from position: 81
2 jumps found. (Code = 44) Position 1 = 88, Position 2 = 0
Branch analysis from position: 88
Branch analysis from position: 0
Branch analysis from position: 62
Branch analysis from position: 56
Branch analysis from position: 50
Branch analysis from position: 44
Branch analysis from position: 38
Branch analysis from position: 32
Branch analysis from position: 26
filename:       /in/X4aBS
function name:  (null)
number of ops:  89
compiled vars:  !0 = $a, !1 = $b, !2 = $adjuster, !3 = $decimal_selector, !4 = $c, !5 = $c_is_int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mt_rand'
          1        SEND_VAL                                                 5
          2        SEND_VAL                                                 75
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
    4     5        INIT_FCALL                                               'mt_rand'
          6        SEND_VAL                                                 5
          7        SEND_VAL                                                 75
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !1, $8
    5    10        INIT_FCALL                                               'mt_rand'
         11        SEND_VAL                                                 2
         12        SEND_VAL                                                 20
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !2, $10
    7    15        INIT_FCALL                                               'mt_rand'
         16        SEND_VAL                                                 1
         17        SEND_VAL                                                 6
         18        DO_ICALL                                         $12     
         19        ASSIGN                                                   !3, $12
    8    20        IS_EQUAL                                                 !3, 1
         21      > JMPZ                                                     ~14, ->26
    9    22    >   DIV                                              ~15     !0, 10
         23        ASSIGN                                                   !0, ~15
   10    24        DIV                                              ~17     !1, 10
         25        ASSIGN                                                   !1, ~17
   12    26    >   IS_EQUAL                                                 !3, 2
         27      > JMPZ                                                     ~19, ->32
   13    28    >   DIV                                              ~20     !0, 10
         29        ASSIGN                                                   !0, ~20
   14    30        DIV                                              ~22     !1, 100
         31        ASSIGN                                                   !1, ~22
   16    32    >   IS_EQUAL                                                 !3, 3
         33      > JMPZ                                                     ~24, ->38
   17    34    >   DIV                                              ~25     !0, 100
         35        ASSIGN                                                   !0, ~25
   18    36        DIV                                              ~27     !1, 10
         37        ASSIGN                                                   !1, ~27
   20    38    >   IS_EQUAL                                                 !3, 4
         39      > JMPZ                                                     ~29, ->44
   21    40    >   DIV                                              ~30     !0, 100
         41        ASSIGN                                                   !0, ~30
   22    42        DIV                                              ~32     !1, 100
         43        ASSIGN                                                   !1, ~32
   24    44    >   IS_EQUAL                                                 !3, 5
         45      > JMPZ                                                     ~34, ->50
   25    46    >   DIV                                              ~35     !0, 1000
         47        ASSIGN                                                   !0, ~35
   26    48        DIV                                              ~37     !1, 1000
         49        ASSIGN                                                   !1, ~37
   28    50    >   IS_EQUAL                                                 !3, 6
         51      > JMPZ                                                     ~39, ->56
   29    52    >   DIV                                              ~40     !0, 1000
         53        ASSIGN                                                   !0, ~40
   30    54        DIV                                              ~42     !1, 100
         55        ASSIGN                                                   !1, ~42
   33    56    >   IS_SMALLER                                               !1, !0
         57      > JMPZ                                                     ~44, ->62
   34    58    >   SUB                                              ~45     !0, !1
         59        ADD                                              ~46     !1, ~45
         60        ADD                                              ~47     ~46, !2
         61        ASSIGN                                                   !1, ~47
   37    62    >   ROPE_INIT                                     5  ~50     'a%3A+'
         63        ROPE_ADD                                      1  ~50     ~50, !0
         64        ROPE_ADD                                      2  ~50     ~50, '.+b%3A+'
         65        ROPE_ADD                                      3  ~50     ~50, !1
         66        ROPE_END                                      4  ~49     ~50, '.+'
         67        ECHO                                                     ~49
   39    68        SUB                                              ~53     !1, !0
         69        ASSIGN                                                   !4, ~53
   41    70        INIT_FCALL                                               'round'
         71        SEND_VAR                                                 !4
         72        DO_ICALL                                         $55     
         73        IS_EQUAL                                                 !4, $55
         74      > JMPZ                                                     ~56, ->81
   42    75    >   ASSIGN                                                   !5, 1
   43    76        ROPE_INIT                                     3  ~59     'c%3A+'
         77        ROPE_ADD                                      1  ~59     ~59, !4
         78        ROPE_END                                      2  ~58     ~59, '+%28is+int%21%29%0A'
         79        ECHO                                                     ~58
         80      > JMP                                                      ->86
   45    81    >   ASSIGN                                                   !5, 0
   46    82        ROPE_INIT                                     3  ~63     'c%3A+'
         83        ROPE_ADD                                      1  ~63     ~63, !4
         84        ROPE_END                                      2  ~62     ~63, '+%28is+NOT+int%21%29%0A'
         85        ECHO                                                     ~62
   48    86    >   IS_EQUAL                                                 !5, 1
         87      > JMPNZ                                                    ~65, ->0
         88    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.56 ms | 1404 KiB | 17 Q