Bug #14306: Need a something to pass to use default function values

From: Date: Fri, 30 Nov 2001 22:49:54 +0000
Subject: Bug #14306: Need a something to pass to use default function values
Groups: php.dev 
Request: Send a blank email to php-dev+get-72171@lists.php.net to get a copy of this message
From: mikep@oeone.com Operating system: PHP version: 4.1.0 PHP Bug Type: Feature/Change Request Bug description: Need a something to pass to use default function values I would like a way to pass something into a function and have it use the default values. For eg., if I have the function function test( $value, $value1=1, $value2=2 ) and I call it like test( "value", "", "2" ) I think it should use 1 for $value1. It currently does not, but I'd like to be able to pass something in to make it use the default value, like: test( "value", NULL, "2" ) I know you can rewrite the function to test for $value1="", but I'd rather not do that. -- Edit bug report at: http://bugs.php.net/?id=14306&edit=1

« previous php.dev (#72171) next »