3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ElasticSearch { class Thing { public function tmp (){ echo 'ElasticSearch';} } } namespace Elasticsearch { class Thing { public function tmp (){ echo 'Elasticsearch';} } class Builder { public function thing() { return new Thing; } } } namespace { $class = new ElasticSearch\Thing; $builder = new Elasticsearch\Builder; echo $builder->thing->tmp(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mn9jq
function name:  (null)
number of ops:  12
compiled vars:  !0 = $class, !1 = $builder
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'elasticsearch%5Cthing'
   20     1        NEW                                              $2      'ElasticSearch%5CThing'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   21     4        NEW                                              $5      'Elasticsearch%5CBuilder'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   23     7        FETCH_OBJ_R                                      ~8      !1, 'thing'
          8        INIT_METHOD_CALL                                         ~8, 'tmp'
          9        DO_FCALL                                      0  $9      
         10        ECHO                                                     $9
   24    11      > RETURN                                                   1

Class ElasticSearch\Thing:
Function tmp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mn9jq
function name:  tmp
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'ElasticSearch'
          1      > RETURN                                                   null

End of function tmp

End of class ElasticSearch\Thing.

Class Elasticsearch\Thing:
Function tmp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mn9jq
function name:  tmp
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'Elasticsearch'
          1      > RETURN                                                   null

End of function tmp

End of class Elasticsearch\Thing.

Class Elasticsearch\Builder:
Function thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mn9jq
function name:  thing
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $0      'Elasticsearch%5CThing'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function thing

End of class Elasticsearch\Builder.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.26 ms | 1395 KiB | 13 Q