3v4l.org

run code in 300+ PHP versions simultaneously
<?php $week_start=(new DateTime())->format('Y,W'); $week_start->setISODate()->format('D Y-m-d'); echo $week_start;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZH4Ba
function name:  (null)
number of ops:  13
compiled vars:  !0 = $week_start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'DateTime'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'format'
          3        SEND_VAL_EX                                              'Y%2CW'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !0, $3
    3     6        INIT_METHOD_CALL                                         !0, 'setISODate'
          7        DO_FCALL                                      0  $5      
          8        INIT_METHOD_CALL                                         $5, 'format'
          9        SEND_VAL_EX                                              'D+Y-m-d'
         10        DO_FCALL                                      0          
    4    11        ECHO                                                     !0
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
200.29 ms | 1392 KiB | 13 Q