mixed PHP_Compat::loadFunction (
mixed $function
)
Charge une fonction ou un tableau de fonctions.
Le nom ou un tableau de noms de fonctions à charger
mixed
Chargement d'une fonction avec la classe :
<?php
require_once 'PHP/Compat.php';
// Chargement de file_put_contents
PHP_Compat::loadFunction('file_put_contents');
// Chargement de str_split, array_chunk et file_get_contents
PHP_Compat::loadFunction(array('str_split', 'array_chunk', 'file_get_contents'));
?>
Vous pouvez également charger une fonction sans utiliser la classe.
Chargement d'une fonction manuellement :
<?php
require_once 'PHP/Compat/Function/file_put_contents.php';
?>
This function should be called statically.