3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ReturnDates($date1, $date2) { $date1 = date_create($date1); $date2 = date_create($date2); while(date_diff($date1 < $date2)) { date_add($date, date_interval_create_from_date_string('1 day')); echo date_format($date, 'Y-m-d'); } } ReturnDates('01-01-2012', '01-02-2012');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cJ4P5
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'returndates'
          1        SEND_VAL                                                 '01-01-2012'
          2        SEND_VAL                                                 '01-02-2012'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function returndates:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 11
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 11
Branch analysis from position: 28
Branch analysis from position: 11
filename:       /in/cJ4P5
function name:  ReturnDates
number of ops:  29
compiled vars:  !0 = $date1, !1 = $date2, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'date_create'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    5     6        INIT_FCALL                                               'date_create'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    6    10      > JMP                                                      ->23
    7    11    >   INIT_FCALL                                               'date_add'
         12        SEND_VAR                                                 !2
         13        INIT_FCALL                                               'date_interval_create_from_date_string'
         14        SEND_VAL                                                 '1+day'
         15        DO_ICALL                                         $7      
         16        SEND_VAR                                                 $7
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'date_format'
         19        SEND_VAR                                                 !2
         20        SEND_VAL                                                 'Y-m-d'
         21        DO_ICALL                                         $9      
         22        ECHO                                                     $9
    6    23    >   INIT_FCALL                                               'date_diff'
         24        IS_SMALLER                                       ~10     !0, !1
         25        SEND_VAL                                                 ~10
         26        DO_ICALL                                         $11     
         27      > JMPNZ                                                    $11, ->11
   10    28    > > RETURN                                                   null

End of function returndates

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.07 ms | 1398 KiB | 24 Q