I know this has already been discussed multiple times here but I would like to further and clear understanding why it's bad practice to use global variables. Does it becomes dangerous on the concurrent http requests? if this is the code:
<?php
$variable1 = $_REQUEST['userinput'];
sleep(3000);
echo $variable1;
?>
if there are users like user1, user2.. if user1's input is 'request1' and user2's input is 'request2' that is passed to $_REQUEST['userinput'] variable, then concurrent sending of requests happens, will the echoed $variable1 be displayed as what the respective users have input to their browser or it will override the first user's input by the last user's input? apologies for my poorly written post and for this repeated inquiry. I just like to have clear understanding about global variables.