3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Foo { use function random_int; var_dump(random_int(1, 100)); var_dump(\random_int(1, 100)); } namespace Foo { function random_int(int $min, int $max) : int { return 4; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cR6Gg
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_NS_FCALL_BY_NAME                                        'Foo%5Cvar_dump'
          1        INIT_FCALL                                                   'random_int'
          2        SEND_VAL                                                     1
          3        SEND_VAL                                                     100
          4        DO_ICALL                                             $0      
          5        SEND_VAR_NO_REF_EX                                           $0
          6        DO_FCALL                                          0          
    5     7        INIT_NS_FCALL_BY_NAME                                        'Foo%5Cvar_dump'
          8        INIT_FCALL                                                   'random_int'
          9        SEND_VAL                                                     1
         10        SEND_VAL                                                     100
         11        DO_ICALL                                             $2      
         12        SEND_VAR_NO_REF_EX                                           $2
         13        DO_FCALL                                          0          
   12    14      > RETURN                                                       1

Function foo%5Crandom_int:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cR6Gg
function name:  Foo\random_int
number of ops:  5
compiled vars:  !0 = $min, !1 = $max
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   10     2      > RETURN                                                       4
   11     3*       VERIFY_RETURN_TYPE                                           
          4*     > RETURN                                                       null

End of function foo%5Crandom_int

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
186.76 ms | 1254 KiB | 15 Q