PHP_CompatInfo
[ class tree: PHP_CompatInfo ] [ index: PHP_CompatInfo ] [ all elements ]

Class: PHP_CompatInfo

Source Location: /PHP_CompatInfo-1.7.0b3/CompatInfo.php

Class Overview


Check Compatibility of chunk of PHP code


Author(s):

Version:

  • Release: 1.7.0b3

Copyright:

  • 2003 Davey Shafik and Synaptic Media. All Rights Reserved.

Variables

Methods


Child classes:

PHP_CompatInfo_Cli
CLI Script to Check Compatibility of chunk of PHP code

Inherited Variables

Inherited Methods


Class Details

[line 60]
Check Compatibility of chunk of PHP code


[ Top ]


Class Variables

$earliest_version =  ''

[line 71]

  • Var: Last version of PHP to use

Type:   string


[ Top ]

$latest_version =  '3.0.0'

[line 66]

  • Var: Earliest version of PHP to use
  • Since: 0.7.0

Type:   string


[ Top ]

$recurse_dir =  true

[line 77]

  • Var: Toggle parseDir recursion
  • Since: 0.7.0

Type:   boolean


[ Top ]



Method Detail

loadVersion   [line 471]

array loadVersion( string $min, [string|boolean $max = false], [boolean $include_const = false])

Load components list

Load components list for a PHP version or subset

  • Return: An array of php function/constant names to ignore
  • Since: version 1.2.0 (2006-08-23)
  • Access: public

Parameters:

string   $min   —  PHP minimal version
string|boolean   $max   —  (optional) PHP maximal version
boolean   $include_const   —  (optional) include constants list in final result

[ Top ]

parseArray   [line 357]

array|false parseArray( array $files, [array $options = array()])

Parse an Array of Files

You can parse an array of Files or Strings, to parse strings, $options['is_string'] must be set to true

  • Since: version 0.7.0 (2004-03-09)
  • Access: public

Parameters:

array   $files   —  Array of file names or code strings
array   $options   —  An array of options where:
  • 'file_ext' Contains an array of file extensions to parse for PHP code. Default: php, php4, inc, phtml
  • 'debug' Contains a boolean to control whether extra ouput is shown.
  • 'ignore_functions' Contains an array of functions to ignore when calculating the version needed.
  • 'ignore_constants' Contains an array of constants to ignore when calculating the version needed.
  • 'ignore_files' Contains an array of files to ignore. File names are case insensitive.
  • 'is_string' Contains a boolean which says if the array values are strings or file names.
  • 'ignore_extensions' Contains an array of php extensions to ignore when calculating the version needed.
  • 'ignore_versions' Contains an array of php versions to ignore when calculating the version needed.
  • 'ignore_functions_match' Contains an array of function patterns to ignore when calculating the version needed.
  • 'ignore_extensions_match' Contains an array of extension patterns to ignore when calculating the version needed.
  • 'ignore_constants_match' Contains an array of constant patterns to ignore when calculating the version needed.

[ Top ]

parseDir   [line 193]

array|false parseDir( string $dir, [array $options = array()])

Parse a directory

Parse a directory recursively for its compatibility info


Parameters:

string   $dir   —  Path of folder to parse
array   $options   —  An array of options where:
  • 'file_ext' Contains an array of file extensions to parse for PHP code. Default: php, php4, inc, phtml
  • 'recurse_dir' Boolean on whether to recursively find files
  • 'debug' Contains a boolean to control whether extra ouput is shown.
  • 'ignore_functions' Contains an array of functions to ignore when calculating the version needed.
  • 'ignore_constants' Contains an array of constants to ignore when calculating the version needed.
  • 'ignore_files' Contains an array of files to ignore. File names are case insensitive.
  • 'ignore_dirs' Contains an array of directories to ignore. Directory names are case insensitive.
  • 'ignore_extensions' Contains an array of php extensions to ignore when calculating the version needed.
  • 'ignore_versions' Contains an array of php versions to ignore when calculating the version needed.
  • 'ignore_functions_match' Contains an array of function patterns to ignore when calculating the version needed.
  • 'ignore_extensions_match' Contains an array of extension patterns to ignore when calculating the version needed.
  • 'ignore_constants_match' Contains an array of constant patterns to ignore when calculating the version needed.

[ Top ]

parseFile   [line 107]

array parseFile( string $file, [array $options = array()])

Parse a single file

Parse a file for its compatibility info

  • Since: version 0.7.0 (2004-03-09)
  • Access: public

Parameters:

string   $file   —  Path of File to parse
array   $options   —  An array of options where:
  • 'debug' Contains a boolean to control whether extra ouput is shown.
  • 'ignore_functions' Contains an array of functions to ignore when calculating the version needed.
  • 'ignore_constants' Contains an array of constants to ignore when calculating the version needed.
  • 'ignore_extensions' Contains an array of php extensions to ignore when calculating the version needed.
  • 'ignore_versions' Contains an array of php versions to ignore when calculating the version needed.
  • 'ignore_functions_match' Contains an array of function patterns to ignore when calculating the version needed.
  • 'ignore_extensions_match' Contains an array of extension patterns to ignore when calculating the version needed.
  • 'ignore_constants_match' Contains an array of constant patterns to ignore when calculating the version needed.

[ Top ]

parseFolder   [line 317]

array parseFolder( string $folder, [array $options = array()])

Alias of parseDir

Alias of parseDir function


Parameters:

string   $folder   —  Path of folder to parse
array   $options   —  An array of options

[ Top ]

parseString   [line 146]

array|false parseString( string $string, [array $options = array()])

Parse a string

Parse a string for its compatibility info

  • Since: version 0.7.0 (2004-03-09)
  • Access: public

Parameters:

string   $string   —  PHP Code to parses
array   $options   —  An array of options where:
  • 'debug' Contains a boolean to control whether extra ouput is shown.
  • 'ignore_functions' Contains an array of functions to ignore when calculating the version needed.
  • 'ignore_constants' Contains an array of constants to ignore when calculating the version needed.
  • 'ignore_extensions' Contains an array of php extensions to ignore when calculating the version needed.
  • 'ignore_versions' Contains an array of php versions to ignore when calculating the version needed.
  • 'ignore_functions_match' Contains an array of function patterns to ignore when calculating the version needed.
  • 'ignore_extensions_match' Contains an array of extension patterns to ignore when calculating the version needed.
  • 'ignore_constants_match' Contains an array of constant patterns to ignore when calculating the version needed.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:18:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.