Live data from Hacker News

The new PHP

programming.oreilly.com

191–200 of 203 posts

Re: The new PHP

#191
post #154

Earlier quoted context omitted.

There's a vast array of frameworks for just about any appetite available in PHP. Just looking for a simple MVC app? Silex ( http://silex.sensiolabs.org/ ) Want something that's beefier and more rails-inspired? Laravel ( http://laravel.com/ ) Want MVC but near native PHP performance? PhalconPHP ( http://phalconphp.com/en/ ) Building an enterprise application with a team of developers? Symfony ( http://symfony.com/ ),…

You mention performance... Is phps performance any good? I've always been under the impression that it is quite slow. Maybe I'm just buying the fud.

The most problem application is IO speed. While testing php speed,problem speed occur on include,require file.Each include toll 200 to 300 ms. If you build your server with SSD .It cut short the io issue.Don't overlook some micro optimization tips..

Re: The new PHP

#192
post #77

Earlier quoted context omitted.

I did the same job for 6 months. I really like PHP nowadays, but Christ Drupal core is a mess (or was, that was v6).

If I may ask, what other languages do you have experience with and what are your opinions of them?

Ruby, extensively. It's enjoyable and quite useful. Meta programming makes me think of Lisp, but need to be careful of side effects.

Go, recently I've been using it for certain services and APIs. Really great for concurrent programming for services, syntax is nice too.

Python, I've used a few times over the years and have used it with personal projects a number of times. Still like python quite a bit.

(Bonus: nimrod, which I'm helping build a new type system for, Clojure and Scala I've played with extensively but never had a chance to use in production, and C/C++/Vala I've used when doing desktop programming on Linux for Elementary)

Re: The new PHP

#193

Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…

> The key flaw I find with PHP is with its community and lack of any mature frameworks. The key flaw in the PHP community are people like you. People who still think that Codeigniter is THE PHP framework (it hasn't been for at least 3 years) yet still have the nerve to look down on newbie programmers. The ignorance in your post is embarrassing.

Why are you being so hostile? First of all the PHP framework world is deeply fragmented and its tough to guess which is getting large piece and yes codeigniter is still a popular choice [http://php.dzone.com/articles/top-5-php-frameworks].

An year or two before the trend was all 'yii' which I though could be 'one framework to rule them all' but after that comes laravel and yet more fragmentation. Yes, I shouldn't ignore that how nice they are but the problem which I see is always the community and with a new one every year, it ain't helping.

Re: The new PHP

#194

Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…

I'm not sure if PHP will ever really "go away", for the same reason bicycles won't "go away" just because motorcycles exist. PHP is insanely easy to start using, and while maybe the average person isn't capable of getting it up to highway speeds, not everyone needs highway speeds.

Re: The new PHP

#195
post #186

To me the criticisms about PHP are pedantic and is a result of misunderstanding the philosophy behind PHP. The kneejerk reaction language modifications the PHP community made because of the 'PHP sucks lol' meme is detrimental to the language itself. PHP is a mature webdevelopment language that features an easy to learn, read, and develop feature set. Scala or Perl are not. (See Perl 6) So I don't see how emulating it…

I think most people don't really compare PHP to Scala: it is an entirely different language. I think most people who talk down about PHP do so because Python and Ruby are so much easier to understand and use. But then again I'm of the unpopular opinion (having worked professionally in all four) that Perl, PHP, Python, and Ruby should go into a cage, and only one should emerge. The others must write converters that turn their code into working code of the winner's, and we should stop having four languages that are basically all fighting over the same dynamic scripting language mindshare. Imagine if instead of worrying about "keeping up with the Rail's" you could just think about how to actually work on converting those Java/Haskell/Lisp programmers!

Re: The new PHP

#196

Earlier quoted context omitted.

1: "Explicit option" means it's still possible, but shouldn't better practices be encouraged? Anything to push developers away from interleaving logic and templates 2: PHP, however, has types. == is wildly unpredictable

1. IMO, the bigger issue with response_body == stdout is that the default data output is unescaped. Take a look at Wordpress templates. The fact that the template framework is PHP doesn't really cause any issues. And WP is diligent about keeping the escaped data easily accessible, so calling actually works fairly elegantly. 2. I wonder if reliance on == has ever caused any major security issues? I know there's some e…

> the default data output is unescaped

How is that a bad idea? IMHO much better by default to be outputting verbatim instead of silently changing the output. Escaping is something you should be conscious of, since you then have a better idea of where you need it and where you don't, and what type of escaping you need.

They tried to do escaping on the input by default with the magic quotes option; that didn't turn out well.

Re: The new PHP

#197
post #154

Earlier quoted context omitted.

You mention performance... Is phps performance any good? I've always been under the impression that it is quite slow. Maybe I'm just buying the fud.

The most problem application is IO speed. While testing php speed,problem speed occur on include,require file.Each include toll 200 to 300 ms. If you build your server with SSD .It cut short the io issue.Don't overlook some micro optimization tips..

200 - 300ms ? what on earth are you running on a floppy disk?

my entire routing processes are 47ms and that's a round trip AJAX request INCLUDING rendering, database calls and includes.

Seriously, check your HDD's - they're probably on their way out

Re: The new PHP

#198
post #95

PHP is and will always be the choice of script kiddies and freelances looking for a quick small buck. Because it suits and is made by that niche, copy-pasted "solutions" and monkey-ing others, just as the latest versions of PHP try to monkey other language and framework thinking, shows a profound character of its community, monkey-patches thrown together to look like some thought was put into it. It is not the langua…

And yet here you are ranting how bad it is?

Let me guess, a node / python hipster?

Re: The new PHP

#199

I often wonder why a PHP killer hasn't yet been created. I don't mean a Ruby or another vastly different language. I mean a language similar in approach to PHP, but with the gotcha's removed, some order and consistency introduced into the API, and a few changes to the defaults. Open source, free, and on all major OS's.

How many products gained market share with a slogan like "we're like $this_free_other_product, but cleaned up, incompatible and without libraries"?

SVN. It actually won via a killer library/app - TortoiseSVN.

But it was cleaned up, and mostly incompatible - after all all the commands had changed from cvs to svn :)

A cleaned up PHP would be interesting but it would need a truly killer app. Basically make a PHP clone except for the bad parts. I'd say that the killer app would be a very to use framework that provided various security best practices already built in.

And a PHP clone would need a 0 installation process - no messing around with shell commands or root access. Just copy your .phpclone files and you're set to go.

Re: The new PHP

#200
post #98

Earlier quoted context omitted.

In most enterprise environments, you have your choice between .NET and PHP. Given the option, I'll take PHP, thanks.

What wrong if combine in enterprise environment. Php + Java.. E.g jasper report printing. Php + Microsoft Excel(vb macro) E.g making reporting direct from excel

Nokia uses Java + php (internally for cms kinda stuff)
Post reply on HN