3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function hello() { echo "Hello"; return $this; } public function bye() { echo "Bye"; return $this; } } $test = (new Test)->hello(); $test->hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MgZdd
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'hello'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !0, $3
   15     5        INIT_METHOD_CALL                                         !0, 'hello'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function hello

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

End of function bye

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.38 ms | 1393 KiB | 13 Q