3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "02/06/2019 22:23:22"; echo 'date->'.$s.PHP_EOL; $date = date ("d/m/Y H:i:s", strtotime($s)); $st_date = new DateTime($date); $st_date->modify('+1 days'); $tomorrow = $st_date->format('d/m/Y'); echo 'tomorrow -> '.$tomorrow; //Always return 02/01/1970
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0fSHu
function name:  (null)
number of ops:  26
compiled vars:  !0 = $s, !1 = $date, !2 = $st_date, !3 = $tomorrow
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '02%2F06%2F2019+22%3A23%3A22'
    3     1        CONCAT                                           ~5      'date-%3E', !0
          2        CONCAT                                           ~6      ~5, '%0A'
          3        ECHO                                                     ~6
    5     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'd%2Fm%2FY+H%3Ai%3As'
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !1, $8
    7    12        NEW                                              $10     'DateTime'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !2, $10
    9    16        INIT_METHOD_CALL                                         !2, 'modify'
         17        SEND_VAL_EX                                              '%2B1+days'
         18        DO_FCALL                                      0          
   11    19        INIT_METHOD_CALL                                         !2, 'format'
         20        SEND_VAL_EX                                              'd%2Fm%2FY'
         21        DO_FCALL                                      0  $14     
         22        ASSIGN                                                   !3, $14
   12    23        CONCAT                                           ~16     'tomorrow+-%3E+', !3
         24        ECHO                                                     ~16
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
344.47 ms | 1016 KiB | 15 Q