3v4l.org

run code in 300+ PHP versions simultaneously
<?php function VADAC() { class A { public function getName() { return "Hello"; } } class B { public function setName() { return "World"; } } $object = new stdClass(); $object->One = new A; $object->Two = new B; return $object; } $name = VADAC(); var_dump($name->One->getName());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0YVC
function name:  (null)
number of ops:  10
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                               'vadac'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   25     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~3      !0, 'One'
          5        INIT_METHOD_CALL                                         ~3, 'getName'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function vadac:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0YVC
function name:  VADAC
number of ops:  15
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'a'
   11     1        DECLARE_CLASS                                            'b'
   17     2        NEW                                              $1      'stdClass'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   18     5        NEW                                              $5      'A'
          6        DO_FCALL                                      0          
          7        ASSIGN_OBJ                                               !0, 'One'
          8        OP_DATA                                                  $5
   19     9        NEW                                              $8      'B'
         10        DO_FCALL                                      0          
         11        ASSIGN_OBJ                                               !0, 'Two'
         12        OP_DATA                                                  $8
   20    13      > RETURN                                                   !0
   21    14*     > RETURN                                                   null

End of function vadac

Class A:
Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0YVC
function name:  getName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'Hello'
    8     1*     > RETURN                                                   null

End of function getname

End of class A.

Class B:
Function setname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0YVC
function name:  setName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   'World'
   15     1*     > RETURN                                                   null

End of function setname

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.17 ms | 1398 KiB | 16 Q