3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo(int $bar) { var_dump($bar); } foo(7); foo(7.0); foo(7.1); foo(7.9); foo('7'); try { foo('7even'); } catch(\Error $e) { echo $e->getMessage() . PHP_EOL; } try { foo('seven'); } catch(\Error $e) { echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 19
Branch analysis from position: 19
2 jumps found. (Code = 107) Position 1 = 20, Position 2 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Found catch point at position: 28
Branch analysis from position: 28
2 jumps found. (Code = 107) Position 1 = 29, Position 2 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bIF5F
function name:  (null)
number of ops:  33
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                                   'foo'
          1        SEND_VAL                                                     7
          2        DO_FCALL                                          0          
    6     3        INIT_FCALL                                                   'foo'
          4        SEND_VAL                                                     7
          5        DO_FCALL                                          0          
    7     6        INIT_FCALL                                                   'foo'
          7        SEND_VAL                                                     7.1
          8        DO_FCALL                                          0          
    8     9        INIT_FCALL                                                   'foo'
         10        SEND_VAL                                                     7.9
         11        DO_FCALL                                          0          
    9    12        INIT_FCALL                                                   'foo'
         13        SEND_VAL                                                     '7'
         14        DO_FCALL                                          0          
   11    15        INIT_FCALL                                                   'foo'
         16        SEND_VAL                                                     '7even'
         17        DO_FCALL                                          0          
         18      > JMP                                                          ->24
   12    19  E > > CATCH                                           last         'Error'
   13    20    >   INIT_METHOD_CALL                                             !0, 'getMessage'
         21        DO_FCALL                                          0  $7      
         22        CONCAT                                               ~8      $7, '%0A'
         23        ECHO                                                         ~8
   16    24    >   INIT_FCALL                                                   'foo'
         25        SEND_VAL                                                     'seven'
         26        DO_FCALL                                          0          
         27      > JMP                                                          ->32
   17    28  E > > CATCH                                           last         'Error'
   18    29    >   INIT_METHOD_CALL                                             !0, 'getMessage'
         30        DO_FCALL                                          0  $10     
         31        ECHO                                                         $10
   19    32    > > RETURN                                                       1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
181.49 ms | 1921 KiB | 21 Q