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

DZone.com:
Understanding php.ini
Apr 03, 2015 @ 11:05:55

The Dzone.com site has a recently posted tutorial helping you understand the php.ini, the main configuration file PHP uses to set up its own internal features and settings.

our php.ini file provides a considerable amount of power over the behavior of your PHP application ecosystem. Let’s jump into some of the most common declaratives and discuss how they impact your application performance and behavior. I won’t go into an explanation of each setting that is available, but I’ll cover the fundamental options that you should be aware of. Please keep in mind that changing any of the settings on in your php.ini can and may very well change the behavior of your application, whether positive or unfavorable. Please use caution when adjusting your settings, consult with your team, do your research, understand the implications, and, of course, test, test, and test again before deploying anything into production!

He starts with a brief introduction to what the php.ini file is and how you can use the phpinfo function to find the current settings in HTML form (on the command line it's "php -i"). He then goes through and covers some of the basics from the standpoint of security, memory handling and some general settings.

tagged: understand phpini configuration file introduction

Link: http://php.dzone.com/articles/understanding-phpini

MaltBlue.com:
5 Reasons Coding Standards Are Essential
Mar 13, 2013 @ 10:13:59

Matthew Setter has posted five reasons why he thinks that making a coding standard is an essential part of your development process. He suggests that "pain avoidance" is one of the key factors, both for new members of the team and for those maintaining it in the future.

Whenever you’re working on a project, are you consistent? Are you consistent in your coding style, consistent in your documenting, consistent in your database naming conventions? Better yet, do you and your team have a coding standard which you consistently adhere to? If you don’t, you’re buying yourself and others a world of pain – which is painlessly simple to avoid. Today I’m banging the drum, shouting from the street corner, calling from the cathedral spire, imploring you to do one thing, above all else – pick a coding standard and then BE CONSISTENT!

His five reasons for implementing (and effectively using) a coding standard are:

  • Poor, Inconsistent Code - Causes You Pain
  • Your Code is Easier to Read
  • Your Code is Easier to Understand
  • Your Code is Easier to Maintain
  • Your Code is Easier to Collaborate on

Check out the post for summaries of each point.

tagged: coding standard essential opinion maintenance read understand collaborate

Link:

David Parra's Blog:
Calling Conventions – when you need to know C to understand PHP
Jul 07, 2009 @ 12:03:24

David Parra has a suggestion for PHP developers out there - it might be beneficial to learn some C so you know what's going on.

I think most of the people using PHP wonder from time to time about particular behavior of the language. [...] But lately I stumbled over a nice one. It looked like a bug in PHP, but turns out to be an interesting, curious, part of the C-language.

He gives an example of a case where an error message (as a result of E_ALL error reporting) shows evaluation of certain variables in a different order than anticipated. As it turns out, the difference was in the order of the parameters in the C code of PHP (different on SPARC versus x86 systems).

tagged: bug understand language c

Link:

PHP in Action:
Comments Considered Harmful
Dec 24, 2008 @ 13:41:38

In this new post from the PHP in Action blog, they comment on Eli White's comments on commenting.

There is too much old advice in PHP. A recent case comes from the PHP Advent calendar. Eli White is a strong believer in commenting code, including inline comments inside functions. Unfortunately, he's at least 10 years too late. This used to be good advice, but not any more. Up to a point, he's right.

They propose a better way - refactoring code so that its as easy to read as possible, reducing the need for extensive commenting. They illustrate with a rework from the Zend Framework function, changing up the method names to better reflect the action inside (rather than the current "doUpdate").

tagged: comment harmful refactor understand zendframework

Link:

The Show (CakePHP Podcast):
Understanding FormHelper
Oct 02, 2007 @ 12:09:00

The CakePHP podcast, "The Show" has posted it's latest episode - a spotlight on the FormHelper component of the framework:

Nate Abele and Larry Masters join me to discuss the new FormHelper feature in CakePHP 1.2. This time we manage to stay on topic and sober. Join us for an archived hour of form developing goodness.

You can either subscribe to their normal feed, their iTunes feed or you can just grab the show directly from the site to enjoy the episode.

tagged: cakephp framework podcast understand formhelper component cakephp framework podcast understand formhelper component

Link:

The Show (CakePHP Podcast):
Understanding FormHelper
Oct 02, 2007 @ 12:09:00

The CakePHP podcast, "The Show" has posted it's latest episode - a spotlight on the FormHelper component of the framework:

Nate Abele and Larry Masters join me to discuss the new FormHelper feature in CakePHP 1.2. This time we manage to stay on topic and sober. Join us for an archived hour of form developing goodness.

You can either subscribe to their normal feed, their iTunes feed or you can just grab the show directly from the site to enjoy the episode.

tagged: cakephp framework podcast understand formhelper component cakephp framework podcast understand formhelper component

Link:

The Codist Blog:
Followup To: I Will Never Understand the Appeal Of PHP
Dec 14, 2006 @ 07:11:32

A few days back there was a post on the "The Codist" blog about why the author would never quite understand the appeal of PHP to the masses and some of his thoughts behind it. Well, there was such an outcry and response to his comments that he's written up another post on what he learned from comments made.

Clearly I touched a nerve. However I did learn a lot of things that you don't read in a quickly tutorial on PHP. The whole point of writing something is to get feedback, positive or negative, and hopefully learn from it.

He admits that his experience with PHP and its developers has been limited, so his perspective might have been thrown off a bit. He still holds to one thing from the previous article, though - that PHP just isn't for him.

tagged: appeal followup understand opinion comment learn limited appeal followup understand opinion comment learn limited

Link:

The Codist Blog:
Followup To: I Will Never Understand the Appeal Of PHP
Dec 14, 2006 @ 07:11:32

A few days back there was a post on the "The Codist" blog about why the author would never quite understand the appeal of PHP to the masses and some of his thoughts behind it. Well, there was such an outcry and response to his comments that he's written up another post on what he learned from comments made.

Clearly I touched a nerve. However I did learn a lot of things that you don't read in a quickly tutorial on PHP. The whole point of writing something is to get feedback, positive or negative, and hopefully learn from it.

He admits that his experience with PHP and its developers has been limited, so his perspective might have been thrown off a bit. He still holds to one thing from the previous article, though - that PHP just isn't for him.

tagged: appeal followup understand opinion comment learn limited appeal followup understand opinion comment learn limited

Link:

Tectonic.co.za:
Getting your head around PHP objects
Aug 08, 2006 @ 06:02:20

In a new article from Tectonic today, Jason Norwood-Young takes a look at one of the harder things for beginning PHP developers to understand - objects.

Still the practice of using objects in PHP remains a bit of a lost art – you're more likely to find an application with a bunch of functions than objects. PHP just lends itself to function-like thinking.

That doesn't mean that you shouldn't take advantage of the object-oriented (OO) features of PHP. The big question is when. Deciding when to implement a bit of code as an object or as a function is the real trick of object-oriented programming (OOP) in PHP (or as I like to call it, POOP). If you get that right, you can save yourself a lot of time and hassle down the line.

Jason starts off with the differences between OOP and regular, procedural programming, explaining it with a series of reasons/times to choose OOP. Of course, code examples are a must, and a few are included, showing the structure of classes and how to create new objects from them. He explains the PHP5 functionality offered as well, including private/public/protected values and functions.

tagged: objects understand introductory tutorial oop procedural objects understand introductory tutorial oop procedural

Link:

Tectonic.co.za:
Getting your head around PHP objects
Aug 08, 2006 @ 06:02:20

In a new article from Tectonic today, Jason Norwood-Young takes a look at one of the harder things for beginning PHP developers to understand - objects.

Still the practice of using objects in PHP remains a bit of a lost art – you're more likely to find an application with a bunch of functions than objects. PHP just lends itself to function-like thinking.

That doesn't mean that you shouldn't take advantage of the object-oriented (OO) features of PHP. The big question is when. Deciding when to implement a bit of code as an object or as a function is the real trick of object-oriented programming (OOP) in PHP (or as I like to call it, POOP). If you get that right, you can save yourself a lot of time and hassle down the line.

Jason starts off with the differences between OOP and regular, procedural programming, explaining it with a series of reasons/times to choose OOP. Of course, code examples are a must, and a few are included, showing the structure of classes and how to create new objects from them. He explains the PHP5 functionality offered as well, including private/public/protected values and functions.

tagged: objects understand introductory tutorial oop procedural objects understand introductory tutorial oop procedural

Link: