On Wednesday, January 19, 2011 4:45:14 pm Ben Schmidt wrote:
> > Related: What is the overhead of a ZVal? I'm assuming it's a fixed
> > number of bytes.
>
> It seems not, though a zval has a fixed size. What that size is will
> depend on the compiler and architecture of the system being used, or
Hi!
Many PHP features should be language constructs, but they were made as
language hacks.
__construct is evil, as like any other language hack
Constructors are standard feature in many languages. There's nothing
evil in them.
class Client {
function __construct() {
// some
Many PHP features should be language constructs, but they were made as
language hacks.
__construct is evil, as like any other language hack
It does not provides a safe fundation to build safe abstractions, reusable
and extendibles components, which leads to the lack of PHP libraries.
Let's suppo
Hi Sam:
(becomes off-topic here, but for the sake of argument)
On 19 Jan 2011, at 04:14, Sam Vilain wrote:
> On 19/01/11 10:50, Stefan Marr wrote:
>> On 18 Jan 2011, at 22:16, Sam Vilain wrote:
>>> there doesn't seem to
>>> be an interpreter under the sun which has successfully pulled off
>>> th
On 20/01/11 6:05 AM, la...@garfieldtech.com wrote:
So it sounds like the general answer is that if you pass a complex array to a
function by value and mess with it, data is duplicated for every item you modify
and its direct ancestors up to the root variable but not for the rest of the
tree.
Fo
On 19/01/11 23:10, Sam Vilain wrote:
> On 20/01/11 10:17, Ángel González wrote:
>> Have you taken a look at Runkit_Sandbox? It may provide useful tips.
> *headdesk*
>
> No, I hadn't seen that. Thanks for pointing this out, it looks like
> exactly what I was trying to reinvent...
>
> Cheers,
> Sam.
On 20/01/11 10:17, Ángel González wrote:
> Have you taken a look at Runkit_Sandbox? It may provide useful tips.
*headdesk*
No, I hadn't seen that. Thanks for pointing this out, it looks like
exactly what I was trying to reinvent...
Cheers,
Sam.
--
PHP Internals - PHP Runtime Development Maili
Have you taken a look at Runkit_Sandbox? It may provide useful tips.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi!
I think the point is that the php language itself does not provide solid
construct for writing rock-solid code. Yes, there are many
programmers/hackers that can, but the effort they put is huge.
I think this is completely untrue.
In Java you are free to extend a class --yours or imported
On 19 January 2011 20:05, la...@garfieldtech.com wrote:
> So it sounds like the general answer is that if you pass a complex array to
> a function by value and mess with it, data is duplicated for every item you
> modify and its direct ancestors up to the root variable but not for the rest
> of th
So it sounds like the general answer is that if you pass a complex array
to a function by value and mess with it, data is duplicated for every
item you modify and its direct ancestors up to the root variable but not
for the rest of the tree.
For objects, because of their "pass by handle"-type
On Wed, 19 Jan 2011 14:23:49 -, Martin Scotta
wrote:
What about objects?
With objects less copying occurs because the object value (zval) data is
actually just a pointer and an id that for most purposes works as a
pointer.
However, it should be said that while a copy of an array f
On 1/19/11 7:50 AM, Pierre Joye wrote:
> Honestly if a given part of an application needs something along this
> line for performance reasons, then doing that on the same box where
> the request is executed may be a bad idea. Tools like gearman will do
> a far better jobs and will let you do resour
hi,
On Wed, Jan 19, 2011 at 4:41 PM, Martin Scotta wrote:
> I think the point is that the php language itself does not provide solid
> construct for writing rock-solid code. Yes, there are many
> programmers/hackers that can, but the effort they put is huge.
Care to enlighten me and tell me what
I think the point is that the php language itself does not provide solid
construct for writing rock-solid code. Yes, there are many
programmers/hackers that can, but the effort they put is huge.
it's so easy to break well-written bug-free code, that's impossible for
developers to share libraries,
What about objects?
class Foo {
public $foo;
}
function test($o) {
$o->foo->foo->foo = 2;
}
$bar = new Foo;
$bar->foo = new Foo;
$bar->foo->foo = new Foo;
test( $bar );
---
Also... is it better to pass an object as a parameter rather than many
values?
function withValues($anInteger, $
On 19/01/11 16:14, Sam Vilain wrote:
> In general, Java's basic types typically correspond with types that can
> be dealt with atomically by processors, or are small enough to be passed
> by value. This already makes things a lot easier.
>
> I've had another reason for the differences explained to
Using references does not speed up PHP. It does that already
internally, if I'm not mistaken. The point of my post was that
assigning values to tree arrays are in general faster than a full
array copy.
Hannes
On 19 January 2011 08:36, Ben Schmidt wrote:
> Yep. PHP does clock up memory very quick
18 matches
Mail list logo