Bug #1180 Updated: ereg behaving unexpectedly

From: Date: Wed, 24 Feb 1999 22:14:16 +0000
Subject: Bug #1180 Updated: ereg behaving unexpectedly
Groups: php.dev 
Request: Send a blank email to php-dev+get-4268@lists.php.net to get a copy of this message
ID: 1180 User Update by: david@persimmon.com 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@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4268) next »