3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (is_int(0x7FFFFFFF + 1)) { function foo() { return sprintf( "%15x%01x", mt_rand(0, 0xFFFFFFFFFFFFFFF), mt_rand(0, 0xF) ); } } else { function foo() { return sprintf( "%07x%07x%02x", mt_rand(0, 0xFFFFFFF), mt_rand(0, 0xFFFFFFF), mt_rand(0, 0xFF) ); } } foreach (range(1, 5) as $i) { echo foo(), "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
Branch analysis from position: 16
filename:       /in/6m6Id
function name:  (null)
number of ops:  18
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   TYPE_CHECK                                   16          2147483648
          1      > JMPZ                                                     ~1, ->4
    3     2    >   DECLARE_FUNCTION                                         'foo'
    9     3      > JMP                                                      ->5
   12     4    >   DECLARE_FUNCTION                                         'foo'
   22     5    >   INIT_FCALL                                               'range'
          6        SEND_VAL                                                 1
          7        SEND_VAL                                                 5
          8        DO_ICALL                                         $2      
          9      > FE_RESET_R                                       $3      $2, ->16
         10    > > FE_FETCH_R                                               $3, !0, ->16
   23    11    >   INIT_FCALL_BY_NAME                                       'foo'
         12        DO_FCALL                                      0  $4      
         13        ECHO                                                     $4
         14        ECHO                                                     '%0A'
   22    15      > JMP                                                      ->10
         16    >   FE_FREE                                                  $3
   24    17      > RETURN                                                   1

Function %00foo%2Fin%2F6m6Id%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6m6Id
function name:  foo
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'sprintf'
    5     1        SEND_VAL                                                 '%2515x%2501x'
    6     2        INIT_FCALL                                               'mt_rand'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 1152921504606846975
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
    7     7        INIT_FCALL                                               'mt_rand'
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 15
         10        DO_ICALL                                         $1      
         11        SEND_VAR                                                 $1
         12        DO_ICALL                                         $2      
         13      > RETURN                                                   $2
    9    14*     > RETURN                                                   null

End of function %00foo%2Fin%2F6m6Id%3A3%240

Function %00foo%2Fin%2F6m6Id%3A12%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6m6Id
function name:  foo
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'sprintf'
   14     1        SEND_VAL                                                 '%2507x%2507x%2502x'
   15     2        INIT_FCALL                                               'mt_rand'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 268435455
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
   16     7        INIT_FCALL                                               'mt_rand'
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 268435455
         10        DO_ICALL                                         $1      
         11        SEND_VAR                                                 $1
   17    12        INIT_FCALL                                               'mt_rand'
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 255
         15        DO_ICALL                                         $2      
         16        SEND_VAR                                                 $2
         17        DO_ICALL                                         $3      
         18      > RETURN                                                   $3
   19    19*     > RETURN                                                   null

End of function %00foo%2Fin%2F6m6Id%3A12%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.9 ms | 1400 KiB | 19 Q