3v4l.org

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


preferences:
163.84 ms | 1395 KiB | 13 Q