News Feed
Sections

News Archive
feed this:

Matthew Weier O'Phinney's Blog:
Migrating OOP Libraries and Frameworks to PHP 5.3
July 02, 2008 @ 10:24:02

Matthew Weier O'Phinney recently posted about a method he's come up with for migrating your object-oriented libraries (including frameworks) over to the upcoming PHP 5.3 version of the language.

With PHP 5.3 coming up on the horizon, I'm of course looking forward to using namespaces.

He gives an example of how useful these namespaces can be for you and your code, but points out one failing point - trying to define classes in a namespace that are named the same as a built-in keyword for PHP. There's already been a suggestion to add a captial "I" in front of the class name to prevent this collision.

There's also the problem of throwing custom exceptions - unless you use the namespace properly your script will just throw a default exception.

0 comments voice your opinion now!
php5 namespace migrate library framework collision keyword exception



IBM developerWorks:
Use the YouTube API with PHP
April 16, 2008 @ 22:42:36

In this new tutorial on the IBM developerWorks website, they show you how - with a little simple HTML and PHP - to integrate functionality from the YouTube API into your site.

The YouTube video sharing site allows Web application developers to access public content through its REST-based developer API. [...] This article introduces the YouTube Data API, demonstrates how you can use it to browse user-generated video content; access video metadata, comments and responses; and perform keyword searches.

They help you get started by outlining the format that the YouTube messages use (Atom feeds) and how to run a query against the API and return back the custom data for things like video categories, popularity and the results of keyword searches.

0 comments voice your opinion now!
youtube api tutorial category keyword search atom feed


Jeff Moore's Blog:
Keywords and Language Simplicity
October 12, 2007 @ 11:55:00

Jeff Moore has posted and shared an interesting graph showing something I'd never thought about comparing one language versus another on - the number of keywords it uses.

Well, I like programming language comparisons, so how could I resist this chart (via) promoting the simplicity of the io language by pointing out how few keywords it has. The interesting thing about this is that Java and PHP are tied on this measure of simplicity with 53 keywords.

Though not too meaningful, it is interesting to see how the different languages stack up in the number of reserved words you can't use for anything else. So, does that mean that Perl is the list limiting?

0 comments voice your opinion now!
keyword language simplicity graph perl php javascript ruby keyword language simplicity graph perl php javascript ruby


David Sklar's Blog:
Runkit, "static", and inheritance
May 17, 2007 @ 08:43:00

David Sklar points out an issue that keeps coming up over and over again in the course of object-oriented applications - why the static keyword doesn't know about inheritance.

There are plenty of good reasons why PHP 5 works this way and it seems that in PHP 6 the static keyword will be able to be used in place of self to get the dynamic behavior a lot of folks are looking for. [...] All well and good once PHP 6 is done.

In the meantime, I was noodling around with runkit and came up with some glue that lets you do something like this.

In his runkit example uses a glue class called MethodHelper that uses various things (including some reflection) to manually look into the classes and find the static information.

A fun proof of concept, but not something (for efficiency reasons) you'd probably want to run on a busy production site.
0 comments voice your opinion now!
runkit inheritance static keyword php5 php6 oop runkit inheritance static keyword php5 php6 oop


Nick Halstead's Blog:
How to make AuctionAd$ dynamic with PHP
May 07, 2007 @ 10:30:00

On the Programming and Management blog today, Nick Halstead has posted a quick look at how to make the AuctionAd$ you include on your site a bit more dynamic.

Before you read the rest of the article (you may not be interested in the coding side) the end result is that I have built an AuctionAd$ display system that adjusts the keywords it uses based upon the visitor clicking adverts. This means that your visitors will automatically adjust what is displayed for them by clicking or not clicking on the adverts shown.

You still have control over the keywords you use but, instead of a supplying a single keyword, you supply a list that it initially selects from and then adapts based on your visitors interaction.

He shows his method - grabbing the keyword information from a SQL database that has a weighting system based on the number of mouseovers for the ad for that keyword. The information is stored in a SQL database and is updated dynamically via an ajax request.

0 comments voice your opinion now!
ajax auctionads database keyword weighting ajax auctionads database keyword weighting


Ilia Alshanetsky's Blog:
Reliably locating phpinfo()
October 23, 2006 @ 11:26:00

In his latest post, Ilia Alshanetsky shares a handy (and a little scary) tip on finding the location of a phpinfo page reliably to help figure out the common PHP settings developers out there are using.

The problem with finding a reliable pool of such pages is that basic search often contaisn many blog, forum, bugs.php.net and alike entries which area copy & paste outputs from users. This maybe fine in some instances, but what if you just want the real phpinfo() pages. The answer is surprisingly simple.

His solution? To search for an element always in the page, but unique to it - usually the term you're looking for (like his suggestion of "Zend Scripting Language Engine"). He links to two result sets, one from Google and the other from Yahoo.

Besides the phpinfo information, Ilia also mentions the other handy data you can find with similar searches to major search engines like Apache header information.

0 comments voice your opinion now!
phpinfo locate statistics search engine term keyword apache header phpinfo locate statistics search engine term keyword apache header



Community Events











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


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

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