473,574 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

equivalent to use strict in php?

Hi
is there any equivalent of perl's use strict; in PHP,??
TIA
--
http://www.gregerhaga.net
Aug 6 '05 #1
2 7476
Greger wrote:
Hi
is there any equivalent of perl's use strict; in PHP,??
TIA


In php.ini file:
error_reporting E_ALL

On top of each file:
error_reporting (E_ALL);

There is also a display_errors directive which allows you to display errors,
warnings and notices in your browser or have them written to the server's
error log only; see php.net for more information.

JW

Aug 6 '05 #2
On Sat, 06 Aug 2005 11:09:21 +0200, Greger <bo*******@mark etweighton.com>
wrote:
is there any equivalent of perl's use strict; in PHP,??


No, because PHP doesn't have lexically scoped variables in the same was as
Perl, nor does it have any way of defining variables other than through the
first assignment.

There's the (strongly recommended) error_reporting (E_ALL) but this basically
gets you an equivalent of perl's use warnings;

--
Andy Hassall / <an**@andyh.co. uk> / <http://www.andyh.co.uk >
<http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool
Aug 6 '05 #3

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

Similar topics

2
4699
by: The Plankmeister | last post by:
Hi... What's an equivalent of doing: <center>hello!</center> in 4.01 strict? I'm using stylesheets and am telling the various selectors I want to be centred to "text-align : center;" but they only align textual objects, not image objects:
24
5810
by: Mohammd M. Hussain | last post by:
Hi, I am writing an XHTML 1.0 Strict Compatible web page. However, the validator complained about the <br> tag. I wonder whether there is another alternative for this. Thanks,
12
15613
by: vvv | last post by:
Hi All, Do we have anything in .NET which is equivalent to C++'s Typedef . Regards, Vasanth
17
4472
by: David | last post by:
Hi all, I have the following problem: my program works fine, but when I add option strict at the top of the form, the following sub fails with an error that option strict does not allow late binding. What should I do? Public Sub MyMnuHandler(ByVal sender As Object, ByVal e As System.EventArgs) If sender.checked = True Then...
2
12182
by: Tasman | last post by:
Is there an equivalent of valign="bottom" for a table within a DIV using CSS? I've found I can center a table of buttons in a DIV with {margin-left:auto; margin-right:auto}. But I am unsure how to get this table to sit at the bottom of the DIV. Example code follows, or see http://home.exetel.com.au/tas/valign/test01.html
4
1414
by: John | last post by:
Hi What is the late binding equivalent of the below code? Many Thanks Regards Dim O As Outlook.Application
70
14978
by: axlq | last post by:
I'm trying to design my style sheets such that my pages have similar-looking fonts different platforms (Linux, Mac, Adobe, X-Windows, MS Windows, etc). The problem is, a font on one platform might be the same as a font on another platform, but with different names. I'd like to be able to specify the font names that are "most equivalent." ...
32
4033
by: Andrew Poulos | last post by:
I'm writing some ASP using js and I need to do a case sensitive SQL select. Googling gave me this: SELECT * FROM User WHERE Strcomp("Blue",,vbBinaryCompare)=0 Strcomp is from vbs. Is there a js equivalent, or some other way to handle this? Andrew Poulos
2
4264
by: Big Bill | last post by:
What's the CSS equivalent for that frequently found table coding? Roughly speaking? I know that speaking of equivalents can itself lead one into a semantic nightmare but, loosely speaking, what would you guys put? BB -- http://www.kruse.co.uk/internet-marketing-small-business.htm http://www.kruse.co.uk/close-ended-questions.htm
0
7808
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8063
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7822
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...
0
8101
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...
0
3742
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...
0
3754
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2249
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
1
1347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1062
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...

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.