3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime('2014-05-16'); var_dump(date('Y-m-d', strtotime('Monday this week' . $date->format('Y-m-d'))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1Z2tu
function name:  (null)
number of ops:  19
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'DateTime'
          1        SEND_VAL_EX                                              '2014-05-16'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    4     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'date'
          6        SEND_VAL                                                 'Y-m-d'
          7        INIT_FCALL                                               'strtotime'
          8        INIT_METHOD_CALL                                         !0, 'format'
          9        SEND_VAL_EX                                              'Y-m-d'
         10        DO_FCALL                                      0  $4      
         11        CONCAT                                           ~5      'Monday+this+week', $4
         12        SEND_VAL                                                 ~5
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                         $7      
         16        SEND_VAR                                                 $7
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.83 ms | 1386 KiB | 19 Q