3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test2 { } class test3 { } class test { private $title ='test2'; function aaa() { return new $this->title(); } function bbb() { $title =$this->title(); return (new $this->title())(); } function title() { return 'test3'; } } $t = new test; var_dump($t->aaa()); var_dump($t->bbb()); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YR5Zq
function name:  (null)
number of ops:  14
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'aaa'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   24     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'bbb'
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
   25    13      > RETURN                                                   1

Class test2: [no user functions]
Class test3: [no user functions]
Class test:
Function aaa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YR5Zq
function name:  aaa
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_OBJ_R                                      ~0      'title'
          1        FETCH_CLASS                                   0  $1      ~0
          2        NEW                                              $2      $1
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $2
   13     5*     > RETURN                                                   null

End of function aaa

Function bbb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YR5Zq
function name:  bbb
number of ops:  11
compiled vars:  !0 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_METHOD_CALL                                         'title'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   16     3        FETCH_OBJ_R                                      ~3      'title'
          4        FETCH_CLASS                                   0  $4      ~3
          5        NEW                                              $5      $4
          6        DO_FCALL                                      0          
          7        INIT_DYNAMIC_CALL                                        $5
          8        DO_FCALL                                      0  $7      
          9      > RETURN                                                   $7
   17    10*     > RETURN                                                   null

End of function bbb

Function title:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YR5Zq
function name:  title
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E > > RETURN                                                   'test3'
   20     1*     > RETURN                                                   null

End of function title

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.53 ms | 1400 KiB | 15 Q