RE: [PHP-DEV] YANP (Yet Another Namespace Proposal)

2005-07-08 Thread Jessie Hernandez
David, You are right, classes that don't use self might break, although there might be a solution for this: when a class declaration is started, immediately "import" the class. This will fix the problem, but I don't really think it's necessary. After all, if you're using an new feature as namespac

[PHP-DEV] Re: YANP (Yet Another Namespace Proposal)

2005-07-08 Thread Jessie Hernandez
For previewing purposes, I have attached a patch of what I have so far so that others can look at it and try it out. I have also attached two PHP files for testing (_testns.php is the script that should be run after the patch is applied. This script includes a class from class3.php to demonstrate t

[PHP-DEV] is_callable and method_exists always true when __call is defined

2005-07-08 Thread Davey Shafik
Dear all, I came across something when I found this bug (http://bugs.php.net/bug.php?id=33621). Should is_callable() and method_exists() always return true when the method doesn't *really* exist? i.e. it would only be called via __call() Is it possible to add an argument to make it only che

Re: [PHP-DEV] YANP (Yet Another Namespace Proposal)

2005-07-08 Thread Al Baker
One more thing, here's an example of how things go in the enterprise and where namespaces make or break PHP being used. Every now and then, someone says "Let's merge projects A and B", and those projects could be in different parts of the world, each having 10s if not 100s of developers, and very

Re: [PHP-DEV] YANP (Yet Another Namespace Proposal)

2005-07-08 Thread Al Baker
I think we're trying to boil the ocean here, and in doing so failing to see both the problems that need to be solved, and the possible solutions. I'd like to break things down a little bit here to address what the real problem is with a lack of namespaces in PHP. In my eyes, there are really only

Re: [PHP-DEV] YANP (Yet Another Namespace Proposal)

2005-07-08 Thread Stanislav Malyshev
JH>>With the above scenario, nothing will be affected if there is an JH>>opcode cache or not. The only situation I can think of where an opcode JH>>cache can affect this is when the script DYNAMICALLY creates classes JH>>from the imported namespace. Maybe there's other situations, but I JH>>can

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Ilia Alshanetsky
Since the underlying way of passing internal data would be an object, the functions you propose may as well be object methods. Aside from that the API looks good. Ilia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Marcus Boerger
Hello Pierre-Alain, since we now have ext/date shouldn't we rename pecl/date to something different for easier integration? And i also do not know if we aren't running into problems later if two extensions have the same name. marcus Friday, July 8, 2005, 12:44:45 PM, you wrote: > On Fri, 8 Ju

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Marcus Boerger
Hello Derick, Friday, July 8, 2005, 2:31:14 PM, you wrote: > On Fri, 8 Jul 2005, Edin Kadribasic wrote: >> I would love to be able to do something like this: >> >> $d = new Date(time()); >> $d->month++; >> $d->print("Y-m-d"); // date() equiv. > Adding methods is no problem, that's what you get

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Andi Gutmans
At 02:36 PM 7/8/2005 +0200, Pierre-Alain Joye wrote: On Fri, 8 Jul 2005 14:31:14 +0200 (CEST) Derick Rethans <[EMAIL PROTECTED]> wrote: > On Fri, 8 Jul 2005, Edin Kadribasic wrote: > > > I would love to be able to do something like this: > > > > $d = new Date(time()); > > $d->month++; > > $d->pr

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Pierre-Alain Joye
On Fri, 8 Jul 2005 14:31:14 +0200 (CEST) Derick Rethans <[EMAIL PROTECTED]> wrote: > On Fri, 8 Jul 2005, Edin Kadribasic wrote: > > > I would love to be able to do something like this: > > > > $d = new Date(time()); > > $d->month++; > > $d->print("Y-m-d"); // date() equiv. > > Adding methods is

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Derick Rethans
On Fri, 8 Jul 2005, Edin Kadribasic wrote: > I would love to be able to do something like this: > > $d = new Date(time()); > $d->month++; > $d->print("Y-m-d"); // date() equiv. Adding methods is no problem, that's what you get for free anyway, I just think that $d->month is too much magic, and

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Edin Kadribasic
On Friday 08 July 2005 02:17, Pierre-Alain Joye wrote: [snip] > This is what I talk about when I say a common Date object in php. > Derick exported the headers on my demand, this is a good first step. I agree that it would be a great idea to have a common Date object in PHP. And since most of it

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Pierre-Alain Joye
On Fri, 8 Jul 2005 09:16:29 +0200 (CEST) [EMAIL PROTECTED] (Derick Rethans) wrote: > Objects are not harder to implement, I found it actually more > straight forward. Besides that, making it an object allows other > people to extend it, something that Pierre wants for his pecl/ > date. I do not

Re: [PHP-DEV] php_pgsql.dll

2005-07-08 Thread Christopher Kings-Lynne
OK, I see what's going on here. The downloads page is just bad... It says "there are no extensions in the installer" and it also says "the extensions are available in the pecl download" Whereas in fact the pecl download does not include all the extensions that are not available in the instal

Re: [PHP-DEV] php_pgsql.dll

2005-07-08 Thread Nicholas Telford
Regardless, you need to download the ZIP that is clearly stated on the downloads page. The installer contains no additional modules, this is also clearly stated. This question should have been posted to php.general or php.install, not internals. Nicholas Telford Christopher Kings-Lynne wrote:

Re: [PHP-DEV] Re: date/timezone classes

2005-07-08 Thread Derick Rethans
On Thu, 7 Jul 2005, Pierre-Alain Joye wrote: > The other are only duplicated with current function. This is maybe > useless. The worst being to rely on strtotime to manipulate date, > this is maybe human readable (understandable is another > question ;), but it is slooow, and the best way to hell

Re: [PHP-DEV] date/timezone classes

2005-07-08 Thread Derick Rethans
On Thu, 7 Jul 2005, Andi Gutmans wrote: > If you're just wrapping the date type with a class, I don't see why it > shouldn't be a resource. It'd give you the same thing but would be easier to > implement (unless I'm missing something). Objects are not harder to implement, I found it actually more