Please keep in mind you are speaking about microseconds of performance
improvements. Optimising on this level is complete and utter nonsense.
Using output buffering may give your application a much higher
performance boost. And then you can still use a cache (opcode cache,
page cache, ...) which gr
Wow! Fantastic rundown Satyam! Thanks for posting such a complete analysis. I
had no idea that you could use commas instead of periods to join multiple
strings much less do it without concatinating, that's very interesting.
I don't think I've ever seen that used in any sample code before. I'm
On 31 August 2005 16:56, [EMAIL PROTECTED] wrote:
> $varname = '$firstname $lastname told me to find the file in folder
> C:\newtext\'; echo $varname;
>
>
> Yields..
>
> $firstname $lastname told me to find the file in folder C:\newtext\
Actually, that'll give you an error as well, since \' is
> In fact, this is a poor example since the difference gets larger with
longer
> string and more arguments. When you use dots, the interpreter has to
> actually concatenate the string, looking for memory to do so and freeing
it
> up afterwards. This takes time. With commas, each argument is sent
> hi
> i have a problem when i am formating a string
> the problem is it converts the \n in the string to a new line
> here is the code
>
> $Text = "D:\AppServ\www\intranet\admin\store\nodirectory\sub";
> $Replace = "D:\AppServ\www\intranet\admin\store";
> $with = "http://localhost/bank/admin/sto
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> To elaborate on Philip's response (which is correct)...
[]
>
>
> I've read "never use double quotes unless you have to" because it could
> potentially speed up PHP a little because it won't be trying to interpret
> every string.
To elaborate on Philip's response (which is correct)...
Anything in double quotes (" ") will be interpreted by PHP before figuring out
what the actual value is. Items like \n, \t, etc are therefore converted to a
newline (\n) or a tab (\t) before assigning to the variable. Variables within
t
hi
i have a problem when i am formating a string
the problem is it converts the \n in the string to a new line
here is the code
http://localhost/bank/admin/store";;
//$doc = str_replace ($Replace, $with, $Text);
$doc = str_replace( '\\', '/', str_replace( $Replace, $with, $Text ) );
echo $doc;
On 8/31/05, Ahmed Abdel-Aliem <[EMAIL PROTECTED]> wrote:
> hi
> i have a problem when i am formating a string
> the problem is it converts the \n in the string to a new line
> here is the code
>
> $Text = "D:\AppServ\www\intranet\admin\store\nodirectory\sub";
> $Replace = "D:\AppServ\www\intranet
hi
i have a problem when i am formating a string
the problem is it converts the \n in the string to a new line
here is the code
http://localhost/bank/admin/store";;
//$doc = str_replace ($Replace, $with, $Text);
$doc = str_replace( '\\', '/', str_replace( $Replace, $with, $Text ) );
echo $doc;
10 matches
Mail list logo