PHP Classes

adebug: Check whether variable values match expected types

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 48%Total: 603 All time: 5,179 This week: 455Up
Version License PHP version Categories
adebug 0.0.1GNU Lesser Genera...5.0.0PHP 5, Debug, Testing
Description 

Author

This class can be used to check the values of given PHP variables and verify whether they contain values of the expected types.

It provides many functions that can check whether given values are of the basic PHP types: array, boolean, double, integer and string.

It may also check whether the tested values are objects of a given class or sub-class, a callable function, a valid resource handle, the path of a directory, regular file, executable program, readable or writable file, an uploaded file, or symbolic link, a finite or infinite number, or not a number.

When the values do not match the expected types, the class triggers an error denoting the line and the script file where the check was performed.

Innovation Award
PHP Programming Innovation award nominee
June 2007
Number 10
Sometimes PHP scripts may have bugs that lead them to generate variable values of different types that are expected.

This class can be used to test and debug PHP scripts by inserting checks that verify whether the types the variables that the scripts generate match the expected types.

It may save a lot of time detecting bugs introduced by changes made to different scripts that a site depends.

Manuel Lemos
Picture of Sylvain Rabot
Name: Sylvain Rabot <contact>
Classes: 6 packages by
Country: United States United States
Age: 37
All time rank: 27234 in United States United States
Week rank: 170 Up21 in United States United States Up
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files (1)  
File Role Description
Plain text file adebug.class.php Class main class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:603
This week:0
All time:5,179
This week:455Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:81%StarStarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:48%StarStarStar
Rank:2921