3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Cat{ private $p; function __construct(){ $this->p="wut"; } } $o=new Cat(); var_dump(((array)$o)["\x00".get_class($o)."\x00"."p"]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7WKoA
function name:  (null)
number of ops:  13
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Cat'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_FCALL                                               'var_dump'
          4        CAST                                          7  ~4      !0
          5        GET_CLASS                                        ~5      !0
          6        CONCAT                                           ~6      '%00', ~5
          7        CONCAT                                           ~7      ~6, '%00'
          8        CONCAT                                           ~8      ~7, 'p'
          9        FETCH_DIM_R                                      ~9      ~4, ~8
         10        SEND_VAL                                                 ~9
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Cat:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7WKoA
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN_OBJ                                               'p'
          1        OP_DATA                                                  'wut'
    7     2      > RETURN                                                   null

End of function __construct

End of class Cat.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.12 ms | 1009 KiB | 14 Q