Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

First: this could result in:

  echo $blah; // hi <script>alert('foo');</script>
But maybe it's just because you posted an example...

Second: it will double the memory used.

Third: you can't use the variables global anymore



Like you said, I wouldn't use it without first cleaning the input. I guess I use it more out of habit and preferring a straight variable to an array... just feels neater.

Good point on the memory, but I wouldn't think thats a big issue. I haven't tested right now, but I dont remember ever having issues using the $_GET variable after exporting? Not sure if thats what you meant.


If I am not mistaken, PHP is copy-on-write, so if extract just copy value then memory usage wouldn't be doubling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: