3v4l.org

run code in 300+ PHP versions simultaneously
<?php $o = new class () { public string $foo = 'bar'; protected string $baz = 'qux'; private string $xyz = 'xyz'; }; $ao = new ArrayObject($o, ArrayObject::ARRAY_AS_PROPS); var_dump((object) $ao->getArrayCopy());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/47VCv
function name:  (null)
number of ops:  16
compiled vars:  !0 = $o, !1 = $ao
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <true>  
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    9     4        NEW                                              $6      'ArrayObject'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              2
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   11     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !1, 'getArrayCopy'
         11        DO_FCALL                                      0  $9      
         12        CAST                                          8  ~10     $9
         13        SEND_VAL                                                 ~10
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.63 ms | 996 KiB | 14 Q