3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dailyHours = 7.5; $baseDate = new DateTime('2017-01-01', new DateTimezone('UTC')); $endDate = clone $baseDate; for($i = 1; $i <= 64; ++$i) { $m = $i*15; $duration = new DateInterval("PT{$m}M"); $endDate->add($duration); } $totalDuration = $baseDate->diff($endDate); echo $totalDuration->format('%a days, %h hours, %i minutes');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 13
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 13
Branch analysis from position: 28
Branch analysis from position: 13
filename:       /in/bhrau
function name:  (null)
number of ops:  37
compiled vars:  !0 = $dailyHours, !1 = $baseDate, !2 = $endDate, !3 = $i, !4 = $m, !5 = $duration, !6 = $totalDuration
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 7.5
    5     1        NEW                                              $8      'DateTime'
          2        SEND_VAL_EX                                              '2017-01-01'
          3        NEW                                              $9      'DateTimezone'
          4        SEND_VAL_EX                                              'UTC'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $9
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $8
    6     9        CLONE                                            ~13     !1
         10        ASSIGN                                                   !2, ~13
    7    11        ASSIGN                                                   !3, 1
         12      > JMP                                                      ->26
    8    13    >   MUL                                              ~16     !3, 15
         14        ASSIGN                                                   !4, ~16
    9    15        NEW                                              $18     'DateInterval'
         16        ROPE_INIT                                     3  ~20     'PT'
         17        ROPE_ADD                                      1  ~20     ~20, !4
         18        ROPE_END                                      2  ~19     ~20, 'M'
         19        SEND_VAL_EX                                              ~19
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !5, $18
   10    22        INIT_METHOD_CALL                                         !2, 'add'
         23        SEND_VAR_EX                                              !5
         24        DO_FCALL                                      0          
    7    25        PRE_INC                                                  !3
         26    >   IS_SMALLER_OR_EQUAL                                      !3, 64
         27      > JMPNZ                                                    ~26, ->13
   13    28    >   INIT_METHOD_CALL                                         !1, 'diff'
         29        SEND_VAR_EX                                              !2
         30        DO_FCALL                                      0  $27     
         31        ASSIGN                                                   !6, $27
   15    32        INIT_METHOD_CALL                                         !6, 'format'
         33        SEND_VAL_EX                                              '%25a+days%2C+%25h+hours%2C+%25i+minutes'
         34        DO_FCALL                                      0  $29     
         35        ECHO                                                     $29
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.25 ms | 1395 KiB | 13 Q