3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateTimeStrBefore = "2024/09/01 00:00:00"; $dateTimeBefore = new DateTimeImmutable($dateTimeStrBefore); $dateTimeAfter = $dateTimeBefore->modify("-1 second"); var_dump($dateTimeBefore); var_dump($dateTimeAfter);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oHank
function name:  (null)
number of ops:  16
compiled vars:  !0 = $dateTimeStrBefore, !1 = $dateTimeBefore, !2 = $dateTimeAfter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2024%2F09%2F01+00%3A00%3A00'
    4     1        NEW                                              $4      'DateTimeImmutable'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
    5     5        INIT_METHOD_CALL                                         !1, 'modify'
          6        SEND_VAL_EX                                              '-1+second'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
    7     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.06 ms | 1435 KiB | 14 Q