3v4l.org

run code in 500+ PHP versions simultaneously
<?php final readonly class ObjectCollector { private SplObjectStorage $storage; public function __construct() { $this->storage = new SplObjectStorage(); } public function add(object $object): void { $this->storage->attach($object); } } (new ObjectCollector())->add(new stdClass());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dSpQO
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   NEW                                                  $0      'ObjectCollector'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'add'
          3        NEW                                                  $2      'stdClass'
          4        DO_FCALL                                          0          
          5        SEND_VAR_NO_REF_EX                                           $2
          6        DO_FCALL                                          0          
          7      > RETURN                                                       1

Class ObjectCollector:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dSpQO
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $1      'SplObjectStorage'
          1        DO_FCALL                                          0          
          2        ASSIGN_OBJ                                                   'storage'
          3        OP_DATA                                                      $1
   10     4      > RETURN                                                       null

End of function __construct

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dSpQO
function name:  add
number of ops:  6
compiled vars:  !0 = $object
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
   14     1        FETCH_OBJ_R                                          ~1      'storage'
          2        INIT_METHOD_CALL                                             ~1, 'attach'
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0          
   15     5      > RETURN                                                       null

End of function add

End of class ObjectCollector.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.75 ms | 1583 KiB | 13 Q