3v4l.org

run code in 500+ PHP versions simultaneously
<?php $someDateStr = 'May 14'; $start = new DateTimeImmutable($someDateStr); $end = new DateTimeImmutable('@' . strtotime('Saturday', $start->getTimestamp()) ); // the Saturday following `$start`
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zp2S2
function name:  (null)
number of ops:  17
compiled vars:  !0 = $someDateStr, !1 = $start, !2 = $end
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'May+14'
    5     1        NEW                                                  $4      'DateTimeImmutable'
          2        SEND_VAR_EX                                                  !0
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !1, $4
    6     5        NEW                                                  $7      'DateTimeImmutable'
          6        INIT_FCALL                                                   'strtotime'
          7        SEND_VAL                                                     'Saturday'
          8        INIT_METHOD_CALL                                             !1, 'getTimestamp'
          9        DO_FCALL                                          0  $8      
         10        SEND_VAR                                                     $8
         11        DO_ICALL                                             $9      
         12        CONCAT                                               ~10     '%40', $9
         13        SEND_VAL_EX                                                  ~10
         14        DO_FCALL                                          0          
         15        ASSIGN                                                       !2, $7
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.05 ms | 1095 KiB | 15 Q