PHP Developer - January 30th, 2008
The PHP Web Services blog has a helpful hint on getting a custom SOAP request all ready to go:
How do you get this [custom] XML to be output by the SoapClient?
Using the SoapVar method and a few newly created objects, making a custom structure is simple. It’s just a matter of encoding the object and setting it with the base() method in the PHP SOAP extension. Check out the blog post for an example of both the custom XML and the code to produce it.
Continue Reading ·
PHP Developer - January 30th, 2008
Stefan Koopmanschap has pointed out an interesting article over on the CIO magazine website that has some in the PHP community a bit up in arms about comments it makes towards the language.
The article, “You Used PHP to Write WHAT?!”, covers the basics of the language - its status in the web programming world, the functionality it offers and the database interfaces it includes. They also include a hit list of reasons PHP is popular and why it’s a good choice for your project.
Then things get a little strange - they move from their PHP praise to three things that have more to do with unresearched “facts” than the reality of the language:
- Security and PHP
- Working with PHP and the shell
- Scaling and PHP (in enterprise environments)
These incorrect assumptions have lead to many comments both from the PHP community and from users of other languages (like Java and ColdFusion) sharing thoughts on the contents of the article and the language in general. Check out the article’s comments to see for yourself.
Continue Reading ·
PHP Developer - January 30th, 2008
On the ProDevTips site, Henrik has pointed out a handy application that can make HTML encoding characters outside the norm in PHP simple.
The standard htmlentities() function will encode special characters so that they display OK in the browser. However, sometimes you might want to encode different languages to entities too. I just found a script that will do that in the form of an html encode application.
He includes an example showing how to encode a string of non-english characters out to an easy-to-display HTMLified string.
Continue Reading ·
PHP Developer - January 30th, 2008
The Bakery (for the CakePHP framework) has several new articles/helpers/components they’ve posted about lately - here’s the list:
Check out <a href=http://bakery.cakephp.org”>The Bakery for more information on these and other great CakePHP-related items.
Continue Reading ·
PHP Developer - January 30th, 2008
Devshed continues their series looking at the use of destructors in PHP5 applications with part three, a method for keeping track of objects you’ve created during execution.
In this third part of the series, I’m going to show you how to retrieve some useful information about a specific object, including its properties and methods, prior to its being destroyed by the PHP parser via the implementation of a simple destructor.
Their new user class extracts the details about each of the objects right before they’re destroyed via a call to get_object_vars and a loop to display the property and its value.
Continue Reading ·