3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Entity { class File { private $foo = 'top'; } class FileInbox { public $file; public function setFile(File $file) { $this->file = $file; } } } namespace Entity\FileInbox { class File { private $foo = 'nested'; } } namespace Test { use Entity\FileInbox; $fileInbox = new FileInbox(); var_dump($fileInbox->file->foo); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T4kng
function name:  (null)
number of ops:  10
compiled vars:  !0 = $fileInbox
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'Entity%5CFileInbox'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_NS_FCALL_BY_NAME                                    'Test%5Cvar_dump'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_OBJ_FUNC_ARG                               $4      !0, 'file'
          6        FETCH_OBJ_FUNC_ARG                               $5      $4, 'foo'
          7        SEND_FUNC_ARG                                            $5
          8        DO_FCALL                                      0          
   28     9      > RETURN                                                   1

Class Entity\File: [no user functions]
Class Entity\FileInbox:
Function setfile:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T4kng
function name:  setFile
number of ops:  4
compiled vars:  !0 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'file'
          2        OP_DATA                                                  !0
   13     3      > RETURN                                                   null

End of function setfile

End of class Entity\FileInbox.

Class Entity\FileInbox\File: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
294.05 ms | 1395 KiB | 16 Q