========================= Parsed directive contents ========================= Custom "paragraph" directive reparsing tests Awesome ======= Some text here too Comments -------- .. paragraph:: :name: Foo :datetime: Tuesday, December 22nd 2009, 13:42 GMT test :: foo test :: foo Second test ----------- test2:: foo2 test2:: foo2 .. paragraph:: > Don't use "return ()", > but just "return ". That's something I've always advocated, since "return" is a statement and not a function. (BTW: the manual is a bit misleading: http://www.php.net/manual/en/function.return.php) In the specific case, MDB (v.1.x) had a different "coding standard" I never completely agreed on (but I somewhat tolerated since I wasn't the lead developer), one of these being treating "return" as a function. Hence the parentesis. My comment in the CVS log was triggered by this consideration, I didn't see a single variable as an expression (your explanation makes sense, though, even if I'd welcome some flexibility in the parser). Nevertheless, there are other annoyances introduced by the PHP4.4 fix that are worth a second thought. For instance, as pointed out by Foo, this is no longer valid:: ========================== function &foo() { return $var; } function &bar() { return foo(); } ========================== My question is: why? Other annoyances are highlighted by John Lim here: http://phplens.com/phpeverywhere/?q=node/view/205 You seem to agree that $var = null; return $var; is a bit silly ;-) I'm 100% convinced about the intrinsic goodness of the patch, I just wonder if it could be a bit more flexible (for instance with null and bool values), that's it. .. paragraph:: Basically the only problem with strtotime() is that when there are two numeric fields which could be either day or month, it always uses US ordering. For locales other than the US, and php less than 5.3, the following kludge just swaps those two date elements in that case: this absolutely should be a flag argument to strtotime(), either to swap directly, or to swap if the locale requires it:: $fixed = $_POST['date']; if (preg_match('/^s*(dd?)[^w](dd?)[^w](d{1,4}s*$)/', $y, $match)) { $y = $match[2] . '/' . $match[1] . '/' . $match[3]; } echo date('d # m # Y', strtotime($fixed)); .. Local Variables: mode: rst fill-column: 79 End: vim: et syn=rst tw=79