3v4l.org

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

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

End of function func

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.92 ms | 1399 KiB | 15 Q