3v4l.org

run code in 300+ PHP versions simultaneously
<?php $january = new DateTime('2010-01-10'); $february = new DateTime('2010-02-01'); $interval = $february->diff($january); // %a will output the total number of days. // While %d will only output the number of days not already covered by the // month. if ($interval->format('%a')/30 > 1) { echo $interval->format('%m month, %d days'); } else { echo $interval->format('%a total days')."\n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fvof7
function name:  (null)
number of ops:  29
compiled vars:  !0 = $january, !1 = $february, !2 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2010-01-10'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '2010-02-01'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    5     8        INIT_METHOD_CALL                                         !1, 'diff'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $9      
         11        ASSIGN                                                   !2, $9
   11    12        INIT_METHOD_CALL                                         !2, 'format'
         13        SEND_VAL_EX                                              '%25a'
         14        DO_FCALL                                      0  $11     
         15        DIV                                              ~12     $11, 30
         16        IS_SMALLER                                               1, ~12
         17      > JMPZ                                                     ~13, ->23
   12    18    >   INIT_METHOD_CALL                                         !2, 'format'
         19        SEND_VAL_EX                                              '%25m+month%2C+%25d+days'
         20        DO_FCALL                                      0  $14     
         21        ECHO                                                     $14
         22      > JMP                                                      ->28
   14    23    >   INIT_METHOD_CALL                                         !2, 'format'
         24        SEND_VAL_EX                                              '%25a+total+days'
         25        DO_FCALL                                      0  $15     
         26        CONCAT                                           ~16     $15, '%0A'
         27        ECHO                                                     ~16
   18    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.28 ms | 1395 KiB | 13 Q