3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = new class { private $a = 3; protected $b = 2; public $c = 1; }; $arr = (array)$foo; var_dump($arr); var_dump(array_keys($arr)[0][0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sks4C
function name:  (null)
number of ops:  18
compiled vars:  !0 = $foo, !1 = $arr
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
          4        CAST                                          7  ~6      !0
          5        ASSIGN                                                   !1, ~6
          6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'array_keys'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        FETCH_DIM_R                                      ~10     $9, 0
         14        FETCH_DIM_R                                      ~11     ~10, 0
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.51 ms | 1394 KiB | 17 Q