Re: [PHP-DEV] Re: New Operator

2006-03-14 Thread Cristiano Duarte
ot;); > > or > > $ConfirmCode = $_GET["ConfirmCode"]; > settype($ConfirmCode, "string"); But you still don't have a default value, just an empty default value(string, zero, etc.). You can't i.e. initialize $_GET["ConfirmCode"] with "Yes" using settype... Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: ZSTR cast to union not working on g++

2006-03-14 Thread Cristiano Duarte
Should I have opened a BUG report instead ? It's just an one line patch... Let me know if I need to open a BUG report. Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: New Operator

2006-03-14 Thread Cristiano Duarte
Jason Garber wrote: > Hello internals, > > Since nobody could seem to agree on a language construct for > accessing a variable that you don't know exists (ifsetor), > I would like to propose a simpler approach. > > It returns the value of the passed variable, or NULL if the variable >

[PHP-DEV] ZSTR cast to union not working on g++

2006-03-13 Thread Cristiano Duarte
fdef __GNUC__ +#if defined(__GNUC__) && ! defined(__GNUG__) # define ZSTR(x)((zstr)(x)) # define NULL_ZSTR ZSTR((void*)NULL) # define EMPTY_ZSTR ZSTR("\0\0") Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] 1.5Gb PHP process, lots of swap

2005-10-28 Thread Cristiano Duarte
for the script end to be freed' ? Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: is_writable & ACLs (Bug #14923)

2005-10-23 Thread Cristiano Duarte
Simon Kissane wrote: > Bug #14923 concerns PHP's is_writable, etc., functions & POSIX ACLs. > Likewise, Bug #30931 concerns the same thing. This bug has been fixed in CVS as pointed by Bug #34957. So Bugs #14923, #30931 and #34957 are all finally closed, thanks to Wez. Regards, C

Re: [PHP-DEV] Re: CLI in PHP6

2005-10-23 Thread Cristiano Duarte
ft, and I have to make scripts in Java, Python, Perl, C++, etc please tell me before they know about it (so I have time to give it up: I really don't want to). Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Bug #30931 is_writable() and is_readable() return false when access is permitted via ACL

2005-10-14 Thread Cristiano Duarte
This bug has many comments waiting for answer. Can someone, please, take a look at it? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Interfaces and access types

2005-01-15 Thread Cristiano Duarte
ace::myStaticMethodDeclarationUsedToWorkNowDont() static in class MyClass in /webpages/sistemas2/RadFrame-lib/classes/radframe/x.php on line 6 I need a way to force a class to have a static method using interfaces. Now I can't do it anymore. Is it possible to put this feature back on CVS again ? Best Regards, Cristiano Duarte

Re: [PHP-DEV] Type hints with null default values

2004-11-16 Thread Cristiano Duarte
; I suggest to either leave as is or to support default values of NULL > (only) and if that is given then you may also pass NULL (give it a double > meaning). Will be possible to implement this "null default value" with "double meaning" for 5.1? Just as information,

RE: [PHP-DEV] Type hints with null default values

2004-10-26 Thread Cristiano Duarte
), 'func1'); 3) Optional argument (with typehint) publicÂfunctionÂCompare($cmpFunc,ÂBaseClassÂ$objA=null); Ex: Compare('func1'); Am I right ? Is it possible to implement all three syntaxes ? IMH it would satisfy everybody's needs. Regards, Cristiano Duarte --

RE: [PHP-DEV] Type hints with null default values

2004-10-22 Thread Cristiano Duarte
se syntax #1. If someone is very strict and don't even think about using null in typehinted arguments, because null is not a value it's a type and must be used as so, just need to use syntax #2. If someone wants to make typehinted parameters optional, just use syntax #3. I really don&#x

Re: [PHP-DEV] Type hints with null default values

2004-10-22 Thread Cristiano Duarte
se syntax #1. If someone is very strict and don't even think about using null in typehinted arguments, because null is not a value it's a type and must be used as so, just need to use syntax #2. If someone wants to make typehinted parameters optional, just use syntax #3. I really don&#x

RE: [PHP-DEV] Type hints with null default values

2004-10-19 Thread Cristiano Duarte
;t add the [] or whatever > is decided upon, but the people that don't follow your particular OOP > guidelines can use [] to make null an allowable value. +1 Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Type hints with null default values

2004-10-19 Thread Cristiano Duarte
se syntax #1. If someone is very strict and don't even think about using null in typehinted arguments, because null is not a value it's a type and must be used as so, just need to use syntax #2. If someone wants to make typehinted parameters optional, just use syntax #3. I really don&#x

RE: [PHP-DEV] Type hints with null default values

2004-10-17 Thread Cristiano Duarte
expected" functionality of $obj=default, but it is > limited to the scope of type hints. > 4. Doesn't affect BC (since they can't use a default now) +1 > 5. It allows optional typed parameters +1 > 6. You still have to check for null +1 > 7. Downside - you cant pass optional params after the first one. -1 > (...)Typed optional params that cannot be null. -1 Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Type hints with null default values

2004-10-16 Thread Cristiano Duarte
can't see the problem that Marcus pointed anymore. If I can remember, he wants a way to enforce typehints not allowing nulls: construction-1 does it. I really need optional typehints and construction-2 supports it. IMHO, everybody would be happy. Any comments ? Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Type hints with null default values

2004-10-16 Thread Cristiano Duarte
Georg Richter wrote: > Am Sa, den 16.10.2004 schrieb Cristiano Duarte um 21:13: >> Hi @ll, >> >> Now that 5.0.3 is out > > Doohh 5.0.3? I didn't see any announcement and I planned to commit > several stuff before :( Sorry Georg. I meant: Now that 5.0.2 i

RE: [PHP-DEV] Type hints with null default values

2004-10-16 Thread Cristiano Duarte
optional (but not necessarily null). That's what I'm asking for. :-) I'm not asking for null objects, just an optional parameter that must be an object or a "null" reference. All OO languages I've ever programmed had this kind of reference(Java, C++, Delphi, etc.)

[PHP-DEV] Type hints with null default values

2004-10-16 Thread Cristiano Duarte
class or null. Am I right ? The use of null (I know it's not a value it's a type...) is justified because we don't have a "value" to represent a NULL OBJECT(or NO OBJECT). IMO, this is a necessary feature (maybe others thing this way too) and that's why I brought

Re: [PHP-DEV] Seg fault

2004-08-02 Thread Cristiano Duarte
t; 1 00:15:31 2004] [notice] child pid 19059 exit signal Segmentation >> fault (11) > > It seems like a session related problem. > Please try my patch: http://tony2004.phpclub.net/dev/tmp/session.diff Thank God! I'm having segfaults over a week, even with last friday's CVS. N

Re: [PHP-DEV] array_intersect_key

2004-07-21 Thread Cristiano Duarte
array_diff_key() and array_diff_ukey() I changed the function name from array_udiff_key to array_diff_ukey. Is this ok ? Patch attached. Cristiano Duarte --- array.c 2004-07-11 18:15:04.0 -0300 +++ /home/aluno/php-5.0.0-new/ext/standard/array.c 2004-07-21 11:47:58.0 -0300 @@ -77,6 +77,7 @@ #de

Re: [PHP-DEV] array_intersect_key

2004-07-21 Thread Cristiano Duarte
array_diff_key() and array_diff_ukey() I have added these already. :-) Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] array_intersect_key

2004-07-21 Thread Cristiano Duarte
Andrey Hristov wrote: > is "make test" showing problems? (i am just currious). > I will try to review the patch later today (atm i am sick). Nope. Make test shows the same errors before and after the patch. I decided to attach the patch since it will keep tabs... Cristiano Du

[PHP-DEV] array_intersect_key

2004-07-20 Thread Cristiano Duarte
0.0 and PHP-4.3.8 that implements the intersection only comparing the array keys. If someone would like to commit it, maybe it would be useful to other users. Regards, Cristiano Duarte ***Patch for PHP 5.0.0 --- array.c 2004-07-11 18:15:04.0 -0300 +++ /home

[PHP-DEV] Re: PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions

2004-05-06 Thread Cristiano Duarte
Cristiano Duarte wrote: > Hi internals, > > this piece of code causes coredumps with PHP5-RC2: I also tested with latest CVS (2004-05-06). Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions

2004-05-06 Thread Cristiano Duarte
Hi internals, this piece of code causes coredumps with PHP5-RC2: register_function('test', 'smarty_test'); $s->display('exception_bug.tpl'); ?> Here is the template(exception_bug.tpl): Exception BUG {test name="ExceptionBugTest"} -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] PHP5: Class behavior: method overloading

2004-02-28 Thread Cristiano Duarte
inition is still a commitment of "interfacing". When you extend the base class you are not supposed to break this commitment. If you allow this commitment break, it may lead to "buggy" code when you take a class by its superclass "interface". Best Regards, Cristiano

Re: [PHP-DEV] Re: Static weirdness..

2004-02-20 Thread Cristiano Duarte
On Wed, 18 Feb 2004 17:37:31 +, Wez Furlong wrote: > C++ allows $a->bar() when bar() is a static method (yes, it is called > in a static context there too). > > IMO, there should be no error, warning or notice here. > I Agree. PHP is fine the way it is. Cristiano Duarte

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Cristiano Duarte
cally this is wrong. Of course overriding > is wrong period, but it's the route you have to take when overloading > isn't an option. IMHO, this odd behavior exists because of the lack of overloading support. To be consistent, PHP shouldn't allow the overriding of methods with

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Cristiano Duarte
ou agreed at the commitment, you can't break it doing overriding(with a different signature - arguments). The only way is overloading, but PHP doesn't support it(you can do overloading with __call, __get and __set but that's not the case). BTW, overriding with default arguments will

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c

2004-02-15 Thread Cristiano Duarte
ecially you, for helping me last year. You guys are really great and if my PHP5 CORBA extension is becoming real it's because of you. Cristiano Duarte. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c

2004-02-15 Thread Cristiano Duarte
"try" or "catch" block. It's really a pain... But I can live with it by now. :-( > Personally, I like the compulsory derivation for 'throw' operands, but I > would prefer it to be an interface instead of a class. In that case, it > is a lot easier to pl

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c

2004-02-15 Thread Cristiano Duarte
nterface and letting the built-in class implement it is the best approach. But only instances of classes wich implement this interface should be throw or caught(language enforcement). With this enforcement, we can have a "catch all" for exceptions with less pain. Cristiano Duarte -- PHP In

Re: [PHP-DEV] ZE2, dl() and objects

2004-01-17 Thread Cristiano Duarte
No Pierre. I'm experiencing the same problem with my PHP5 CORBA extension. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] __toString()

2003-12-14 Thread Cristiano Duarte
ect->thrownException() > > does not work but the object returned from thrownException() has a > __toString() method? IMHO I think it should be supported by print (echo). Without, this support, it will be only a naming convention... Cristiano Duarte -- PHP Internals - PHP R

Re: [PHP-DEV] StudlyCaps

2003-12-06 Thread Cristiano Duarte
shouldn't have exceptions. If the DOM extension (and many others) must use StudlyCaps (because of W3C specifications), all OO-based extension or code should use too. We can live with a CS for procedural and other CS for OOP. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing Li

Re: [PHP-DEV] Beta 3

2003-12-04 Thread Cristiano Duarte
Derick Rethans wrote: > From what I saw more people don't want those suckyCaps . Sorry Derick, but it seems that more people want studlyCaps in Object-Oriented PHP and underscores in procedural PHP. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscrib

[PHP-DEV] Re: When is php going to grow up?? (fwd)

2003-11-27 Thread Cristiano Duarte
ftware application server language. There will be a long path till then, but PHP5 is a start and there are a lot of developers contributing for it. Best Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] Streams "file://" bug

2003-11-23 Thread Cristiano Duarte
Andi Gutmans wrote: This should be changed to (*path_for_open)++ In fact, it's "(*path_for_open)--" :-) Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: [PATCH] Streams "file://" bug

2003-11-23 Thread Cristiano Duarte
just cosmetic... Andi has pointed out that (*path_for_open)++ will make it. Best Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [PATCH] Streams "file://" bug

2003-11-22 Thread Cristiano Duarte
Hi all, The current implementation of file:// support under main/streams/strems.c has a little bug. Maybe it's my gcc 3.2.2 compiler... I don't know... Anyway, the attached patch fixes it. Best Regards, Cristiano Duarte ? php-src/ZendEngine1 Index: php-src/main/streams

[PHP-DEV] [PATCH] Internal Hashtables bug

2003-11-11 Thread Cristiano Duarte
al hashtable ? Anyway, if this is a bug, the patch attached fixes it. Best Regards, Cristiano Duarte ? php-src/ZendEngine1 Index: php-src/Zend/zend_compile.c === RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.4

[PHP-DEV] Re: internal hashtables [patch included]

2003-11-09 Thread Cristiano Duarte
internal hashtable ? Anyway, the patch attached fixes it. Best Regards, Cristiano Duarte ? php-src/ZendEngine1 Index: php-src/Zend/zend_compile.c === RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.491 diff -u

[PHP-DEV] Re: internal hashtables [patch included]

2003-11-09 Thread Cristiano Duarte
internal hashtable ? Anyway, the patch attached fixes it. Best Regards, Cristiano Duarte ? php-src/ZendEngine1 Index: php-src/Zend/zend_alloc.c === RCS file: /repository/ZendEngine2/zend_alloc.c,v retrieving revision 1.129 diff -u -r

[PHP-DEV] internal hashtables [patch included]

2003-11-09 Thread Cristiano Duarte
internal hashtable ? Anyway, the patch attached fixes it. Best Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: finally again

2003-11-07 Thread Cristiano Duarte
ow exceptions that shouldn't be caught, no need to make code redundancy... I know it's not critical, but IMHO it's important. I hope I was clear enough... :-) Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: finally again

2003-10-30 Thread Cristiano Duarte
ow exceptions that shouldn't be caught, no need to make code redundancy... I know it's not critical, but IMHO it's important. I hope I was clear enough... :-) Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: finally again

2003-10-30 Thread Cristiano Duarte
Hi internals ! I really need an opinion about this. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] internal hashtables [patch included]

2003-10-28 Thread Cristiano Duarte
Derick Rethans wrote: Can you please not send uuencoded stuff but just attach the files as plain text? Sorry Derick, I didn't mean to. :-( The patch is attached as plain text now. Cristiano Duarte ? php-src/ZendEngine1 Index: php-src/Zend/zend_al

Re: [PHP-DEV] internal hashtables [patch included]

2003-10-28 Thread Cristiano Duarte
> Can you please not send uuencoded stuff but just attach the files as > plain text? Sorry Derick, I didn't mean to. The patch is now included as plain text. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] internal hashtables [patch included]

2003-10-28 Thread Cristiano Duarte
> Can you please not send uuencoded stuff but just attach the files as > plain text? Sorry Derick, I didn't mean to. The patch is now included as plain text. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] internal hashtables [patch included]

2003-10-27 Thread Cristiano Duarte
Oops, I figure out that the patch was incorrect, since the function call should be "zend_hash_destroy" instead of "zend_hash_clean". Sorry. :-p New patch included. Now the memory leaks are gone forever ! Cristiano Duarte begin 666 ze2_internal_symtables.patch M/R!P:'

[PHP-DEV] Re: internal hashtables [patch included]

2003-10-26 Thread Cristiano Duarte
Here is the patch without the printf's. Sorry. ;-) Cristiano Duarte begin 666 ze2_internal_symtables.patch M/R!P:' MF5N M9%]A;&QO8RYC"CT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T*4D-3(&9I;&4Z("]R M97!OF5N9%]I;G1E

[PHP-DEV] internal hashtables [patch included]

2003-10-26 Thread Cristiano Duarte
patch introduces a new macro called ZEND_INIT_INTERNAL_SYMTABLE wich is to be used instead of ZEND_INIT_SYMTABLE when the hashtables is internal. That's the only change that should be done in sources that needs internal hashtables. Best Regards, Cristiano Duarte begi

Re: [PHP-DEV] internal hashtables [patch included]

2003-10-26 Thread Cristiano Duarte
Hi Andi, In fact Moriyoshi pointed out this problem in hist "Registering constants to internal classes (ZE2)" message: http://www.zend.com/lists/php-dev/200307/msg00023.html The code I provided fix this problem, if it's a problem... Cristiano Duarte -- PHP Internals - PHP Runt

Re: [PHP-DEV] internal hashtables [patch included]

2003-10-26 Thread Cristiano Duarte
ts userland defined class constants. What is the good practice in developing PHP extensions ? Free all classes defined within an extension at module shutdown ? Best Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: finally again

2003-10-26 Thread Cristiano Duarte
is mind... :-) > Agreed. You pointed out an example that really needs finally. Thanx > I can't think of another solution right now. But if I figure out > something I'll let you know. Ok. Best Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: finally again

2003-10-26 Thread Cristiano Duarte
easeReply($_input); //PHP still does not have FINALLY !!! > throw new org__omg__CORBA__UNKNOWN("Unexpected User Exception: > $_exception_id"); > } catch(Exception $_exception) { > $this->_releaseReply($_input); //PHP still does not have FINALLY !!! >

[PHP-DEV] Re: finally again

2003-10-24 Thread Cristiano Duarte
h block. And I forgot to mention that there must be one "catch all" clause(wich is impossible in PHP) with a copy of the finally code and a rethrowing exception statement otherwise an exception that is not caugh will propagate without executing the replicated code of "finally"

[PHP-DEV] finally again

2003-10-24 Thread Cristiano Duarte
not have FINALLY !!! ... ?> IMHO, I think that replicating the finally code at the end of every catch block, before every throw/return statement and at the end of the try/catch statement justify the need of "finally". If there is another aproach without "finally" and without code redundancy, I really need it. Best Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] class constants bugs

2003-09-30 Thread Cristiano Duarte
"Derick Rethans" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > On Mon, 29 Sep 2003, Cristiano Duarte wrote: > > > Shouldn't class constants support simple expressions ? > > No. So It's a compiler bug if it not complaining abount cont

[PHP-DEV] class constants bugs

2003-09-29 Thread Cristiano Duarte
1) This code: results in this error: PHP Fatal error: Unsupported operand types in /test.php on line 13 Shouldn't class constants support simple expressions ? 2) Also, this code: Results in segmentation fault. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing Li

[PHP-DEV] Re: PHP Extension authors - please join the PECL community

2003-09-18 Thread Cristiano Duarte
Hi Wez, I'm developing a PHP 5 CORBA extension. It will have an IDL compiler too. Is PEAR the right place for it ? Cristiano Duarte "Wez Furlong" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > [Sorry for mass-mailing those of you who are not already

[PHP-DEV] Re: problem with interfaces

2003-09-08 Thread Cristiano Duarte
Did anyone think about it ? Any opinions ? Cristiano Duarte. "Cristiano Duarte" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Hi all, > > Is this supposed to work? > > interface test { > function my_function ($mandatory_parameter); > }

Re: [PHP-DEV] Default exception handler

2003-09-06 Thread Cristiano Duarte
HPish by introducing ZS>new terms and requirements appears to defeat the purpose. Ok. If we take option (2) there should be a public recomendation that all exceptions that we want to get caught (and don't want to abort the application/page) should inherit from Exception. Is that right ? Cri

[PHP-DEV] before beta2 (is alive again) :-)

2003-09-06 Thread Cristiano Duarte
- Original Message - MB>From: "Marcus Börger" <[EMAIL PROTECTED]> MB>To: "Cristiano Duarte" <[EMAIL PROTECTED]> MB>Sent: Saturday, September 06, 2003 5:12 PM MB>Subject: Re: before beta 2 MB> MB> MB>Hello Cristiano, MB> MB>you s

Re: [PHP-DEV] Default exception handler

2003-09-06 Thread Cristiano Duarte
gram abnormally. Instead, if we can catch this (at the moment) "unknown exception", maybe it would be possible to recover the program stability. Cristiano Duarte "Andi Gutmans" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Hi Marcus, > > I imple

Re: [PHP-DEV] Re: Concerning Thies's and Sterling's "Hack"

2003-08-31 Thread Cristiano Duarte
s a moving > target, and after a day, our patch would be broken, or we'd constantly > have to remerge. Nearly every optimization applys to Zend Engine 2, > with the exception of the optimizations that are already in Zend Engine > 2 that is :) > > -Sterling > > Am Mo, 2003-0

[PHP-DEV] Re: Concerning Thies's and Sterling's "Hack"

2003-08-31 Thread Cristiano Duarte
Does these hacks apply to ZE2 too ? "Sebastian Bergmann" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Since nobody -- not even the "perpetrators" themselves -- has brought > this to this list yet I'll simply post these two links: > > - http://edwardbear.org/optimizatio

[PHP-DEV] problem with interfaces

2003-08-31 Thread Cristiano Duarte
face since PHP does not allow multiple explicit method declarations (explicit overloading). IMHO, if all additional parameters are optional, the interface commitment is preserved. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Constant Scope PHP5

2003-08-22 Thread Cristiano Duarte
st; > echo $Test->bar; > ?> > > Ciao, > Arjen > IMHO it should. Cristiano Duarte. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] userland macros

2003-08-18 Thread Cristiano Duarte
efine DEFAULT_VALUE(check_value, default_value) (isset(check_value) ? check_value : default_value) $a = DEFAULT_VALUE($my_array['some_index'], true); ?> Best regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] variable_exists() patch

2003-08-17 Thread Cristiano Duarte
well defined way to check whether a variable exists or not. And we are talking about the variable, not the value it stores. :) Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] variable_exists() patch

2003-08-16 Thread Cristiano Duarte
hat's one more reason for variable_exists. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] variable_exists() patch

2003-08-16 Thread Cristiano Duarte
gt; // => bool(true) > > It's not that hard to detect. IMHO, array_key_exists can be used this way, but it shouldn't. The function name has a meaning specific for arrays. We must have a not so specific way to detect if a variable(or attribute) exists or not. Cristiano Duarte. -- PH

Re: [PHP-DEV] variable_exists() patch

2003-08-15 Thread Cristiano Duarte
"every piece of code". See what is necessary to test if a variable exists or not !!! In fact it's a workaround to a necessary variable_exists function. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: variable_exists() patch

2003-08-14 Thread Cristiano Duarte
+1 for variable_exists Cristiano Duarte "Lars Torben Wilson" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > On Thu, 2003-08-14 at 08:42, Andi Gutmans wrote: > > I am not really convinced either that variable_exists() is > > function_ex

[PHP-DEV] PHP archive

2003-08-14 Thread Cristiano Duarte
and now the filesystem functions have an improved abstraction layer, maybe it's time to think about adding transparent ZIP support on this abstraction layer. Cristiano Duarte. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re[2]: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-14 Thread Cristiano Duarte
Hello Marcus, Did you think of a better interface name instead of "Printable" ? Do you think Zeev or Andi will accept this patch ? Cristiano. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP archive

2003-08-14 Thread Cristiano Duarte
Wez Furlong wrote: Please, take it off this list. Excuse me? What's the matter? Cristiano Duarte. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-14 Thread Cristiano Duarte
t does.. Ok. New patch included. AK> It would be nice to hear some noise from Zeev and Andi on this :) I agree. Regards, Cristiano Duarte begin 666 toString.patch M/R!P:' MF5N M9"YC"CT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T*4D-3(

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-14 Thread Cristiano Duarte
y class can provide it's string representation why should you implement some interface? It's only my $.20 though. Maybe you're right. I can move the code away from the "cast" function and create a toString method on the "Object" class wich returns "Object id #n&

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-14 Thread Cristiano Duarte
(IMHO a prefer the second) Cristiano Duarte. "Alan Knowles" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > > > switch/case removed and patch attached. Is it ok? > > Should the method be named "to_string()", "tostring()" or &quo

Re: [PHP-DEV] Apache2

2003-08-11 Thread Cristiano Duarte
with 512Mb RAM. Cristiano Duarte "Ilia Alshanetsky" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > I wouldn't worry about the EXPERIMENTAL label, but rather whether the PHP's > Apache 2 interface works for you and if there are any bug reports

Re: [PHP-DEV] Apache2

2003-08-10 Thread Cristiano Duarte
gt; several bugs, which at least in part responsible for it's EXPERIMENTAL > status. Are these bugs related to Apache2 interface or Apache2 multithreaded (worker) ? > Redhat released a beta compiler despite warnings from developers of said > compiler. Shame on them. :-( Cristiano

[PHP-DEV] Re: implementing a JDBC like api in PHP

2003-08-09 Thread Cristiano Duarte
This discussion simply doesn't belong on internals@, please, take it off this list. Try pear.devl. Cristiano Duarte. "Daniel Penning" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Hi > > PHP5 should support a standardized oo way to access da

Re: [PHP-DEV] PHP archive

2003-08-08 Thread Cristiano Duarte
me like java's one could solve this problem but it does not exist in PHP :( The precedente must be cleary defined. We must know if we have to search inside the par file before or after searching the filesystem. IMHO the par file must be searched first (for security reasons). Maybe, we can store the par file structure in memory to speed the file seaching. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP archive

2003-08-07 Thread Cristiano Duarte
files support. ZIP already supports multiple files (like .tar.bz2). If we can have native support for ".tar.bz2" I agree with your point of view. Cristiano Duarte. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: try/catch/FINALLY

2003-08-05 Thread Cristiano Duarte
egards, Cristiano Duarte "Cristiano Duarte" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Hi all, > > I know there was a lot of discussion about try/catch, but I will bring it up > again: > > What about finally ? > > I know someone posted that

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-05 Thread Cristiano Duarte
d the interface in zend_default_classes. Is it the right place for it? > CD> If you could point me some code to dig... > > cvs co -p ext/spl spl Thanx. And now my code runs ok. Can you check it up ? Cristiano Duarte begin 666 to_string.patch M/R!P:' MF5N M9"YC"CT]/3T

[PHP-DEV] try/catch/FINALLY

2003-08-05 Thread Cristiano Duarte
g the function exit at the engine.. Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-03 Thread Cristiano Duarte
the interface in ZE2. Are there any interfaces registered inside ZE2? I cound't find any... If you could point me some code to dig... Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-03 Thread Cristiano Duarte
ved and patch attached. Is it ok? Should the method be named "to_string()", "tostring()" or "__tostring()" ? Do you commit it to CVS ? Cristiano Duarte begin 666 to_string.patch M/R!P:' MF5N M9"YC"CT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M

Re: Re[2]: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-03 Thread Cristiano Duarte
so I just do the default behavior. Plz, if you could help on this... Attached another patch. Cristiano Duarte "Marcus BöRger" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Hello Cristiano, > > Sunday, August 3, 2003, 9:54:55 PM, you wrote: > > CD

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-03 Thread Cristiano Duarte
I read README.SUBMITING_PATCH and attached the patch as specified. Cristiano Duarte "Cristiano Duarte" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > >"Marcus BöRger" <[EMAIL PROTECTED]> escreveu na mensagem > news:[EMAIL PROTECTED]

Re: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-03 Thread Cristiano Duarte
CLI sapi, and now the configure line is: ./configure --enable-debug --enable-maintainer-zts --enable-cli Best regards, Cristiano Duarte PS: the patch file needs to be applied inside ./Zend > Hello Cristiano, > > Sunday, August 3, 2003, 5:33:25 AM, you wrote: > > CD> I made a

Re: [PHP-DEV] Feature proposal

2003-08-02 Thread Cristiano Duarte
Sorry, but didn't all there error/warnings/info got logged if you want ? I think you can set loggin on in php.ini and IMHO that's the best place to dig for bugs... Cristiano Duarte. "Wojtek Meler" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] >

[PHP-DEV] Re: hook cast_object handler in userspace

2003-08-02 Thread Cristiano Duarte
OBJ_HANDLE_P(expr)); + } + zval_ptr_dtor(&fname); } #if 0 /* FIXME: This might break BC for some people */ expr_copy->value.str.len = sizeof("Object")-1; Thanx, Cristiano Duarte. "Cristiano Duarte" <[EMAIL PROTECTED]> escreveu na mensagem ne

[PHP-DEV] Re: hook cast_object handler in userspace

2003-08-02 Thread Cristiano Duarte
Sorry guys, > $o = new xxx(); should be $o = new my_object(); And if there is a way to hook into zend_standard_class (stdClass) what would make all objects inherit the to_string method, it would be great ! Cristiano Duarte "Cristiano Duarte" <[EMAIL PROTECTED]> escreveu na m

  1   2   >