3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = 5; echo date('Y-m-d', strtotime('-'.$key.' days')) . '-' . date('Y-m-d', strtotime('+'.(7-$key).' days')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OHVdN
function name:  (null)
number of ops:  24
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 5
    3     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-d'
          3        INIT_FCALL                                               'strtotime'
          4        CONCAT                                           ~2      '-', !0
          5        CONCAT                                           ~3      ~2, '+days'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        CONCAT                                           ~6      $5, '-'
         11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'Y-m-d'
         13        INIT_FCALL                                               'strtotime'
         14        SUB                                              ~7      7, !0
         15        CONCAT                                           ~8      '%2B', ~7
         16        CONCAT                                           ~9      ~8, '+days'
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                         $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                         $11     
         21        CONCAT                                           ~12     ~6, $11
         22        ECHO                                                     ~12
    5    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.8 ms | 1395 KiB | 17 Q