News Feed
Sections




News Archive
feed this:

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

Reddit.com:
When do you throw exceptions?
September 20, 2013 @ 10:45:04

On Reddit.com there's a discussion that's started up around when to throw exceptions in your PHP applications. The poster asks:

When and where do you throw exceptions? Is it just on database connections? Is it whenever you run a query? Send an email? I'm just curious what the best situations are to throw exceptions and possibly improve my code.

There's a good number of replies so far, some a bit more vague than others:

  • "In exceptional circumstances."
  • "You throw an except when you can't sensibly handle what has just happened."
  • "Fatals for compile-time errors, Exceptions for run-time errors"
  • "I throw an exception any time the function being called is either not capable of continuing or it is not going to return the expected results."
  • "Exceptions everywhere is not a good thing."

Check out more suggestions and comments in the full post.

0 comments voice your opinion now!
exceptions throw opinion conversation

Link: http://www.reddit.com/r/PHP/comments/1mr1qa/when_do_you_throw_exceptions

Engine Yard:
A Conversation About Testing in PHP
May 23, 2013 @ 09:42:29

On the Engine Yard blog today they've posted a conversation about testing between Ed Finkler and Chris Hartjes (also the hosts of the DevHell podcast).

Our friends Ed Finkler and Chris Hartjes recently had a chat about testing in PHP. Read on to get the low down on different testing tools and their relative merits-check it out as Ed and Chris weep for the future, come to some interesting conclusions and get their hands dirty so you don't have to.

They talk some about the current tools for unit testing in PHP applications and show what a sample test looks like. Ed talks about how the current testing tools can make it intimidating for people to get started testing and mentions the built-in testing library in Python that is a bit easier. There's also some mention of acceptance/functional testing and the Behat + Mink combo.

0 comments voice your opinion now!
conversation testing unittest phpunit edfinkler chrishartjes

Link: https://blog.engineyard.com/2013/a-conversation-about-testing-in-php

Zend Developer Zone:
Sometimes It's Not the Post, It's the Conversation.
August 14, 2006 @ 07:32:17

On the Zend Developer Zone today, Cal Evans looks back some more at his experiences at this year's OSCON and mentions his personal favorite session attended while there - the PHP Lightning talks.

The absolute best session I attended at OSCON 2006 was the "PHP Lightening Talks". Some of the presentations were interesting, others were hilarious. Theo Schlossnagle's Why PHP Sucks was both. Theo is a facilitating to sit and listen to, as you'll soon see when I post my interview with him. He's also quite funny when he wants to be. His presentation was interesting. It was part tongue-in-cheek and part dead serious but Theo left it to you to decide which was which.

He also points out another post about the talk from Chris Shiflett where a rather large discussion started about the contents of Theo's slides. And Cal hits the nail on the head:

The talk was good, don't get me wrong, but the conversation it inspired is much more interesting.
0 comments voice your opinion now!
post lightning talk oscon2006 conversation why sucks post lightning talk oscon2006 conversation why sucks



Community Events





Don't see your event here?
Let us know!


threedevsandamaybe code opinion podcast community refactor laravel introduction framework api interview release series unittest install list testing wordpress language developer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework