Re: [PHP] strange string evaluation

2008-07-31 Thread brian
Marten Lehmann wrote: Hello, with PHP 5.0.x this two lines of code returned "{TEST}": $var = "TEST"; print "\{$var}"; But with PHP 5.2.x, the same code returns "\{TEST}" If I remove the backslash: $var = "TEST"; print "{$var}"; then just "TEST" is return (without any brackets). What is the

Re: [PHP] strange string evaluation

2008-07-31 Thread Robert Cummings
On Thu, 2008-07-31 at 17:54 +0200, Marten Lehmann wrote: > Hello, > > with PHP 5.0.x this two lines of code returned "{TEST}": > > $var = "TEST"; > print "\{$var}"; > > But with PHP 5.2.x, the same code returns "\{TEST}" > > If I remove the backslash: > > $var = "TEST"; > print "{$var}"; > >

[PHP] strange string evaluation

2008-07-31 Thread Marten Lehmann
Hello, with PHP 5.0.x this two lines of code returned "{TEST}": $var = "TEST"; print "\{$var}"; But with PHP 5.2.x, the same code returns "\{TEST}" If I remove the backslash: $var = "TEST"; print "{$var}"; then just "TEST" is return (without any brackets). What is the recommended way for PH