From Wiki
Revision as of 04:44, 10 August 2006 by Admin (talk) (PhpWikiMigration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

==== PHP Sucks because:

  • '0', 0, and 0.0 are false, but '0.0' is true
  • __toString() on php5 objects only gets called for print() and echo(), not concatenating or casting
  • There is no one consistent idea of what a expression is. There are at least three: normal, plus the following exceptions:
 * Array() can not be put in function calls
 * here doc syntax "<<END" can not be used in the initiation of method attribute default values
  • There is no way to find if vars hold refs to the same object. (well since __toString() is broken I guess you could do "((string) $obj1) == ((string) $obj2)" but that is stupid.)
  • The documentation is not revisioned. There is a single version of the docs that you are supposed to use for php4.x php5, php5.1... It is often up to you to figure out when features were added if they forget to mention it.

==== XSLT sucks because:

  • There is no way to modularize or abstract the following items:
  * conditionals in test="" attributes of <xsl:if> and <xsl:when> items.
  * sorting conditions in <xsl:sort>
  • When your context is the contents of a node-set, the key() functions defined on the entire input XML do not work. What's dumber, no error message is produced; your select="key(...)" just silently returns the empty set. It should at least say "key() does not work inside node-sets" or perhaps "no such key in context node-set"
  • The select"", value"" and match="" attributes do basically the same thing. And their use is arbitrarily exclusive; you must use the correct attribute in the correct place, and if you use the wrong one, the node fails without any warning. These three attributes should be the same.

Last edit: Thu, 20 Jul 2006 11:25:48 -0700
Revisions: 8