Login   Register  
PHP Classes
elePHPant
Icontem

PHP Register Globals Logger: Log the usage of registered global variables

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-01-16 (11 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 173 All time: 7,445 This week: 1,311Up
Version License PHP version Categories  
registergloballogger 1.0.1MIT/X Consortium License5.2.1PHP 5, Logging, Language
Description Author  

This class can log the usage of registered global variables.

It takes the values of all variables that would be assigned to global variables when register_globals is enables and initialize those global variables to objects of the class.

The class returns the original registered values but also logs the accesses to the global variables to help legacy applications find and fix old code that accesses registered global variables when register_globals option is on.

Innovation Award  
PHP Programming Innovation award nominee
December 2013
Number 7
The register_globals option was removed from PHP 5.4 after several years of being discouraged.

However, there are always legacy applications that still rely on the register globals functionality.

This class not only can emulate the register globals option functionality, but it can also log the parts of the code of legacy applications that still rely on this feature, thus helping the developers to find and fix their code.

Manuel Lemos
Picture of Matthew Daniel
Name: Matthew Daniel <contact>
Classes: 3 packages by
Country: United States United States
Age: 34
All time rank: 2551323 in United States United States
Week rank: 1555 Up178 in United States United States Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file class_globallogger.php Class register and log registered_globals usage
Accessible without login Plain text file example.php Example example usage of global logger

 Version Control Unique User Downloads Download Rankings  
 0%Total:173All time:7,445
 This week:0This week:1,311Up