News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
Zend Developer Zone:
Dynamically Generating PDF Files with PHP and Haru
November 19, 2008 @ 17:47:40

New on the Zend Developer Zone there's a tutorial written up by Wil Sinclair looking at building dynamic PDF files in PHP with help from Haru.

This incredible versatility also applies to the topic of today's article: the PDF, or Portable Document Format. Not content with just one, PHP actually comes with two different extensions that allow developers to dynamically generate PDF documents: the PDFlib extension, and the libHaru extension. Over the next few pages, I'm going to take a quick look at the Haru extension, providing you with a brief overview of its functions and demonstrating how you can use it in your PHP development.

The tutorial walks you through the installation of the extension and several examples of it in use - everything from simple text input out to text transformations, drawing shapes and adding annotations.

0 comments voice your opinion now!
dynamic pdf generate haru extension pecl tutorial



Jani Hartikainen's Blog:
Base classes in OOP programming languages
November 19, 2008 @ 16:10:58

Jani Hartikainen has followed up on a post from David Otten about standard classes in PHP and how they provide the base for much of what the language does.

David Otton posted a short but thought-provoking post about stdClass, which many think is the "base class" all PHP classes automatically inherit from. I have to admit that I had this misconception as well. [...] This [difference in PHP from other OOP languages] presents some room for analysis in how things are handled in dynamic and static languages, and how those differences affect things...

Jani talks about dynamic and static typing in languages and how that effects the base types things are extended from as well as some of the benefits that having a standard base class affords developers.

0 comments voice your opinion now!
base class programming language oop stdclass standard inherit


Community News:
PHP Quebec 2009 Schedule Announced
November 19, 2008 @ 11:28:13

The PHP Quebec conference has posted the official schedule for this year's conference (happening March 4-6th, 2009 in Montreal, Canada).

Speakers include Matthew Weier O'Phinney, Derick Rethans, Sara Golemon, Sebastian Bergmann and many more. Topics include software lifecycles, unit testing, extensions and PHP in the enterprise. Talks will be given in English and in French.

You can still register to save your spot for the event. Early Bird pricing comes in around $500 CAD and a regular ticket after that it's bumped up to $600.

0 comments voice your opinion now!
phpquebec09 conference schedule announcement



Brandon Savage's Blog:
Hosting Made for PHP Developers
November 18, 2008 @ 16:28:54

After looking around for different hosting for some of his projects (one that was a bit more PHP-developer friendly), Brandon Savage looked into Slicehost, a virtual server option that gives a bit more control than the larger, more typical shared hosting environments. Here's his review of the move.

I'm not sure what I was expecting, but what I got was pretty amazing. Slicehost works by offering virtual servers for each account - that is, for each account they offer, you get your own box. [...] You're responsible for putting anything on it you want. And that's where the fun starts: you really can put anything you want on it.

The slices allow you to customize your PHP builds, add in MySQL, change up Apache - whatever you want. All you need to know is how to compile things and get them working together. Slicehost isn't a good option for someone that's not familiar with linux system administration, but if you know exactly what you want and how to put it there, their pricing is one of the best out there (plus they just got bought up by Rackspace so their future seems bright).

0 comments voice your opinion now!
hosting developer slicehost slice compile custom apache mysql


David Otton's Blog:
php//memory, Unit Tests
November 18, 2008 @ 15:42:01

In looking to test his fputscsv functionality, David Otton found a simple way to measure its performance by using streams.

Then I realised I could use PHP's (fairly) new IO streams to dump the function's output to a temporary buffer, and read it back in for comparison. Not perfect, but it removes concerns about file mutexes, permissions, unique filenames, etc. and speeds up the tests, as they never touch disc.

He uses a custom stream and points it to php://memory to store and read the data from. Code is included in the post as well as example usage. It runs an assert that the value pushed into another memory chunk is the same as the first one (ensuring that the results of his fputcsv calls are valid).

0 comments voice your opinion now!
memory stream test fputcsv unittest assert


Sameer's Blog:
Creating a Figlet text in php
November 18, 2008 @ 14:15:00

Sameer has posted an example of a new(ish) component of the Zend Framework - the Zend_Figlet component - and how you can use it to render the multi-line ASCII text figlet users are familiar with.

Zend_Text_Figlet is a Zend component which enables developers to create a FIGlet text. A Figlet is nothing but a technique of creating large letters using ordinary text. I don't know how to make a use of this in my daily matters, but its a nice recreation. A short history on Figlet can be found here. An example and the code to generate it is shown below.

He includes a few quick code examples to show it in action - including how to make it work with your own fonts and styles.

0 comments voice your opinion now!
figlet text zendframework component zendfiglet


Eran Galperin's Blog:
OO PHP Templating
November 18, 2008 @ 13:05:30

On the TechFounder blog, Eran Galperin has taken a look at object-oriented templating in PHP applications, comparing the older search and replace method with the inclusion of PHP-based templates.

PHP as a language can be considered a templating system, as in its root it was meant to modify HTML pages dynamically. The need for more structured templating systems arose as PHP applications have grown more and more complex, giving birth to much more specialized and focused solutions.

He illustrates with an object replacement example - parsing the template as a PHP script and replacing any objects found with the corresponding object property value.

0 comments voice your opinion now!
template project search replace include object


Johannes Schluter's Blog:
SQL completion in PHP strings
November 18, 2008 @ 11:55:16

Johannes Schluter has posted showing how the new version of Netbeans (with PHP support) offers SQL completion support.

NetBeans 6.5 is soon to be released. After 10 years of NetBeans that's the first version of Sun's OpenSource IDE featuring PHP support. While 6.5 is waiting to be packaged the development didn't stop and the first features for the successor, NetBeans.next, are already being developed. David Van Couvering just showed a preview of a cool new feature: SQL completion in PHP strings, if it does what the screenshot promises that's a damn great addition in my opinion.

Johannes includes the screenshot of it in action.

0 comments voice your opinion now!
sql completion string netbeans ide screenshot


Smashing Magazine:
10 Advanced PHP Tips to Improve Your Programming
November 18, 2008 @ 09:56:03

On the Smashing Magazine site Glen Stasberry has posted a few tips to help improve your PHP development practices.

Because of PHP's huge popularity, it has become almost impossible for Web developers not to have at least a working knowledge of PHP. This tutorial is aimed at people who are just past the beginning stages of learning PHP and are ready to roll up their sleeves and get their hands dirty with the language. Listed below are 10 excellent techniques that PHP developers should learn and use every time they program. These tips will speed up proficiency and make the code much more responsive, cleaner and more optimized for performance.

Suggestions include using a SQL injection cheat sheet, "shortcutting" the else in your conditionals, don't use regular expressions if you don't have to, using ternary operators and using memcached. You can see the full list here.

0 comments voice your opinion now!
improve programming advanced tips



Community Events











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


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

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