Hello, Since the ereg_replace function is deprecated in PHP 5.3.0, when building PHP docs with PHP 5.3.0, I got too many E_DEPRECATED messages. To clear the boring messages, I changed the function call to ereg_replace to preg_replace. Following is the patch:
Index: manpage.php
===================================================================
RCS file: /repository/phd/formats/manpage.php,v
retrieving revision 1.3
diff -r1.3 manpage.php
215c215
< $ret = trim(ereg_replace( "[ \n\t]+", ' ', $str));
---
> $ret = trim(preg_replace( '/[ \n\t]+/', ' ', $str));
446c446
< return trim(ereg_replace("[ \n\t]+", ' ', $value));
---
> return trim(preg_replace('/[ \n\t]+/', ' ', $value));
Index: chmsource.php
===================================================================
RCS file: /repository/phd/themes/php/chmsource.php,v
retrieving revision 1.10
diff -r1.10 chmsource.php
337,338c337,340
< $header = ereg_replace('( *)</head>','\\1 <link media="all"
rel="stylesheet" type="text/css" href="style.css"/>
< \\1</head>', $header);
---
> $pattern =
> '/(.*)(\r|\n|\r\n|\n\r)(.*)<\/head>/';
> $replacement = '$1 <link media="all"
> rel="stylesheet" type="text/css" href="style.css"/>$2$3</head>';
>
> $header = preg_replace($pattern, $replacement,
> $header);
Regards,
Chen Gang
--
PHP Internals Study
http://www.phpinternals.com
chmsource.php.diff
Description: Binary data
manpage.php.diff
Description: Binary data
