3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try{ $a = new class { public function func():self{return "";} }; (null)->getSome(); //$res = $a->func(); var_dump($res); }catch(Throwable $ex){ echo "Catched error" .$ex->getMessage(); }
based on OChJ3
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 15
Branch analysis from position: 15
Jump found. Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
Jump found. Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
Jump found. Position 1 = -2
filename:       /in/CvhoA
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $res, !2 = $ex
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   <171>                                            $3      'class%40anonymous%00%2Fin%2Fcvhoa0x7fa2e012e051'
         1        NEW                                              $4      :3
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $4
   7     4        INIT_METHOD_CALL                                         null, 'getSome'
         5        DO_FCALL                                      0          
  10     6        INIT_FCALL                                               'var_dump'
         7        SEND_VAR                                                 !1
         8        DO_ICALL                                                 
         9      > JMP                                                      ->15
  11    10  E > > CATCH                                                    'Throwable', !2
  12    11    >   INIT_METHOD_CALL                                         !2, 'getMessage'
        12        DO_FCALL                                      0  $9      
        13        CONCAT                                           ~10     'Catched+error', $9
        14        ECHO                                                     ~10
        15    > > RETURN                                                   1

Class class@anonymous:
Function func:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/CvhoA
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 7.1.0