3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fixDate(\DateTime $d) { $d->modify('this week sunday 23:59:59'); return $d; } var_dump( fixDate(new DateTime('November 10, 2017 10:00:00')), fixDate(new DateTime('November 11, 2017 10:00:00')), fixDate(new DateTime('November 12, 2017 10:00:00')) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EZ7hC
function name:  (null)
number of ops:  24
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
   10     1        INIT_FCALL                                               'fixdate'
          2        NEW                                              $0      'DateTime'
          3        SEND_VAL_EX                                              'November+10%2C+2017+10%3A00%3A00'
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $0
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
   11     8        INIT_FCALL                                               'fixdate'
          9        NEW                                              $3      'DateTime'
         10        SEND_VAL_EX                                              'November+11%2C+2017+10%3A00%3A00'
         11        DO_FCALL                                      0          
         12        SEND_VAR                                                 $3
         13        DO_FCALL                                      0  $5      
         14        SEND_VAR                                                 $5
   12    15        INIT_FCALL                                               'fixdate'
         16        NEW                                              $6      'DateTime'
         17        SEND_VAL_EX                                              'November+12%2C+2017+10%3A00%3A00'
         18        DO_FCALL                                      0          
         19        SEND_VAR                                                 $6
         20        DO_FCALL                                      0  $8      
         21        SEND_VAR                                                 $8
         22        DO_ICALL                                                 
   13    23      > RETURN                                                   1

Function fixdate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EZ7hC
function name:  fixDate
number of ops:  6
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_METHOD_CALL                                         !0, 'modify'
          2        SEND_VAL_EX                                              'this+week+sunday+23%3A59%3A59'
          3        DO_FCALL                                      0          
    5     4      > RETURN                                                   !0
    6     5*     > RETURN                                                   null

End of function fixdate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.64 ms | 1402 KiB | 19 Q