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

Class: PHP_CompatInfo

Source Location: /PHP_CompatInfo-1.4.2/CompatInfo.php

Class Overview


Check Compatibility of chunk of PHP code


Author(s):

Version:

  • Release: 1.4.2

Copyright:

  • 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 54]
Check Compatibility of chunk of PHP code


[ Top ]


Class Variables

$earliest_version =  ''

[line 65]

  • Var: Last version of PHP to use

Type:   string


[ Top ]

$latest_version =  '3.0.0'

[line 60]

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

Type:   string


[ Top ]

$recurse_dir =  true

[line 71]

  • Var: Toggle parseDir recursion
  • Since: 0.7.0

Type:   boolean


[ Top ]



Method Detail

loadVersion   [line 368]

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

Load components list for a PHP version or subset
  • Return: An array of php function names to ignore
  • Since: 1.2.0
  • Access: public

Parameters:

string   $min   —  PHP minimal version
string|boolean   $max   —  (optional) PHP maximal version

[ Top ]

parseArray   [line 285]

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: 0.7.0
  • 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.

[ Top ]

parseDir   [line 158]

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

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.

[ Top ]

parseFile   [line 92]

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

Parse a file for its Compatibility info
  • Since: 0.7.0
  • 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.

[ Top ]

parseFolder   [line 252]

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

Alias of parseDir

Parameters:

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

[ Top ]

parseString   [line 121]

Array parseString( string $string, [array $options = array()])

Parse a string for its Compatibility info
  • Since: 0.7.0
  • 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.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:57:54 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.