473,396 Members | 2,030 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,396 software developers and data experts.

is there a php editor of developer environment that asks for variables to be declared?


PHP does not ask developers to declare their variables. You can simply
create a variable on the fly. That is nice for small scripts and a
headache for large projects. Is there editor out there that enforces a
kind of strict mode? I don't need full variable typing, I just want an
editor that makes me declare all variable - at the very least I'd like
to be able to catch spelling errors.

Oct 15 '05 #1
8 1426
If you crank up the error reporting level PHP will warn you about using
a variable before it has been defined.

http://www.php.net/manual/en/ref.err...rror-reporting

You probably want E_ALL.

Oct 15 '05 #2

ZeldorBlat wrote:
If you crank up the error reporting level PHP will warn you about using
a variable before it has been defined.

http://www.php.net/manual/en/ref.err...rror-reporting

You probably want E_ALL.


Good to know. So if I set it to E_ALL, PHP will want me to write this
line:

var $myHtmlString = "";

before I start using the variable $myHtmlString?

Oct 24 '05 #3
lk******@geocities.com wrote:
ZeldorBlat wrote:
If you crank up the error reporting level PHP will warn you about using
a variable before it has been defined.

http://www.php.net/manual/en/ref.err...rror-reporting

You probably want E_ALL.


Good to know. So if I set it to E_ALL, PHP will want me to write this
line:

var $myHtmlString = "";

before I start using the variable $myHtmlString?


Probably you may not be wanted... But, anyway you can do such
wonders if you use <http://in2.php.net/set_error_handler>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Oct 25 '05 #4
R. Rajesh Jeba Anbiah wrote:
lk******@geocities.com wrote:

<snip>
Good to know. So if I set it to E_ALL, PHP will want me to write this
line:

var $myHtmlString = "";

before I start using the variable $myHtmlString?


BTW, I don't think you need such feature. If you use a variable
without having a value in it, it's an error; and you have to correct
it. If you just want to fill it with empty text or null, as somone
said, you set your error level to low.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Oct 25 '05 #5
You might try this one ...

http://www.visualiez.com/stuff/belib...rorhandler.zip

--
Raqueeb Hassan
Bangladesh

Oct 25 '05 #6
> > Good to know. So if I set it to E_ALL, PHP will want me to
write this
line:
var $myHtmlString = "";
before I start using the variable $myHtmlString?
BTW, I don't think you need such feature. If you use a variable
without having a value in it, it's an error; and you have to correct
it. If you just want to fill it with empty text or null, as somone
said, you set your error level to low.


I'm not sure I understand you. I want to declare my variables before
they are used. I'd like an IDE that enforces it. I might declare a
variable like this:

var $isFlagSet = false;

and then later I might have an if() test like this:

if ($ifFlagSet) {
echo "success";
} else {
echo "sorry, there was an error";
}

Oct 25 '05 #7
In article <11**********************@g47g2000cwa.googlegroups .com>,
lk******@geocities.com says...


PHP does not ask developers to declare their variables. You can simply
create a variable on the fly. That is nice for small scripts and a
headache for large projects. Is there editor out there that enforces a
kind of strict mode? I don't need full variable typing, I just want an
editor that makes me declare all variable - at the very least I'd like
to be able to catch spelling errors.


I wish PHP had the "use strict" mode that Perl has. I've gotten accustomed to
weeding out typos and goofy errors that take a little longer to debug now. Maybe
it was too much of a crutch. I still catch myself starting with "my $var =... ".
Maybe there's a settings in the php.ini file to output more information to the
web error log, but wasn't seeing anything obvious.

Rich
--
Newsguy -- http://newsguy.com

Oct 25 '05 #8
On Wed, 26 Oct 2005 01:17:59 +0300, <ri**@newsguy.com> wrote:
In article <11**********************@g47g2000cwa.googlegroups .com>,
lk******@geocities.com says...


PHP does not ask developers to declare their variables. You can simply
create a variable on the fly. That is nice for small scripts and a
headache for large projects. Is there editor out there that enforces a
kind of strict mode? I don't need full variable typing, I just want an
editor that makes me declare all variable - at the very least I'd like
to be able to catch spelling errors.


I wish PHP had the "use strict" mode that Perl has. I've gotten
accustomed to
weeding out typos and goofy errors that take a little longer to debug
now. Maybe
it was too much of a crutch. I still catch myself starting with "my $var
=... ".
Maybe there's a settings in the php.ini file to output more information
to the
web error log, but wasn't seeing anything obvious.

Rich
--
Newsguy -- http://newsguy.com


Free up then.
Give up with PHP.
Love Perl - us it. I hate PHP for such things too :)

--
Exact Meta Search
http://exactsearcher.com
Oct 26 '05 #9

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

Similar topics

0
by: Dave | last post by:
Hi everyone, (I already posted this to the VS.NET IDE news group without any responses, so I'm attempting one more time in this group) The issue I'm having is occuring in the IDE of VS.NET...
7
by: Matthew | last post by:
I am very new to JavaScript, and have been using Notepad. Is there a editor out there that showes the JavaScript environment variables? Example: I just found out about the document.forms array...
2
by: shaun | last post by:
Is there anyway to access a system environment variable from within an xml document? Two applications: 1) I'd like to make an XBase declared path equal to an environment variable declared path....
6
by: Uttam | last post by:
Hello, I am using the code from Chapter 17 specifically the code from the font frmListFonts in my application. I have taken care to copy all the relevant modules / class modules into the...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
4
by: johnwind | last post by:
Hello All, I hope someone out there has some input on this problem, it driving me nuts. This problem only occurs with one code .mdb out of many I have on my system, which implies the problem...
2
by: David | last post by:
hi been using Editplus for JScript/MS Access/ASP for 4 years now while asp programming. Would like to try some other environment now while migrating to C#/.Net Some environments I find...
5
by: rn5a | last post by:
Can someone please suggest me a text editor especially for DEBUGGING ASP scripts apart from Microsoft Visual Interdev? I tried using Visual Interdev & created a project but Interdev generates...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...

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.