3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_a = new DateTime('now'); $date_b2 = new DateTime('wednesday + 7 day 08:00'); $date_c2 = new DateTime('saturday + 7 day 20:00'); $intervaln = date_diff($date_a,$date_b2); $interval2n = date_diff($date_a,$date_c2); $diff1n = $intervaln->format('%d d. %h h. %i min.'); $diff2n = $interval2n->format('%d d. %h h. %i min.'); if ($diff1n > $diff2n) { echo $diff1n; } else if ($diff1n < $diff2n) { echo $diff2n; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 37
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/aRsYB
function name:  (null)
number of ops:  38
compiled vars:  !0 = $date_a, !1 = $date_b2, !2 = $date_c2, !3 = $intervaln, !4 = $interval2n, !5 = $diff1n, !6 = $diff2n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $7      'DateTime'
          1        SEND_VAL_EX                                              'now'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $7
    5     4        NEW                                              $10     'DateTime'
          5        SEND_VAL_EX                                              'wednesday+%2B+7+day+08%3A00'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $10
    6     8        NEW                                              $13     'DateTime'
          9        SEND_VAL_EX                                              'saturday+%2B+7+day+20%3A00'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $13
    8    12        INIT_FCALL                                               'date_diff'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $16     
         16        ASSIGN                                                   !3, $16
    9    17        INIT_FCALL                                               'date_diff'
         18        SEND_VAR                                                 !0
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $18     
         21        ASSIGN                                                   !4, $18
   11    22        INIT_METHOD_CALL                                         !3, 'format'
         23        SEND_VAL_EX                                              '%25d+d.+%25h+h.+%25i+min.'
         24        DO_FCALL                                      0  $20     
         25        ASSIGN                                                   !5, $20
   12    26        INIT_METHOD_CALL                                         !4, 'format'
         27        SEND_VAL_EX                                              '%25d+d.+%25h+h.+%25i+min.'
         28        DO_FCALL                                      0  $22     
         29        ASSIGN                                                   !6, $22
   14    30        IS_SMALLER                                               !6, !5
         31      > JMPZ                                                     ~24, ->34
   15    32    >   ECHO                                                     !5
   14    33      > JMP                                                      ->37
   17    34    >   IS_SMALLER                                               !5, !6
         35      > JMPZ                                                     ~25, ->37
   18    36    >   ECHO                                                     !6
   19    37    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.69 ms | 1006 KiB | 14 Q