Re:OK, here's the thing: this is only the entrance of the ra...
by IgorPartola on Monday October 18, 2010 @09:21PM
(#1805810)
IMHO, PHP's main flaws are not in the types of features discussed by OP. It's mostly an issue of naming and namespacing. Another thing that is kind of wrong about it is the URL => file semantics (when used as a web framework). Other frameworks do this better which results in clean URL's and more structured codebases.
Amongst other things that PHP gets right is the date/time handling (two functions to go between datetimes and UNIX timestamps, support for timezones).
Re:OK, here's the thing: this is only the entrance of the ra...
by invisible on Monday October 18, 2010 @10:04PM
(#1805898)
PHP is a language (just like Ruby and Python are to Rails and Django).
Here are some PHP frameworks (that handle URL => resource instead of URL => file): http://www.phpframeworks.com/
Re:OK, here's the thing: this is only the entrance of the ra...
by IgorPartola on Tuesday October 19, 2010 @06:49AM
(#1806708)
Yes I am aware, but I see PHP as somewhere in between a general purpose scripting language and a web framework. It does have features that are very specific to web development: parsing of query strings and post data and cookies, built-in headers function, templating. That last one is funny since that's where the language came from: a DSL for putting some dynamic content into HTML. Nowadays people consider it clunky so things like Smarty were built in PHP to handle templating better.
Re:OK, here's the thing: this is only the entrance of the ra...
by narrator on Wednesday October 20, 2010 @09:39AM
(#1811135)
Any of you guys use CakePHP? I've inherited a project that uses it. It seems ok, a bit like Rails...
Re:OK, here's the thing: this is only the entrance of the ra...
by Fluxx on Tuesday October 19, 2010 @03:16AM
(#1806447)
Naming, oh god yes, the naming. Nothing is consistent with naming functions at all. My favorite example of this is the aptly named "parse_str" function:
Re:OK, here's the thing: this is only the entrance of the ra...
by IgorPartola on Tuesday October 19, 2010 @06:52AM
(#1806712)
Ah that one is my favorite. The second parameter is optional, but if you don't pass it in it's a noop. Don't really get where that came from.
Re:OK, here's the thing: this is only the entrance of the ra...
by andfarm on Tuesday October 19, 2010 @06:27PM
(#1809077)
Ohohoho. No... if you omit the second parameter, PHP sets variables from the query string in your local scope. Surprise! It's register_globals all over again.
Re:OK, here's the thing: this is only the entrance of the ra...
by IgorPartola on Sunday October 24, 2010 @08:11AM
(#1825941)
Wow. That's so fantastic I can't even describe it. I can't imagine how much buggy software there is out there because of this.
Re:OK, here's the thing: this is only the entrance of the ra...
by treeface on Monday October 18, 2010 @10:16PM
(#1805923)
If these are your main complaints with PHP, you need to look into CodeIgniter.
Re:OK, here's the thing: this is only the entrance of the ra...
by lmz on Monday October 18, 2010 @11:12PM
(#1806062)
CodeIgniter as a request dispatcher is OK, but as a framework it's not very clean. Single instance of every library + methods that mutate the global instance (see the bundled mail library)? No way to trap database errors (unique constraint violation,etc.) and if debug is enabled it simply die()s?
http://www.quora.com/What-are-PHP-s-main-flaws-(and-good-par...