3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = (object) [ 'foo' => 'bar', 'foo2' => 'bar2' ]; $coll = collect($obj); var_dump($coll[0]); // returns object
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Va1Uc
function name:  (null)
number of ops:  11
compiled vars:  !0 = $obj, !1 = $coll
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          8  ~2      <array>
    3     1        ASSIGN                                                   !0, ~2
    8     2        INIT_FCALL_BY_NAME                                       'collect'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !1, $4
   10     6        INIT_FCALL                                               'var_dump'
          7        FETCH_DIM_R                                      ~6      !1, 0
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.57 ms | 996 KiB | 14 Q