3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d1 = date_create('now'); $d2 = date_create('now'); $diff = $d2->diff($d1); echo phpversion()."\n"; print_r($diff);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lk8B
function name:  (null)
number of ops:  20
compiled vars:  !0 = $d1, !1 = $d2, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_create'
          1        SEND_VAL                                                 'now'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'date_create'
          5        SEND_VAL                                                 'now'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    5     8        INIT_METHOD_CALL                                         !1, 'diff'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !2, $7
    6    12        INIT_FCALL                                               'phpversion'
         13        DO_ICALL                                         $9      
         14        CONCAT                                           ~10     $9, '%0A'
         15        ECHO                                                     ~10
    7    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:
147.4 ms | 1395 KiB | 19 Q