Bug #1180: ereg behaving unexpectedly

From: Date: Wed, 24 Feb 1999 20:36:15 +0000
Subject: Bug #1180: ereg behaving unexpectedly
Groups: php.dev 
Request: Send a blank email to php-dev+get-4267@lists.php.net to get a copy of this message
From: david@persimmon.com Operating system: Digital Unix 4.0d PHP version: 3.0.6 PHP Bug Type: Misbehaving function Bug 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. -- 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 (#4267) next »