3v4l.org

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

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

End of function toarray

End of class ValueObject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.92 ms | 1011 KiB | 15 Q