3v4l.org

run code in 500+ PHP versions simultaneously
<?php date_default_timezone_set( 'UTC' ); $time = strtotime( '2014-01-31' ); $format = "\\Fm\0 j, Y"; var_dump( date( $format, $time ) ); $datetime = new DateTime( '@' . $time ); var_dump( $datetime->format( $format ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1vQ94
function name:  (null)
number of ops:  27
compiled vars:  !0 = $time, !1 = $format, !2 = $datetime
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'date_default_timezone_set'
          1        SEND_VAL                                                     'UTC'
          2        DO_ICALL                                                     
    4     3        INIT_FCALL                                                   'strtotime'
          4        SEND_VAL                                                     '2014-01-31'
          5        DO_ICALL                                             $4      
          6        ASSIGN                                                       !0, $4
    6     7        ASSIGN                                                       !1, '%5CFm%00+j%2C+Y'
    8     8        INIT_FCALL                                                   'var_dump'
          9        INIT_FCALL                                                   'date'
         10        SEND_VAR                                                     !1
         11        SEND_VAR                                                     !0
         12        DO_ICALL                                             $7      
         13        SEND_VAR                                                     $7
         14        DO_ICALL                                                     
   10    15        NEW                                                  $9      'DateTime'
         16        CONCAT                                               ~10     '%40', !0
         17        SEND_VAL_EX                                                  ~10
         18        DO_FCALL                                          0          
         19        ASSIGN                                                       !2, $9
   11    20        INIT_FCALL                                                   'var_dump'
         21        INIT_METHOD_CALL                                             !2, 'format'
         22        SEND_VAR_EX                                                  !1
         23        DO_FCALL                                          0  $13     
         24        SEND_VAR                                                     $13
         25        DO_ICALL                                                     
         26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
149.68 ms | 481 KiB | 11 Q