PHP 3 syntax imcompatibilities
| From: | Manuel Lemos | Date: | Sun, 19 Dec 1999 22:08:02 +0000 |
| Subject: | PHP 3 syntax imcompatibilities | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8190@lists.php.net to get a copy of this message | ||
Hello,
Recently I was brought to the attention that there are some syntax problems
in my forms class that hundreds of users have downloaded from here:
http://phpclasses.UpperDesign.com/browse.html/package/1
The problem is that I am not sure what exactly uses on it syntax that was
legal on PHP 3 but is not legal at least in PHP 4 beta 3.
I have pasted the part of the code that apparently offend the PHP 4 syntax.
I wonder if anybody can tell me what and why I can't use this syntax in PHP
4 despite I could in PHP 3.
$function("function $validate_as_email(theinput)$jseol{$jseol");
$function("\ts=theinput.value$jseol\tif(s.search)$jseol\t{$jseol\t\treturn (s.search(new
RegExp(\"".$this->EscapeJavascriptRegularExpressions($this->email_regular_expression)."\",\"gi\"))>=0)$jseol\t}$jseol");
$function("\tif(s.indexOf)$jseol\t{$jseol\t\tat_character=s.indexOf('@')$jseol\t\tif(at_character<=0
|| at_character+4>s.length)$jseol\t\t\treturn false$jseol\t}$jseol");
$function("\tif(s.length<6)$jseol\t\treturn false$jseol\telse$jseol\t\treturn
true$jseol}$jseol");
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--