3v4l.org

run code in 500+ PHP versions simultaneously
<?php function func(string $foo){ } try { func(null); } catch (Error $e){ echo $e->getMessage()."\n"; } try { func(array()); } catch (Error $e){ echo $e->getMessage()."\n"; } try { func((object)array()); } catch (Error $e){ echo $e->getMessage()."\n"; } try { func(fopen("php://stdout", "w")); } 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 = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
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 = 42) Position 1 = 28
Branch analysis from position: 28
Found catch point at position: 23
Branch analysis from position: 23
2 jumps found. (Code = 107) Position 1 = 24, Position 2 = -2
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Found catch point at position: 36
Branch analysis from position: 36
2 jumps found. (Code = 107) Position 1 = 37, Position 2 = -2
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WZdQC
function name:  (null)
number of ops:  42
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'func'
          1        SEND_VAL                                                     null
          2        DO_FCALL                                          0          
          3      > JMP                                                          ->9
    9     4  E > > CATCH                                           last         'Error'
   10     5    >   INIT_METHOD_CALL                                             !0, 'getMessage'
          6        DO_FCALL                                          0  $2      
          7        CONCAT                                               ~3      $2, '%0A'
          8        ECHO                                                         ~3
   14     9    >   INIT_FCALL                                                   'func'
         10        SEND_VAL                                                     <array>
         11        DO_FCALL                                          0          
         12      > JMP                                                          ->18
   15    13  E > > CATCH                                           last         'Error'
   16    14    >   INIT_METHOD_CALL                                             !0, 'getMessage'
         15        DO_FCALL                                          0  $5      
         16        CONCAT                                               ~6      $5, '%0A'
         17        ECHO                                                         ~6
   20    18    >   INIT_FCALL                                                   'func'
         19        CAST                                              8  ~7      <array>
         20        SEND_VAL                                                     ~7
         21        DO_FCALL                                          0          
         22      > JMP                                                          ->28
   21    23  E > > CATCH                                           last         'Error'
   22    24    >   INIT_METHOD_CALL                                             !0, 'getMessage'
         25        DO_FCALL                                          0  $9      
         26        CONCAT                                               ~10     $9, '%0A'
         27        ECHO                                                         ~10
   26    28    >   INIT_FCALL                                                   'func'
         29        INIT_FCALL                                                   'fopen'
         30        SEND_VAL                                                     'php%3A%2F%2Fstdout'
         31        SEND_VAL                                                     'w'
         32        DO_ICALL                                             $11     
         33        SEND_VAR                                                     $11
         34        DO_FCALL                                          0          
         35      > JMP                                                          ->41
   27    36  E > > CATCH                                           last         'Error'
   28    37    >   INIT_METHOD_CALL                                             !0, 'getMessage'
         38        DO_FCALL                                          0  $13     
         39        CONCAT                                               ~14     $13, '%0A'
         40        ECHO                                                         ~14
   29    41    > > RETURN                                                       1

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

End of function func

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.59 ms | 3473 KiB | 18 Q