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

SimasToleikis' Blog:
New to PHP 5.4: Traits
Nov 22, 2010 @ 15:11:09

Simas Toleikis has a new post to his blog looking at a feature that'll be included in PHP 5.4 - something developers have been wanting for a long time - traits.

As a long-time internals.php mailing list reader I am going to tell you a small secret – the first alpha release for PHP 5.4 should be just around the corner. This release is packed with some welcome new language features, usual bug fixes followed by some performance and memory management improvements. One of the noteworthy language additions are Traits – a brand new horizontal code reuse mechanism.

He explains traits as a better way to do the "kind-of" inheritance that PHP does now with parent and child classes, making it easier to reuse functionality from classes even though they don't share the same parent. With the "use" keyword (not to be confused with the "use" keyword in namespaces) you can include common functionality into class methods and even accommodate for naming conflicts and requirements.

tagged: traits new feature internals mixins inheritance

Link:

php|architect:
October 2008 Issue Released
Oct 31, 2008 @ 18:13:29

The latest issue of php|architect magazine has been released - October 2008. Articles in this new issue include:

  • Alvaro Videla Godoy - The Propel ORM
  • John Mertic - Using Mixins with PHP
  • Forrest Lyma - Developing Digitalus

As well as the usual columns from Steph Fox, Jeff Moore and Marco Tabini. You can either buy the issue alone or you can subscribe and get a full year of high quality PHP goodness.

tagged: phparchitect issue release orm mixins bandwidth digitalus

Link:


Trending Topics: