Re: [PHP-DEV] Array syntax []

2008-01-11 Thread Stephan Schmidt
+1 Best regards Stephan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 5.3 Suggested Feature List

2007-09-10 Thread Stephan Schmidt
Hi, Ilia Alshanetsky wrote: List of Feature Ideas 1) Backport the namespaces patch for PHP 6 +1 2) Symlink the intl extension from PECL, but leave it disabled by default as is the case with all extensions dependent on external libs 0 3) Apply the Late Static B

Re: [PHP-DEV] toString() and Object #ID

2007-07-14 Thread Stephan Schmidt
Hi Pavel, Pavel Shevaev wrote: Folks, is this really wanted behavior? Because if so, why does the following result in the same hash as well(PHP-5.2.1)? $ php -r "class Foo{};$foo = new Foo();var_dump(spl_object_hash($foo));$foo->bar = 1;var_dump(spl_object_hash($foo));" string(32) "d1f40a1cc04

Re: [PHP-DEV] forward compatibility "public" in 4.4

2005-06-16 Thread Stephan Schmidt
Hi, Lukas Smith wrote: I think its a good idea to have, to make it somewhat possible to prepare for the PHP5 E_STRICT world, while still developing PHP4 compatible code. I could for example see this help increase the PHP5 adoption inside PEAR, since this would allow us to make some packages E_

Re: [PHP-DEV] extension naming

2005-03-21 Thread Stephan Schmidt
Hi, Lukas Smith schrieb: Also while xmlrpci is only a pecl ext for now is seems like it registers a class called xmlrpc ("REGISTER_XMLRPCI_CLASS(xmlrpc, rpc, NULL, 0)"). I dont think this is a good idea either. IIRC XMLRPCi strives to be backward compatible with ext/xmlrpc... But I agree that the

Re: [PHP-DEV] LOGO_GUID

2005-03-10 Thread Stephan Schmidt
Hi, D.Walsh schrieb: OK so I've looked at the code from the link provided and while it looks like it's suppose to do something, I am unable to verify what it can actually do because I am unable to install a working copy of PECL_Gen in PHP 4.3.10 on a Macintosh computer based on the instructions

Re: [PHP-DEV] __autoload() and class_exists()

2005-02-22 Thread Stephan Schmidt
Hi, Marcus Boerger schrieb: Expected behavior that can be changed: proto bool class_exists(string classname [, bool autoload]) "RTFM" or is it undocumented? Ooops, didn't check the manual for class_exists() in the last months... Stephan -- http://www.php-tools.net http://www.schst.net http://pear.p

[PHP-DEV] realpath() and destructors

2005-02-22 Thread Stephan Schmidt
Hi, I found another strange behaviour in PHP5, it occurred only on my Windows machine using the Apache SAPI (tried it on Debian with PHP-CGI and it worked fine). The following code: public function __destruct() { echo realpath('./') . "\n"; } } $foo = new Foo(); ?> returns:

[PHP-DEV] __autoload() and class_exists()

2005-02-22 Thread Stephan Schmidt
Hi, I just found this strange behaviour in PHP5: When using class_exists() to test, whether a class exists, the magic function __autoload() is called: function __autoload($class) { echo "Trying to load $class\n"; } if (!class_exists('DB')) { echo "DB does not exist.\n"; } You'll get: Trying t

Re: [PHP-DEV] PHP 5.1

2005-02-01 Thread Stephan Schmidt
Hi, Andi Gutmans schrieb: I believe both PDO and Date should be included in the default distro. I'd like to see xmlreader be bundled as well. It's fast, easy to use and still very powerful. Stephan -- http://www.php-tools.net http://www.schst.net http://pear.php.net -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Re: Need help with streams

2004-06-14 Thread Stephan Schmidt
Hi, iirc there may be a printf means to specify NULL as the padding character, or to repeat an aribtrary character for a certain number of characters, but it's escaping me at the moment. For the size of your padding this method should introduce to horrible of a penalty. Works like a charm, thanks.

Re: [PHP-DEV] Re: Need help with streams

2004-06-14 Thread Stephan Schmidt
Hi, /* Not binary safe, but depending on your data that may be okay */ if (Z_STRLEN_PP(data) > 30) { php_stream_write(stream, Z_STRVAL_PP(data), 30); } else { php_stream_printf(stream TSRMLS_CC, "%-30s", Z_STRVAL_PP(data)); } Both solutions will pad the string with ' ', but I need to pad it wit

Re: [PHP-DEV] Re: Need help with streams

2004-06-14 Thread Stephan Schmidt
Hi, That's because you're telling it to write one character from the position POINTED TO by the integer value. (i.e. Treat the integer like a pointer) You're lucky you're getting data at all and not a segfault. Try: php_stream_putc(stream, (char)(Z_LVAL_P(*data) & 0xFF)); You are a livesaver! Th

[PHP-DEV] Need help with streams

2004-06-14 Thread Stephan Schmidt
Hi, I'm working on ext/id3 (proposed in pecl) and I'm currently experiencing a problem. I got a function that is used to update the information in an ID3 tag. The user passes an array and I update all information that has been passed. One of the possible tokens is a genre ID which is represented

RE: [PHP-DEV] Re: Confusing pointers in PHP 4 and 5

2004-06-09 Thread Stephan Schmidt
Hi, > I think, and I could be completely wrong, that copying a > variable actually > creates a reference. The data is only copied when the > variable referenced is > modified. Yes, that is correct. Stephan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://w

RE: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Stephan Schmidt
Hi, > Somehow this behaviour seems logical, on the other hand I don't think > it's desired. I think that 'self' should point to the current class, > even if the static method resides in a parent class. > > Is this 'self'-behaviour intended? Furthermore this renders the template-method pattern

Re: [PHP-DEV] Performance Consideration of 1 class per file

2004-04-24 Thread Stephan Schmidt
Hi, Maybe the PEAR Packager / Installer could be changed to (optionally?) create a single source file (without require/include statements) comments, whitespace) from all role="php" s and use this for deployment. This should not be done, as a lot of packages are driver based. If you create

RE: [PHP-DEV] stdClass

2004-02-27 Thread Stephan Schmidt
Hi, > > Please can some explain to me what the stdClass is used for in > > PHP 5. I've tried to use the reflection API to reverse engineer it > > but it does not give you much on the stdClass > No. There is no such thing as Java's base class built into PHP. > stdClass is just an empty "dummy cl

AW: [PHP-DEV] CVS Account Request: schst

2003-07-20 Thread Stephan Schmidt
Hi, > Coincidentially, I wrote a similar package that handles CVS > repository > either locally or over network (pserver). I didn't announced it yet > since it's not completed, but I wonder if my trivial effort > would help you > in any way :) > OOOps there's totally stupid typo in my mail,

[PHP-DEV] CVS Account Request: schst

2003-07-20 Thread Stephan Schmidt
I want to release PEAR::Net_CVS. I proposed it on the PEAR Dev mailinglist, got 7 +1 and now need a CVS account to maintain my code. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php