On 20/Oct/10 2:58 PM, Richard Quadling wrote:
Hello.
Take the following simple code.
?php
function foo($var1, $var2 = 2, $var3 = 3) {
echo $var1, $var2, $var3\n;
}
foo(10); // 10, 2, 3
foo(10, 20); // 10, 20, 3
foo(10, 20, 30); // 10, 20, 30
foo(10, null, 30); // 10, , 30
foo(10,, 30); //
On Thu, Oct 21, 2010 at 12:52 AM, Ionut G. Stan ionut.g.s...@gmail.com wrote:
Option 5: Implement named parameters?
Option 6: do as other have and just pass an array yourself...
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, Oct 21, 2010 at 9:56 AM, Michael Shadle mike...@gmail.com wrote:
On Thu, Oct 21, 2010 at 12:52 AM, Ionut G. Stan ionut.g.s...@gmail.com
wrote:
Option 5: Implement named parameters?
Option 6: do as other have and just pass an array yourself...
--
PHP Internals - PHP Runtime
Option 4 would probably be the worse one to go for. Looking any number
of languages that support defaults and you will see code like ...
someFunction(param1,param7param11)
It does get ugly fast for large numbers of arguments...
But any function with more than a handful of arguments is
On Thu, Oct 21, 2010 at 1:10 AM, Ferenc Kovacs i...@tyrael.hu wrote:
With #6, you would lose the argument hinting(either be native, or phpdoc)
feature for your method.
you would, however
a) it's already supported
b) there's no language changes required
c) do your own typecasting, sanity
On 21 October 2010 08:52, Ionut G. Stan ionut.g.s...@gmail.com wrote:
Option 5: Implement named parameters?
Come on, play fair. I know all about the named parameters and I didn't
mention them.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--
On 21 October 2010 09:11, Stan Vass sv_for...@fmethod.com wrote:
Option 4 would probably be the worse one to go for. Looking any number
of languages that support defaults and you will see code like ...
someFunction(param1,param7param11)
It does get ugly fast for large numbers of
On 21/Oct/10 1:17 PM, Richard Quadling wrote:
On 21 October 2010 08:52, Ionut G. Stanionut.g.s...@gmail.com wrote:
Option 5: Implement named parameters?
Come on, play fair. I know all about the named parameters and I didn't
mention them.
Where's the unfairness? I proposed them because
On 21 October 2010 11:45, Ionut G. Stan ionut.g.s...@gmail.com wrote:
On 21/Oct/10 1:17 PM, Richard Quadling wrote:
On 21 October 2010 08:52, Ionut G. Stanionut.g.s...@gmail.com wrote:
Option 5: Implement named parameters?
Come on, play fair. I know all about the named parameters and I
PHP 5.2.14
Docs say to compile w/ zlib you need to use the --with-zlib[=DIR] flag.
This does not work. You need to use --with-zlib --with-zlib-dir=[DIR]
Is this a documentation error or a ./configure error?
Greetings,
I'm currently trying to troubleshoot an intermittent problem on one of
our servers. After some time of running just fine (usually a couple of
hours), scripts will start throwing the warning Attempt to assign
property of non-object when writing to a property of the $this object.
On 2010.10.21. 12:56, Richard Quadling wrote:
On 21 October 2010 11:45, Ionut G. Stanionut.g.s...@gmail.com wrote:
On 21/Oct/10 1:17 PM, Richard Quadling wrote:
On 21 October 2010 08:52, Ionut G. Stanionut.g.s...@gmail.comwrote:
Option 5: Implement named parameters?
Come on, play
* lon...@gmail.com lon...@gmail.com wrote:
PHP 5.2.14
Docs say to compile w/ zlib you need to use the --with-zlib[=DIR] flag.
This does not work. You need to use --with-zlib --with-zlib-dir=[DIR]
Is this a documentation error or a ./configure error?
BTW: recent zlib provides an proper
13 matches
Mail list logo