3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getStartAndEndDate($week, $year) { $dto = new DateTime(); $ret['week_start'] = $dto->setISODate($year, $week)->format('Y-m-d'); $ret['week_end'] = $dto->modify('+6 days')->format('Y-m-d'); return $ret; } print_r(getStartAndEndDate(24, 2014));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/59WV6
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'getstartandenddate'
          2        SEND_VAL                                                 24
          3        SEND_VAL                                                 2014
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function getstartandenddate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/59WV6
function name:  getStartAndEndDate
number of ops:  24
compiled vars:  !0 = $week, !1 = $year, !2 = $dto, !3 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        NEW                                              $4      'DateTime'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $4
    5     5        INIT_METHOD_CALL                                         !2, 'setISODate'
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $8      
          9        INIT_METHOD_CALL                                         $8, 'format'
         10        SEND_VAL_EX                                              'Y-m-d'
         11        DO_FCALL                                      0  $9      
         12        ASSIGN_DIM                                               !3, 'week_start'
         13        OP_DATA                                                  $9
    6    14        INIT_METHOD_CALL                                         !2, 'modify'
         15        SEND_VAL_EX                                              '%2B6+days'
         16        DO_FCALL                                      0  $11     
         17        INIT_METHOD_CALL                                         $11, 'format'
         18        SEND_VAL_EX                                              'Y-m-d'
         19        DO_FCALL                                      0  $12     
         20        ASSIGN_DIM                                               !3, 'week_end'
         21        OP_DATA                                                  $12
    7    22      > RETURN                                                   !3
    8    23*     > RETURN                                                   null

End of function getstartandenddate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.12 ms | 1399 KiB | 16 Q