#23768 [NEW]: Create an smart if that will return value of the parameter that matches expr
| From: | mno11 at lycos dot com | Date: | Fri, 23 May 2003 04:32:43 +0000 |
| Subject: | #23768 [NEW]: Create an smart if that will return value of the parameter that matches expr | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-40247@lists.php.net to get a copy of this message | ||
From: mno11 at lycos dot com
Operating system: Windows XP
PHP version: 4.3.1
PHP Bug Type: Feature/Change Request
Bug description: Create an smart if that will return value of the parameter that matches expr
While using PHP and many other programming languages, I've come across
having to use the following code a lot:
if (strlen($form_fields[$i]) > $cur_max)
$cur_max = strlen($form_fields[$i]);
It would be great if PHP had a smart if_replace function implemented that
will return the value of first parameter passed if expression is true and
value of second parameter passed if expression is false.
--
Edit bug report at http://bugs.php.net/?id=23768&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23768&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23768&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23768&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23768&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23768&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23768&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23768&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23768&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23768&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23768&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23768&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23768&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23768&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23768&r=gnused