Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17211 программистов и 1835 роботов. Сейчас ищут 1598 программистов ...

Introduction

Вернуться к: PHP_Compat

Introduction

Introduction – Purpose and simple usage example

PHP_Compat provides missing functionality in the form of functions and constants for older versions of PHP.

The replicated functions are designed to be interchangable with their native equivilants. They have the same signature, same return values and throw the same errors. Each function is unit tested to ensure accuracy.

Example

Loading a component with PHP_Compat:

<?php
require_once 'PHP/Compat.php';

PHP_Compat::loadFunction('file_get_contents');
?>

Or, if you don't wish to use the class, you can load it manually.

Loading a component manually:

<?php
require_once 'PHP/Compat/Function/file_put_contents.php';
?>

The function is then ready to use like you would normally.

PHP_Compat is designed for ease of use. It has no dependencies and can be used completely outside the PEAR infrastructure.



Вернуться к: PHP_Compat

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware