Home / Section index
 www.icosaedro.it 
PHPLint
Reference
Manual

Contents
Introduction
Basic features
Packages
Importing modules
Importing packages
Autoloading classes
Namespaces
Constants
Predefined constants
Global variables
Predefined superglobals
Types
Arrays
Type compatibility
Typecasting
Classes
Recursive declarations
Control structures
Definite assignment analysis
Functions
Errors
Exceptions
PHPLint's Std. Library
Documentator
Usage
How To...
(PHP4) Classes (PHP4)
(PHP4) Type conversion operators
Reserved keywords
To-do list
Memorandum
License
References
Syntax
=>Introduction




PHPLint Reference Manual

PHP source parser and validator
with extended syntax


Version: 1.1_20120202
Copyright 2012 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

    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

    Namespaces

      Terminology

      Names and case sensitiveness

      The namespace statement

      The use statement

      Name resolution algorithm

    Constants

      The define() statement

      The const statement

    Predefined constants

    Global variables

    Predefined superglobal 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

      Runtime errors accessing arrays

    Type compatibility

      Assignment

      Comparison operators

      Strict equality operators

    Typecasting

      Value conversion operators

      Formal type conversion operators

      The cast(T,V) magic function

    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

    Control structures

      declare()

      namespace

      use

      const

      if()

      for()

      while() and do...while()

      foreach()

      switch()

      try...catch

      return

      break

    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

    Functions

      Returned type

      Mandatory arguments

      Default arguments

      Optional arguments

      Passing method for arguments

      The contract of a function

      Examples

    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

    Documentator

    Usage

      Command line options

        General options

        Error detection options

      Format of the report

      Exit status

      Examples of invocation

    How To...

    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

    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



=>Introduction

Umberto Salsi

Contact
Site map
Home / Section index