3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTimeImmutable; $newDate = $date->modify('+1 day'); echo $date->format('m/d/Y').PHP_EOL; echo $newDate->format('d/m/Y').PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fufHO
function name:  (null)
number of ops:  18
compiled vars:  !0 = $date, !1 = $newDate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTimeImmutable'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'modify'
          4        SEND_VAL_EX                                              '%2B1+day'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
    6     7        INIT_METHOD_CALL                                         !0, 'format'
          8        SEND_VAL_EX                                              'm%2Fd%2FY'
          9        DO_FCALL                                      0  $7      
         10        CONCAT                                           ~8      $7, '%0A'
         11        ECHO                                                     ~8
    7    12        INIT_METHOD_CALL                                         !1, 'format'
         13        SEND_VAL_EX                                              'd%2Fm%2FY'
         14        DO_FCALL                                      0  $9      
         15        CONCAT                                           ~10     $9, '%0A'
         16        ECHO                                                     ~10
    8    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.1 ms | 1404 KiB | 13 Q