3v4l.org

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

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

End of function bar

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

End of function baz

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

End of function bat

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.51 ms | 1395 KiB | 13 Q