3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ public function foo() { return "Hello, World!"; } public function bar() { return $this; } } function createFoo(){ return new Foo(); } echo createFoo()->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YmR1m
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'createfoo'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'foo'
          3        DO_FCALL                                      0  $1      
          4        ECHO                                                     $1
          5      > RETURN                                                   1

Function createfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YmR1m
function name:  createFoo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   17     3*     > RETURN                                                   null

End of function createfoo

Class Foo:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YmR1m
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'Hello%2C+World%21'
    7     1*     > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YmR1m
function name:  bar
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_THIS                                       ~0      
          1      > RETURN                                                   ~0
   12     2*     > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.05 ms | 1398 KiB | 14 Q