3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test{ public function test($param){ if(10 == $param){ throw new Exception('The api key must be a string and not empty'); } } } try {$test = new Test(); for($i=0;$i<10;$i++){ $test->test($i); } } catch (Exception $e) { die($e->getMessage()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 6
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 6
Branch analysis from position: 13
Branch analysis from position: 6
Found catch point at position: 14
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/3m0Ye
function name:  (null)
number of ops:  19
compiled vars:  !0 = $test, !1 = $i, !2 = $e
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
  12     1        NEW                                              $4      :-5
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $4
  13     4        ASSIGN                                                   !1, 0
         5      > JMP                                                      ->11
  14     6    >   INIT_METHOD_CALL                                         !0, 'test'
         7        SEND_VAR_EX                                              !1
         8        DO_FCALL                                      0          
  13     9        POST_INC                                         ~9      !1
        10        FREE                                                     ~9
        11    >   IS_SMALLER                                       ~10     !1, 10
        12      > JMPNZ                                                    ~10, ->6
        13    > > JMP                                                      ->18
  16    14  E > > CATCH                                                    'Exception', !2
  17    15    >   INIT_METHOD_CALL                                         !2, 'getMessage'
        16        DO_FCALL                                      0  $11     
        17      > EXIT                                                     $11
  18    18    > > RETURN                                                   1

Class Test:
Function test:
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/3m0Ye
function name:  test
number of ops:  8
compiled vars:  !0 = $param
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   RECV                                             !0      
   4     1        IS_EQUAL                                         ~1      10, !0
         2      > JMPZ                                                     ~1, ->7
   5     3    >   NEW                                              $2      :-4
         4        SEND_VAL_EX                                              'The+api+key+must+be+a+string+and+not+empty'
         5        DO_FCALL                                      0          
         6      > THROW                                         0          $2
   7     7    > > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 7.3.0