3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $baz = 'foobar'; public function bar() { self::functionName(); $this->functionName(); } public function functionName() { echo $this->baz . "\n"; } } $f = new Foo(); $f->bar(); $f::functionName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8srKc
function name:  (null)
number of ops:  9
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   21     5        FETCH_CLASS                                   0  $5      !0
          6        INIT_STATIC_METHOD_CALL                                  $5, 'functionName'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8srKc
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_STATIC_METHOD_CALL                                  'functionName'
          1        DO_FCALL                                      0          
   10     2        INIT_METHOD_CALL                                         'functionName'
          3        DO_FCALL                                      0          
   11     4      > RETURN                                                   null

End of function bar

Function functionname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8srKc
function name:  functionName
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'baz'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   16     3      > RETURN                                                   null

End of function functionname

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.34 ms | 1394 KiB | 13 Q