Reply to Re: [PHP] Breaking up data efficiently

Your name:

Reply:


Posted by Jason Barnett on 06/28/05 16:37

Kevin L'Huillier wrote:
....
> Create the function split_location to return the associative array or,
> if it is invalid, throws an exception. If PHP4, replace the exception
> with similar error handling.

If efficiency is really the goal, then the OP probably shouldn't go the
route of Exceptions. Just use a simple trigger_error() and your php.ini
to direct where the error messages go. Especially in this case...
because errors here are likely just because someone added / removed an
extra "|" where it didn't belong.

In my opinion you should save exceptions for, well, EXCEPTIONal
problems. Either that or you use exceptions for a large system that
discriminates against specific types of errors and handles each error
type in a totally different way. Can we say bloat?

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация