3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stuff(int $i, string $s, float $f, Point $p, int $m = 0) {} try { str_replace(1); } catch(ArgumentCountError $e) { echo $e->getMessage(), PHP_EOL; } try { stuff(1); } catch(ArgumentCountError $e) { echo $e->getMessage(), PHP_EOL; }
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/3G8EO
function name:  (null)
number of ops:  19
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'str_replace'
          1        SEND_VAL                                                 1
          2        DO_ICALL                                                 
          3      > JMP                                                      ->9
    7     4  E > > CATCH                                       last         'ArgumentCountError'
    8     5    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          6        DO_FCALL                                      0  $2      
          7        ECHO                                                     $2
          8        ECHO                                                     '%0A'
   11     9    >   INIT_FCALL                                               'stuff'
         10        SEND_VAL                                                 1
         11        DO_FCALL                                      0          
         12      > JMP                                                      ->18
   12    13  E > > CATCH                                       last         'ArgumentCountError'
   13    14    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         15        DO_FCALL                                      0  $4      
         16        ECHO                                                     $4
         17        ECHO                                                     '%0A'
   14    18    > > RETURN                                                   1

Function stuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3G8EO
function name:  stuff
number of ops:  6
compiled vars:  !0 = $i, !1 = $s, !2 = $f, !3 = $p, !4 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV_INIT                                        !4      0
          5      > RETURN                                                   null

End of function stuff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.06 ms | 1008 KiB | 15 Q