PHP for ASP.NET Developers (part 5 – Object lifetime)

Following from my last post on the basics of object orientation in PHP, what about object lifetimes. How long does an object hang around for? In PHP you have a __destruct method on a class. This is like the finaliser in C#. For example, here is a HomoSapien class (a natural extension from the object […]

PHP for ASP.NET developers (part 4 – Object Orientation)

Continuing on my series of getting to know PHP for ASP.NET developers, I’m going to concentrate on the object oriented parts of the language. In order to creating a class is very similar to C#, for example: class Animal { //put your code here } To create a derived class you “extend” the base class. […]

PHP for ASP.NET Developers (part 2)

In my previous post on PHP for ASP.NET Developers, I introduced the basics of how to set up a PHP environment and started showing the differences between PHP’s way of doing things from an ASP.NET developer’s perspective. In this post, I’m continuing with those differences. Comments Comments in PHP are very similar to C#. You […]