Welcome! » Log In » Create A New Profile

Strict version in PHP 4?

Posted by Ryan McCue 
Ryan McCue
Strict version in PHP 4?
June 23, 2007 08:33PM

Just wondering, does the PHP 5 strict version work in PHP 4, or is it PHP 5 only? Thanks.

Re: Strict version in PHP 4?
June 23, 2007 08:34PM

It's PHP 5 only. Note that "Strict" has nothing to do with HTML 4.01 Strict/Transitional.

HTML Purifier, Standards Compliant HTML Filtering

Ryan McCue
Re: Strict version in PHP 4?
June 23, 2007 08:56PM

I'm quite aware of that; it's just I thought that the changes might be backwards compatible, as I'd like to get rid of all errors, yet still support my PHP 4 users.

Re: Strict version in PHP 4?
June 23, 2007 09:09PM

It's practically impossible to write portable code that is E_STRICT compliant for two main reasons:

1. is_a() is deprecated in favor of instanceof, which is PHP5-only 2. static methods must have the static keyword, which is PHP5-only

HTML Purifier, Standards Compliant HTML Filtering

Ryan McCue
Re: Strict version in PHP 4?
June 23, 2007 09:16PM

OK, thanks. I personally don't use classes, since I don't need them, so I was unaware of those.

Oh and one more thing. Can I steal your navigation CSS, since it's exactly what I need?

Re: Strict version in PHP 4?
June 23, 2007 11:50PM

Heh. OOP is a powerful thing, try it out some time.

Quote:
Oh and one more thing. Can I steal your navigation CSS, since it's exactly what I need?

Of course. :-)

HTML Purifier, Standards Compliant HTML Filtering

Ryan McCue
Re: Strict version in PHP 4?
June 24, 2007 08:26AM

Thanks for all your help ;) I'll be back some time for more questions

Sorry, you do not have permission to post/reply in this forum.