4b3: split(): bad regular expression for split()
| From: | Chris Shenton | Date: | Fri, 28 Jan 2000 18:01:41 +0000 |
| Subject: | 4b3: split(): bad regular expression for split() | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9528@lists.php.net to get a copy of this message | ||
Using it on Solaris-2.6 Sparc.
I used the sample from the online manual:
<?
$date = "04/30/1973"; // Delimiters may be slash, dot, or hyphen
list( $month, $day, $year ) = split( '[/.-]', $date );
echo "Month: $month; Day: $day; Year: $year<br>\n";
?>
And I get:
Warning: bad regular expression for split() in
/opt/whalemail/apache/htdocs/myproject/test/date.php on line 3
Month: ; Day: ; Year:
I played around with it and got it to fail without returning any
output, sometimes after hanging for quite a few seconds. I saw
messages like the following in the logs:
[Fri Jan 28 12:14:17 2000] [notice] child pid 10582 exit signal Segmentation Fault (11)
FATAL: emalloc(): Unable to allocate -1515870799 bytes
FATAL: erealloc(): Unable to allocate 1515870818 bytes
Other samples from the manual ``split(":", $passwd, 5)'' failed
similarly, as did attempts to use ereg_replace() [presumably because
it uses the same split() code?]