3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Generic\Space { function bar() { echo "bar over here!"; } } namespace Some\Other { class Foo { use \My\TraitSpace\NiceTrait; function baz() { $method = new \ReflectionMethod('Some\Other\Foo', 'bar'); $method->setAccessible(false); } } } namespace My\TraitSpace { use \Generic\Space; trait NiceTrait { function bar() { echo "within the trait!"; } } } namespace { $foo = new Some\Other\Foo(); $foo->baz(); $foo->bar(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2HBIJ
function name:  (null)
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                            'some%5Cother%5Cfoo'
   34     1        NEW                                              $1      'Some%5COther%5CFoo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   35     4        INIT_METHOD_CALL                                         !0, 'baz'
          5        DO_FCALL                                      0          
   36     6        INIT_METHOD_CALL                                         !0, 'bar'
          7        DO_FCALL                                      0          
   38     8      > RETURN                                                   1

Function generic%5Cspace%5Cbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2HBIJ
function name:  Generic\Space\bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'bar+over+here%21'
          1      > RETURN                                                   null

End of function generic%5Cspace%5Cbar

Class Some\Other\Foo:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2HBIJ
function name:  baz
number of ops:  9
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'Some%5COther%5CFoo'
          2        SEND_VAL_EX                                              'bar'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   18     5        INIT_METHOD_CALL                                         !0, 'setAccessible'
          6        SEND_VAL_EX                                              <false>
          7        DO_FCALL                                      0          
   19     8      > RETURN                                                   null

End of function baz

End of class Some\Other\Foo.

Class My\TraitSpace\NiceTrait:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2HBIJ
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   ECHO                                                     'within+the+trait%21'
          1      > RETURN                                                   null

End of function bar

End of class My\TraitSpace\NiceTrait.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.71 ms | 1395 KiB | 13 Q