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->retorno = 'mensagem!'; } } public function response($e) { echo $this->retorno; } public function __destruct() { $this->response(); } } $a = new a; $a->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a8LnB
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > 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/a8LnB
function name:  test
number of ops:  9
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                                                      ->8
   11     5  E > > CATCH                                       last         'Exception'
   12     6    >   ASSIGN_OBJ                                               'retorno'
          7        OP_DATA                                                  'mensagem%21'
   14     8      > 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/a8LnB
function name:  response
number of ops:  4
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        FETCH_OBJ_R                                      ~1      'retorno'
          2        ECHO                                                     ~1
   19     3      > RETURN                                                   null

End of function response

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a8LnB
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_METHOD_CALL                                         'response'
          1        DO_FCALL                                      0          
   24     2      > RETURN                                                   null

End of function __destruct

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.69 ms | 1395 KiB | 13 Q