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

PHPMaster.com:
Error Handling in PHP
November 10, 2011 @ 08:41:39

On PHPMaster.com today there's a new tutorial from Sneha Heda looking at error handling in PHP - the types of errors that can come up, how to throw your own and how to catch them appropriately.

Errors are the most common event a developer faces when programming. [...] To help reduce the number of errors in your code, and to mitigate their effects, proper error handling is essential in your web application. This article is a crash course in PHP error handling. You'll learn about PHP's built-in error reporting levels, and how to handle errors with custom error handlers and exception handling.

She starts with the different error reporting levels PHP offers, everything from the lightweight E_NOTICE out to E_ALL|E_STRICT. With this as a reference, she shows how to create a custom error handler (using set_error_handler). Also included is a look at exceptions and some of the more detailed information that comes with them - line numbers, messages, file the error was thrown from, etc.

0 comments voice your opinion now!
error handling tutorial exception custom handler reporting level


Brian Swan's Blog:
SQL Server Driver for PHP Connection Options Transaction Isolation Levels
September 09, 2010 @ 13:53:32

On his blog today Brian Swan has posted the results of some of his research on transaction isolation levels in SQL Server PHP applications.

Last week I had the good fortune of presenting at the the Seattle PHP Meet Up on a topic I knew only a little about: transaction isolation levels. It was fun doing the homework to learn more and I'll share what I learned in this post. This post is only somewhat PHP-specific. I'll focus largely on the concepts behind database transactions and isolation levels. Most of the concepts I'll look at are database agnostic (although I will use SQL Server as the vehicle for explaining the concepts) and are supported by most relational database management systems out there (e.g. SQL Server, MySQL, Oracle, DB2, etc.).

He introduces database transactions for those not familiar (a key to understanding the rest of the post) and some PHP code that connects to a SQL Server and begins a transaction to update some banking information. He uses this example to show how to set up isolation levels like "READ UNCOMMITTED", "READ COMMITTED" and "SERIALIZABLE".

0 comments voice your opinion now!
transaction isolation level sqlserver driver tutorial


PHPFour.com:
Becoming a Kick-ass PHP ninja
October 02, 2008 @ 07:57:24

New from the PHPFour website, there's this post with a few tips to help you become a "kick-ass PHP ninja" in your development.

You've been developing web applications using PHP for a couple months now and are finding it very enjoyable. Although you feel that you're doing quite good, you're not sure whether its the end. [...] If that's the scenario, then this post if for YOU.

Its broken up into two methods to move forward in your career as a developer - the technical way and the personal way. The technical way involves things like using version control and adhering to a coding standard. The personal way includes tips like "keep yourself updated" and "start community involvement".

0 comments voice your opinion now!
ninja development application personal technical level


Mike Naberezny's Blog:
Better PHPUnit Group Annotations
September 04, 2008 @ 21:48:39

Mike Naberezny has posted about some improvements that were made to the PHPUnit testing software lately (support for TestNG-style groupings) and how, with a few of his own suggestions it was made a bit more flexible.

At my company, we typically organize our test case classes into high-level groups such as unit and functional. Method-level group annotations are inconvenient for us because we'd need to annotate every method of every test case class.

He includes an example of their use - commenting a testing class and running it through the phpunit command line tool with a call to the testing group's name.

1 comment voice your opinion now!
phpunit group annotation method high level unittest phpunit group annotation method high level unittest


Lars Strojny's Blog:
Security "to go"?
May 21, 2008 @ 12:53:55

In this new post to his blog today, Lars Strojny looks to clear up some of the confusion that might be forming around the term "intrusion detection", more specifically, related to projects like PHP-IDS.

PHP-IDS is an intrusion detection tool on the application level. Application firewalls know about a certain protocol and its structure (e.g. HTTP) and inspect the protocol to detect attack patterns. Some of them are even capable of learning from usual request signatures and enforcing rules based on the learned data. There are various commercial products to achieve application firewalling. PHP-IDS does the same for free and sits directly on the webserver in the scope of the application.

He recommends it as a good supplement to the hardening you've already done for your server (you have hardened it, haven't you?) to help keep you and your data safe from prying eyes.

0 comments voice your opinion now!
security application level phpids protect harden


Sebastian Bergmann's Blog:
PHPUnit and Software Metrics
August 03, 2007 @ 12:06:00

In a update to his recent post on Cyclomatic Complexity in PHPUnit, Sebastian Bergmann has given more information about the software metrics support that the upcoming release (3.1.6) of PHPUnit will offer.

The upcoming 3.1.6 release of PHPUnit adds a couple of software metrics to the data that is stored in PHPUnit's test database.

Among the metrics gathered are things like: lines of code, commented lines of code, an attribute inheritance factor, depth of inheritance tree, method hiding factor and a polymorphism factor (he links each of these more complex ones for more information on the subject). Still included in the post is an example of the output for the Cyclomatic Complexity metric.

0 comments voice your opinion now!
phpunit software metric level file class method cyclomatic phpunit software metric level file class method cyclomatic


Richard Lord's Blog:
PHP 5.2 - Nesting level too deep - recursive dependency?
November 13, 2006 @ 10:02:00

So, you've just upgraded to PHP 5.2 and all is going well until you come across a page in your application that gives the message "Nesting level too deep - recursive dependency?". With such a vague error message, you might have trouble locating the source of the problem. Thankfully, someone's already been there and figured out the issue - Richard Lord.

I installed PHP 5.2 on one of my testing servers today and a couple of bits of code that previously worked fine in version 5.1.6 threw fatal errors in the new version. The error message was "Nesting level too deep - recursive dependency?" and it took a little time to track down the root of the problem. Here's what I'd done wrong.

Basically, his problem was using the "non-strict" evaluation for checking if two objects were equal to each other (== instead of ===). This compares everything about them, down to the properties - even if they're references to other properties inside of the same class (which is where the problem lies).

So, the fix is simple - === instead of == when comparing those objects. You'll be happier for the change.

0 comments voice your opinion now!
php5 nesting level deep recursive dependency compare object php5 nesting level deep recursive dependency compare object


Job Posting:
Digital Business Solutions Seeks Entry Level PHP Website Programmer (Louisville, KY)
November 07, 2006 @ 16:57:00

Company Digital Business Solutions
Location Louisville, Kentucky
Title Entry Level PHP Website Programmer
Summary We are looking for someone with a positive attitude who really loves programming and learning new technologies to become the newest member of our team. This is a full time position. Specific job responsibilities include website and web application development; database and link-integration; website maintenance; and content management tool development.
Link More Information
1 comment voice your opinion now!
job post entry level programmer ky louisville job post entry level programmer ky louisville


Andi Gutmans' Blog:
PHP is a great language!
January 05, 2006 @ 06:37:38

On his blog today, Andi Gutmans has posted his feelings on the growing trend of PHP developers turnng to the C level of things to add new functionality to the PHP development.

One thing I have noticed, is that quite often, PHP developers who are seeking for new PHP features are prematurely trying to implement them in C. Although, there are definitely cases where you want to write your code in C, I think in some cases PHP is too quickly dismissed.

Developing features in PHP not only takes less time, but is also less prone to bugs, easier to maintain, and more stable and secure. Also, in the majority of cases, whether such a feature were implemented in C or PHP, would not make a significant different to overall application performance.

He gives the example of the ZSearch functionality that they mentioned in the php|architect webcast for the Zend framework - entirely implemented in PHP, not C. He also mentions a point that web developers would do good to take to heart - the bottlenecks usually aren't in the code - it's dealing with external resources that's the problem...

0 comments voice your opinion now!
great language C level external resources great language C level external resources



Community Events





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


api interview deployment application threedevsandamaybe framework language code release tips development developer introduction laravel conference zendserver community list podcast series

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