Posted by Oliver Grδtz on 11/15/05 03:05
No question: You will be able to use procedural code with PHP6!
The developers of PHP are well aware that man people prefer this way of
programming _and_ they want to ensure that clean PHP4 code will be able
to run on PHP6 with little to no modifications. Some of the developers
themselves swear by the procedural way!
Anyway: I prefer OOP. In my early days of PHP I couldn't understand the
need for classes and objects in a language where your program only lives
for a couple of seconds or milliseconds, but now my code base has grown
and classes are _the_ way of easily managing such a lot of code.
And objects are nice:
$meeting_id=14;
$m=new DB_Meeting($meeting_id);
foreach ($m->allParticipants as $person)
{
mail(
$person['email'],
'Invitation to the meeting "'.$m['topic'].'"',
'Dear '.$person['nick']', you are invited!'
);
}
This fetches all the records from the database and iterates through them
without any need for SQL on my side.
OLLi
[Back to original message]
|