3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_object_public_vars($object) { return get_object_vars($object); } class Toto { public $unset; public $tata = 'tata'; protected $tete = 'tete'; private $tutu = 'tutu'; public function __construct($set) { $this->unset = $set; } } $toto = new Toto('ahah'); var_dump(get_object_public_vars($toto));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TsVA1
function name:  (null)
number of ops:  11
compiled vars:  !0 = $toto
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Toto'
          1        SEND_VAL_EX                                              'ahah'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   20     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'get_object_public_vars'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function get_object_public_vars:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TsVA1
function name:  get_object_public_vars
number of ops:  6
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'get_object_vars'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
    5     5*     > RETURN                                                   null

End of function get_object_public_vars

Class Toto:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TsVA1
function name:  __construct
number of ops:  4
compiled vars:  !0 = $set
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        ASSIGN_OBJ                                               'unset'
          2        OP_DATA                                                  !0
   16     3      > RETURN                                                   null

End of function __construct

End of class Toto.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.37 ms | 1398 KiB | 18 Q