3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); echo $date->format('Y-m-d'); echo "\n"; echo $date->modify('+1day')->format('Y-m-d'); echo "\n"; echo $date->format('Y-m-d');
based on Zj3np
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/91Vge
function name:  (null)
number of ops:  21
compiled vars:  !0 = $date
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NEW                                              $1      :-6
         1        DO_FCALL                                      0          
         2        ASSIGN                                                   !0, $1
   4     3        INIT_METHOD_CALL                                         !0, 'format'
         4        SEND_VAL_EX                                              'Y-m-d'
         5        DO_FCALL                                      0  $4      
         6        ECHO                                                     $4
   5     7        ECHO                                                     '%0A'
   6     8        INIT_METHOD_CALL                                         !0, 'modify'
         9        SEND_VAL_EX                                              '%2B1day'
        10        DO_FCALL                                      0  $5      
        11        INIT_METHOD_CALL                                         $5, 'format'
        12        SEND_VAL_EX                                              'Y-m-d'
        13        DO_FCALL                                      0  $6      
        14        ECHO                                                     $6
   7    15        ECHO                                                     '%0A'
   9    16        INIT_METHOD_CALL                                         !0, 'format'
        17        SEND_VAL_EX                                              'Y-m-d'
        18        DO_FCALL                                      0  $7      
        19        ECHO                                                     $7
        20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0