Re: default function argument issue
From: Alvaro G Vicario (alvaro_QUITAR_REMOVE_at_telecomputeronline.com)
Date: 03/23/04
- Next message: John: "How to call other scripts without header method"
- Previous message: Brad Kent: "Re: default function argument issue"
- In reply to: Brad Kent: "Re: default function argument issue"
- Next in thread: Brad Kent: "Re: default function argument issue"
- Reply: Brad Kent: "Re: default function argument issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Mar 2004 17:36:52 +0100
*** Brad Kent wrote/escribió (23 Mar 2004 08:16:53 -0800):
> array() is a constant
Actually, it's a language construct. A constant would be something like
M_PI. But you are right, your code works.
I hadn't tested your original code. I've done it now and it works fine for
me, just correcting a typo —you define test() and call foo()—:
This:
function test($foo=array()) {
echo gettype($foo);
implode(' ',$foo);
}
test();
prints:
array
-- -- -- Álvaro G. Vicario - Burgos, Spain --
- Next message: John: "How to call other scripts without header method"
- Previous message: Brad Kent: "Re: default function argument issue"
- In reply to: Brad Kent: "Re: default function argument issue"
- Next in thread: Brad Kent: "Re: default function argument issue"
- Reply: Brad Kent: "Re: default function argument issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|