3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function bar() { return $this; } public function foo() { return $this; } } $a = new A(); $a->foo()->bar()->foo()->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4rOMC
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0  $4      
          5        INIT_METHOD_CALL                                         $4, 'bar'
          6        DO_FCALL                                      0  $5      
          7        INIT_METHOD_CALL                                         $5, 'foo'
          8        DO_FCALL                                      0  $6      
          9        INIT_METHOD_CALL                                         $6, 'foo'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

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

End of function bar

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4rOMC
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

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.85 ms | 1394 KiB | 13 Q