3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime(null, new DateTimeZone('Europe/Berlin')); $soon = new DateTime(null, new DateTimeZone('Europe/Berlin')); $soon->add(new DateInterval('P7Y5M4DT4H3M2S')); $diff = $now->diff($soon); echo $diff->format('%R%a');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/81YEa
function name:  (null)
number of ops:  31
compiled vars:  !0 = $now, !1 = $soon, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              null
          2        NEW                                              $4      'DateTimeZone'
          3        SEND_VAL_EX                                              'Europe%2FBerlin'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $4
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
    3     8        NEW                                              $8      'DateTime'
          9        SEND_VAL_EX                                              null
         10        NEW                                              $9      'DateTimeZone'
         11        SEND_VAL_EX                                              'Europe%2FBerlin'
         12        DO_FCALL                                      0          
         13        SEND_VAR_NO_REF_EX                                       $9
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !1, $8
    4    16        INIT_METHOD_CALL                                         !1, 'add'
         17        NEW                                              $13     'DateInterval'
         18        SEND_VAL_EX                                              'P7Y5M4DT4H3M2S'
         19        DO_FCALL                                      0          
         20        SEND_VAR_NO_REF_EX                                       $13
         21        DO_FCALL                                      0          
    5    22        INIT_METHOD_CALL                                         !0, 'diff'
         23        SEND_VAR_EX                                              !1
         24        DO_FCALL                                      0  $16     
         25        ASSIGN                                                   !2, $16
    6    26        INIT_METHOD_CALL                                         !2, 'format'
         27        SEND_VAL_EX                                              '%25R%25a'
         28        DO_FCALL                                      0  $18     
         29        ECHO                                                     $18
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.45 ms | 1394 KiB | 13 Q