3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(1,2,3); $o = (object) $arr; $o2 = new ArrayObject($arr); $o2b = new ArrayObject($arr, ArrayObject::ARRAY_AS_PROPS); $o3 = new stdClass; $o3->arr = $arr; var_dump($o,$o2,$o2b,$o3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2k9lB
function name:  (null)
number of ops:  24
compiled vars:  !0 = $arr, !1 = $o, !2 = $o2, !3 = $o2b, !4 = $o3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        CAST                                          8  ~6      !0
          2        ASSIGN                                                   !1, ~6
    4     3        NEW                                              $8      'ArrayObject'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $8
    5     7        NEW                                              $11     'ArrayObject'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAL_EX                                              2
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $11
    6    12        NEW                                              $14     'stdClass'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !4, $14
    7    15        ASSIGN_OBJ                                               !4, 'arr'
         16        OP_DATA                                                  !0
    8    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !2
         20        SEND_VAR                                                 !3
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.59 ms | 1395 KiB | 15 Q