On 16 November 2011 13:56, Tim Streater <t...@clothears.org.uk> wrote:
> I'm looking at the source of a web sockets server and I see these various 
> forms:
>
>  "ws://{$host}{$path}"
>  "HTTP/1.1 ${status}\r\n"
>
> Are these simply equivalent to:
>
>  "ws://" . $host . $path
>  "HTTP/1.1 " . $status . "\r\n";
>
> and if so, is there any particular benefit to using that form? Or if not, 
> what do they mean?
>
> (I've read up about variable variables).
>
> Thanks,
>
> --
> Cheers  --  Tim
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

If you want to embed $array[CONSTANT], then the {} is used.

I use {} out of habit for non arrays. Not sure if there is an impact.

http://docs.php.net/manual/en/language.types.string.php#example-71
shows the use.

Oh. I've fixed the layout bug for
http://docs.php.net/manual/en/language.types.string.php#example-70.

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to