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

Author:
Your Email:

Subject:

HTML input is enabled. Make sure you escape all HTML and angled brackets with < and >.

Auto-paragraphing is enabled. Double newlines will be converted to paragraphs; for single newlines, use the pre tag.

Allowed tags: a, abbr, acronym, b, blockquote, caption, cite, code, dd, del, dfn, div, dl, dt, em, i, ins, kbd, li, ol, p, pre, s, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var.

For inputting literal code such as HTML and PHP for display, use CDATA tags to auto-escape your angled brackets, and pre to preserve newlines:

<pre><![CDATA[
Place code here
]]></pre>

Power users, you can hide this notice with:

.htmlpurifier-help {display:none;}

Message: