3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function testing($var) { if ($var == 'test') { throw new Exception('broke'); } return true; } } $test = new Test(); try { var_dump($test->testing('test')); } catch (Exception $e) { echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6LFYJ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $test, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   16     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'testing'
          5        SEND_VAL_EX                                              'test'
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
          9      > JMP                                                      ->14
   17    10  E > > CATCH                                       last         'Exception'
   18    11    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         12        DO_FCALL                                      0  $7      
         13        ECHO                                                     $7
   19    14    > > RETURN                                                   1

Class Test:
Function testing:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6LFYJ
function name:  testing
number of ops:  9
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        IS_EQUAL                                                 !0, 'test'
          2      > JMPZ                                                     ~1, ->7
    6     3    >   NEW                                              $2      'Exception'
          4        SEND_VAL_EX                                              'broke'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
    9     7    > > RETURN                                                   <true>
   10     8*     > RETURN                                                   null

End of function testing

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.67 ms | 1388 KiB | 15 Q