3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $retorno; public function test() { try { throw new Exception('Error!'); } catch(Exception $e) { $this->response($e); } } public function response($e) { echo $e->getMessage(); } } //call_user_func(array($a, 'test')); // a->test() normal call_user_func(array(a::class, 'test')); // a::test() static // $a = new a; // $a->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8BuMb
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_USER_CALL                                0          'call_user_func', <array>
          1        DO_FCALL                                      0          
   25     2      > RETURN                                                   1

Class a:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8BuMb
function name:  test
number of ops:  10
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Exception'
          1        SEND_VAL_EX                                              'Error%21'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $1
          4*       JMP                                                      ->9
   11     5  E > > CATCH                                       last         'Exception'
   12     6    >   INIT_METHOD_CALL                                         'response'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
   14     9      > RETURN                                                   null

End of function test

Function response:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8BuMb
function name:  response
number of ops:  5
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        INIT_METHOD_CALL                                         !0, 'getMessage'
          2        DO_FCALL                                      0  $1      
          3        ECHO                                                     $1
   19     4      > RETURN                                                   null

End of function response

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.42 ms | 1394 KiB | 13 Q