Dropping Variables |
|
Except the $_POST and $_GET they are visible inside the function
|
||||||||||||
|
|
i say the result will be 1 i mean 11 of course it would be mental if the result was 1
|
||||||||||||
|
Veteran
|
Ok, lets sort this out. First of all lets make it perfectly clear that the result is 11 - as you mentioned in your last post.
Now:
Yes, it makes sense - these are PHP global variables and are visible everywhere as such.
Once again - I guess you meant 11 instead of 1 - right?
No, the result will be "undefined" until you enter the function - could you please provide more details related to this use case. What do you mean by not entering the function? Where do you see the result equal to 1? Thanks!
Again - when exactly does it happen? When you do step into the function or inside the function or as soon as you step outof the function? I think screen shot would be very helpful here - if you could please provide it. Please remember also that $var and $y are local to function scope and will be undefined outside of that function |
||||||||||||||||||||
|
|
when i say "enter the function" i mean enter the function in the debugger not enter the function in the program.
We always enter the function in the program. In PHPEd i run the debugger by pressing F8 and then i press F8 to run though each line of code. If i do that for each line then it works fine and outputs 11. However if i press F7 and "enter the function" then $var is undefined even though i passed it $foo (which is 1). Then i press F8 again and i process this line
however after this $y is still undefined. So then $result is undefined. However if i "step over the function" as in process the function but not actually "enter" it in the debugger (press F8 again after $foo = 1; ) Then $result is 11. Sorry about the confusion with the 1 and 11, thats what happens when i can't debug my code hahahaha |
||||||||||||||
|
Veteran
|
|
||||||||||||
|
|
thanks mate,
it has happenned randomly before, but i just used to restart my computer and it would fix, but today i've tried restarting and reinstalling and it doesn't seem to make any difference. |
||||||||||||
|
Veteran
|
Could you try the latest version - you can use the eval to see if it is fixed there.
|
||||||||||||
|
Site Admin
|
Rozi,
There are no known issues like this in PhpED 3.3. If you belive you faced up with a problem, please submit screenshots and detailed description on what you did, what you expected to get and what you actually got. Thank you. |
||||||||||||
|
Dropping Variables |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by