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

ReviewSignal Blog:
Long Running Processes in PHP
Aug 23, 2013 @ 16:29:03

On the ReviewSignal blog today there's a post looking at their use of long running PHP processes and how they got around some of the common problems.

Here at Review Signal, I use a lot of PHP code and one of the challenges is getting PHP to run for long periods of time. Here are two sample problems that I deal with at Review Signal that require PHP processes to run for long periods of time or indefinitely: data processing and Twitter streaming API data.

They talk some about their use of the PHP CLI, bash and cron to execute their scripts. There's a bit about the difference between executing a script in ssh versus cron and how to use "nohup" to have it execute in the background. They show how to set up a cron job and, more specifically, how their script pulls from the Twitter API via a bash script to check if it's already running.

tagged: long running process example twitter api streaming

Link: http://reviewsignal.com/blog/2013/08/22/long-running-processes-in-php/

David Coallier's Blog:
Namespaces part 4.1 (What namespaces don't fix (part 1))
Oct 03, 2007 @ 19:36:00

David Coallier continuing his look at the upcoming namespace support in PHP, has posted some a bit more negative than some of his previous posts - this time it's about what namespaces don't fix.

Anyways, after posting a few articles about namespaces and now that the patch has been ported to the php 5.3 branch, people are actually starting to use it. The side effects of people (without too much knowledge or thinking about the implementation of namespaces) is that they are actually realizing that namespaces are not the promised land.

To illustrate his point, David gives something that namespaces just won't fix - long class names. It doesn't matter if you're using them in the Project_Package_Class or (with namespaces) Project::Package::Class format, you're still stuck with the long names. Keep an eye out for more similar articles from David to demystify other incorrect namespace impressions.

tagged: namespace support long class name fix namespace support long class name fix

Link:

David Coallier's Blog:
Namespaces part 4.1 (What namespaces don't fix (part 1))
Oct 03, 2007 @ 19:36:00

David Coallier continuing his look at the upcoming namespace support in PHP, has posted some a bit more negative than some of his previous posts - this time it's about what namespaces don't fix.

Anyways, after posting a few articles about namespaces and now that the patch has been ported to the php 5.3 branch, people are actually starting to use it. The side effects of people (without too much knowledge or thinking about the implementation of namespaces) is that they are actually realizing that namespaces are not the promised land.

To illustrate his point, David gives something that namespaces just won't fix - long class names. It doesn't matter if you're using them in the Project_Package_Class or (with namespaces) Project::Package::Class format, you're still stuck with the long names. Keep an eye out for more similar articles from David to demystify other incorrect namespace impressions.

tagged: namespace support long class name fix namespace support long class name fix

Link:

Ryan Malesevich's Blog:
WP Plugins: WP-Chunk
Aug 24, 2006 @ 12:32:19

Ryan Malesevich is back on his blog today with a look at another WordPress plugin - WP-Chunk, a tool to split up large data so to conforms more to the page layout.

Occassionally I'll have someone post a comment that includes a URL. Wordpress automatically links to that URL, but often times it's too large for the alotted space. So depending on the browser, it might break it entirely. John recently wrote about a plugin that would fix that problem. WP-Chunk doesn't require much to work. There's no customization, or settings to change, it just works.

His example is of a long URL, but I imagine you could use it for any content that would cause the output of the post to expand out too far. And no configuration makes it even better!

tagged: wordpress plugin wpchunk long string shorten configuration wordpress plugin wpchunk long string shorten configuration

Link:

Ryan Malesevich's Blog:
WP Plugins: WP-Chunk
Aug 24, 2006 @ 12:32:19

Ryan Malesevich is back on his blog today with a look at another WordPress plugin - WP-Chunk, a tool to split up large data so to conforms more to the page layout.

Occassionally I'll have someone post a comment that includes a URL. Wordpress automatically links to that URL, but often times it's too large for the alotted space. So depending on the browser, it might break it entirely. John recently wrote about a plugin that would fix that problem. WP-Chunk doesn't require much to work. There's no customization, or settings to change, it just works.

His example is of a long URL, but I imagine you could use it for any content that would cause the output of the post to expand out too far. And no configuration makes it even better!

tagged: wordpress plugin wpchunk long string shorten configuration wordpress plugin wpchunk long string shorten configuration

Link:

Michael Kimsal's Blog:
PHP short tags/xml patch (AKA long live short tags!)
Jan 16, 2006 @ 13:54:44

On Michael Kimsal's blog today, there's this new post with his method handling the "short tags" issue that plagues so many developers out there with a patch that makes it less of a problem.

For years I've been seeing people try to get rid of PHP "short tags" - Well, last year I made a quick patch to prove that the XML tag conflict was something that could be taken care of at the PHP parser level. It worked, but I lost that patch. So, I put it together again and would like some feedback. It seems to work OK on my end, and I'd like to see if this is something that we could get some traction behind.

He gives the source for the patch, a modification to one of the C files prior to compiling the PHP installation....

tagged: short tags long live patch zend_language_scanner.c short tags long live patch zend_language_scanner.c

Link:

Michael Kimsal's Blog:
PHP short tags/xml patch (AKA long live short tags!)
Jan 16, 2006 @ 13:54:44

On Michael Kimsal's blog today, there's this new post with his method handling the "short tags" issue that plagues so many developers out there with a patch that makes it less of a problem.

For years I've been seeing people try to get rid of PHP "short tags" - Well, last year I made a quick patch to prove that the XML tag conflict was something that could be taken care of at the PHP parser level. It worked, but I lost that patch. So, I put it together again and would like some feedback. It seems to work OK on my end, and I'd like to see if this is something that we could get some traction behind.

He gives the source for the patch, a modification to one of the C files prior to compiling the PHP installation....

tagged: short tags long live patch zend_language_scanner.c short tags long live patch zend_language_scanner.c

Link:


Trending Topics: