Re: Can someone explain me why this happens please?

From: Date: Sun, 16 Nov 2008 14:16:03 +0000
Subject: Re: Can someone explain me why this happens please?
References: 1 2 3 4  Groups: php.internals php.internals 
Request: Send a blank email to internals+get-41953@lists.php.net to get a copy of this message
Ok, I see. Thank you all for replying. I guess there are a lot to be learned for me now. I'm actually trying to learn C and put it in use of writing PHP extensions. Because from years of working with PHP, I start to feel that PHP might be a bit weak for performance sensitive tasks. Well, it's a long way ahead, and I'd better get going now. Thanks again for the help, and I'll send more 'spam' if I've got problem with PHP and Zend in the future. :D M. Karpelès 写道:
Le dimanche 16 novembre 2008 à 21:35 +0800, Chris Jiang a écrit :
Still, this is a really strange experience. Where are those characters come from? Shouldn't it be a clean array when I first created them? Anything related to the zval structure?
This is not PHP-related. When you *define* a variable, it has no content, you have to initialize it. The characters you got are from the uninitialized space you used in the stack. C won't initialize variables for you as it would be a waste of time in the case you already initialize it with a non-NULL value. Anyway as this is not PHP-related, I suggest this discussion to be continued outside of the PHP internals mailing list, if you have any question, I can probably give you some pointers to good documentation, just need to understand what you are trying to do. Best regards, Mark


« previous php.internals (#41953) next »