 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
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
The Tutorial Blog: Adding security to CodeIgniter forms with a custom library class
by Chris Cornutt December 17, 2009 @ 08:15:41
On The Tutorial Blog today they've shared a library that you can use on your CodeIgniter application to help give your forms a bit more security - a math problem "captcha".
The class that we are going to create within CI will simply add a math question that the user will have to enter correctly to continue. This is useful to stop bots from mass submitting information to your forms. The class we are going to write is only very short and simple, but it will give you an idea of how to create classes for your own projects.
Their class creates two random numbers to be used for the question, displays the question the user should answer (Ex. "What is 2 + 4?") and sets the answer in the flashdata, ready for the page submit. When the controller reloads, the answer the user gave and the one from the flash are compared as a part of the standard form validation rules.
voice your opinion now!
codeigniter framework tutorial captcha addition
Felix Geisendorfer's Blog: Assert the yummyness of your cake
by Chris Cornutt October 25, 2007 @ 12:16:00
Felix Geisendorfer has posted an addition to his previous look at exceptions in CakePHP with a modification that uses assertions instead of an if to check the value of a variable.
I suddenly remembered what assertions are and how they could make my code more readable, while making it shorter. I took a quick look at PHP's assert function, but decided that I don't like it. [...] What I ended up doing was basically to create a class called Assert, and abuse it as a name-space for a whole bunch of useful assertion functions.
He includes two examples of how this new class would look, checking to see if a value is empty and to see if a task ID exists in a given value. The code for the assertion class is also included and has methods for checking things like "not empty", "equals to", "is not numeric" and "is an object". And, no, it's not CakePHP specific, so you could take it an use it anywhere.
voice your opinion now!
cakephp assertion class exception addition cakephp assertion class exception addition
Pierre-Alain Joye's Blog: Filter 0.10.0 released
by Chris Cornutt September 01, 2006 @ 03:33:19
On Pierre's blog today, there's a release announcement about the "long awaited for" version of his Filter extension - version 0.1.0.0.
This release will be included in the upcoming PHP 5.2.0RC3, which is likely to be the last RC. Please report any trouble you find, and post your feedback (here, on the pecl-dev mailing list or in the issue tracker), it will help provide the best possible extension in the 5.2.0 release. A stable filter release should still hit the road this year.
Feature additons for this release include an input_get_args method, support for PHP's pcre expressions, JIT support, and support for custom decimal spacers. Several behaviors were changed as well, including when a value is FALSE or NULL, updates to the integer/float parser, and the default filter now being set to "raw".
You can get the complete listing of updates on the project from the Changelog and check out the project and all of its documentation on it's PECL homepage.
voice your opinion now!
pecl package filter release updates feature addition behavior change pecl package filter release updates feature addition behavior change
|
Community Events
Don't see your event here? Let us know!
|