3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '2015-03-16'; // monday echo date("Y-m-d", strtotime('monday this week', strtotime($date))), "\n"; echo date("Y-m-d", strtotime('sunday this week', strtotime($date))), "\n"; $date = '2015-03-22'; // sunday echo date("Y-m-d", strtotime('monday this week', strtotime($date))), "\n"; echo date("Y-m-d", strtotime('sunday this week', strtotime($date))), "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4N2HU
function name:  (null)
number of ops:  55
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2015-03-16'
    3     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-d'
          3        INIT_FCALL                                               'strtotime'
          4        SEND_VAL                                                 'monday+this+week'
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                         $4      
         12        ECHO                                                     $4
         13        ECHO                                                     '%0A'
    4    14        INIT_FCALL                                               'date'
         15        SEND_VAL                                                 'Y-m-d'
         16        INIT_FCALL                                               'strtotime'
         17        SEND_VAL                                                 'sunday+this+week'
         18        INIT_FCALL                                               'strtotime'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $5      
         21        SEND_VAR                                                 $5
         22        DO_ICALL                                         $6      
         23        SEND_VAR                                                 $6
         24        DO_ICALL                                         $7      
         25        ECHO                                                     $7
         26        ECHO                                                     '%0A'
    6    27        ASSIGN                                                   !0, '2015-03-22'
    7    28        INIT_FCALL                                               'date'
         29        SEND_VAL                                                 'Y-m-d'
         30        INIT_FCALL                                               'strtotime'
         31        SEND_VAL                                                 'monday+this+week'
         32        INIT_FCALL                                               'strtotime'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $9      
         35        SEND_VAR                                                 $9
         36        DO_ICALL                                         $10     
         37        SEND_VAR                                                 $10
         38        DO_ICALL                                         $11     
         39        ECHO                                                     $11
         40        ECHO                                                     '%0A'
    8    41        INIT_FCALL                                               'date'
         42        SEND_VAL                                                 'Y-m-d'
         43        INIT_FCALL                                               'strtotime'
         44        SEND_VAL                                                 'sunday+this+week'
         45        INIT_FCALL                                               'strtotime'
         46        SEND_VAR                                                 !0
         47        DO_ICALL                                         $12     
         48        SEND_VAR                                                 $12
         49        DO_ICALL                                         $13     
         50        SEND_VAR                                                 $13
         51        DO_ICALL                                         $14     
         52        ECHO                                                     $14
         53        ECHO                                                     '%0A'
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.17 ms | 1400 KiB | 17 Q