Whats ur favourite new feature in PHP5?

self explanatory title ;)SQLite .... its very great to work with and simpel to...:cool:The new OOP Structure is good but i cant compare it to SQLite or SimpleXML havent played with either though SimpleXML looks very niceCan someone breifly explain what each of the options are?

Thanks,
DFAll new features in PHP5.

SimpleXML <!-- m --><a class="postlink" href="http://au3.php.net/simplexml">http://au3.php.net/simplexml</a><!-- m -->
New OOP <!-- m --><a class="postlink" href="http://au3.php.net/manual/en/language.oop.php">http://au3.php.net/manual/en/language.oop.php</a><!-- m --> - Must look in User Comments on how it looks

and SQLite <!-- m --><a class="postlink" href="http://au3.php.net/sqlitenot">http://au3.php.net/sqlitenot</a><!-- m --> having tried v5 yet, SimpleXML (check spelling in polloptions ;-) ) seems what i have been waiting for the longest.*drools*
My vote is for SimpleXML because its just that... simple. Once PHP5 is all growned-up and ready for the majors itll be a great tool.

About the new OO capabilities. Maybe some day they will be useful but I never find my self using objects/classes too much. Big improvement however as PHP starts to look more like C++. All definently cool features.SimpleXML. period.the OOP, it is so much like the C++ one which makes it really simplei vote SQLite, goodbye MySQL sorry uv been great but an module SQL Library is sooo much better!I think they are all very useful features. SQLite will probably be great for prototyping, SimpleXML looks like it will tie into our new fangled object model rather neatly . Still I think the new OO structure itself tops it all as being the most useful.

Big thanks for setting up this forum :)simpleXML. HOLY CRAP.

However I like them all! SimpleSQL looks cool too. OOP style doesn't excite me much. Too much C++ shoved in my head for me to really want other idiots to be able to do PHP/C++. LOL. All well I can keep throwing my $.02 around right? Very cool though!

ChadIts SQLite not SimpleSQLHaven't played with php5 too much yet but based on what ive seen, SQLite gets my voteOriginally posted by Napster
the OOP, it is so much like the C++ one which makes it really simple Of course, C++ has one of the most baroque, overly-complicated, and messy implementations of OO out there. Even its designer thinks so.to be honest i don't really care about OOP. i like PHP like it is - it was my first programming language and i love it.

i do intnd to learn C++ but i would prefer C++ to be more like PHP rather than the other way round - i have heard the syntax is pretty similair anyway.jwb666 once you have programmed sufficiently in c++ and used objects, you will appreciate their value.

gpright ill take ur word for it, seeing as tho i havent used it yet, and im inexperienced with any other language other than PHP ;)The use of OO in PHP is such a great feature, especcialy for reuse of functions, writing new multipart email functions every time I create a new contact page is a right pain :)

I'm really looking forward to SimpleXML though, and the new features of OOHmm OOP seems to be the fav (so far :p)

Why can SimpleXML be winning :bemused:I've used SimpleXML quite a bit in the past few weeks, and have to say it's really rather excellent :) Particularly like the Xpath support - damn funky.there are objects in php4.. so what's so cool about objects in php5?Originally posted by jacrewq
there are objects in php4.. so what's so cool about objects in php5?

Yes that is true however the support is better PHP 4s implementation of OO was a quick thing put together. PHP 5s implementation shows the language is maturing with the OO support somewhat like C++ and even Java some say.

<!-- m --><a class="postlink" href="http://www.zend.com/php5/articles/engine2-php5-changes.php">http://www.zend.com/php5/articles/engin ... hanges.php</a><!-- m -->
There you can see what the new OO looks like.The OO structure is way cool. it is so much like JAVA I need a cup of coffee. I am working with how the syntax and structures work then I will see hoe SQLLite and the XML works. I cannot wait to get familiar with it.I voted for OOP because I reeeeeeally want to get better at OOP and understand the mind set which makes it work. PHP5 seems to contain all the features which might help me. I can see all the advantages, but I still find it very hard to write myself.

I was reading about ext/msqli on the train this morning: bound parameters and try/catch blocks. All very interesting. It wasn't clear from the article how you install PHP5 with ext/mysqli, but I'm sure I'll find out.

Normeh i voted for OOP becos it is almost like java like a pure OOP language.
1 thing i am damn curious is that if u declare a method/class static in PHP5 do u have to do a include of that PHP file which contains the method/class on top of the page to be able to call that static method???Originally posted by xkdavid
eh i voted for OOP becos it is almost like java like a pure OOP language.
1 thing i am damn curious is that if u declare a method/class static in PHP5 do u have to do a include of that PHP file which contains the method/class on top of the page to be able to call that static method??? How would PHP know what the method is if you didn't? But there is a magic __autoload() function.Originally posted by Weedpacket
How would PHP know what the method is if you didn't? But there is a magic __autoload() function.

what about classes???Originally posted by xkdavid
what about classes??? You should try that link planetsim gave.The OOP. It's more like Java, etc, where objects are passed around by reference.

Exceptionally annoying in PHP4 where you cannot pass an object by reference without explicitly putting an ampersand everywhere, and some other things still copy it (like foreach).

I look forward to using it.

MarkSimpleXML. It's uncannily easy to, for example, pull in an RSS feed and format it as HTML.

<?php
$xml = simplexml_load_file('http://onlineathens.com/RSS/news.xml');
foreach($xml->channel->item as $item)
echo "
<li><a href=http://www.phpbuilder.com/board/archive/index.php/\"$item->link\">$item->title</a> $item->pubDate</li>\r\n";
?>hmm.. i've not voted yet since i've not played with php5.. however, i would like to know how if simpleXML is the first time for PHP to tackle XML? Didnt php have XML parsing functions before? Or did people juz load in XML as plain text and parsed it via own codes??

teaYes PHP has had XML functions before in PHP 4 however using them wasnt and easy task. Also the amount of work requried to get it to work correctly wasnt easy at all. SimpleXML thus the name makes getting XML information easily without much effort.

Its probably one of the biggest changes i feel in PHP 5 as well as the OO.I think that the name SimpleXML is perhaps a little misleading. It is an immensely versatile extension, it's just the API which is simple :)It should be noted that sqlite works fine in PHP 4, so, it's not a new PHP 5 feature ;-)

<!-- m --><a class="postlink" href="http://pecl.php.net/sqliteActually">http://pecl.php.net/sqliteActually</a><!-- m --> it is a new PHP 5 feature that version your talking about isnt built in. PHP 5 has the extension built in.Whether an extension is enabled by default or not doesn't dictate if it's "new" or "old" because it's the same extension. Sure PHP 5 has --with-sqlite by default which you can disable by using --without-sqlite. Same versions. For people who compile their own PHP this isn't a concern, it's still very much a choice. (for you PHP 4 users out there, use pear to install sqlite, it does so as a shared extension) Extensions get enabled/disabled (ctype/mysql/bcmath...) by default all the time. And in a similar light, SimpleXML requires --enable-simplexml during the configure as it's not enabled by default but it is, however, PHP 5 specific. Now I'm not saying having sqlite listed here is inappropriate but it is a little misleading.

BTW my vote is for OOP5 :)Actually, simplexml is enabled unless you specifically disable it. The documentation is a bit out of synch.

Being in the default setup (simplexml, tidy, sqlite) is really significant, because that will shape what's available through hosting providers.
 
Back
Top