News Feed
Sections




News Archive
feed this:

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

Nicolas Grekas (on Github):
Improved handling of HTTP requests in PHP
June 17, 2011 @ 09:39:41

As Nicolas Grekas shows in this tutorial (posted as a gist), the functionality that PHP gives users to work with the raw HTTP requests is pretty limited. There's a few solutions he offers, but none of them allow for the full use of the HTTP options provided by the server.

HP offers comprehensive autoglobals to access external data sent with each request. These variables do not expose all the possibilities allowed by the HTTP protocol, but a controlled use can in practice minimize the impact of this limitation. Two problems are particularly troublesome: the lack of access to multi-valued keys without using a special syntax and complexity of the magic bracketed syntax. Until PHP natively provides another interface freed from these problems, a different interface in user space can circumvent them.

He gives some code examples of methods that can be used to parse strings like those found in cookies (or pulled in via php://stdin) including mentions of key normalization and accessing the values by literal keys. You can see a more full implementation here.

0 comments voice your opinion now!
http handling improved requests tutorial parse


Jani Hartikainen's Blog:
Improved PDF generation with RE Framework RE_Pdf
March 24, 2009 @ 08:42:27

Jani Hartikainen has made a recent post about a library that can manage PDF generation a bit better than the Zend_PDF component of the Zend Framework - RE_PDF.

Zend_Pdf, while generally quite good, has one big issue: It does not support word wrapping text! There's a new and still a bit obscure framework called RE Framework, which has an excellent PDF component - it includes support for word wrapping, better support for PDF templates, image loading etc.

The several of the interfaces (method calls) are similar between Zend_Pdf and RE_Pdf, so there's not too much rewriting involved if you're already using Zend's option. He shows how to parse an XML file, plug those values, the fonts and fields, in the PDF object then flesh it out with a presentation layer and information to fill in the blanks.

0 comments voice your opinion now!
improved pdf generate framework zendpdf repdf reframework


Nefarious Designs:
Object-Oriented PHP Part 4 PHP5's Improved Features
August 31, 2006 @ 10:29:29

Nefarious Designs continues their object-oriented PHP series with part four posted today, a look at some of the new features that PHP5 brings to the table.

After a welcome break, over the late summer public holiday here in England, here's the final part in my object-oriented PHP series. Sorry about the rather extended pause since "Part 3: Taking Relationships Further".

Having already looked at definition, relationships and taking those relationships further, I'm going to look at how PHP5's new Object Model introduces more advanced functionality.

In this latest part they look at clas constants, abstract classes, object interfaces, and magic methods (including overloading).

0 comments voice your opinion now!
object oriented php5 improved features tutorial part4 object oriented php5 improved features tutorial part4



Community Events





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


community application voicesoftheelephpant framework interview release symfony opinion install series tool composer version package language introduction laravel library podcast security

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