|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-05-11 08:15 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 22 02:00:01 2025 UTC |
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.