3v4l.org

run code in 500+ PHP versions simultaneously
<?php $amount = 320.49; $payments = array_fill(0, 3, floor($amount * 100 / 4) / 100); $payments[3] = round($amount - $payments[0] * 3, 2); print_r($payments); $payments = array_fill(0, 3, ceil($amount * 100 / 4) / 100); $payments[3] = round($amount - $payments[0] * 3, 2); print_r($payments);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LhFH4
function name:  (null)
number of ops:  50
compiled vars:  !0 = $amount, !1 = $payments
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 320.49
    4     1        INIT_FCALL                                                   'array_fill'
          2        SEND_VAL                                                     0
          3        SEND_VAL                                                     3
          4        INIT_FCALL                                                   'floor'
          5        MUL                                                  ~3      !0, 100
          6        DIV                                                  ~4      ~3, 4
          7        SEND_VAL                                                     ~4
          8        DO_ICALL                                             $5      
          9        DIV                                                  ~6      $5, 100
         10        SEND_VAL                                                     ~6
         11        DO_ICALL                                             $7      
         12        ASSIGN                                                       !1, $7
    5    13        INIT_FCALL                                                   'round'
         14        FETCH_DIM_R                                          ~10     !1, 0
         15        MUL                                                  ~11     ~10, 3
         16        SUB                                                  ~12     !0, ~11
         17        SEND_VAL                                                     ~12
         18        SEND_VAL                                                     2
         19        DO_ICALL                                             $13     
         20        ASSIGN_DIM                                                   !1, 3
         21        OP_DATA                                                      $13
    6    22        INIT_FCALL                                                   'print_r'
         23        SEND_VAR                                                     !1
         24        DO_ICALL                                                     
    8    25        INIT_FCALL                                                   'array_fill'
         26        SEND_VAL                                                     0
         27        SEND_VAL                                                     3
         28        INIT_FCALL                                                   'ceil'
         29        MUL                                                  ~15     !0, 100
         30        DIV                                                  ~16     ~15, 4
         31        SEND_VAL                                                     ~16
         32        DO_ICALL                                             $17     
         33        DIV                                                  ~18     $17, 100
         34        SEND_VAL                                                     ~18
         35        DO_ICALL                                             $19     
         36        ASSIGN                                                       !1, $19
    9    37        INIT_FCALL                                                   'round'
         38        FETCH_DIM_R                                          ~22     !1, 0
         39        MUL                                                  ~23     ~22, 3
         40        SUB                                                  ~24     !0, ~23
         41        SEND_VAL                                                     ~24
         42        SEND_VAL                                                     2
         43        DO_ICALL                                             $25     
         44        ASSIGN_DIM                                                   !1, 3
         45        OP_DATA                                                      $25
   10    46        INIT_FCALL                                                   'print_r'
         47        SEND_VAR                                                     !1
         48        DO_ICALL                                                     
         49      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.34 ms | 2264 KiB | 18 Q