3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.41 ms | 1395 KiB | 17 Q