NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Using BreakPoints


Joined: 11 Dec 2008
Posts: 2
Reply with quote
im using Phped for a while and i have a problem with that
i post a simple code to show my problem:
Code:
1:<?php
2:    echo "First<br>";
3:    for($i=0;$i<=10;$i++)
4:        echo $i,"<br>";
5:    echo "Last";
6:?>

when debuging this code step by step (using F7,Step Into) it run ok until line 3 and after another F7 it jump to line 5 and execute whole FOR with 1 press, i assume its from implementation of PhpED but how i can run line 4 step by step if i want to see them individually on the output window? is there anyway or u guys just prefer to be like this. im fan of C++ and very familiar with old way.
thanks for your support.

Edit:
i dont know if i should post it here or on "PhpED PHP IDE / Windows" section. if i made a mistake tell me i will move it there Smile
my software info:
Windows XP SP2, PhpED 5.2 Pro.
View user's profileFind all posts by elnaz1010Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
it's known behaviour of php compiler.
it considers for($i=0;$i<=10;$i++) echo $i,"<br>"; as one statement.
If you need to break it into multiple, add curly braces:
Code:
for($i=0;$i<=10;$i++)  {
        echo $i,"<br>";
}

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 11 Dec 2008
Posts: 2
Reply with quote
dmitri wrote:
it's known behaviour of php compiler.
it considers for($i=0;$i<=10;$i++) echo $i,"<br>"; as one statement.
If you need to break it into multiple, add curly braces:
Code:
for($i=0;$i<=10;$i++)  {
        echo $i,"<br>";
}

thanks so much for support
regards.
View user's profileFind all posts by elnaz1010Send private message
Using BreakPoints
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic