3v4l.org

run code in 300+ PHP versions simultaneously
<?php $old = ['created' => new \DateTime()]; $new = ['created' => new \DateTime('+1 minute')]; $changeset = array_merge($old, $new); var_dump($changeset, $changeset['created'] instanceof \DateTime);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T1BcN
function name:  (null)
number of ops:  21
compiled vars:  !0 = $old, !1 = $new, !2 = $changeset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~5      $3, 'created'
          3        ASSIGN                                                   !0, ~5
    4     4        NEW                                              $7      'DateTime'
          5        SEND_VAL_EX                                              '%2B1+minute'
          6        DO_FCALL                                      0          
          7        INIT_ARRAY                                       ~9      $7, 'created'
          8        ASSIGN                                                   !1, ~9
    6     9        INIT_FCALL                                               'array_merge'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $11     
         13        ASSIGN                                                   !2, $11
    8    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        FETCH_DIM_R                                      ~13     !2, 'created'
         17        INSTANCEOF                                       ~14     ~13, 'DateTime'
         18        SEND_VAL                                                 ~14
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.52 ms | 1395 KiB | 17 Q