php4-beta | 199912
Date: 12/20/99
- Next message: Tilfried Weissenberger: "[PHP4BETA] Plz answer"
- Previous message: Zeev Suraski: "Re: [PHP4BETA] PHP 3 syntax imcompatibilities"
- In reply to: Manuel Lemos: "[PHP4BETA] PHP 3 syntax imcompatibilities"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In PHP 4 {$ in encapsulated strings tells PHP 4 that it should be expecting
something like {$variable}. This was done because now in PHP 4 within { }
in your encapsed strings you aren't limited with your variables anymore but
can go wild with multi-dimensional arrays.
Try to escape the {$ with \{$
Andi
At 10:08 PM 12/19/99 +0000, Manuel Lemos wrote:
>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_e
>xpression)."\",\"gi\"))>=0)$jseol\t}$jseol");
>$function("\tif(s.indexOf)$jseol\t{$jseol\t\tat_character=s.indexOf('@')$js
>eol\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: email protected>?subject=Re:%20[PHP4BETA]%20PHP%203%20syntax%20imcompatibilities&replyto=4.2.0.58.19991220073559.00de8d30 <email protected>">mlemos <email protected>">http://phpclasses.UpperDesign.com/?user=mlemos <email protected>
>--
>E-mail: mlemos <email protected>
>URL: http://www.mlemos.e-na.net/
>PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
>--
>
>
>--
>PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
>To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
>For additional commands, e-mail: php4beta-help <email protected>
>To contact the list administrators, e-mail: php4beta-admin <email protected>
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>
- Next message: Tilfried Weissenberger: "[PHP4BETA] Plz answer"
- Previous message: Zeev Suraski: "Re: [PHP4BETA] PHP 3 syntax imcompatibilities"
- In reply to: Manuel Lemos: "[PHP4BETA] PHP 3 syntax imcompatibilities"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

