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

Rob Allen:
A few Phing tips
Dec 02, 2014 @ 16:40:07

Rob Allen has shared a few Phing tips in the latest post to his site today. Phing is a PHP-based automation tools most popularly used for the deployment and configuration of PHP applications.

Following on from my last post, here's a few other Phing things that I've found helps me.

He shares three short but useful tips:

  • Hiding targets from Phing -l
  • Main target vs subtarget
  • List available targets by default

Each tip includes the XML markup you'll need to make it functional. You can find out more about Phing and what it's capable of on its website.

tagged: phing tips hide target subtarget available list

Link: http://akrabat.com/php/a-few-phing-tips/

Derick Rethans' Blog:
Five reasons why the shut-op operator (@) should be avoided
Jan 05, 2009 @ 18:09:37

Derick Rethans has posted just a few of the reasons why the "shut-up operator" (the @ symbol) should be avoided at all costs in your PHP applications.

The @-operator is often used to silence errors in noisy PHP functions—functions that generate warnings that can not be easily prevented. [...] In those cases, there is no way how to check up-front whether the function call will not issue a warning when being called.

There are side effects to using the operator, however, including hiding legitimate errors and making debugging that much more difficult. To back up his point, he includes four other reasons to avoid the operator's use (besides the debugging issues):

  • It's slow (part 1)
  • It's slow (part 2)
  • It's slow (part 3: It generates crappier code)
  • Apfelstrudels were harmed (related to the strudel_token in the C code for the operator)
tagged: shutup operator atsign avoid reason slow debugging error hide

Link:

Felix Geisendörfer's Blog:
Make printing easy, using a PrintController
Sep 25, 2006 @ 12:41:14

On the ThinkingPHP blog today, Felix Geisendörfer shows, based on some of his own personal work, how to make printing simpler inside of a CakePHP application.

The web site I currently work on is going to be for the hotel where my step father is the manager of. One of the things that is going to be an important 'feature' for the site, is to make it printer friendly.

Since the new site has a very clean markup, I thought about simply creating an additonal style sheet for the media type "print". However, after thinking about it a little bit more today, I came to to the conclusion that I'm dealing with WYSIWYG visitors. So I decided to get a little fancier, and to create a PrintController, which would output printable versions of any site requested by /print/*

He gives the code for the controller and for the easy to use link to go over to the "printable version" of each page, hiding the none-printable information from the browser.

tagged: cakephp framework print controller version hide cakephp framework print controller version hide

Link:

Felix Geisendörfer's Blog:
Make printing easy, using a PrintController
Sep 25, 2006 @ 12:41:14

On the ThinkingPHP blog today, Felix Geisendörfer shows, based on some of his own personal work, how to make printing simpler inside of a CakePHP application.

The web site I currently work on is going to be for the hotel where my step father is the manager of. One of the things that is going to be an important 'feature' for the site, is to make it printer friendly.

Since the new site has a very clean markup, I thought about simply creating an additonal style sheet for the media type "print". However, after thinking about it a little bit more today, I came to to the conclusion that I'm dealing with WYSIWYG visitors. So I decided to get a little fancier, and to create a PrintController, which would output printable versions of any site requested by /print/*

He gives the code for the controller and for the easy to use link to go over to the "printable version" of each page, hiding the none-printable information from the browser.

tagged: cakephp framework print controller version hide cakephp framework print controller version hide

Link:


Trending Topics: