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]); $b = array_keys($arr); var_dump($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MDB5J
function name:  (null)
number of ops:  25
compiled vars:  !0 = $foo, !1 = $arr, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $4      $3
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
          4        CAST                                          7  ~7      !0
          5        ASSIGN                                                   !1, ~7
          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                                         $10     
         13        FETCH_DIM_R                                      ~11     $10, 0
         14        FETCH_DIM_R                                      ~12     ~11, 0
         15        SEND_VAL                                                 ~12
         16        DO_ICALL                                                 
    5    17        INIT_FCALL                                               'array_keys'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $14     
         20        ASSIGN                                                   !2, $14
    6    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.31 ms | 1395 KiB | 17 Q