cvs: pear /PHP_Compat/Compat/Function array_change_key_case.php array_chunk.php array_combine.php array_diff_assoc.php array_udiff.php
array_udiff_assoc.php file_get_contents.php file_put_contents.php fprintf.php html_entity_decode.php http_build_query.php is_a.php scandir.php
str_ireplace.php str_split.php stripos.php strripos.php var_export.php vprintf.php vsprintf.php
| From: | Aidan Lister | Date: | Sun, 13 Jun 2004 14:07:56 +0000 |
| Subject: | cvs: pear /PHP_Compat/Compat/Function array_change_key_case.php array_chunk.php array_combine.php array_diff_assoc.php array_udiff.php array_udiff_assoc.php file_get_contents.php file_put_contents.php fprintf.php html_entity_decode.php http_build_query.php is_a.php scandir.php str_ireplace.php str_split.php stripos.php strripos.php var_export.php vprintf.php vsprintf.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-20592@lists.php.net to get a copy of this message | ||
aidan Sun Jun 13 10:07:56 2004 EDT
Modified files:
/pear/PHP_Compat/Compat/Function array_change_key_case.php
array_chunk.php array_combine.php
array_diff_assoc.php
array_udiff.php
array_udiff_assoc.php
file_get_contents.php
file_put_contents.php fprintf.php
html_entity_decode.php
http_build_query.php is_a.php
scandir.php str_ireplace.php
str_split.php stripos.php
strripos.php var_export.php
vprintf.php vsprintf.php
Log:
Added @require to docblock
http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_change_key_case.php?r1=1.6&r2=1.7&ty=u Index: pear/PHP_Compat/Compat/Function/array_change_key_case.php diff -u pear/PHP_Compat/Compat/Function/array_change_key_case.php:1.6 pear/PHP_Compat/Compat/Function/array_change_key_case.php:1.7 --- pear/PHP_Compat/Compat/Function/array_change_key_case.php:1.6 Sat Jun 12 06:34:06 2004 +++ pear/PHP_Compat/Compat/Function/array_change_key_case.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_change_key_case.php,v 1.6 2004/06/12 10:34:06 aidan Exp $ +// $Id: array_change_key_case.php,v 1.7 2004/06/13 14:07:55 aidan Exp $ // @@ -29,6 +29,7 @@ define('CASE_UPPER', 1); } + /** * Replace array_change_key_case() * @@ -37,8 +38,9 @@ * @link http://php.net/function.array_change_key_case * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since PHP 4.2.0 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_change_key_case')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_chunk.php?r1=1.8&r2=1.9&ty=u Index: pear/PHP_Compat/Compat/Function/array_chunk.php diff -u pear/PHP_Compat/Compat/Function/array_chunk.php:1.8 pear/PHP_Compat/Compat/Function/array_chunk.php:1.9 --- pear/PHP_Compat/Compat/Function/array_chunk.php:1.8 Sat Jun 12 03:06:41 2004 +++ pear/PHP_Compat/Compat/Function/array_chunk.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_chunk.php,v 1.8 2004/06/12 07:06:41 aidan Exp $ +// $Id: array_chunk.php,v 1.9 2004/06/13 14:07:55 aidan Exp $ // @@ -28,8 +28,9 @@ * @link http://php.net/function.array_chunk * @author Aidan Lister <aidan@php.net> * @author Thiemo Mättig <thiemo.maettig@gmx.de> - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @since PHP 4.2.0 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_chunk')) { @@ -39,12 +40,12 @@ trigger_error('array_chunk() expects parameter 1 to be array, ' . gettype($input) . ' given', E_USER_WARNING); return null; } - + if (!is_numeric($size)) { trigger_error('array_chunk() expects parameter 2 to be long, ' . gettype($size) . ' given', E_USER_WARNING); return null; } - + $size = (int)$size; if ($size <= 0) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_combine.php?r1=1.15&r2=1.16&ty=u Index: pear/PHP_Compat/Compat/Function/array_combine.php diff -u pear/PHP_Compat/Compat/Function/array_combine.php:1.15 pear/PHP_Compat/Compat/Function/array_combine.php:1.16 --- pear/PHP_Compat/Compat/Function/array_combine.php:1.15 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/array_combine.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_combine.php,v 1.15 2004/06/12 06:53:00 aidan Exp $ +// $Id: array_combine.php,v 1.16 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.array_combine * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.15 $ + * @version $Revision: 1.16 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_combine')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_diff_assoc.php?r1=1.6&r2=1.7&ty=u Index: pear/PHP_Compat/Compat/Function/array_diff_assoc.php diff -u pear/PHP_Compat/Compat/Function/array_diff_assoc.php:1.6 pear/PHP_Compat/Compat/Function/array_diff_assoc.php:1.7 --- pear/PHP_Compat/Compat/Function/array_diff_assoc.php:1.6 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/array_diff_assoc.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_diff_assoc.php,v 1.6 2004/06/12 06:53:00 aidan Exp $ +// $Id: array_diff_assoc.php,v 1.7 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.array_diff_assoc * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since PHP 4.3.0 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_diff_assoc')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_udiff.php?r1=1.4&r2=1.5&ty=u Index: pear/PHP_Compat/Compat/Function/array_udiff.php diff -u pear/PHP_Compat/Compat/Function/array_udiff.php:1.4 pear/PHP_Compat/Compat/Function/array_udiff.php:1.5 --- pear/PHP_Compat/Compat/Function/array_udiff.php:1.4 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/array_udiff.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_udiff.php,v 1.4 2004/06/12 06:53:00 aidan Exp $ +// $Id: array_udiff.php,v 1.5 2004/06/13 14:07:55 aidan Exp $ // @@ -29,8 +29,9 @@ * @link http://php.net/function.array_udiff * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_udiff')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_udiff_assoc.php?r1=1.5&r2=1.6&ty=u Index: pear/PHP_Compat/Compat/Function/array_udiff_assoc.php diff -u pear/PHP_Compat/Compat/Function/array_udiff_assoc.php:1.5 pear/PHP_Compat/Compat/Function/array_udiff_assoc.php:1.6 --- pear/PHP_Compat/Compat/Function/array_udiff_assoc.php:1.5 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/array_udiff_assoc.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_udiff_assoc.php,v 1.5 2004/06/12 06:53:00 aidan Exp $ +// $Id: array_udiff_assoc.php,v 1.6 2004/06/13 14:07:55 aidan Exp $ // @@ -28,9 +28,10 @@ * @package PHP_Compat * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * @link http://php.net/function.array-udiff-assoc * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_udiff_assoc')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/file_get_contents.php?r1=1.14&r2=1.15&ty=u Index: pear/PHP_Compat/Compat/Function/file_get_contents.php diff -u pear/PHP_Compat/Compat/Function/file_get_contents.php:1.14 pear/PHP_Compat/Compat/Function/file_get_contents.php:1.15 --- pear/PHP_Compat/Compat/Function/file_get_contents.php:1.14 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/file_get_contents.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: file_get_contents.php,v 1.14 2004/06/12 06:53:00 aidan Exp $ +// $Id: file_get_contents.php,v 1.15 2004/06/13 14:07:55 aidan Exp $ // @@ -27,9 +27,10 @@ * @package PHP_Compat * @link http://php.net/function.file_get_contents * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.14 $ + * @version $Revision: 1.15 $ * @internal $resource_context is not supported * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('file_get_contents')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/file_put_contents.php?r1=1.17&r2=1.18&ty=u Index: pear/PHP_Compat/Compat/Function/file_put_contents.php diff -u pear/PHP_Compat/Compat/Function/file_put_contents.php:1.17 pear/PHP_Compat/Compat/Function/file_put_contents.php:1.18 --- pear/PHP_Compat/Compat/Function/file_put_contents.php:1.17 Sun Jun 13 09:56:59 2004 +++ pear/PHP_Compat/Compat/Function/file_put_contents.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: file_put_contents.php,v 1.17 2004/06/13 13:56:59 aidan Exp $ +// $Id: file_put_contents.php,v 1.18 2004/06/13 14:07:55 aidan Exp $ // @@ -38,9 +38,10 @@ * @package PHP_Compat * @link http://php.net/function.file_put_contents * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.17 $ + * @version $Revision: 1.18 $ * @internal $resource_context is not supported * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('file_put_contents')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/fprintf.php?r1=1.7&r2=1.8&ty=u Index: pear/PHP_Compat/Compat/Function/fprintf.php diff -u pear/PHP_Compat/Compat/Function/fprintf.php:1.7 pear/PHP_Compat/Compat/Function/fprintf.php:1.8 --- pear/PHP_Compat/Compat/Function/fprintf.php:1.7 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/fprintf.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: fprintf.php,v 1.7 2004/06/12 06:53:00 aidan Exp $ +// $Id: fprintf.php,v 1.8 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.fprintf * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('fprintf')) { @@ -43,10 +44,10 @@ $resource_handle = array_shift($args); $format = array_shift($args); - if (!is_resource($resource_handle)) { - trigger_error ('fprintf(): supplied argument is not a valid stream resource', E_USER_WARNING); - return false; - } + if (!is_resource($resource_handle)) { + trigger_error ('fprintf(): supplied argument is not a valid stream resource', E_USER_WARNING); + return false; + } return fwrite($resource_handle, vsprintf($format, $args)); } http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/html_entity_decode.php?r1=1.1&r2=1.2&ty=u Index: pear/PHP_Compat/Compat/Function/html_entity_decode.php diff -u pear/PHP_Compat/Compat/Function/html_entity_decode.php:1.1 pear/PHP_Compat/Compat/Function/html_entity_decode.php:1.2 --- pear/PHP_Compat/Compat/Function/html_entity_decode.php:1.1 Sun Jun 13 09:57:12 2004 +++ pear/PHP_Compat/Compat/Function/html_entity_decode.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: html_entity_decode.php,v 1.1 2004/06/13 13:57:12 aidan Exp $ +// $Id: html_entity_decode.php,v 1.2 2004/06/13 14:07:55 aidan Exp $ // @@ -42,9 +42,10 @@ * @link http://php.net/function.html_entity_decode * @author David Irvine <dave@codexweb.co.za> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since PHP 4.3.0 - * @internal setting the charset does nothing + * @internal Setting the charset will not do anything + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('html_entity_decode')) { @@ -54,8 +55,8 @@ trigger_error('html_entity_decode() expects parameter 2 to be long, ' . gettype($quote_style) . ' given', E_USER_WARNING); return null; } - - $trans_tbl = get_html_translation_table(HTML_ENTITIES); + + $trans_tbl = get_html_translation_table(HTML_ENTITIES); $trans_tbl = array_flip($trans_tbl); // Translating single quotes http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/http_build_query.php?r1=1.7&r2=1.8&ty=u Index: pear/PHP_Compat/Compat/Function/http_build_query.php diff -u pear/PHP_Compat/Compat/Function/http_build_query.php:1.7 pear/PHP_Compat/Compat/Function/http_build_query.php:1.8 --- pear/PHP_Compat/Compat/Function/http_build_query.php:1.7 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/http_build_query.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> // +----------------------------------------------------------------------+ // -// $Id: http_build_query.php,v 1.7 2004/06/12 06:53:00 aidan Exp $ +// $Id: http_build_query.php,v 1.8 2004/06/13 14:07:55 aidan Exp $ // @@ -29,8 +29,9 @@ * @link http://php.net/function.http-build-query * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('http_build_query')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/is_a.php?r1=1.11&r2=1.12&ty=u Index: pear/PHP_Compat/Compat/Function/is_a.php diff -u pear/PHP_Compat/Compat/Function/is_a.php:1.11 pear/PHP_Compat/Compat/Function/is_a.php:1.12 --- pear/PHP_Compat/Compat/Function/is_a.php:1.11 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/is_a.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: is_a.php,v 1.11 2004/06/12 06:53:00 aidan Exp $ +// $Id: is_a.php,v 1.12 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.is_a * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ * @since PHP 4.2.0 + * @require PHP 4.0.0 (is_subclass_of) */ if (!function_exists('is_a')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/scandir.php?r1=1.12&r2=1.13&ty=u Index: pear/PHP_Compat/Compat/Function/scandir.php diff -u pear/PHP_Compat/Compat/Function/scandir.php:1.12 pear/PHP_Compat/Compat/Function/scandir.php:1.13 --- pear/PHP_Compat/Compat/Function/scandir.php:1.12 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/scandir.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: scandir.php,v 1.12 2004/06/12 06:53:00 aidan Exp $ +// $Id: scandir.php,v 1.13 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.scandir * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.12 $ + * @version $Revision: 1.13 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('scandir')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/str_ireplace.php?r1=1.13&r2=1.14&ty=u Index: pear/PHP_Compat/Compat/Function/str_ireplace.php diff -u pear/PHP_Compat/Compat/Function/str_ireplace.php:1.13 pear/PHP_Compat/Compat/Function/str_ireplace.php:1.14 --- pear/PHP_Compat/Compat/Function/str_ireplace.php:1.13 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/str_ireplace.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: str_ireplace.php,v 1.13 2004/06/12 06:53:00 aidan Exp $ +// $Id: str_ireplace.php,v 1.14 2004/06/13 14:07:55 aidan Exp $ // @@ -27,9 +27,10 @@ * @package PHP_Compat * @link http://php.net/function.str_ireplace * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * @since PHP 5 * @internal count not by returned by reference - not possible in php4 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('str_ireplace')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/str_split.php?r1=1.8&r2=1.9&ty=u Index: pear/PHP_Compat/Compat/Function/str_split.php diff -u pear/PHP_Compat/Compat/Function/str_split.php:1.8 pear/PHP_Compat/Compat/Function/str_split.php:1.9 --- pear/PHP_Compat/Compat/Function/str_split.php:1.8 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/str_split.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: str_split.php,v 1.8 2004/06/12 06:53:00 aidan Exp $ +// $Id: str_split.php,v 1.9 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.str_split * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('str_split')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/stripos.php?r1=1.6&r2=1.7&ty=u Index: pear/PHP_Compat/Compat/Function/stripos.php diff -u pear/PHP_Compat/Compat/Function/stripos.php:1.6 pear/PHP_Compat/Compat/Function/stripos.php:1.7 --- pear/PHP_Compat/Compat/Function/stripos.php:1.6 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/stripos.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: stripos.php,v 1.6 2004/06/12 06:53:00 aidan Exp $ +// $Id: stripos.php,v 1.7 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.stripos * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('stripos')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/strripos.php?r1=1.15&r2=1.16&ty=u Index: pear/PHP_Compat/Compat/Function/strripos.php diff -u pear/PHP_Compat/Compat/Function/strripos.php:1.15 pear/PHP_Compat/Compat/Function/strripos.php:1.16 --- pear/PHP_Compat/Compat/Function/strripos.php:1.15 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/strripos.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Stephan Schmidt <schst@php.net> | // +----------------------------------------------------------------------+ // -// $Id: strripos.php,v 1.15 2004/06/12 06:53:00 aidan Exp $ +// $Id: strripos.php,v 1.16 2004/06/13 14:07:55 aidan Exp $ // @@ -29,8 +29,9 @@ * @link http://php.net/function.strripos * @author Aidan Lister <aidan@php.net> * @author Stephan Schmidt <schst@php.net> - * @version $Revision: 1.15 $ + * @version $Revision: 1.16 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('strripos')) { @@ -54,17 +55,17 @@ // Manipulate the string if there is an offset $fix = 0; if (!is_null($offset)) - { - // If the offset is larger than the haystack, return - if (abs($offset) >= strlen($haystack)) { - return false; - } + { + // If the offset is larger than the haystack, return + if (abs($offset) >= strlen($haystack)) { + return false; + } - // Check whether offset is negative or positive + // Check whether offset is negative or positive if ($offset > 0) { $haystack = substr($haystack, $offset, strlen($haystack) - $offset); - // We need to add this to the position of the needle - $fix = $offset; + // We need to add this to the position of the needle + $fix = $offset; } else { $haystack = substr($haystack, 0, strlen($haystack) + $offset); @@ -72,11 +73,11 @@ } $segments = explode(strtolower($needle), strtolower($haystack)); - - $last_seg = count($segments) - 1; - $position = strlen($haystack) + $fix - strlen($segments[$last_seg]) - strlen($needle); + + $last_seg = count($segments) - 1; + $position = strlen($haystack) + $fix - strlen($segments[$last_seg]) - strlen($needle); - return $position; + return $position; } } ?> http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/var_export.php?r1=1.6&r2=1.7&ty=u Index: pear/PHP_Compat/Compat/Function/var_export.php diff -u pear/PHP_Compat/Compat/Function/var_export.php:1.6 pear/PHP_Compat/Compat/Function/var_export.php:1.7 --- pear/PHP_Compat/Compat/Function/var_export.php:1.6 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/var_export.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: var_export.php,v 1.6 2004/06/12 06:53:00 aidan Exp $ +// $Id: var_export.php,v 1.7 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.var_export * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since PHP 4.2.0 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('var_export')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/vprintf.php?r1=1.9&r2=1.10&ty=u Index: pear/PHP_Compat/Compat/Function/vprintf.php diff -u pear/PHP_Compat/Compat/Function/vprintf.php:1.9 pear/PHP_Compat/Compat/Function/vprintf.php:1.10 --- pear/PHP_Compat/Compat/Function/vprintf.php:1.9 Sat Jun 12 02:52:34 2004 +++ pear/PHP_Compat/Compat/Function/vprintf.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: vprintf.php,v 1.9 2004/06/12 06:52:34 aidan Exp $ +// $Id: vprintf.php,v 1.10 2004/06/13 14:07:55 aidan Exp $ // @@ -27,19 +27,19 @@ * @package PHP_Compat * @link http://php.net/function.vprintf * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ * @since PHP 4.1.0 + * @require PHP 4.0.4 (call_user_func_array) */ if (!function_exists('vprintf')) { function vprintf ($format, $args) { - if (count($args) < 2) - { + if (count($args) < 2) { trigger_error('vprintf() Too few arguments', E_USER_WARNING); return null; } - + array_unshift($args, $format); return call_user_func_array('printf', $args); } http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/vsprintf.php?r1=1.5&r2=1.6&ty=u Index: pear/PHP_Compat/Compat/Function/vsprintf.php diff -u pear/PHP_Compat/Compat/Function/vsprintf.php:1.5 pear/PHP_Compat/Compat/Function/vsprintf.php:1.6 --- pear/PHP_Compat/Compat/Function/vsprintf.php:1.5 Sat Jun 12 02:52:34 2004 +++ pear/PHP_Compat/Compat/Function/vsprintf.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: vsprintf.php,v 1.5 2004/06/12 06:52:34 aidan Exp $ +// $Id: vsprintf.php,v 1.6 2004/06/13 14:07:55 aidan Exp $ // @@ -27,15 +27,15 @@ * @package PHP_Compat * @link http://php.net/function.vsprintf * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * @since PHP 4.1.0 + * @require PHP 4.0.4 (call_user_func_array) */ if (!function_exists('vsprintf')) { function vsprintf ($format, $args) { - if (count($args) < 2) - { + if (count($args) < 2) { trigger_error('vsprintf() Too few arguments', E_USER_WARNING); return null; }
http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_change_key_case.php?r1=1.6&r2=1.7&ty=u Index: pear/PHP_Compat/Compat/Function/array_change_key_case.php diff -u pear/PHP_Compat/Compat/Function/array_change_key_case.php:1.6 pear/PHP_Compat/Compat/Function/array_change_key_case.php:1.7 --- pear/PHP_Compat/Compat/Function/array_change_key_case.php:1.6 Sat Jun 12 06:34:06 2004 +++ pear/PHP_Compat/Compat/Function/array_change_key_case.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_change_key_case.php,v 1.6 2004/06/12 10:34:06 aidan Exp $ +// $Id: array_change_key_case.php,v 1.7 2004/06/13 14:07:55 aidan Exp $ // @@ -29,6 +29,7 @@ define('CASE_UPPER', 1); } + /** * Replace array_change_key_case() * @@ -37,8 +38,9 @@ * @link http://php.net/function.array_change_key_case * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since PHP 4.2.0 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_change_key_case')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_chunk.php?r1=1.8&r2=1.9&ty=u Index: pear/PHP_Compat/Compat/Function/array_chunk.php diff -u pear/PHP_Compat/Compat/Function/array_chunk.php:1.8 pear/PHP_Compat/Compat/Function/array_chunk.php:1.9 --- pear/PHP_Compat/Compat/Function/array_chunk.php:1.8 Sat Jun 12 03:06:41 2004 +++ pear/PHP_Compat/Compat/Function/array_chunk.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_chunk.php,v 1.8 2004/06/12 07:06:41 aidan Exp $ +// $Id: array_chunk.php,v 1.9 2004/06/13 14:07:55 aidan Exp $ // @@ -28,8 +28,9 @@ * @link http://php.net/function.array_chunk * @author Aidan Lister <aidan@php.net> * @author Thiemo Mättig <thiemo.maettig@gmx.de> - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @since PHP 4.2.0 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_chunk')) { @@ -39,12 +40,12 @@ trigger_error('array_chunk() expects parameter 1 to be array, ' . gettype($input) . ' given', E_USER_WARNING); return null; } - + if (!is_numeric($size)) { trigger_error('array_chunk() expects parameter 2 to be long, ' . gettype($size) . ' given', E_USER_WARNING); return null; } - + $size = (int)$size; if ($size <= 0) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_combine.php?r1=1.15&r2=1.16&ty=u Index: pear/PHP_Compat/Compat/Function/array_combine.php diff -u pear/PHP_Compat/Compat/Function/array_combine.php:1.15 pear/PHP_Compat/Compat/Function/array_combine.php:1.16 --- pear/PHP_Compat/Compat/Function/array_combine.php:1.15 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/array_combine.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_combine.php,v 1.15 2004/06/12 06:53:00 aidan Exp $ +// $Id: array_combine.php,v 1.16 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.array_combine * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.15 $ + * @version $Revision: 1.16 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_combine')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_diff_assoc.php?r1=1.6&r2=1.7&ty=u Index: pear/PHP_Compat/Compat/Function/array_diff_assoc.php diff -u pear/PHP_Compat/Compat/Function/array_diff_assoc.php:1.6 pear/PHP_Compat/Compat/Function/array_diff_assoc.php:1.7 --- pear/PHP_Compat/Compat/Function/array_diff_assoc.php:1.6 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/array_diff_assoc.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_diff_assoc.php,v 1.6 2004/06/12 06:53:00 aidan Exp $ +// $Id: array_diff_assoc.php,v 1.7 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.array_diff_assoc * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since PHP 4.3.0 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_diff_assoc')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_udiff.php?r1=1.4&r2=1.5&ty=u Index: pear/PHP_Compat/Compat/Function/array_udiff.php diff -u pear/PHP_Compat/Compat/Function/array_udiff.php:1.4 pear/PHP_Compat/Compat/Function/array_udiff.php:1.5 --- pear/PHP_Compat/Compat/Function/array_udiff.php:1.4 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/array_udiff.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_udiff.php,v 1.4 2004/06/12 06:53:00 aidan Exp $ +// $Id: array_udiff.php,v 1.5 2004/06/13 14:07:55 aidan Exp $ // @@ -29,8 +29,9 @@ * @link http://php.net/function.array_udiff * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_udiff')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/array_udiff_assoc.php?r1=1.5&r2=1.6&ty=u Index: pear/PHP_Compat/Compat/Function/array_udiff_assoc.php diff -u pear/PHP_Compat/Compat/Function/array_udiff_assoc.php:1.5 pear/PHP_Compat/Compat/Function/array_udiff_assoc.php:1.6 --- pear/PHP_Compat/Compat/Function/array_udiff_assoc.php:1.5 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/array_udiff_assoc.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: array_udiff_assoc.php,v 1.5 2004/06/12 06:53:00 aidan Exp $ +// $Id: array_udiff_assoc.php,v 1.6 2004/06/13 14:07:55 aidan Exp $ // @@ -28,9 +28,10 @@ * @package PHP_Compat * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * @link http://php.net/function.array-udiff-assoc * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('array_udiff_assoc')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/file_get_contents.php?r1=1.14&r2=1.15&ty=u Index: pear/PHP_Compat/Compat/Function/file_get_contents.php diff -u pear/PHP_Compat/Compat/Function/file_get_contents.php:1.14 pear/PHP_Compat/Compat/Function/file_get_contents.php:1.15 --- pear/PHP_Compat/Compat/Function/file_get_contents.php:1.14 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/file_get_contents.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: file_get_contents.php,v 1.14 2004/06/12 06:53:00 aidan Exp $ +// $Id: file_get_contents.php,v 1.15 2004/06/13 14:07:55 aidan Exp $ // @@ -27,9 +27,10 @@ * @package PHP_Compat * @link http://php.net/function.file_get_contents * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.14 $ + * @version $Revision: 1.15 $ * @internal $resource_context is not supported * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('file_get_contents')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/file_put_contents.php?r1=1.17&r2=1.18&ty=u Index: pear/PHP_Compat/Compat/Function/file_put_contents.php diff -u pear/PHP_Compat/Compat/Function/file_put_contents.php:1.17 pear/PHP_Compat/Compat/Function/file_put_contents.php:1.18 --- pear/PHP_Compat/Compat/Function/file_put_contents.php:1.17 Sun Jun 13 09:56:59 2004 +++ pear/PHP_Compat/Compat/Function/file_put_contents.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: file_put_contents.php,v 1.17 2004/06/13 13:56:59 aidan Exp $ +// $Id: file_put_contents.php,v 1.18 2004/06/13 14:07:55 aidan Exp $ // @@ -38,9 +38,10 @@ * @package PHP_Compat * @link http://php.net/function.file_put_contents * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.17 $ + * @version $Revision: 1.18 $ * @internal $resource_context is not supported * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('file_put_contents')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/fprintf.php?r1=1.7&r2=1.8&ty=u Index: pear/PHP_Compat/Compat/Function/fprintf.php diff -u pear/PHP_Compat/Compat/Function/fprintf.php:1.7 pear/PHP_Compat/Compat/Function/fprintf.php:1.8 --- pear/PHP_Compat/Compat/Function/fprintf.php:1.7 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/fprintf.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: fprintf.php,v 1.7 2004/06/12 06:53:00 aidan Exp $ +// $Id: fprintf.php,v 1.8 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.fprintf * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('fprintf')) { @@ -43,10 +44,10 @@ $resource_handle = array_shift($args); $format = array_shift($args); - if (!is_resource($resource_handle)) { - trigger_error ('fprintf(): supplied argument is not a valid stream resource', E_USER_WARNING); - return false; - } + if (!is_resource($resource_handle)) { + trigger_error ('fprintf(): supplied argument is not a valid stream resource', E_USER_WARNING); + return false; + } return fwrite($resource_handle, vsprintf($format, $args)); } http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/html_entity_decode.php?r1=1.1&r2=1.2&ty=u Index: pear/PHP_Compat/Compat/Function/html_entity_decode.php diff -u pear/PHP_Compat/Compat/Function/html_entity_decode.php:1.1 pear/PHP_Compat/Compat/Function/html_entity_decode.php:1.2 --- pear/PHP_Compat/Compat/Function/html_entity_decode.php:1.1 Sun Jun 13 09:57:12 2004 +++ pear/PHP_Compat/Compat/Function/html_entity_decode.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: html_entity_decode.php,v 1.1 2004/06/13 13:57:12 aidan Exp $ +// $Id: html_entity_decode.php,v 1.2 2004/06/13 14:07:55 aidan Exp $ // @@ -42,9 +42,10 @@ * @link http://php.net/function.html_entity_decode * @author David Irvine <dave@codexweb.co.za> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since PHP 4.3.0 - * @internal setting the charset does nothing + * @internal Setting the charset will not do anything + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('html_entity_decode')) { @@ -54,8 +55,8 @@ trigger_error('html_entity_decode() expects parameter 2 to be long, ' . gettype($quote_style) . ' given', E_USER_WARNING); return null; } - - $trans_tbl = get_html_translation_table(HTML_ENTITIES); + + $trans_tbl = get_html_translation_table(HTML_ENTITIES); $trans_tbl = array_flip($trans_tbl); // Translating single quotes http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/http_build_query.php?r1=1.7&r2=1.8&ty=u Index: pear/PHP_Compat/Compat/Function/http_build_query.php diff -u pear/PHP_Compat/Compat/Function/http_build_query.php:1.7 pear/PHP_Compat/Compat/Function/http_build_query.php:1.8 --- pear/PHP_Compat/Compat/Function/http_build_query.php:1.7 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/http_build_query.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Aidan Lister <aidan@php.net> // +----------------------------------------------------------------------+ // -// $Id: http_build_query.php,v 1.7 2004/06/12 06:53:00 aidan Exp $ +// $Id: http_build_query.php,v 1.8 2004/06/13 14:07:55 aidan Exp $ // @@ -29,8 +29,9 @@ * @link http://php.net/function.http-build-query * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('http_build_query')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/is_a.php?r1=1.11&r2=1.12&ty=u Index: pear/PHP_Compat/Compat/Function/is_a.php diff -u pear/PHP_Compat/Compat/Function/is_a.php:1.11 pear/PHP_Compat/Compat/Function/is_a.php:1.12 --- pear/PHP_Compat/Compat/Function/is_a.php:1.11 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/is_a.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: is_a.php,v 1.11 2004/06/12 06:53:00 aidan Exp $ +// $Id: is_a.php,v 1.12 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.is_a * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ * @since PHP 4.2.0 + * @require PHP 4.0.0 (is_subclass_of) */ if (!function_exists('is_a')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/scandir.php?r1=1.12&r2=1.13&ty=u Index: pear/PHP_Compat/Compat/Function/scandir.php diff -u pear/PHP_Compat/Compat/Function/scandir.php:1.12 pear/PHP_Compat/Compat/Function/scandir.php:1.13 --- pear/PHP_Compat/Compat/Function/scandir.php:1.12 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/scandir.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: scandir.php,v 1.12 2004/06/12 06:53:00 aidan Exp $ +// $Id: scandir.php,v 1.13 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.scandir * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.12 $ + * @version $Revision: 1.13 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('scandir')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/str_ireplace.php?r1=1.13&r2=1.14&ty=u Index: pear/PHP_Compat/Compat/Function/str_ireplace.php diff -u pear/PHP_Compat/Compat/Function/str_ireplace.php:1.13 pear/PHP_Compat/Compat/Function/str_ireplace.php:1.14 --- pear/PHP_Compat/Compat/Function/str_ireplace.php:1.13 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/str_ireplace.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: str_ireplace.php,v 1.13 2004/06/12 06:53:00 aidan Exp $ +// $Id: str_ireplace.php,v 1.14 2004/06/13 14:07:55 aidan Exp $ // @@ -27,9 +27,10 @@ * @package PHP_Compat * @link http://php.net/function.str_ireplace * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * @since PHP 5 * @internal count not by returned by reference - not possible in php4 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('str_ireplace')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/str_split.php?r1=1.8&r2=1.9&ty=u Index: pear/PHP_Compat/Compat/Function/str_split.php diff -u pear/PHP_Compat/Compat/Function/str_split.php:1.8 pear/PHP_Compat/Compat/Function/str_split.php:1.9 --- pear/PHP_Compat/Compat/Function/str_split.php:1.8 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/str_split.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: str_split.php,v 1.8 2004/06/12 06:53:00 aidan Exp $ +// $Id: str_split.php,v 1.9 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.str_split * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('str_split')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/stripos.php?r1=1.6&r2=1.7&ty=u Index: pear/PHP_Compat/Compat/Function/stripos.php diff -u pear/PHP_Compat/Compat/Function/stripos.php:1.6 pear/PHP_Compat/Compat/Function/stripos.php:1.7 --- pear/PHP_Compat/Compat/Function/stripos.php:1.6 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/stripos.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: stripos.php,v 1.6 2004/06/12 06:53:00 aidan Exp $ +// $Id: stripos.php,v 1.7 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.stripos * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('stripos')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/strripos.php?r1=1.15&r2=1.16&ty=u Index: pear/PHP_Compat/Compat/Function/strripos.php diff -u pear/PHP_Compat/Compat/Function/strripos.php:1.15 pear/PHP_Compat/Compat/Function/strripos.php:1.16 --- pear/PHP_Compat/Compat/Function/strripos.php:1.15 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/strripos.php Sun Jun 13 10:07:55 2004 @@ -17,7 +17,7 @@ // | Stephan Schmidt <schst@php.net> | // +----------------------------------------------------------------------+ // -// $Id: strripos.php,v 1.15 2004/06/12 06:53:00 aidan Exp $ +// $Id: strripos.php,v 1.16 2004/06/13 14:07:55 aidan Exp $ // @@ -29,8 +29,9 @@ * @link http://php.net/function.strripos * @author Aidan Lister <aidan@php.net> * @author Stephan Schmidt <schst@php.net> - * @version $Revision: 1.15 $ + * @version $Revision: 1.16 $ * @since PHP 5 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('strripos')) { @@ -54,17 +55,17 @@ // Manipulate the string if there is an offset $fix = 0; if (!is_null($offset)) - { - // If the offset is larger than the haystack, return - if (abs($offset) >= strlen($haystack)) { - return false; - } + { + // If the offset is larger than the haystack, return + if (abs($offset) >= strlen($haystack)) { + return false; + } - // Check whether offset is negative or positive + // Check whether offset is negative or positive if ($offset > 0) { $haystack = substr($haystack, $offset, strlen($haystack) - $offset); - // We need to add this to the position of the needle - $fix = $offset; + // We need to add this to the position of the needle + $fix = $offset; } else { $haystack = substr($haystack, 0, strlen($haystack) + $offset); @@ -72,11 +73,11 @@ } $segments = explode(strtolower($needle), strtolower($haystack)); - - $last_seg = count($segments) - 1; - $position = strlen($haystack) + $fix - strlen($segments[$last_seg]) - strlen($needle); + + $last_seg = count($segments) - 1; + $position = strlen($haystack) + $fix - strlen($segments[$last_seg]) - strlen($needle); - return $position; + return $position; } } ?> http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/var_export.php?r1=1.6&r2=1.7&ty=u Index: pear/PHP_Compat/Compat/Function/var_export.php diff -u pear/PHP_Compat/Compat/Function/var_export.php:1.6 pear/PHP_Compat/Compat/Function/var_export.php:1.7 --- pear/PHP_Compat/Compat/Function/var_export.php:1.6 Sat Jun 12 02:53:00 2004 +++ pear/PHP_Compat/Compat/Function/var_export.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: var_export.php,v 1.6 2004/06/12 06:53:00 aidan Exp $ +// $Id: var_export.php,v 1.7 2004/06/13 14:07:55 aidan Exp $ // @@ -27,8 +27,9 @@ * @package PHP_Compat * @link http://php.net/function.var_export * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since PHP 4.2.0 + * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('var_export')) { http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/vprintf.php?r1=1.9&r2=1.10&ty=u Index: pear/PHP_Compat/Compat/Function/vprintf.php diff -u pear/PHP_Compat/Compat/Function/vprintf.php:1.9 pear/PHP_Compat/Compat/Function/vprintf.php:1.10 --- pear/PHP_Compat/Compat/Function/vprintf.php:1.9 Sat Jun 12 02:52:34 2004 +++ pear/PHP_Compat/Compat/Function/vprintf.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: vprintf.php,v 1.9 2004/06/12 06:52:34 aidan Exp $ +// $Id: vprintf.php,v 1.10 2004/06/13 14:07:55 aidan Exp $ // @@ -27,19 +27,19 @@ * @package PHP_Compat * @link http://php.net/function.vprintf * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ * @since PHP 4.1.0 + * @require PHP 4.0.4 (call_user_func_array) */ if (!function_exists('vprintf')) { function vprintf ($format, $args) { - if (count($args) < 2) - { + if (count($args) < 2) { trigger_error('vprintf() Too few arguments', E_USER_WARNING); return null; } - + array_unshift($args, $format); return call_user_func_array('printf', $args); } http://cvs.php.net/diff.php/pear/PHP_Compat/Compat/Function/vsprintf.php?r1=1.5&r2=1.6&ty=u Index: pear/PHP_Compat/Compat/Function/vsprintf.php diff -u pear/PHP_Compat/Compat/Function/vsprintf.php:1.5 pear/PHP_Compat/Compat/Function/vsprintf.php:1.6 --- pear/PHP_Compat/Compat/Function/vsprintf.php:1.5 Sat Jun 12 02:52:34 2004 +++ pear/PHP_Compat/Compat/Function/vsprintf.php Sun Jun 13 10:07:55 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: vsprintf.php,v 1.5 2004/06/12 06:52:34 aidan Exp $ +// $Id: vsprintf.php,v 1.6 2004/06/13 14:07:55 aidan Exp $ // @@ -27,15 +27,15 @@ * @package PHP_Compat * @link http://php.net/function.vsprintf * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * @since PHP 4.1.0 + * @require PHP 4.0.4 (call_user_func_array) */ if (!function_exists('vsprintf')) { function vsprintf ($format, $args) { - if (count($args) < 2) - { + if (count($args) < 2) { trigger_error('vsprintf() Too few arguments', E_USER_WARNING); return null; }