On Nov 24, 2008, at 9:27 PM, Christopher Vogt wrote:
Interfaces are helpful in combination with type hinting, but for
people who prefer
duck typing, it is reasonable to not explicitly define them.
It sounds like you are saying that if you prefer duck typing then
interfaces have no use.
I
ith the "use" keyword, but something like:
use HelloworldExtras;
Would be a lightweight way to make sure that the autoloader would add
the category into the runtime.
Looking forward to your comments. Also, I will be at php|works in
Atlanta Thursday and Friday if anyone is
It seems that the problem you're encountering could be fixed
trivially by moving the initialization of $stuff into the constructor.
However, it's difficult to tell from the provided code whether $stuff
is intended as a static member... but if it's not, seems like a very
simple fix...
I d
Yes, I'd be interested in this, too. I filed a bug report for a
segfault under similar conditions and I'd be happy to help find the
bug if I had any idea how to help...
Alan
On Jan 5, 2006, at 7:44 AM, Jochem Maas wrote:
Rasmus,
I have a quick question which if you are able to
give an ans
I also would like someone to tell me why exceptions cannot be
called in the
destructor? Since they can't, this means the reliability of a
destructor is
uncontrolled and nothing can be done to see if this completes
successfully.
Your question is kindof wrong... you can always throw exception
Your last post also indicates, that because the destructors are
only called
after script termination, the scope of an object is global, always.
Is this true?
This isn't true, at least empirically. Destructors are called when
the GC frees the object.
For many objects, this is at script term
e indirect) but also for arrays.
This is a side-effect of reference counting systems, but within
the way PHP is used within a request/response paradigm, it
shouldn't be a real limiting factor in real-life usage. On the
contrary, for these kind of apps, garbage collecting systems have
potential to
regarding the actually topic of this thread I'm very interested
in the concept of 'weak references' (as Apple seems to call them),
what '$this->this' is all about, and whether using reference notation
with object variable assignment is even allowed, whether it it makes
a difference and what the fu
by
using the indirect property access. Might not be perfect but it's
quite doable.
Awesome! Could you tell me what "indirect property access" is? I
googled for it but there's nothing...
Thanks,
Alan
Andi
At 09:21 PM 12/8/2005, Alan Pinstein wrote:
Generally speaking
Generally speaking, if you create a circular reference (whether by
reference or by value), then you will have a "memory leak" until
the end of the request. This is not only true for objects (and
circular references might be indirect) but also for arrays.
sure, of course...
This is a side-e
ipulating $this; that
is, creating weak references.
Alan
On Dec 7, 2005, at 11:27 AM, Antony Dovgal wrote:
On 07.12.2005 18:40, Alan Pinstein wrote:
Hi all-
Please use php-general@lists.php.net for questions regarding
development *in* PHP.
--
Wbr, Antony Dovgal
--
PHP Intern
om/ASPN/Mail/Message/php-Dev/1555640
Plus, this is kind of an *internals* question because the topic not
documented publicly and it has to do with things that are opaque to
userland like refcounts and how "$this" works.
Alan
On Dec 7, 2005, at 11:27 AM, Antony Dovgal wrote:
On
are you using ph4 or php5?
PHP5
are you setting $this->this yourself or 'is it just there'?
No, I'm not setting it, just reading it (see addChildObject() code
below), if that's what you mean.
-Alan
Alan Pinstein wrote:
Hi all-
I've been trying to avoid
Hi all-
I've been trying to avoid circular references in some data import
scripts and finally figured out how to do it. However, I wanted to
ask you guys to make sure that what I'm doing is something that's
legit and can be relied on into the future.
Also, please note that I tried searchi
14 matches
Mail list logo