3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} class B { public function __construct() {} } class D { protected function test1($class_name) { echo $class_name, "\n"; return 'BLAH'; } public function test($class_name) { return new $class_name($this->test1($class_name)); } } $D = new D; $D->test('A');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ENJcV
function name:  (null)
number of ops:  7
compiled vars:  !0 = $D
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'D'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, 'test'
          4        SEND_VAL_EX                                              'A'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class A: [no user functions]
Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ENJcV
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function __construct

End of class B.

Class D:
Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ENJcV
function name:  test1
number of ops:  5
compiled vars:  !0 = $class_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        ECHO                                                     !0
          2        ECHO                                                     '%0A'
   15     3      > RETURN                                                   'BLAH'
   16     4*     > RETURN                                                   null

End of function test1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ENJcV
function name:  test
number of ops:  10
compiled vars:  !0 = $class_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        FETCH_CLASS                                   0  $1      !0
          2        NEW                                              $2      $1
          3        INIT_METHOD_CALL                                         'test1'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR_NO_REF_EX                                       $3
          7        DO_FCALL                                      0          
          8      > RETURN                                                   $2
   21     9*     > RETURN                                                   null

End of function test

End of class D.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.98 ms | 1395 KiB | 13 Q