1410711
story
aftk2 writes
"PHP.Net has just reported the release of PHP 4.3.0. The update sports a unified method of handling files and sockets, a bundled GD library (for working with images), and finalizes PHP's command line interface. For other information, check out the ChangeLog."
PGSQL support problem? (Score:3, Informative)
I really do enjoy having Postgre and MySQL support on the same machine, but for now I guess I'll have to stick with MySQL until I figure this one out.
But above all, CONGRATS on the changes, PHP team, and please keep up with the good work! It's a great software and a great asset to server administrators, programmers and scripters around.
Re:Why I prefer PHP to Perl (Score:2, Informative)
In a related note.... (Score:5, Informative)
Re:Why I prefer PHP to Perl (Score:2, Informative)
How is this? PHP's OO is weak and kludged together ( but will be much better come Zend 2/ PHP 5 ).
I'm not sure if either (a) Smalltalk is horrible ( which from my understanding isn't ) or (b) the parent should be modded +1 Funny. Seriously, putting PHP in the same OO ranks as Smalltalk is like putting a Ford Escort in the same offroad handling ranks as a F-150 truck.
On a side note, is it just me or is /. really slow right now?
Re:That's great (Score:1, Informative)
Re:That's great (Score:2, Informative)
consider running an opcode cache (Score:4, Informative)
This is different from HTML output caching.
Opcode caching is said to increase performance by 30-200% depending on the cache code you use and your app.
With about 30% of apache installs running PHP, and with more than 50% of the web running apache, I'm surprise the PHP does not include an opcode cache with the install.
That's a lot of wasted cpu cycles :) Just compiling PHP scripts on every page hit.
There are open source caches out there, see the link in my sig.
Re:Command Line Interface? (Score:3, Informative)
While MS continues to innovate visual solutions to problems, the open-source community keeps returning to outdated ways of doing things... The idea that you should have to learn the command line interface to a language will end up coming back to bite PHP it the ass.
Not sure if this is a troll or just a misfire. The optional CLI is an addition to PHP, not something that changes how you use it from web pages. The CLI is a valuable feature. It lets you use PHP as a shell scripting language, rather than being restricted to CGI processing.
Using the CLI, you can write a wrapper that dumps a PHP-created web page to a static HTML file. Now you can use PHP as an authoring tool for statically served web pages. Nifty!
Re:XML? (Score:3, Informative)
Comment removed (Score:2, Informative)
Re:XML? (Score:2, Informative)
There also is a nice wrapper called XML_parser [php.net] in PEAR. That package is installed by default in PHP 4 I believe.
If you are going to deal with RSS and RDF stuff, then I definately recommend you check out the PEAR XML_RSS package [php.net]
I see nothing lacking with PHPs XML support.
Re:Most needed feature for newbies...... (Score:5, Informative)
The PHP docs are brilliant.
You just type in the function name, and there are enough examples to get you running until you actually start understanding the language.
I learnt PHP purely from www.uk.php.net, and I have always found the Java and Perl docs to have too much stuff in them.
The PHP docs are like this:
mysql_connect ([hostname],[username],[password]) Returns true if successful.
What more do you need to know? What goes into a function, what comes out.
I'm genuinely not trolling here, I'm just surprised that anyone could moan about the PHP docs.
Re:consider running an opcode cache (Score:3, Informative)
PHP has both SAX and DOM based XML parsers. It also has an xmltree function to instantly build you an object hierarchy from an XML document. There is also the most excellent phpxpath object available here [sourceforge.net]
"What does PHP use in terms of a browser agent (a la LWP)?"
It supports fetching from URLs the same way as opening and fetching from files. The new version also has streams. Also it has hooks into CURL for more sophisticated stuff. There is also the excellent snoopy [sourceforge.net] object.
"Is there really no support simple filebased db persistence? (by which I mean something along the lines of tieing a hash to BerkleyDB)"
There are hooks into berkley db if you want to sink to that level. If you want to sink even lower then any php variable, array or object can be turned into a string and saved to files or sent to other URLs or what have you.
"How well does it hook into the other stages of the Apache request handling pipeline?"
You don't have that much control over the pipeline but you can hook into auth and such. I never needed anything it did not provide.
"Oh and something I'm curious about (too lazy to look it up, I guess) what sort of exception handling does PHP have (ie it's equivalent of 'try {} catch {} finally {}')?"
PEAR has a pretty good error handling library. Otherwise you basically just test for errors manually. You call a function with @function which surpresses error messages but sets global error indicators which you can test for. Not great but gets the job done. Version five will have try catch. All in all error handling in php is better then perl and worse then java.
"What sort of logging modules are available? (log4PHP?)"
PEAR has a logging class. I know that there are others out there as well. PHP also hooks into syslog if you want that.
" I'd also be curious to know about how PHP's templating systems measure up, from someone who's had experience with this sort of thing..."
smarty [php.net] is an outstanding templating engine with caching. I don't see how you could possibly do better. There are numerous others.
I hope this prevents you from further trolling. Now that you are armed with actual knowledge (which you could have gotten by simple searching) you no longer need to troll here.
Re:Most needed feature for newbies...... (Score:2, Informative)