|
-
Aug 5th, 2006, 04:30 AM
#7
Re: Is this php code right ? asp.net to php conversion
Well, it looks alright, but, as CB said, the try{}...catch{} block is pointless, the only function you call is preg_match() and that does not throw exceptions.
Standard PHP generally as a rule doesn't throw many, if any, exceptions. If you need graceful error handling you can register an error handler function, but correctly written code doesn't produce errors anyway. Error handling is only really useful with things like plugin systems where the quality of code is unknown.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|