3v4l.org

run code in 300+ PHP versions simultaneously
<?php $amount = 1009.0; for($a = .5; $a < 20; $a + 0.5){ echo number_format($amount,2) . " = " . number_format(round($amount,-1)) . " " ; $amount = $amount + $a; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
Branch analysis from position: 3
filename:       /in/XGHie
function name:  (null)
number of ops:  25
compiled vars:  !0 = $amount, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1009
    5     1        ASSIGN                                                   !1, 0.5
          2      > JMP                                                      ->22
    7     3    >   INIT_FCALL                                               'number_format'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $4      
          7        CONCAT                                           ~5      $4, '+%3D+'
          8        INIT_FCALL                                               'number_format'
          9        INIT_FCALL                                               'round'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 -1
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                         $7      
         15        CONCAT                                           ~8      ~5, $7
         16        CONCAT                                           ~9      ~8, '%0A'
         17        ECHO                                                     ~9
    9    18        ADD                                              ~10     !0, !1
         19        ASSIGN                                                   !0, ~10
    5    20        ADD                                              ~12     !1, 0.5
         21        FREE                                                     ~12
         22    >   IS_SMALLER                                               !1, 20
         23      > JMPNZ                                                    ~13, ->3
   11    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.74 ms | 1395 KiB | 17 Q