[SOLVED]Is this a Scriptcase bug?

When I write this simple code as following:

for($i = 0;$i <10;$i++)
{
$a = “{” . “why?<br />”;
echo $a;
}

As the code, the output should be

{why?
{why?
{why?
{why?
{why?
{why?
{why?
{why?
{why?
{why?

But,the actual output is

{ why?
{ why?
{ why?
{ why?
{ why?
{ why?
{ why?
{ why?
{ why?
{ why?

Why the blank space between “{” and “why?” came out?

So, I change the code as above , like this :

for($i = 0;$i < 10;$i++)
{
$a = “{”;
$b = trim($a);
$c = $b . “why?<br />”;
echo $c;
}

this time ,the output result is actually as I need

{why?
{why?
{why?
{why?
{why?
{why?
{why?
{why?
{why?
{why?

So, Is this a Scriptcase bug? Please give me an answer, thanks.

By the way, My Scriptcase version is 7.01.0003
you can test this problem as I wrote on a “Blank” application.

I think it’s a bug. I think it has to do with the {. Look into the generated source to be sure.

I don’t think its a bug, its by the php language default and can be fixed by trim() function
which he is already used… :wink:

Concatenation of strings is automatically preceded by a space is default php?

Must be a new feature… :slight_smile: Never worked that way in the 15 years I have been using PHP.

Hello,

Issue reported to our bugs team.

regards,
Bernhard Bernsmann

Hello,

This problem has been resolved and will be released in the next update.

Thank you for confirming this. Much appreciated!