 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Nikita Popov's Blog: htmlspecialchars() improvements in PHP 5.4
by Chris Cornutt 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).
voice your opinion now!
htmlspecialchars improvement release doctype error utf8
KingFoo Blog: PHP 5.4 - What's new?
by Chris Cornutt January 24, 2012 @ 08:50:42
On the KingFoo blog today there's an excellent look at everything new coming up in PHP 5.4, the next version of PHP set to be released in early February.
PHP 5.4 will be stable soon.
In this post I'll try to give you an overview and examples of the new PHP 5.4 features. If you want to try out PHP 5.4 (which is currently in RC3), it has to be installed first. I suggest that you try this out on a virtual machine so you don't break your current PHP version.
Improvements on the list include:
- Improved Session Extension
- Built-in webserver
- Traits
- Array dereferencing
- Method calls through arrays
- Binary notation for integers
- Instantiate a class without running constructor
- Improved JSON extension
- Improved CURL extension
And this is just a start - they detail each of the improvements and provide code where needed to illustrate the update. They also link over to the PHP.net manual (or PHP bug tracker) for more information on the new feature/change.
voice your opinion now!
version upcoming language improvement addition new
Brian Swan's Blog: Why is PHP 5.3 on Windows faster than previous PHP versions?
by Chris Cornutt October 13, 2011 @ 08:42:12
In a new post to his blog Brian Swan explains why the latest versions of PHP (the 5.3.x series) are faster now on Windows than some previous versions have been. (Hint: updated technology can work wonders sometimes)
[Rasmus Lerdorf recently said at a Seattle meetup] "If you aren't running PHP 5.3 on Windows, you're lucky…because you have a 40% performance boost coming." He clarified this by saying that, with some help from Microsoft, improvements were made in PHP 5.3 that led to a 40% performance improvement of PHP on Windows. Because he didn't go into the details of why this performance boost was realized, I got questions in email the next day asking about why.
The information in a borrowed slide (from a presentation by Pierre Joye) shows what the differences between the versions are - things like the use of a more modern compiler (VC9 vs VC6), calls to the Win32 API directly and better library management.
voice your opinion now!
windows performance improvement compiler library management win32 api
Derick Rethans' Blog: Xdebug's Code Coverage speedup
by Chris Cornutt September 23, 2011 @ 09:56:33
Derick Rethans has a new post to his blog today talking about some work that's been done to speed up XDebug's code coverage generation. Changes in the coming 2.2 release have some improvements that make things perform better and put less stress on PHP in the process.
Code coverage tells you how much of your code base is actually being tested by your unit tests. It's a very useful feature, but sadly, it slows down PHP's execution quite a lot. One part of this slowdown is the overhead to record the information internally, but another part is because I have to overload lots of opcodes. (Opcodes are PHP's internal execution units, similar to assembler instructions) They are always overloaded even if code coverage is not used, because it's only safe to overload them for the whole request.
These changes were from a combination of contributions from Taavi Burns and a new ini setting that will allow you to enable or disable the code coverage in XDebug. Benchmarking shows a good amount of time reduction in coverage runs - dropping anywhere from a few seconds to over a minute. He also mentions the idea of "modes", shortcuts to predefined settings for different types of reporting (like "profiling" or "tracing").
voice your opinion now!
xdebug codecoverage speed improvement opcode contribution benchmark
Marco Tabini's Blog: The easiest way to add unit test to your application
by Chris Cornutt September 09, 2011 @ 09:17:32
In a new post to his blog Marco Tabini offers some suggestions on unit testing - not really a tutorial on how to it, more of an "easy way in" to introducing it to your development process.
Stopping development for weeks while you figure out how to add unit tests to cover your entire codebase is simply something that cannot be done (at least, not if you want to keep your job), no matter what future benefits it might bring. The good news is, adding unit testing to your existing project only takes five minutes - which is pretty much how long it takes to get a unit testing framework installed. That's it. Move on.
He puts the emphasis on unit testing to manage change in a code base, not so much to ensure that the current application runs as it should (not initially at least). He's found them most useful in bugfixing, refactoring and when adding new functionality. Current tests (and even tests written in TDD) can help with all of these. He includes reminders that if the tests aren't written well, they're useless and that once you've started testing, it needs to be continuous, even if they're not perfect.
voice your opinion now!
unittest opinion application bugfix improvement refactoring
DZone.com: PHP 5.4 features poll the results
by Chris Cornutt August 03, 2011 @ 08:19:43
On DZone.com today Giorgio Sironi has posted the results of a poll taken a little while back concerning what people thought was the best feature of the upcoming PHP 5.4 release.
After two weeks, we have closed the poll among the PHP community of Web Builder Zone to establish which are the most wanted features, which will influence development of applications on PHP 5.4. Hopefully this poll would also shape our focus in tutorials in the future - I personally plan to dedicate more time to the winning features.
Runners up included the removal of magic quotes and strict mode with the top three being (in this order) the upload progress patch, traits and the array improvements leading the pack. You can see the results here.
voice your opinion now!
poll results traits upload progress array improvement
XPertDeveloper.com: PHP coding tips for Performance Improvement
by Chris Cornutt March 30, 2011 @ 10:35:14
The XPertDeveloper blog has shared some micro-optimization tips in a new post to their blog today. It's ten things you can do to squeeze that extra little bit out of your application's performance.
This post covers most performance improvement tips related to PHP coding. While working with small website or project it's ok to ignore these tips, but when you are dealing with large website or project which is going to maintained for long term and which have large number of user base. Developer must have to consider the below tips from the starting of the project.
Their tips include:
- echo is more faster than print
- Always use single quotes for long strings instead of double quotes. Because in double quotes it will search for php variable to evaluate them.
- If you can declare a method as static then let it be
- Try to minimize relative paths for files inclusion.
Keep in mind that these aren't a "silver bullet" for making your application run faster. These sorts of suggestions should only be applied after the major optimizations (caching with something like APC, good application structure) have been put in place. For most of these examples, you'll only really see an improvement if your application makes use of them heavily in a looping structure.
voice your opinion now!
performance microoptimization improvement opinion
Lukas Smith's Blog: Symfony2 stuff
by Chris Cornutt November 01, 2010 @ 10:48:17
Lukas Smith has posted a look at some of the things that have been included in the latest revisions of the Symfony2 framework.
Since about 4 weeks I have really started using Symfony2, in development for a work project no less. Kinda crazy seeing its still in pre-alpha phase, but I think its a great platform today and I know its going to be the best soon aka once we have a stable release. But in these 4 weeks quite a few things have popped up that I like to see addressed. Most things aren't really about writing code, but figuring out how things should be. The kind of stuff that is hard to fix on your own.
He mentions six different things (one or two with code examples) that are new to the framework or are being newly discussed:
- Making 3rd party controllers truly reusable
- Flash message handling
- Easy DIC customization of 3rd party Bundles
- Issues with setting GET parameters in functional tests as well as forward() calls
- Form validation issues
- Aligning the handling for Bundle configuration
voice your opinion now!
symfony2 improvement discussion framework
Paul Reinheimer's Blog: XHGui Improvements
by Chris Cornutt June 15, 2010 @ 11:03:01
Paul Reinheimer has posted about some updates to a profiler project he's been working on, XHProf, with some new GUI improvements thanks to Highcharts. XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface.
I merged my Highcharts branch into master today, including a bunch of improvements to the GUI for XHProf including: using Highcharts for graphing URLs over time, which allows for multiple axis per graph, adding a pie chart to the individual run page to show where time was spent on page load, ability to merge various calls for display within the pie chart (e.g. mysql_* into mysql), switched to the javascript tablesorter for the single run results, filter to allow you to view results only from a specific server or domain
You can see two screenshots of this new feature in action here and here. If you'd like to give the tool a try, you can grab the latest version from github.
voice your opinion now!
gui improvement xhprof profiler highcharts
|
Community Events
Don't see your event here? Let us know!
|