3v4l.org

run code in 500+ PHP versions simultaneously
<?php function createRange($startDate, $endDate) { $tmpDate = new DateTime($startDate); $tmpEndDate = new DateTime($endDate); $outArray = array(); do { $outArray[] = $tmpDate->format('Y-m-d'); } while ($tmpDate->modify('+1 day') <= $tmpEndDate); return $outArray; } print_r( createRange('2010-10-01', '2010-10-05') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kVrYv
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                                   'print_r'
          1        INIT_FCALL                                                   'createrange'
          2        SEND_VAL                                                     '2010-10-01'
          3        SEND_VAL                                                     '2010-10-05'
          4        DO_FCALL                                          0  $0      
          5        SEND_VAR                                                     $0
          6        DO_ICALL                                                     
          7      > RETURN                                                       1

Function createrange:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/kVrYv
function name:  createRange
number of ops:  23
compiled vars:  !0 = $startDate, !1 = $endDate, !2 = $tmpDate, !3 = $tmpEndDate, !4 = $outArray
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    3     2        NEW                                                  $5      'DateTime'
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !2, $5
    4     6        NEW                                                  $8      'DateTime'
          7        SEND_VAR_EX                                                  !1
          8        DO_FCALL                                          0          
          9        ASSIGN                                                       !3, $8
    6    10        ASSIGN                                                       !4, <array>
    8    11    >   INIT_METHOD_CALL                                             !2, 'format'
         12        SEND_VAL_EX                                                  'Y-m-d'
         13        DO_FCALL                                          0  $13     
         14        ASSIGN_DIM                                                   !4
         15        OP_DATA                                                      $13
    9    16        INIT_METHOD_CALL                                             !2, 'modify'
         17        SEND_VAL_EX                                                  '%2B1+day'
         18        DO_FCALL                                          0  $14     
         19        IS_SMALLER_OR_EQUAL                                          $14, !3
         20      > JMPNZ                                                        ~15, ->11
   11    21    > > RETURN                                                       !4
   12    22*     > RETURN                                                       null

End of function createrange

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
200.54 ms | 3051 KiB | 15 Q