PHPLint Reference Manual
PHP source parser and validator with extended syntax
Version: 0.9_20090802
Copyright 2005-2009 by icosaedro.it di Umberto Salsi
phplint@icosaedro.it
www.icosaedro.it/phplint/
Contents
Introduction
Basic features
Packages
Modules, libraries and programs
Items PHPLint collects from parsed packages
General structure of a package
Importing modules
Importing packages
Namespaces
Terminology
Names and case sensitiveness
The namespace statement
The use statement
Name resolution algorithm
Constants
The define() statement
The const statement
Global variables
Types
How PHPLint enhance the type model of PHP
How PHPLint handle the PHP types
The boolean type
The int type
The float type
The string type
Arrays
The structured array type
Building arrays element-by-element
The array constructor
Control structures
declare()
namespace
use
const
if()
for()
while() and do...while()
foreach()
switch()
try...catch
return
Functions
Returned type
Mandatory arguments
Default arguments
Optional arguments
Passing method for arguments
Examples
Type compatibility
Assignment
Comparison operators
Strict equality operators
Typecasting
Value conversion operators
Type conversion operators
Predefined constants
Predefined superglobal variables
Classes
Introduction
Class constants
Properties
Methods
Methods attributes
Inheritance and methods overriding
Accessing to the methods
Special methods
Abstract classes
Interfaces
Recursive declarations
Function prototypes
Method prototypes
Class prototypes
Errors
Fully handling of errors
Triggering errors and errors inheritance
Mapping errors into exceptions
Exceptions
The Exception base class
Extending Exception
Declaring thrown exceptions
Exceptions and prototypes, methods and inheritance
Detecting the exceptions
Checked exceptions
Unchecked exceptions
May overriding methods throw new exceptions?
PHPLint's Standard Library
Handling errors -- errors.h
Autoloading classes -- autoload.php
The typecast magic function -- cast.php
Include all -- all.php
Autoloading classes
The __autoload() magic function
Resolution schema with namespaces
General form of the autoload pragma
When PHPLint triggers autoloading of class
A more realistic __autoload() function
Definite assignment analysis
The if() statement
The while() statement
The do...while() statement
The foreach() statement
The for() statement
The switch() statement
The try...catch statement
Arguments passed by reference
PHP4 - Classes
New attributes for class items
Class constants
Properties
Methods
Example
Overriding properties
Overriding methods
Special methods
Final classes
Abstract classes
PHP4 - Type conversion operators
Documentator
Usage
Command line options
General options
Error detection options
Format of the report
Exit status
Examples of invocation
How To...
Reserved keywords
PHP keywords
PHPLint keywords
To-do list
Known bugs
Missing features
PHP features intentionally omitted
Other differences
Wish list
Memorandum
Source encoding
Identifiers
Constants
Variables
Functions
Classes
Class::Constants
Class::Variables (aka Properties, aka Members)
Class::Functions (aka Methods)
License
References
The syntax of PHPLint
|