Live data from Hacker News

Taking PHP Seriously [pdf]

raw.github.com

11–20 of 155 posts

Re: Taking PHP Seriously [pdf]

#11

I've used php since v3, in its non-OO days. Coming from perl , that fit nicely. Today, I still avoid OOPHP and continue to write procedurally. The convenience of web-oriented functionality, broad deployment, and soft typing is basically unparalleled, although writing this way requires a bit of discipline. It's also a surprisingly good fit for a lot of server side code if you scale beyond a merely web-based execution…

You just asked for trouble with that last statement lol But I agree, I don't get why people want to force you to do something else, if what you do works fine for you, your productivity and the product you are delivering.

I use php since v3 as well, when I joined College back in 2001, in my first programming class, the professor told me PHP was cr@p when I told him that was the language I was more proficient with. I didn't listen to him... PHP was paying my bills since before I joined the College.

Re: Taking PHP Seriously [pdf]

#12
post #7
post #3

obligatory X is better than php flames on the way.. php just works.. end of story

PHP just works... if you're willing to spend more time on it, find more bugs in production, have a less readable, extensible, and maintainable codebase, and have no taste. PHP is the dream of a one-man team that gets paid by the hour. Get contract, slap something together that makes the client willing to pay, throw it all away and do it again when the client wants a change.

Just checking: do you have any experience with it? When was the last time you tried working with PHP in a team?

Re: Taking PHP Seriously [pdf]

#13
post #6

Adams actually makes some very valid arguments in this PDF. People like to argue the superiority of languages, but at the end of the day if the result in PHP is the same as it is in Ruby & Rails, Java, .NET or whatever, does it really make what the language is? Another good point is the efficiency of a developer working in PHP. The language is easy, it's so easy to be a PHP master after a few years working in the lan…

Are the complaints about PHP even controversial? The built in library functions are a mess, and mostly terrible. The syntax and basic language are overly verbose and have layers upon layers of cruft. The type and object systems are grafted on, and have so many gotchas and inconsistencies that it takes many months to understand enough of them to be very productive in the language. The aspects of PHP that were intended…

But with so much frameworks around it is a relief to have the complete control and library support. I am talking about plain PHP.

Re: Taking PHP Seriously [pdf]

#14
post #3

obligatory X is better than php flames on the way.. php just works.. end of story

  $productid = "0x4zz5";
  print $productid + 4;
If printing "8" is your idea of a working interpretation of that code, then PHP is the language for you.

If not, then PHP doesn't work. End of story.

Re: Taking PHP Seriously [pdf]

#15
post #7
post #3

obligatory X is better than php flames on the way.. php just works.. end of story

PHP just works... if you're willing to spend more time on it, find more bugs in production, have a less readable, extensible, and maintainable codebase, and have no taste. PHP is the dream of a one-man team that gets paid by the hour. Get contract, slap something together that makes the client willing to pay, throw it all away and do it again when the client wants a change.

Is that what Facebook is doing? Throwing all the code away and rewriting from scratch when they want to make a change?

You're full of shit and have no clue what you're talking about. Huge web projects are written in PHP, and they work just fine.

Re: Taking PHP Seriously [pdf]

#16
post #3

obligatory X is better than php flames on the way.. php just works.. end of story

$productid = "0x4zz5"; print $productid + 4; If printing "8" is your idea of a working interpretation of that code, then PHP is the language for you. If not, then PHP doesn't work. End of story.

As a PHP developer I entirely assume that is going to print 8. I'm sure every PHP developer has had it happen or ran across it in the manual: when strings are forced into int positions PHP uses the numbers from the front of the string. Its unexpected, but consistent.

Re: Taking PHP Seriously [pdf]

#17
post #3

obligatory X is better than php flames on the way.. php just works.. end of story

$productid = "0x4zz5"; print $productid + 4; If printing "8" is your idea of a working interpretation of that code, then PHP is the language for you. If not, then PHP doesn't work. End of story.

Things like this and some interesting developments from Facebook concerning them are mentioned in the presentation, so it would be nice if people would actually discuss that. Just a suggestion.

Re: Taking PHP Seriously [pdf]

#18
post #3

obligatory X is better than php flames on the way.. php just works.. end of story

$productid = "0x4zz5"; print $productid + 4; If printing "8" is your idea of a working interpretation of that code, then PHP is the language for you. If not, then PHP doesn't work. End of story.

It's PHP concatenation operator is ".".

  print $productid . 4;

Re: Taking PHP Seriously [pdf]

#20
post #16

Earlier quoted context omitted.

$productid = "0x4zz5"; print $productid + 4; If printing "8" is your idea of a working interpretation of that code, then PHP is the language for you. If not, then PHP doesn't work. End of story.

As a PHP developer I entirely assume that is going to print 8. I'm sure every PHP developer has had it happen or ran across it in the manual: when strings are forced into int positions PHP uses the numbers from the front of the string. Its unexpected, but consistent.

Keying it to an int via the tip of the string? Let's call it iceberg-typing.
Post reply on HN