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

Evert Pot's Blog:
Internationalized domain names, are you ready?
October 25, 2010 @ 09:44:13

In a new post to his blog Evert Pot looks at internationalized domain names and where they could cause issues some of the current validation in PHP applications.

Since may 11 TLD's (top-level domain names) have been added. In order for this to work successfully, a lot of applications will have to be fixed. Many email-validation scripts might use [a regular expression] approach [to match most address formats].

Unfortunately, this approach will only continue to work with the normal ASCII-based domain names. He includes a list of several that could break it including ones in Chinese, Korean, Persian, Russian and Arabic. He recommends a very liberal regular expression (one that allows for "punycode" strings) to check the email, find the record and try to find an MX record on that domain.

1 comment voice your opinion now!
internationalized domain name validation email


Mark Karpeles' Blog:
proctitle a new step for pinetd
January 22, 2009 @ 11:12:17

If you've ever worked with forking processes in PHP, you know things can get a little difficult when you have more than one process going at a time. Identification can become a hassle, especially if you need to kill one off because of performance issues. If you've found yourself in this spot before, you might want to check out this update Mark Karpeles has made to his pinetd project to allow for naming of those forked processes.

Ever wanted to give meaningful names to your processes when you pcntl_fork() with PHP ? proctitle is the extension you're looking for! Adapted from bug report #29479 and code initially wrote by Midom for Wikipedia, the proctitle extension allows for a process to change its own displayed title in the system's process list.

The extension (seen in action here) is an interface for making different sorts of daemons, including the ability to give them names. You can check out the project here.

0 comments voice your opinion now!
pinetd proctitle extension daemon tcp udp name process fork


Doug Hill's Blog:
60 Days What is it?
December 24, 2008 @ 12:33:35

Doug Hill has proposed a new project that he hopes to get the community behind - 60 Days:

60 Days is an idea I had while trying to decide what to do with the domains I have sitting around doing nothing - (well nothing but being a nagging reminder that I'll never have time for every idea that pops into my head, and that domain names cost money to keep).

The goal of the project is to take a domain you're not currently using (and you know you have some out there) and making something - a "real world project" - on it in 60 days. the catch is that, for each domain you use for the effort, it has to be a different PHP framework. Keep an eye out for the January 1 launch date for more details.

0 comments voice your opinion now!
sixty days project effort domain name framework different realworld


David Otton's Blog:
Stupid PHP Tricks Illegal Variable Names
August 22, 2008 @ 13:47:52

David Otton has shared another of his "stupid PHP tricks" on his blog today. This one looks at illegal variable names that don't match the "can't start with a number" rule the manual points out.

A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*'

Technically, you can get around this in two different ways - variable varaibles and the more complex notation with curly braces. He points to the compact function for proof that they're set.

0 comments voice your opinion now!
variable trick illegal name compact curlybrace


Amir Saied's Blog:
PEAR bash completion
July 28, 2008 @ 12:08:29

Amir Saied recently posted a handy little tool for the PEAR users out there - a bash script that handles tab completion for you.

Lately I've been playing alot with the PEAR CLI. The one annoying thing I noticed the most was its lack of tab completion that I'm used to from the shell. It turns out that this feature is very easy to add, in the bash at least.

It will finish off the PEAR commands for you and expand out the PEAR package names and discovered channels when it finds a match. You can download the package here.

0 comments voice your opinion now!
pear bash commandline completion tab package name channel


DevShed:
Retrieving Information on Selected Files with a PHP 5 File Uploader
March 27, 2008 @ 09:31:04

DevShed has continued their series (here's part one) looking at the use of file uploading in your PHP scripts. They build on that foundation and add in some more useful features this time:

The initial script in the first tutorial of this series lacked some important features, such as the implementation of an effective error handling module and the ability to check the MIME type and size of the file being uploaded. In this second installment of the series, I'm going to improve the logic of the script from the first tutorial to provide it with the capacity to retrieve useful information concerning the entire file uploading process.

They look back at the previous tutorial to remind you of some of the concepts and then move on to show you how to get information about the file (like the MIME type, name and size of the uploaded file). The last page is just the full source code for the cut and pasters out there.

0 comments voice your opinion now!
tutorial php5 file upload information mime name size


Funcaday.com:
Special Valentines Day Edition (isLove)
February 14, 2008 @ 08:49:00

Besides all of the usual Valentines day logo fun from some of the major sites out there, Paul Reinheimer also points out a special little something on the Funcaday.com website:

Want a custom one to share with someone you care about. Fill out the form here. It's a subtle effect though, they'll need to read it. Valid characters for names are just alphabetics and the underscore, sorry.

The custom output is a great little addition to the site - put in person one's name and person two's name and it updates the image to show the new parameters. Ah, geek love...

0 comments voice your opinion now!
valentine islove custom name input


The Northclick Blog:
Announcing "dropr" - the message queue framework for PHP
December 10, 2007 @ 08:48:00

On the Northclick Blog Soenke Ruempler has shared the new name for their message queue software they're developing (see here) - dropr.

Why? When Boris was writing the client angel script he somehow named it "dropr". As we neither got better suggestions nor had any other idea we just decided for this name. Actually the name is a little bit fun because all those stupidR startupRs. But it's nice and somehow our framework drops message into queues.

Check out the project's homepage for more information including installation instructions, methods to download the latest version, some FAQs and a roadmap for where the project's going.

0 comments voice your opinion now!
dropr message queue framework name trac dropr message queue framework name trac


Stefan Koopmanschap's Blog:
Tip use clearly readable variable names, and constants!
December 05, 2007 @ 12:05:00

Stefan Koopmanschap has a good reminder for developers out there in a new post to his blog - make your code much easier to understand via readable variable names and constants.

Yes, you know what code you write and you also know how it works. You can find your way around it. But what if you haven't touched a piece of code for months or even years. Or what if someone else needs to work with your code. Prevent a hell: use clearly readable variable names and constants.

He points out an example of what not to do - a specific line from the FUDForum code with multiple variables named with a single letter of the alphabet in a complex if() evaluation. He suggests even using "namespacing" of sorts (PHP6 here we come!) to help compartmentalize your variables to make things even easier.

0 comments voice your opinion now!
clearly readable variable name constant namespace clearly readable variable name constant namespace


Hasin Hayder's Blog:
Did you know 'you can have cheese burger' could be a variable name?
October 24, 2007 @ 08:57:00

Hasin Hayder has a quick tip for users of SimpleXML - a handy way to access a node in an XML document that has unsupported characters in its name.

I was finding a way to refer that element as a SimpleXMLElement and found a nifty note in PHP Manual. It says if you have unsupported (unsupported in PHP Lexicon for a variable name) characters inside the name of a node, you can access it using a special pattern {'name'}.

In his example, he shows how a popular phrase ("i can have cheese burger") can be used as the variable name despite having spaces in it.

0 comments voice your opinion now!
variable name unsupported character special pattern variable name unsupported character special pattern



Community Events





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


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

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