3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getAmount() { $increment = 19000; return getTodayValue($increment); } 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); return ($days*$inc); } echo(getUsers());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ome7T
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     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/Ome7T
function name:  getAmount
number of ops:  6
compiled vars:  !0 = $increment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 19000
    6     1        INIT_FCALL_BY_NAME                                       'getTodayValue'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4      > RETURN                                                   $2
    7     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/Ome7T
function name:  getUsers
number of ops:  6
compiled vars:  !0 = $increment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 514
   12     1        INIT_FCALL_BY_NAME                                       'getTodayValue'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4      > RETURN                                                   $2
   13     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/Ome7T
function name:  getTodayValue
number of ops:  29
compiled vars:  !0 = $inc, !1 = $startDay, !2 = $endDay, !3 = $now, !4 = $diff, !5 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        ASSIGN                                                   !1, '2013-11-01'
   17     2        ASSIGN                                                   !2, '2013-12-31'
   18     3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'Y-m-d'
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !3, $8
   20     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
   22    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
   23    24        DIV                                              ~18     !4, 86400
         25        ASSIGN                                                   !5, ~18
   24    26        MUL                                              ~20     !5, !0
         27      > RETURN                                                   ~20
   25    28*     > RETURN                                                   null

End of function gettodayvalue

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1394 KiB | 20 Q