3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new \Datetime("UTC"); $lv = new \Datetime("America/Los_Angeles"); $interval = $now->diff($lv,true); print_r($lv); print_r($interval);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8PZ8d
function name:  (null)
number of ops:  20
compiled vars:  !0 = $now, !1 = $lv, !2 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'Datetime'
          1        SEND_VAL_EX                                              'UTC'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        NEW                                              $6      'Datetime'
          5        SEND_VAL_EX                                              'America%2FLos_Angeles'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    5     8        INIT_METHOD_CALL                                         !0, 'diff'
          9        SEND_VAR_EX                                              !1
         10        SEND_VAL_EX                                              <true>
         11        DO_FCALL                                      0  $9      
         12        ASSIGN                                                   !2, $9
    7    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
    8    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.19 ms | 1395 KiB | 15 Q