3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayExtended implements ArrayAccess{ protected $ary = array(); public function __construct(array $a = null) { if($a) $this->ary = $a; } } $o = new ArrayExtended(['a','b']); print_r($o);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oVsrt
function name:  (null)
number of ops:  9
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'arrayextended'
   11     1        NEW                                              $1      'ArrayExtended'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   12     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class ArrayExtended:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/oVsrt
function name:  __construct
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      null
    7     1      > JMPZ                                                     !0, ->4
          2    >   ASSIGN_OBJ                                               'ary'
          3        OP_DATA                                                  !0
    8     4    > > RETURN                                                   null

End of function __construct

End of class ArrayExtended.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.61 ms | 1395 KiB | 15 Q