3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.06 ms | 1436 KiB | 14 Q