Re: PHP 4.0 Bug #5833 Updated: ereg_replace fails to use correct variable type
| From: | Stanislav Malyshev | Date: | Sat, 29 Jul 2000 19:38:35 +0000 |
| Subject: | Re: PHP 4.0 Bug #5833 Updated: ereg_replace fails to use correct variable type | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-26857@lists.php.net to get a copy of this message | ||
BD>> I don't exactly know how php solves its dynamic type casting,
BD>> but it should be so that $i= 3; would succeed IS_LONG and not
BD>> IS_STRING. Is it so difficult to add a IS_STRING check to the
BD>> ereg-functions? php is just not the language to default to
BD>> binary encoding...
No, it isn't hard. But this would break backward-compatibility (the
sacred cow of PHP :) You can solve it pretty easily - just write
"$i" instead $i. Though, I believe it certainly should be documented.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665 ext.106