3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function Bar() { return new Baz(); } } class Baz { public function foo() { return $this; } public function baz() { return $this; } } Foo::foo()->baz();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TLI1M
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'foo'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'baz'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function bar

End of class Foo.

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

End of function foo

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

End of function baz

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.07 ms | 1394 KiB | 13 Q