3v4l.org

run code in 300+ PHP versions simultaneously
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TCRIA
function name:  (null)
number of ops:  9
compiled vars:  !0 = $bills
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   ASSIGN                                                   !0, <array>
   56     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'findminimum'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 23
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
   66     8      > RETURN                                                   1

Function addbills:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TCRIA
function name:  addBills
number of ops:  14
compiled vars:  !0 = $change, !1 = $value, !2 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    6     3        INIT_FCALL                                               'array_merge'
          4        SEND_VAR                                                 !0
          5        INIT_FCALL                                               'array_fill'
          6        SEND_VAL                                                 0
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !0, $4
    7    13      > RETURN                                                   null

End of function addbills

Function removebill:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/TCRIA
function name:  removeBill
number of ops:  11
compiled vars:  !0 = $change, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        INIT_FCALL                                               'array_search'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !2, $3
   13     7        TYPE_CHECK                                  1018          !2
          8      > JMPZ                                                     ~5, ->10
   14     9    >   UNSET_DIM                                                !0, !2
   16    10    > > RETURN                                                   null

End of function removebill

Function getchangetotal:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TCRIA
function name:  getChangeTotal
number of ops:  6
compiled vars:  !0 = $change
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   21     1        INIT_FCALL                                               'array_sum'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   22     5*     > RETURN                                                   null

End of function getchangetotal

Function findminimum:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 48
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 28
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 28
Branch analysis from position: 48
Branch analysis from position: 28
Branch analysis from position: 48
filename:       /in/TCRIA
function name:  findMinimum
number of ops:  55
compiled vars:  !0 = $bills, !1 = $wantedTotal, !2 = $change, !3 = $value, !4 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
   27     3        COUNT                                            ~5      !0
          4        IS_EQUAL                                                 ~5, 0
          5      > JMPZ                                                     ~6, ->7
   28     6    > > RETURN                                                   !2
   31     7    >   INIT_FCALL                                               'array_pop'
          8        SEND_REF                                                 !0
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !3, $7
   33    11        INIT_FCALL                                               'intdiv'
         12        INIT_FCALL                                               'getchangetotal'
         13        SEND_VAR                                                 !2
         14        DO_FCALL                                      0  $9      
         15        SUB                                              ~10     !1, $9
         16        SEND_VAL                                                 ~10
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $11     
         19        ASSIGN                                                   !4, $11
   34    20        IS_SMALLER                                               0, !4
         21      > JMPZ                                                     ~13, ->48
   36    22    >   INIT_FCALL                                               'addbills'
         23        SEND_REF                                                 !2
         24        SEND_VAR                                                 !3
         25        SEND_VAR                                                 !4
         26        DO_FCALL                                      0          
   37    27      > JMP                                                      ->46
   39    28    >   INIT_FCALL_BY_NAME                                       'findMinimum'
         29        SEND_VAR_EX                                              !0
         30        SEND_VAR_EX                                              !1
         31        SEND_VAR_EX                                              !2
         32        DO_FCALL                                      0  $15     
         33        ASSIGN                                                   !2, $15
   41    34        INIT_FCALL                                               'getchangetotal'
         35        SEND_VAR                                                 !2
         36        DO_FCALL                                      0  $17     
         37        IS_EQUAL                                                 !1, $17
         38      > JMPZ                                                     ~18, ->41
   42    39    > > RETURN                                                   !2
   41    40*       JMP                                                      ->46
   45    41    >   PRE_DEC                                                  !4
   46    42        INIT_FCALL                                               'removebill'
         43        SEND_REF                                                 !2
         44        SEND_VAR                                                 !3
         45        DO_FCALL                                      0          
   37    46    >   IS_SMALLER                                               0, !4
         47      > JMPNZ                                                    ~21, ->28
   51    48    >   INIT_FCALL_BY_NAME                                       'findMinimum'
         49        SEND_VAR_EX                                              !0
         50        SEND_VAR_EX                                              !1
         51        SEND_VAR_EX                                              !2
         52        DO_FCALL                                      0  $22     
         53      > RETURN                                                   $22
   52    54*     > RETURN                                                   null

End of function findminimum

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.57 ms | 987 KiB | 25 Q