You are here: Re: OO PHP « PHP Programming Language « IT news, forums, messages
Re: OO PHP

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

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация