3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.73 ms | 1394 KiB | 17 Q