473,796 Members | 2,875 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1231
my********@yaho o.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********@yaho o.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
16067
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 than storing in a database or session (which just gets saved to disk anyway). Id like to have my commonly used application variables in memory. Is this possible or is it one of the few flaws of PHP?
10
3761
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 prevent this? Why isn't this tool automatically executed by default whenever I build my apps? My company is building corporate applications and don't want our source code available to anyone. I assume there is a Dotfuscator that
10
2251
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 flaw'. In that regard I'm trying to create an 'example' class that's an alternative to the accessor/mutator approach. To further describe the problem consider the class BAR (below) which has a member data in_use that FOO needs visibility into. ...
188
7258
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 - non-deterministic destructors - Objects can't exist on the stack - Type / Reference Types
9
5955
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 scans the image. My applications run as compiled assemblies from our Intranet server and I have setup a Main sub routine in the application with the following line: <STAThread()> Public Sub Main() Note: There is no timer in this application.
4
2638
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) for the application I am attempting. I receive the following IE message when making this call:
3
1978
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
2071
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 specify whether to either see the processed output or the source code by using the extensions php and phps (respectively). So, with one file called "theFile.php" on the server, going to
9
2588
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 are 5 of these. Since each one has two lines, the total lines of
0
9527
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10172
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.