3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oToday = new \DateTime(); $oYesterday = (clone $oToday)->modify('-1 day'); $oDayBefore = (clone $oYesterday)->modify('-1 day'); echo $oToday->format('Y-m-d 00:00:00'). PHP_EOL; echo $oYesterday->format('Y-m-d 00:00:00'). PHP_EOL; echo $oDayBefore->format('Y-m-d 00:00:00'). PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WRX1P
function name:  (null)
number of ops:  29
compiled vars:  !0 = $oToday, !1 = $oYesterday, !2 = $oDayBefore
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        CLONE                                            ~6      !0
          4        INIT_METHOD_CALL                                         ~6, 'modify'
          5        SEND_VAL_EX                                              '-1+day'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
    5     8        CLONE                                            ~9      !1
          9        INIT_METHOD_CALL                                         ~9, 'modify'
         10        SEND_VAL_EX                                              '-1+day'
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !2, $10
    6    13        INIT_METHOD_CALL                                         !0, 'format'
         14        SEND_VAL_EX                                              'Y-m-d+00%3A00%3A00'
         15        DO_FCALL                                      0  $12     
         16        CONCAT                                           ~13     $12, '%0A'
         17        ECHO                                                     ~13
    7    18        INIT_METHOD_CALL                                         !1, 'format'
         19        SEND_VAL_EX                                              'Y-m-d+00%3A00%3A00'
         20        DO_FCALL                                      0  $14     
         21        CONCAT                                           ~15     $14, '%0A'
         22        ECHO                                                     ~15
    8    23        INIT_METHOD_CALL                                         !2, 'format'
         24        SEND_VAL_EX                                              'Y-m-d+00%3A00%3A00'
         25        DO_FCALL                                      0  $16     
         26        CONCAT                                           ~17     $16, '%0A'
         27        ECHO                                                     ~17
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.31 ms | 1434 KiB | 13 Q