3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo strtotime('monday this week', time()); $dayOfWeek = ((int)date('N'))-1; $startOfWeek = new DateTime(); $startOfWeek->modify("-$dayOfWeek days"); var_dump($startOfWeek->format('d'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vb5nU
function name:  (null)
number of ops:  22
compiled vars:  !0 = $dayOfWeek, !1 = $startOfWeek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'N'
          2        DO_ICALL                                         $2      
          3        CAST                                          4  ~3      $2
          4        SUB                                              ~4      ~3, 1
          5        ASSIGN                                                   !0, ~4
    6     6        NEW                                              $6      'DateTime'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
    7     9        INIT_METHOD_CALL                                         !1, 'modify'
         10        ROPE_INIT                                     3  ~10     '-'
         11        ROPE_ADD                                      1  ~10     ~10, !0
         12        ROPE_END                                      2  ~9      ~10, '+days'
         13        SEND_VAL_EX                                              ~9
         14        DO_FCALL                                      0          
    8    15        INIT_FCALL                                               'var_dump'
         16        INIT_METHOD_CALL                                         !1, 'format'
         17        SEND_VAL_EX                                              'd'
         18        DO_FCALL                                      0  $13     
         19        SEND_VAR                                                 $13
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.4 ms | 1386 KiB | 17 Q