3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooContainer { private $foo = 'private'; protected $bar = 'protected'; public $baz = 'public'; public function toArray() { return get_object_vars($this); } } $instance = new FooContainer(); var_dump($intance->toArray());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/htuqc
function name:  (null)
number of ops:  9
compiled vars:  !0 = $instance, !1 = $intance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'FooContainer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !1, 'toArray'
          5        DO_FCALL                                      0  $5      
          6        SEND_VAR                                                 $5
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class FooContainer:
Function toarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/htuqc
function name:  toArray
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'get_object_vars'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   12     5*     > RETURN                                                   null

End of function toarray

End of class FooContainer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.24 ms | 1395 KiB | 17 Q