Um, yes it was. See http://en.wikipedia.org/wiki/PHP#History to verify that PHP started as a bunch of CGI binaries to serve some simple dynamic web pages. The database bit came later, but at the start it was explicitly designed for quick and dirty web pages.
You could make such statements about every other mainstream language.
I guess we can't blame PHP for preserving the $ in front of variable-names with all the legacy code lying around. But the following should parse in a sane language:
$width = getimagesize($filename)[0];
Adding support for this would not break legacy code. Nobody can tell me that naming all intermediate results like $sizes = getimagesize($img);
$width = $sizes[0];
is such a preferable style, that the parser should enforce it.By the way, this is how PHP pretends to support higher order functions:
function cube($n) {return($n * $n * $n);}
$a = array(1, 2, 3, 4, 5);
$b = array_map("cube", $a);And yes, you can make such statements about every other mainstream language. For instance Perl was more designed for text manipulation than most other general purpose programming languages. Java was more designed for multi-threading than most other general purpose languages. C was more designed for close to the machine programming than most other general purpose languages.
All of these things are true. All of these things still show in various ways. Yet every one of those is a general purpose language that can be used for anything you want.
The above is a short sample of how I'd do the thing you describe and I don't have to remember to fetch the next row from the table and I don't have to check that I'm at the end of the result set, grouping is as easy as SQL will make it and all cleanup is automatic.