3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject\ClassB; class B { public $something; public function __construct() { $this->something = "Some (dynamic) string value"; } public function getStr() { echo $this->something; } } namespace MyProject\ClassA; use \MyProject\ClassB\B as B; class A { private $privateVariable; public function __construct() { $b = new B(); $this->privateVariable = $b->something; $b->getStr(); } } namespace MyProject\Something; use \MyProject\ClassA\A as A; $a = new A();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/464G5
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   47     0  E >   NEW                                              $1      'MyProject%5CClassA%5CA'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class MyProject\ClassB\B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/464G5
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN_OBJ                                               'something'
          1        OP_DATA                                                  'Some+%28dynamic%29+string+value'
   15     2      > RETURN                                                   null

End of function __construct

Function getstr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/464G5
function name:  getStr
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'something'
          1        ECHO                                                     ~0
   19     2      > RETURN                                                   null

End of function getstr

End of class MyProject\ClassB\B.

Class MyProject\ClassA\A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/464G5
function name:  __construct
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   NEW                                              $1      'MyProject%5CClassB%5CB'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   36     3        FETCH_OBJ_R                                      ~5      !0, 'something'
          4        ASSIGN_OBJ                                               'privateVariable'
          5        OP_DATA                                                  ~5
   37     6        INIT_METHOD_CALL                                         !0, 'getStr'
          7        DO_FCALL                                      0          
   39     8      > RETURN                                                   null

End of function __construct

End of class MyProject\ClassA\A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.04 ms | 1008 KiB | 13 Q