I tried PHP properly for the first time this week.
Starting at the weekend, I downloaded a load of the Introductory Articles (and a bunch of the advanced ones too) from O Reilly's PHP dev centre.
Then I started porting my very-lightweight-cms from perl to php.
My first impression was that error reporting (something PHP considers a selling point, why?) is poor - marginally better than ASP.
My next impression was that the few error reports you do get are unhelpful.
Further impressions are :
- Object Orientation ? PHP objects seem to lack constructors, destructors, multiple inheritance and differentiation between attributes and methods.
- Database Access ? PHP lacks any decent Database access - you pass around a bunch of variables that aren't handled in a nice abstracted OO way like DBI and require different functions for different database!
Overall I am very disappointed, although I have to admit PHP is better at a technical level than ASP - I managed a hell of lot more in an hour of ASP/VBScript than PHP despite not knowing VB and knowing Perl and C.
Objects and databases
vsergu on 2002-10-31T16:46:28
PHP has constructors. They're just named after the class and have some oddities (such as handling the return of the object magically). And attributes and methods are distinguishable: methods have
()
after them.
There are PHP classes for abstracting database operations. I ended up writing my own DBI-ish one, though, which I suppose I should put out there some time.