Hello Antony,
Saturday, October 6, 2007, 8:49:14 PM, you wrote:
> On 06.10.2007 22:38, Larry Garfield wrote:
>> I have no love for Perl (and a rather strong dislike of it), but I have to
>> agree with those who say that "looks like Perl" is a lame reason to reject
>> something. PHP's object sy
Use quite parameter parsing:
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
TSRMLS_CC, "lll", &m, &d, &y) != SUCCESS &&
zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
TSRMLS_CC, "ll", &m, &d, &y, &h, &min, &s) != SUCCESS &&
zend_parse_paramet
Rasmus Lerdorf skrev:
I think that is one of the strongest reasons not to implement something
actually. If there is a way to do something in a clear and concise
syntax, adding an alternate less clear syntax that isn't immediately
obvious to everyone simply obfuscates the language.
The other fat
I was wondering why objects are always converted to longs when
performing arithmetic.
While looking at bug 42780: http://bugs.php.net/bug.php?id=42780
The only way not to lose precision is to explicitly cast the object to
float or string, which just doesn't seem right to me.
It would be nice if
Rasmus Lerdorf wrote:
Stut wrote:
It may not be clear to some people, but there are many things in the
every language that aren't necessarily obvious and I don't think that's
a reason not to implement something.
I think that is one of the strongest reasons not to implement something
actually.
Stut wrote:
> It may not be clear to some people, but there are many things in the
> every language that aren't necessarily obvious and I don't think that's
> a reason not to implement something.
I think that is one of the strongest reasons not to implement something
actually. If there is a way t
---
$class=new class;
with($class)
{
do_something();
do_more();
do();
}
What more value does this hold over implementing fluent interfaces which
are already possible?
Assuming
class Foo {
public function doSomething() { /**code**/ return $this; }
p
Hartmut Holzgraefe wrote:
When reading foreign C++ code a lot you learn to love
the explicit nature of PHP naming scopes even though
it is extra typing as it is clear at first sight whether
you are looking at a variable, member variable, function,
object method ...
Lets do not weaken this
Richard Black wrote:
I'm usually a lurker on here, but thought I'd through in my 2p on this
one...
Delphi (Object Pascal) has a similar feature, that I've had some
experience of using, and I never liked it. Why? Because it only leads to
confusion, mainly because the separation of object and meth
Richard Black wrote:
[...]
for me it doesn't add any value - only potential confusion.
+0.9
it makes sense as a convenience tool if used correctly
but can create a hell of a maintenance nightmare if not
Almost as bad as GOTO maintenance wise but without the
benefits in edge cases.
When readi
I'm usually a lurker on here, but thought I'd through in my 2p on this
one...
Delphi (Object Pascal) has a similar feature, that I've had some
experience of using, and I never liked it. Why? Because it only leads to
confusion, mainly because the separation of object and method leaves you
unsure of
hi,
i think it would be really handy to introduce the with() feature from
JavaScript (and probably other OOP languages) into php. so for sample the
following
---
$class=new class;
$class->do_something();
$class->do_more();
$class->do();
---
coul
if (ZEND_NUM_ARGS() != 3 && ZEND_NUM_ARGS() != 6 && ZEND_NUM_ARGS() != 7) {
WRONG_PARAM_COUNT;
}
Will let you check that there are 3, 6 and 7 parameters.
Scott
Richard Quadling wrote:
> Hi.
>
> From what I understand about the argument list for
> zend_parse_parameters(), you separate opt
Hi.
>From what I understand about the argument list for
zend_parse_parameters(), you separate optional parameters from
mandatory ones using pipe (|).
e.g.
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll|", &m,
&d, &y, &h, &n, &s, &ms) == FAILURE) {
In the above example, this says
14 matches
Mail list logo