Source for file Compat.php
Documentation is available at Compat.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://au.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Aidan Lister <aidan@php.net> |
// +----------------------------------------------------------------------+
// $Id: Compat.php,v 1.7 2004/05/20 13:38:01 aidan Exp $
* Provides missing functionality in the form of constants and functions
* for older versions of PHP
* The methods in this class should be called statically
* Optionally, you may simply include the file.
* e.g. require_once 'PHP/Compat/Function/scandir.php';
* @author Aidan Lister <aidan@php.net>
* Load a function, or array of functions
* @param string|array$function The function or functions to load.
function loadFunction ($function)
foreach ($function as $singlefunc) {
PHP_Compat ::loadFunction ($singlefunc);
$file = sprintf('PHP/Compat/Function/%s.php',
if ((@include_once $file) !== false ) {
* Load a constant, or array of constants
* @param string|array$constant The constant or constants to load.
function loadConstant ($constant)
foreach ($constant as $singleconst) {
PHP_Compat ::loadConstant ($singleconst);
$file = sprintf('PHP/Compat/Constant/%s.php',
if ((@include_once $file) !== false ) {
Documentation generated on Mon, 11 Mar 2019 10:16:56 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|