3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new DateTimeZone( 'CEST' ); var_dump( ( new DateTime( 'now', $d ) )->format( 'P' ), $d->getOffset( new DateTime() ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3rbNX
function name:  (null)
number of ops:  21
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $1      'DateTimeZone'
          1        SEND_VAL_EX                                              'CEST'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    5     4        INIT_FCALL                                               'var_dump'
    6     5        NEW                                              $4      'DateTime'
          6        SEND_VAL_EX                                              'now'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        INIT_METHOD_CALL                                         $4, 'format'
         10        SEND_VAL_EX                                              'P'
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
    7    13        INIT_METHOD_CALL                                         !0, 'getOffset'
         14        NEW                                              $7      'DateTime'
         15        DO_FCALL                                      0          
         16        SEND_VAR_NO_REF_EX                                       $7
         17        DO_FCALL                                      0  $9      
         18        SEND_VAR                                                 $9
    5    19        DO_ICALL                                                 
    8    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.05 ms | 944 KiB | 14 Q