3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* every day amount increases by £19,000 */ function getAmount() { $increment = 19000; return getTodayValue($increment); } /* every users increases by 514 */ function getUsers() { $increment = 514; return getTodayValue($increment); } function getTodayValue($inc) { $startDay = "2013-11-01"; $endDay = "2013-12-31"; $now = date('Y-m-d'); $endDay = ($now <= $endDay) ? $now : $endDay; $diff = abs(strtotime($endDay) - strtotime($startDay)); $days = ($diff/(60*60*24))+1; return number_format($days*$inc); } echo(getUsers());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0doI7
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   INIT_FCALL                                               'getusers'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function getamount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0doI7
function name:  getAmount
number of ops:  6
compiled vars:  !0 = $increment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 19000
    8     1        INIT_FCALL_BY_NAME                                       'getTodayValue'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4      > RETURN                                                   $2
    9     5*     > RETURN                                                   null

End of function getamount

Function getusers:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0doI7
function name:  getUsers
number of ops:  6
compiled vars:  !0 = $increment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, 514
   15     1        INIT_FCALL_BY_NAME                                       'getTodayValue'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4      > RETURN                                                   $2
   16     5*     > RETURN                                                   null

End of function getusers

Function gettodayvalue:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0doI7
function name:  getTodayValue
number of ops:  33
compiled vars:  !0 = $inc, !1 = $startDay, !2 = $endDay, !3 = $now, !4 = $diff, !5 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        ASSIGN                                                   !1, '2013-11-01'
   20     2        ASSIGN                                                   !2, '2013-12-31'
   21     3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'Y-m-d'
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !3, $8
   23     7        IS_SMALLER_OR_EQUAL                                      !3, !2
          8      > JMPZ                                                     ~10, ->11
          9    >   QM_ASSIGN                                        ~11     !3
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~11     !2
         12    >   ASSIGN                                                   !2, ~11
   25    13        INIT_FCALL                                               'abs'
         14        INIT_FCALL                                               'strtotime'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $13     
         17        INIT_FCALL                                               'strtotime'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $14     
         20        SUB                                              ~15     $13, $14
         21        SEND_VAL                                                 ~15
         22        DO_ICALL                                         $16     
         23        ASSIGN                                                   !4, $16
   26    24        DIV                                              ~18     !4, 86400
         25        ADD                                              ~19     ~18, 1
         26        ASSIGN                                                   !5, ~19
   27    27        INIT_FCALL                                               'number_format'
         28        MUL                                              ~21     !5, !0
         29        SEND_VAL                                                 ~21
         30        DO_ICALL                                         $22     
         31      > RETURN                                                   $22
   28    32*     > RETURN                                                   null

End of function gettodayvalue

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.24 ms | 1394 KiB | 22 Q