3v4l.org

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

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

End of function toarray

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.33 ms | 2673 KiB | 15 Q