3v4l.org

run code in 300+ PHP versions simultaneously
<?php try{ $a = new class { public function func():self{return "";} }; $res = $a->func(); var_dump($res); }catch(Throwable $ex){ echo "Catched error" .$ex->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 11
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OChJ3
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $res, !2 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $4      $3
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    7     4        INIT_METHOD_CALL                                         !0, 'func'
          5        DO_FCALL                                      0  $7      
          6        ASSIGN                                                   !1, $7
    8     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > JMP                                                      ->16
    9    11  E > > CATCH                                       last         'Throwable'
   10    12    >   INIT_METHOD_CALL                                         !2, 'getMessage'
         13        DO_FCALL                                      0  $10     
         14        CONCAT                                           ~11     'Catched+error', $10
         15        ECHO                                                     ~11
   11    16    > > 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/OChJ3
function name:  func
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   VERIFY_RETURN_TYPE                               ~0      ''
          1      > RETURN                                                   ~0
          2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function func

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.16 ms | 1387 KiB | 15 Q