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; var_dump(get_object_public_vars($this)); } } new Toto('ahah');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XIT9n
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $0      'Toto'
          1        SEND_VAL_EX                                              'ahah'
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
          4      > 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/XIT9n
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/XIT9n
function name:  __construct
number of ops:  11
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
   17     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'get_object_public_vars'
          5        FETCH_THIS                                       ~2      
          6        SEND_VAL                                                 ~2
          7        DO_FCALL                                      0  $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
   18    10      > RETURN                                                   null

End of function __construct

End of class Toto.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.71 ms | 1398 KiB | 18 Q