News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Introducing Superglobals
September 30, 2011 @ 08:43:43

PHPMaster.com is back with another introductory tutorial for those new to the PHP language. It's a look at one of the most commonly used (sometimes badly) features of the language - superglobal variables.

Superglobals are specially-defined array variables in PHP that make it easy for you to get information about a request or its context. They are called superglobal because they are always accessible, regardless of the scope - that is, you can access them from any function, class or file without having to do anything special. The superglobal variables are: $GLOBALS, $_SERVER, $_GET, $_POST, $_FILES, $_COOKIE, $_SESSION, $_REQUEST and $_ENV. And while you can learn more about each by reading the PHP documentation, I'd like to show you the ones I think you're likely use the most.

He goes through some of the major ones and explains what kind of situations they can be used in and what data would be inside - $_POST, $_GET, $_SESSION and $_SERVER.

0 comments voice your opinion now!
superglobal tutorial introduction


blog comments powered by Disqus

Similar Posts

CodeIgniter Blog: CodeIgniter Community Voice - HOWTO: Set up a CodeIgniter project in Subversion

SitePoint PHP Blog: 5 Easy Ways to Get Started with PHP on Vagrant

RosSoft Blog: Tutorial - Web based search engine for Flickr

ServerGrove Blog: Symfony2 components overview: Finder

DevShed: Using Static Methods to Validate Data with Helpers in PHP 5


Community Events





Don't see your event here?
Let us know!


symfony install list opinion release voicesoftheelephpant tips laravel podcast series package framework language bugfix api community introduction interview deployment library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework