Re: PHP Array Literals
| From: | Marcus Boerger | Date: | Sun, 29 Jan 2006 20:32:21 +0000 |
| Subject: | Re: PHP Array Literals | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21721@lists.php.net to get a copy of this message | ||
Hello James,
you missed recently emerged $it = betty() here or did i get confused now?
Sunday, January 29, 2006, 9:21:20 PM, you wrote:
> Then why don't we have these:
> $i = integer(5);
> $f = float(4.5);
> $s = string("foo");
> And what about classes? It's slightly different, what with it being a
> definition rather than a specific literal value, but it produces a
> definition, pseudo value if you will, so why not have:
> class("MyClass", array("method", array("arguments"), "method
> body here"));
> Of course, that woudln't make sense. We, instead, use appropriate syntax:
> class MyClass {
> public function method($arguments) {
> // method body here
> }
> }
> Suitable, logical, appropriate code. To me, 'array()' just seems on
> the verge of being (but not totally) inappropriate.
> M.T.
Best regards,
Marcus