3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 0; $i < 10; $i++) { for ($j = 0; $j < 100; $j++) { $valueAsString = $i.".".sprintf('%02d', $j); $valueAsFloat = (float) $valueAsString; $dollars = (int) floor($valueAsFloat); $cents = (int) ($valueAsFloat * 100 % 100); if ($dollars !== $i || $cents !== $j) { echo $valueAsFloat." $i $j $dollars $cents"."\n"; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 2
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 4
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 2
Branch analysis from position: 44
Branch analysis from position: 2
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 38
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 4
Branch analysis from position: 41
Branch analysis from position: 4
Branch analysis from position: 38
Branch analysis from position: 26
filename:       /in/Tj8bQ
function name:  (null)
number of ops:  45
compiled vars:  !0 = $i, !1 = $j, !2 = $valueAsString, !3 = $valueAsFloat, !4 = $dollars, !5 = $cents
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->42
    4     2    >   ASSIGN                                                   !1, 0
          3      > JMP                                                      ->39
    5     4    >   CONCAT                                           ~8      !0, '.'
          5        INIT_FCALL                                               'sprintf'
          6        SEND_VAL                                                 '%2502d'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $9      
          9        CONCAT                                           ~10     ~8, $9
         10        ASSIGN                                                   !2, ~10
    6    11        CAST                                          5  ~12     !2
         12        ASSIGN                                                   !3, ~12
    7    13        INIT_FCALL                                               'floor'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $14     
         16        CAST                                          4  ~15     $14
         17        ASSIGN                                                   !4, ~15
    8    18        MUL                                              ~17     !3, 100
         19        MOD                                              ~18     ~17, 100
         20        CAST                                          4  ~19     ~18
         21        ASSIGN                                                   !5, ~19
   10    22        IS_NOT_IDENTICAL                                 ~21     !4, !0
         23      > JMPNZ_EX                                         ~21     ~21, ->26
         24    >   IS_NOT_IDENTICAL                                 ~22     !5, !1
         25        BOOL                                             ~21     ~22
         26    > > JMPZ                                                     ~21, ->38
   11    27    >   ROPE_INIT                                     8  ~24     '+'
         28        ROPE_ADD                                      1  ~24     ~24, !0
         29        ROPE_ADD                                      2  ~24     ~24, '+'
         30        ROPE_ADD                                      3  ~24     ~24, !1
         31        ROPE_ADD                                      4  ~24     ~24, '+'
         32        ROPE_ADD                                      5  ~24     ~24, !4
         33        ROPE_ADD                                      6  ~24     ~24, '+'
         34        ROPE_END                                      7  ~23     ~24, !5
         35        CONCAT                                           ~28     !3, ~23
         36        CONCAT                                           ~29     ~28, '%0A'
         37        ECHO                                                     ~29
    4    38    >   PRE_INC                                                  !1
         39    >   IS_SMALLER                                               !1, 100
         40      > JMPNZ                                                    ~31, ->4
    3    41    >   PRE_INC                                                  !0
         42    >   IS_SMALLER                                               !0, 10
         43      > JMPNZ                                                    ~33, ->2
   14    44    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.57 ms | 1400 KiB | 17 Q