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

SitePoint PHP Blog:
The Delicious Evils of PHP
Dec 07, 2016 @ 15:50:49

On the SitePoint PHP blog Christopher Pitt is back with another interesting article, this time talking about two "delicious evils of PHP" - the eval and exec functionality.

I want to look at two PHP functions: eval and exec. They’re so often thrown under the sensible-developers-never-use-these bus that I sometimes wonder how many awesome applications we miss out on.

Like every other function in the standard library, these have their uses. They can be abused. Their danger lies in the amount of flexibility and power they offer even the most novice of developers. Let me show you some of the ways I’ve seen these used, and then we can talk about safety precautions and moderation.

He then talks about some of the "interesting" things you can do with these two pieces of functionality including:

  • Dynamic Class Creation
  • [Creating] Domain Specific Languages
  • Parallelism (with exec)

He ends the post with some advice how to avoid issues with the topics he's mentioned and how to "stay safe" while still using these two dangerous pieces of functionality.

tagged: evils language eval exec dynamic class dsl parallelism tutorial safe

Link: https://www.sitepoint.com/the-delicious-evils-of-php/

Sebastian Bergmann's Blog:
Support for BDD and Stories in PHPUnit 3.3
Jan 17, 2008 @ 14:48:00

On his blog today Sebastian Bergmann has posted about new functionality that's been added to the PHPUnit unit testing package for PHP - support for BDD and Stories.

PHPUnit_Extensions_Story_TestCase is a new extension for PHPUnit that has been contributed by Xait, a company that I visited last fall. It adds a story framework with a Domain-Specific Language (DSL) for Behaviour-Driven Development (BDD).

He includes an example of the new extension in action - creating a Story, adding Steps to it and the output that would result from the execution (reading?) of the example.

tagged: bdd story extension xait dsl testcase step bdd story extension xait dsl testcase step

Link:

Sebastian Bergmann's Blog:
Support for BDD and Stories in PHPUnit 3.3
Jan 17, 2008 @ 14:48:00

On his blog today Sebastian Bergmann has posted about new functionality that's been added to the PHPUnit unit testing package for PHP - support for BDD and Stories.

PHPUnit_Extensions_Story_TestCase is a new extension for PHPUnit that has been contributed by Xait, a company that I visited last fall. It adds a story framework with a Domain-Specific Language (DSL) for Behaviour-Driven Development (BDD).

He includes an example of the new extension in action - creating a Story, adding Steps to it and the output that would result from the execution (reading?) of the example.

tagged: bdd story extension xait dsl testcase step bdd story extension xait dsl testcase step

Link:


Trending Topics: