3v4l.org

run code in 500+ PHP versions simultaneously
<?php class a { public $var; function test1() { throw new Exception('...'); } function test2() { echo $this->var; } } $a = new a; $a->var = 'hello, world!'; try { $a->test1(); } catch (Exception $e) { } $a->test2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
filename:       /in/4tNvZ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   NEW                                                  $2      'a'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   16     3        ASSIGN_OBJ                                                   !0, 'var'
          4        OP_DATA                                                      'hello%2C+world%21'
   18     5        INIT_METHOD_CALL                                             !0, 'test1'
          6        DO_FCALL                                          0          
          7      > JMP                                                          ->9
   19     8  E > > CATCH                                           last         'Exception'
   22     9    >   INIT_METHOD_CALL                                             !0, 'test2'
         10        DO_FCALL                                          0          
         11      > RETURN                                                       1

Class a:
Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/4tNvZ
function name:  test1
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   NEW                                                  $0      'Exception'
          1        SEND_VAL_EX                                                  '...'
          2        DO_FCALL                                          0          
          3      > THROW                                             0          $0
    8     4*     > RETURN                                                       null

End of function test1

Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4tNvZ
function name:  test2
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                          ~0      'var'
          1        ECHO                                                         ~0
   12     2      > RETURN                                                       null

End of function test2

End of class a.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.51 ms | 2212 KiB | 13 Q