search

Home  >  Q&A  >  body text

What is the result of reading external variables through $GLOBLAS? The output is 100, not 110.

<?php
$one = 10;
function demo(){
$two = 100;
$result = $two $GLOBALS['one'];
return $result;
}
//You will find that the result becomes 110
echo demo();

?>

肥宅+solo肥宅+solo2131 days ago987

reply all(0)I'll reply

No reply
  • Cancelreply