3v4l.org

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

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

End of function bla

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

End of function hello

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.47 ms | 1402 KiB | 14 Q