Date: 02/24/99
- Next message: bofh <email protected>: "[PHP-DEV] Bug #1181: $obj->array[$x]->classfield doesn't work!"
- Previous message: david <email protected>: "[PHP-DEV] Bug #1180: ereg behaving unexpectedly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 1180
User Update by: david <email protected>
Status: Open
Bug Type: Misbehaving function
Description: ereg behaving unexpectedly
The "ereg" function seems to be behaving oddly. This script:
<?php
$testvar = 'abcdefghijklmnopqrstuvwxyzabcd';
if (ereg($testvar,$testvar)) {
print "A match!";
} else {
print "No match???";
}
?>
produces "A match!" as you would expect. But if you add a single character to $testvar (say, an "e" at the end of the string), and rerun it, PHP will return "No match???"
The limit on my machine for strings passed to ereg seems to be 30 characters - any more than that and ereg always returns "false". Is that the way it's supposed to be, or is this a bug? (or a strange occurance on my machine only?)
PHP was compiled under Digital Unix 4.0d using gcc v2.8.1 and compiled with mSQL and MySQL support. It runs as a standalone CGI.
---------------
UPDATE: 2/24/99
The problem was fixed when I recompiled with --use-system-regex.
Full Bug description available at: http://ca.php.net/bugs.php3?id=1180
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: bofh <email protected>: "[PHP-DEV] Bug #1181: $obj->array[$x]->classfield doesn't work!"
- Previous message: david <email protected>: "[PHP-DEV] Bug #1180: ereg behaving unexpectedly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

