3v4l.org

run code in 500+ PHP versions simultaneously
<?php $date_begining = $date_ending = 0; function total_by_type_between_dates($type, $start, $end){ $row = array('total' => '2770.69'); $total = number_format((float)$row['total'], 2, '.', ''); return $total; } function total_expense_between_dates($start, $end){ $row = array('total' => '407.42'); $total = number_format((float)$row['total'], 2, '.', ''); return $total; } echo total_by_type_between_dates('income', $date_begining, $date_ending)-total_expense_between_dates($date_begining, $date_ending);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FsmbA
function name:  (null)
number of ops:  14
compiled vars:  !0 = $date_begining, !1 = $date_ending
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                               ~2      !1, 0
          1        ASSIGN                                                       !0, ~2
   16     2        INIT_FCALL                                                   'total_by_type_between_dates'
          3        SEND_VAL                                                     'income'
          4        SEND_VAR                                                     !0
          5        SEND_VAR                                                     !1
          6        DO_FCALL                                          0  $4      
          7        INIT_FCALL                                                   'total_expense_between_dates'
          8        SEND_VAR                                                     !0
          9        SEND_VAR                                                     !1
         10        DO_FCALL                                          0  $5      
         11        SUB                                                  ~6      $4, $5
         12        ECHO                                                         ~6
         13      > RETURN                                                       1

Function total_by_type_between_dates:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FsmbA
function name:  total_by_type_between_dates
number of ops:  15
compiled vars:  !0 = $type, !1 = $start, !2 = $end, !3 = $row, !4 = $total
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
    5     3        ASSIGN                                                       !3, <array>
    6     4        INIT_FCALL                                                   'number_format'
          5        FETCH_DIM_R                                          ~6      !3, 'total'
          6        CAST                                              5  ~7      ~6
          7        SEND_VAL                                                     ~7
          8        SEND_VAL                                                     2
          9        SEND_VAL                                                     '.'
         10        SEND_VAL                                                     ''
         11        DO_ICALL                                             $8      
         12        ASSIGN                                                       !4, $8
    7    13      > RETURN                                                       !4
    8    14*     > RETURN                                                       null

End of function total_by_type_between_dates

Function total_expense_between_dates:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FsmbA
function name:  total_expense_between_dates
number of ops:  14
compiled vars:  !0 = $start, !1 = $end, !2 = $row, !3 = $total
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   11     2        ASSIGN                                                       !2, <array>
   12     3        INIT_FCALL                                                   'number_format'
          4        FETCH_DIM_R                                          ~5      !2, 'total'
          5        CAST                                              5  ~6      ~5
          6        SEND_VAL                                                     ~6
          7        SEND_VAL                                                     2
          8        SEND_VAL                                                     '.'
          9        SEND_VAL                                                     ''
         10        DO_ICALL                                             $7      
         11        ASSIGN                                                       !3, $7
   13    12      > RETURN                                                       !3
   14    13*     > RETURN                                                       null

End of function total_expense_between_dates

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
226.2 ms | 2084 KiB | 15 Q