3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(int $a, string $b) { } try { test(1); } catch (Error $e) { echo $e->getMessage() . "\n"; } try { test('test'); } catch (Error $e) { echo $e->getMessage() . "\n"; }
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 = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Found catch point at position: 13
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X53qH
function name:  (null)
number of ops:  19
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 1
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->9
    8     4  E > > CATCH                                       last         'Error'
          5    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          6        DO_FCALL                                      0  $2      
          7        CONCAT                                           ~3      $2, '%0A'
          8        ECHO                                                     ~3
   11     9    >   INIT_FCALL                                               'test'
         10        SEND_VAL                                                 'test'
         11        DO_FCALL                                      0          
         12      > JMP                                                      ->18
   12    13  E > > CATCH                                       last         'Error'
         14    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         15        DO_FCALL                                      0  $5      
         16        CONCAT                                           ~6      $5, '%0A'
         17        ECHO                                                     ~6
         18    > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X53qH
function name:  test
number of ops:  3
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.2 ms | 1399 KiB | 15 Q