3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function e($d) { echo $d->format("Y-m-d H:i:s O"), "\n"; } $irk = new DateTimeZone("Asia/Irkutsk"); $a = new DateTime("2009-10-25 01:30:00", $irk); e($a); $a->modify("+1 hour"); e($a); $a->modify("+1 hour"); e($a); $a->modify("+1 hour"); e($a);
based on qZiRE
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LJ1hZ
function name:  (null)
number of ops:  32
compiled vars:  !0 = $irk, !1 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
   6     1        NEW                                              $2      :-5
         2        SEND_VAL_EX                                              'Asia%2FIrkutsk'
         3        DO_FCALL                                      0          
         4        ASSIGN                                                   !0, $2
   8     5        NEW                                              $5      :-2
         6        SEND_VAL_EX                                              '2009-10-25+01%3A30%3A00'
         7        SEND_VAR_EX                                              !0
         8        DO_FCALL                                      0          
         9        ASSIGN                                                   !1, $5
   9    10        INIT_FCALL                                               'e'
        11        SEND_VAR                                                 !1
        12        DO_FCALL                                      0          
  10    13        INIT_METHOD_CALL                                         !1, 'modify'
        14        SEND_VAL_EX                                              '%2B1+hour'
        15        DO_FCALL                                      0          
  11    16        INIT_FCALL                                               'e'
        17        SEND_VAR                                                 !1
        18        DO_FCALL                                      0          
  12    19        INIT_METHOD_CALL                                         !1, 'modify'
        20        SEND_VAL_EX                                              '%2B1+hour'
        21        DO_FCALL                                      0          
  13    22        INIT_FCALL                                               'e'
        23        SEND_VAR                                                 !1
        24        DO_FCALL                                      0          
  14    25        INIT_METHOD_CALL                                         !1, 'modify'
        26        SEND_VAL_EX                                              '%2B1+hour'
        27        DO_FCALL                                      0          
  15    28        INIT_FCALL                                               'e'
        29        SEND_VAR                                                 !1
        30        DO_FCALL                                      0          
        31      > RETURN                                                   1

Function e:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LJ1hZ
function name:  e
number of ops:  7
compiled vars:  !0 = $d
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   RECV                                             !0      
   3     1        INIT_METHOD_CALL                                         !0, 'format'
         2        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+O'
         3        DO_FCALL                                      0  $1      
         4        ECHO                                                     $1
         5        ECHO                                                     '%0A'
   4     6      > RETURN                                                   null

End of function e

Generated using Vulcan Logic Dumper, using php 7.3.0