3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.5 ms | 1405 KiB | 19 Q