Page 2 of 2
Re: Why Use PHP
Posted: Fri Jun 27, 2008 2:47 am
by onion2k
ole wrote:Also I find the syntax pretty inefficient. Consider:
and in ruby:
I'm starting to bang on about that now.
Ruby is lovely for some things.. you picked a good example of something that makes Ruby much more readable than PHP. Let's try something else though..
Code: Select all
foreach ($names as $name) {
echo "Hello $name";
}
vs
Code: Select all
@names.each do |name|
puts "Hello #{name}!"
end
PHP is the more readable language there. PHP is pretty much English while Ruby is a bit odd.
Re: Why Use PHP
Posted: Fri Jun 27, 2008 2:52 am
by Kieran Huggins
ole wrote:- It's not owned/run by Sun or Microsoft or IBM and the community is more democratic.
Yeah this is undoubtedly a good thing but this is by no means unique to PHP.
- The manual - PHP has the best one I've ever seen
Oh yes! This is probably one of the single greatest things about PHP.
++
The PHP manual is likely the greatest collection of programming documentation out there. I can't help but suspect that it's
at least a significant reason why PHP enjoys the popularity it does. Seriously.
Other programming languages (and/or frameworks) should be paying attention here!