News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Nikita Popov's Blog:
htmlspecialchars() improvements in PHP 5.4
January 30, 2012 @ 09:55:24

In this new post to his blog Nikita Popov looks at an update that might have gotten lost in the shuffle of new features coming in PHP 5.4 - some updates to htmlspecialchars.

One set of changes that I think is particularly important was largely overlooked: For PHP 5.4 cataphract (Artefacto on StackOverflow) heroically rewrote large parts of htmlspecialchars thus fixing various quirks and adding some really nice new features. Here a quick summary of the most important changes: UTF-8 as the default charset, improved error handling (ENT_SUBSTITUTE) and Doctype handling (ENT_HTML401,...).

He goes into each of these three main features in a bit more detail, providing code to illustrate the improved error handling and the new flags for Doctype handling (covering HTML 4.01, HTML 5, XML 1 and XHTML).

0 comments voice your opinion now!
htmlspecialchars improvement release doctype error utf8


blog comments powered by Disqus

Similar Posts

Greg Beaver\'s Blog: Finally - a new release of phpDocumentor

Greg Beaver\'s Blog: Quick Note - Looks like ZDE 5.1.0 is out, but...

Joshua Eichorn's Blog: Testing phpDocumentor 1.3.2

Matthew Weir O'Phinney's Blog: Zend Framework 1.5 is on its way!

Derick Rethans' Blog: The first Release Candidate of Xdebug 2


Community Events

Don't see your event here?
Let us know!


example symfony2 php7 performance podcast introduction version release xdebug opinion voicesoftheelephpant series interview extension library framework laravel conference api community

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework