News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
Till's Blog:
ZendFramework (performance) II
December 01, 2008 @ 12:08:49

On his blog, till has posted the second part of his testing on the Zend Framework and its performance in general usage tasks.

A disclaimer which I should have added to my last article would include that most of my pseudo benchmarks are very subjective and also way too basic. For example, our server setup is pretty comprehensive but we have to take everything into account in order to provide real benchmark. And when I write everything I mean CPU (cores), RAM, motherboard, HDD and so on. Maybe even the throughput of the network card -- if it's different.

This second post is an attempt to correct some of the sore points from the previous one. Here's a list:

  • require/include(_once) and __autoload, or "Why is __autoload() 'better'?"
  • Zend_Loader ERRATA
  • Caching database results
  • Zend_Db
  • Zend Framework (what it currently lacks)
0 comments voice your opinion now!
zendframework performance correction autoload zendloader zenddb



Sebastian Bergmann's Blog:
Freezing and Thawing PHP Objects
December 01, 2008 @ 11:12:18

Sebastian Bergmann has posted details (and a patch) for freezing and unfreezing objects via the new setAccessible method included in the SPL in PHP 5.3.

One of the many new features that have been added for PHP 5.3 is the setAccessible() method of the ReflectionProperty class that is part of PHP's Reflection API. This method makes protected and private attributes (unfortunately, the class is called ReflectionProperty instead of ReflectionAttribute) of a class or object accessible for the ReflectionProperty::getValue() and ReflectionProperty::setValue() methods, thus making protected and private attributes "open" for full read and write access from the outside.

A bit of code shows how to "freeze" and "thaw" the objects out - creating an object, calling the freeze() method on it to protect it from use, then the thaw() method to bring it back out where it can be accessed. Stefan Priebsch helped to create this class and the patch.

0 comments voice your opinion now!
freeze thaw object php5 patch spl setaccessible


Jani Hartikainen's Blog:
NetBeans 6.5 review (with PHP support)
December 01, 2008 @ 10:26:14

Jani Hartikainen has posted a review of the latest release of the NetBeans IDE with an updated version of their PHP support:

During the weekend, I tried out NetBeans 6.5 and its new PHP related functionality. I had earlier seen some quick shots of how the support was, and it seemed like a good contender for big names like Zend Studio. What features does NetBeans 6.5 have for PHP developers? How does it compare against Zend Studio for Eclipse?

He looks at some of the basics it includes (PHPDocumentor support, autocomplete, etc) and gets a bit more in depth by comparing it directly to Zend Studio, a look at the project view and the integration of debugging support and version control. He also points out the HTML, CSS and Javascript support that comes bundled in too.

0 comments voice your opinion now!
netbeans support review zendstudio eclipse feature compare


Rob Allen's Blog:
File uploads with Zend_Form_Element_File
December 01, 2008 @ 09:30:46

With the recent released of the 1.7 version of the Zend Framework Rob Allen wanted to post about a new form element type that integrates some much needed functionality - Zen_Form_Element_File.

Now that Zend Framework 1.7 has been released, I thought I'd take a look at the built in file upload element, Zend_Form_Element_File, and see how it can be used. This is how to use it in its most basic form.

The form in this example is similar to his previous example and the simple code is included for the form, the controller and the view.

That's all there is to it for simple uploading of forms. There are still a few fairly important bugs in the component that we'll have to wait for 1.7.2 for. Specifically the Count validator doesn't always work as you'd expect and don't use getValues() and receive() as it isn't yet clever enough to know not to call move_uploaded_file() more than once.
0 comments voice your opinion now!
file upload tutorial zendframework zendformelementfile


PHPro.org:
Calculate Friday The 13th With Datetime Class
December 01, 2008 @ 08:46:51

As an introduction to the Datetime class functionality PHP 5 has, Kevin Waterson shows how to use it to calculate the "Friday the 13th" for any year.

This class is a request from a PHPRO.ORG regular who asked for a method to calculate Friday the 13th for the next n years. The calculation itself is easy, however, it presents a good opportunity to introduce the PHP datetime class.

He points out that timestamps, because of they way integers are handled, have a somewhat limited lifespan (2038) and dates beyond that cannot be determined by the usual date functions. Instead, he shows how to set up a DateTime object, set a timezone and loop through the days to find the Fridays that land on the 13th.

0 comments voice your opinion now!
tutorial datetime class php5 friday thirteenth


Marco Tabini's Blog:
It turns out, I was wrong
December 01, 2008 @ 07:54:29

Correcting himself from some previous comments concerning PHP 5 versus PHP 4 usage among developers, Marco Tabini has posted something new to his blog with some updated stats.

In the past, I have not been shy about sharing my opinion that the impending death of PHP 4 would have wreaked all sorts of havoc over the PHP world. I am glad to say that I've been wrong - dead wrong, in fact - and that I have never been as happy to be so far off the mark before.

According to a readers survey that the php|architect magazine ran (about a year ago even) PHP 5 is stronger than ever, taking up well over sixty percent of the usage with only a small part still hanging with PHP 4. Check out his graph for the full rankings.

0 comments voice your opinion now!
statistics php4 php5 usage correction phparchitect survey reader




KillerPHP.com:
Creating a Wordpress Theme from Scratch (Video)
November 28, 2008 @ 13:23:18

Stefan Mischook (of the KillerPHP.com site) has posted a new video tutorial about creating WordPress themes:

I just released a new video course on how to create a Wordpress theme/template from scratch. In these 12 videos, we will take someone with some beginner HTML and CSS skills through the steps needed to build a WordPress template from scratch. The videos use only a collection of freely downloadable tools that are available on Windows and Mac.

The full series will cost about $20 USD for a download or $30 USD to have the DVD shipped out to you. The videos focus on different parts of the process like making top-level navigation, setting up content areas and and creation of a custom homepage.

0 comments voice your opinion now!
wordpress theme scratch original tutorial video


Chris Hartjes' Blog:
Handling Multiple Environments In Your PHP Application
November 28, 2008 @ 12:41:24

Chris Hartjes has posted his method for creating a development setup that lets you use multiple environments with your code.

In anticipation of my talk at PHP Quebec 2009 I've been going over my slides and thinking about what I'm going to update for it. One little nugget I'd thought I'd share is one way of handling having multiple environments your code must run in.

It uses a PHP variable in the $_SERVER superglobal - a custom one, APP_ENV - set by the application and checked to ensure global options are correctly set.

0 comments voice your opinion now!
handle multiple environment application multiple tutorial



Community Events







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


PHP5 database book ajax framework release cakephp package PEAR releases job conference application developer code example zend zendframework mysql security

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