3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generate_alpha_num_id($x){ return 0+$x; // add zero to convert strings to integers (effectively trimming leading zeros) } echo generate_alpha_num_id(010100001); // send parameter as 2129921 base 8 (octal) echo "\n---\n"; echo generate_alpha_num_id('010100001'); // send parameter as string to avoid octal interpretation
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fNOtR
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'generate_alpha_num_id'
          1        SEND_VAL                                                 2129921
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
    7     4        ECHO                                                     '%0A---%0A'
    9     5        INIT_FCALL                                               'generate_alpha_num_id'
          6        SEND_VAL                                                 '010100001'
          7        DO_FCALL                                      0  $1      
          8        ECHO                                                     $1
          9      > RETURN                                                   1

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

End of function generate_alpha_num_id

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.27 ms | 1010 KiB | 15 Q