473,385 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Is there a major flaw with PHPs variable handling, in 4.3.11?


Is there a major flaw with PHPs variable handling? I am writing some
PHP scripts and the variables seem to be all over the place.

Eg in one instance, I am counting the number of times a for loop gets
executed. When I force termination the loop count is always set to the
maximum. When I copy the loops current value to a different one, that
variables value also gets changed.

Some procedures don't work when I pass some variables by reference, so
I have to make the variables global to ensure proper output.

The version of PHP I am using is 4.3.11 and I wonder if its variable
handling is totally hosed. It is proving very frustrating.
My deja

Nov 22 '05 #1
3 1210
my********@yahoo.co.uk wrote:
Is there a major flaw with PHPs variable handling? I am writing some
PHP scripts and the variables seem to be all over the place.

Eg in one instance, I am counting the number of times a for loop gets
executed. When I force termination the loop count is always set to the
maximum. When I copy the loops current value to a different one, that
variables value also gets changed.

Some procedures don't work when I pass some variables by reference, so
I have to make the variables global to ensure proper output.

The version of PHP I am using is 4.3.11 and I wonder if its variable
handling is totally hosed. It is proving very frustrating.


This sounds like it could be related to the reference problem:
http://www.php.net/release_4_4_0.php

Dunno about the loop problem, do you have some example code?

--
Oli

Nov 22 '05 #2
Post some sample code.

Nov 22 '05 #3
On 15 Nov 2005 07:01:16 -0800, my********@yahoo.co.uk wrote:
The version of PHP I am using is 4.3.11 and I wonder if its variable
handling is totally hosed. It is proving very frustrating.


There shouldn't be anything hosed about 4.3.11 in the general case.
As other's have suggested, post some code and we'll see what we can do
about it.

Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Nick | last post by:
In ASP you can create a variable that is accessible by all scripts in an application. Is this possible in PHP? Storing a multi-dimensional array in memory has much greater performance benefits...
10
by: Darren | last post by:
OK, I'm trying to understand the need for this. If I understand correctly without this anyone can reverse engineer and obtain the source code of my application - is this correct? And this tool will...
10
by: ma740988 | last post by:
I'm hoping my post here doesn't fall into the 'hard to say' category, nonetheless I've been advised that multiple uses of accessor/mutator (get/set) member functions can be viewed as a 'design...
188
by: christopher diggins | last post by:
I have posted a C# critique at http://www.heron-language.com/c-sharp-critique.html. To summarize I bring up the following issues : - unsafe code - attributes - garbage collection -...
9
by: Tim Frawley | last post by:
I have converted a VB6 application to VB.NET. The old application made extensive use of the Clipboard for copying an Image Name so that it could be pasted into the image capture app when the user...
4
by: Jack Clift | last post by:
Dear Sirs, Sorry, have reposted from another section as have not received any responses... I am using createDocumentFromUrl to obtain data from the web, which is called several times (>100)...
3
by: Disco Octopus | last post by:
Hi, Does anyone know if there is a way to get something equivilent to this... AddType application/x-httpd-php-source .phps .... to work for IIS? Thanks
3
by: Lucanos | last post by:
Hi All, Hoping for some direction here (I have searched, without avail, for a solution already). I was toying with trying to find a way whereby I could have a single PHP file, and then...
9
by: Chad | last post by:
This might be a bit vague and poorly worded..... In my program, I handle function failures using fprintf() and exit() like: fprintf(stderr, "malloc failed"); exit(EXIT_FAILURE); There...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.