3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { function hello() { echo 'hello'; return $this; } } $x = (new test())->hello()->hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SiE2l
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'hello'
          3        DO_FCALL                                      0  $3      
          4        INIT_METHOD_CALL                                         $3, 'hello'
          5        DO_FCALL                                      0  $4      
          6        ASSIGN                                                   !0, $4
          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/SiE2l
function name:  hello
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'hello'
    8     1        FETCH_THIS                                       ~0      
          2      > RETURN                                                   ~0
    9     3*     > RETURN                                                   null

End of function hello

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.92 ms | 1393 KiB | 13 Q