3v4l.org

run code in 300+ PHP versions simultaneously
<?php function newPlayer($wallet) { generate_: { $hash=generateHash(32); } if (mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='$hash' LIMIT 1"))!=0) goto generate_; $alias='Player_'; $alias_i=mysql_fetch_array(mysql_query("SELECT `autoalias_increment` AS `data` FROM `system` LIMIT 1")); $alias_i=$alias_i['data']; mysql_query("UPDATE `system` SET `autoalias_increment`=`autoalias_increment`+1 LIMIT 1"); mysql_query("INSERT INTO `players` (`hash`,`alias`,`time_last_active`,`server_seed`) VALUES ('$hash','".$alias.$alias_i."',NOW(),'".generateServerSeed()."')"); header('Location: ./?unique='.$hash.'# Do Not Share This URL!'); exit(); } newPlayer('sdsd');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7pde
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'newplayer'
          1        SEND_VAL                                                 'sdsd'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function newplayer:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 17
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/d7pde
function name:  newPlayer
number of ops:  50
compiled vars:  !0 = $wallet, !1 = $hash, !2 = $alias, !3 = $alias_i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1    >   INIT_FCALL_BY_NAME                                       'generateHash'
          2        SEND_VAL_EX                                              32
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !1, $4
    7     5        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
          6        INIT_FCALL_BY_NAME                                       'mysql_query'
          7        ROPE_INIT                                     3  ~7      'SELECT+%60id%60+FROM+%60players%60+WHERE+%60hash%60%3D%27'
          8        ROPE_ADD                                      1  ~7      ~7, !1
          9        ROPE_END                                      2  ~6      ~7, '%27+LIMIT+1'
         10        SEND_VAL_EX                                              ~6
         11        DO_FCALL                                      0  $9      
         12        SEND_VAR_NO_REF_EX                                       $9
         13        DO_FCALL                                      0  $10     
         14        IS_NOT_EQUAL                                             $10, 0
         15      > JMPZ                                                     ~11, ->17
         16    > > JMP                                                      ->1
    8    17    >   ASSIGN                                                   !2, 'Player_'
    9    18        INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         19        INIT_FCALL_BY_NAME                                       'mysql_query'
         20        SEND_VAL_EX                                              'SELECT+%60autoalias_increment%60+AS+%60data%60+FROM+%60system%60+LIMIT+1'
         21        DO_FCALL                                      0  $13     
         22        SEND_VAR_NO_REF_EX                                       $13
         23        DO_FCALL                                      0  $14     
         24        ASSIGN                                                   !3, $14
   10    25        FETCH_DIM_R                                      ~16     !3, 'data'
         26        ASSIGN                                                   !3, ~16
   11    27        INIT_FCALL_BY_NAME                                       'mysql_query'
         28        SEND_VAL_EX                                              'UPDATE+%60system%60+SET+%60autoalias_increment%60%3D%60autoalias_increment%60%2B1+LIMIT+1'
         29        DO_FCALL                                      0          
   12    30        INIT_FCALL_BY_NAME                                       'mysql_query'
         31        ROPE_INIT                                     3  ~20     'INSERT+INTO+%60players%60+%28%60hash%60%2C%60alias%60%2C%60time_last_active%60%2C%60server_seed%60%29+VALUES+%28%27'
         32        ROPE_ADD                                      1  ~20     ~20, !1
         33        ROPE_END                                      2  ~19     ~20, '%27%2C%27'
         34        CONCAT                                           ~22     ~19, !2
         35        CONCAT                                           ~23     ~22, !3
         36        CONCAT                                           ~24     ~23, '%27%2CNOW%28%29%2C%27'
         37        INIT_FCALL_BY_NAME                                       'generateServerSeed'
         38        DO_FCALL                                      0  $25     
         39        CONCAT                                           ~26     ~24, $25
         40        CONCAT                                           ~27     ~26, '%27%29'
         41        SEND_VAL_EX                                              ~27
         42        DO_FCALL                                      0          
   13    43        INIT_FCALL                                               'header'
         44        CONCAT                                           ~29     'Location%3A+.%2F%3Funique%3D', !1
         45        CONCAT                                           ~30     ~29, '%23+Do+Not+Share+This+URL%21'
         46        SEND_VAL                                                 ~30
         47        DO_ICALL                                                 
   14    48      > EXIT                                                     
   15    49*     > RETURN                                                   null

End of function newplayer

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.09 ms | 1403 KiB | 16 Q