3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('01-01-2015'); $end = new DateTime('01-06-2015'); $period = new DatePeriod($start, new DateInterval('P1W'), $end); $firstDay = null; $lastDay = null; var_dump(array_pop($period));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UVF4K
function name:  (null)
number of ops:  26
compiled vars:  !0 = $start, !1 = $end, !2 = $period, !3 = $firstDay, !4 = $lastDay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'DateTime'
          1        SEND_VAL_EX                                              '01-01-2015'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    4     4        NEW                                              $8      'DateTime'
          5        SEND_VAL_EX                                              '01-06-2015'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
    5     8        NEW                                              $11     'DatePeriod'
          9        SEND_VAR_EX                                              !0
         10        NEW                                              $12     'DateInterval'
         11        SEND_VAL_EX                                              'P1W'
         12        DO_FCALL                                      0          
         13        SEND_VAR_NO_REF_EX                                       $12
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !2, $11
    7    17        ASSIGN                                                   !3, null
    8    18        ASSIGN                                                   !4, null
   10    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'array_pop'
         21        SEND_REF                                                 !2
         22        DO_ICALL                                         $18     
         23        SEND_VAR                                                 $18
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.01 ms | 1395 KiB | 17 Q