3v4l.org

run code in 500+ PHP versions simultaneously
<?php function getDateForWeekDay($year, $weekNo, $dayOfWeekNo) // return the exact date of this weekday, using ISO 8601 { $date = new DateTime(); $date->setISODate($year, $weekNo, $dayOfWeekNo); return $date->format('Y-m-d'); } echo getDateForWeekDay(2020, 34, 1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bkjUj
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                                   'getdateforweekday'
          1        SEND_VAL                                                     2020
          2        SEND_VAL                                                     34
          3        SEND_VAL                                                     1
          4        DO_FCALL                                          0  $0      
          5        ECHO                                                         $0
          6      > RETURN                                                       1

Function getdateforweekday:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bkjUj
function name:  getDateForWeekDay
number of ops:  16
compiled vars:  !0 = $year, !1 = $weekNo, !2 = $dayOfWeekNo, !3 = $date
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
    6     3        NEW                                                  $4      'DateTime'
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !3, $4
    7     6        INIT_METHOD_CALL                                             !3, 'setISODate'
          7        SEND_VAR_EX                                                  !0
          8        SEND_VAR_EX                                                  !1
          9        SEND_VAR_EX                                                  !2
         10        DO_FCALL                                          0          
    8    11        INIT_METHOD_CALL                                             !3, 'format'
         12        SEND_VAL_EX                                                  'Y-m-d'
         13        DO_FCALL                                          0  $8      
         14      > RETURN                                                       $8
    9    15*     > RETURN                                                       null

End of function getdateforweekday

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
1029.95 ms | 1880 KiB | 14 Q