Hacker News new | past | comments | ask | show | jobs | submit login

PHP like any other language has its shortcomings and its strong points.

The market place decides. If you want to get rid of PHP (or 'kill' it) you will have to displace it with something better.

The other alternative is to send in a patch for this bug or simply report it. I've used PHP for many years and while I certainly don't love some of its more subtle problems you can build an amazing amount of stuff in it.

I have personally had good success reporting bugs to the PHP devs.

That's a lot more productive than 'blogging' about it.

In case it isn't clear why the 08 does not print anything, the 8 is an illegal character in an octal string and is discarded.

A suitable error message would be 'invalid character in octal sequence' instead of a silent discard.




If PHP is to be improved, the new language must be easy enough a 13 year old can do it and web oriented.

These are I think its two strongest points.


That and the ease of deployment, which is possibly the strongest factor. Most hosting companies will provide you with PHP on apache even if you don't ask for it.


Oh, and good documentation too. PHP.net is awesome. It's probably the largest contributing factor to PHP being easy to use.


I'd say that greatest data structure in all languages is PHP array().

It's actually an ordered dictionary with default implicit natural number keys. Efficient enough to represent concepts such as arrays, sets, queues, stacks, trees, graphs without bothering with hashtables, linked lists, reallocations and other underlying data structures tailored for specific purpose.


You must be joking.


Nope. I honestly think that that this is one of the main reasons PHP is popular and is able to power even the most complex websites with ease.

Before PHP I did Basic (Atari), 6502 Assember, Logo, ACTION!, Pascal (Kyan, Turbo), C++ (Turbo, Borland) , Java, C#. After PHP I did JavaScript and Python.

First I've met PHP-like arrays in awk and was astonished with its versatility.

I still believe that data structure that allows person to make a queue, stack, tree, even graph easily without knowing any theory and planning anything is one of the greatest things I've encountered in programming languages.

I am very dissatisfied that python does not have standard ordered dictionary and strongly differentiates between tuple, array, set and dict even though they provide just overlapping subsets of odict functionality.


$I $use $PHP $on $a $daily $basis $too... ;-)

Mainly because I have to. And I often have to, since many el-cheapo web providers only offer PHP+MySQL. PHP isn't too bad, I don't get bitten often by strange bugs. I see PHP as a common workhorse.


In recent memory I ran in to two real bugs, the one was where a ' in a comment would cause strip_tags to malfunction:

http://bugs.php.net/bug.php?id=46578

Fixed within 6 days, with an email to my address about where to get and how to apply the patch, which was a nice touch.

The other one was technically my fault but it would have been nice to see the 'expected' response from a language I've been using for such a long time.


It's not just a bug with an associated patch. It's a language misfeature, in a 15 year old language. You can very probably fix it without breaking existing code.


I think they just simply overlooked it.

And since a probable fix without breaking stuff is likely a patch would be all it takes (and a note in the changelog, for the unlikely case that someone did depend on it, not that they'll read the changelog ;) ).

Octal not being the popular thing it once was I doubt it would matter much.

I think more people are 'bitten' by this totally unexpected behaviour of leading 0's suddenly doing wildly interesting things to numbers (what?? there are more numberbases than just decimal???) than there are that expect illegal characters in octal numbers to throw errors.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: