[PHP-DEV] PHP 5.1 Roadmap -- Type hints

2004-10-29 Thread Robert Silva
Just in case anyone lost track... it seems the consensus is to allow the optional parameter syntax for class hints. The Nullable class hint doesn't seem to be well supported among the purists so the optional param syntax, while not optimal, is better than leaving it as it is now. One can always rea

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

2004-10-19 Thread Robert Silva
nctionality that the PHP userland classes don't. I love good discussion! Bob -Original Message- From: Marcus Boerger [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 3:26 PM To: Robert Silva Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Type hints with null default valu

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

2004-10-19 Thread Robert Silva
October 19, 2004 1:37 PM To: Robert Silva Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Type hints with null default values Hello Robert, Tuesday, October 19, 2004, 10:20:59 PM, you wrote: > The issues surrounding this seemed to have been muddied up a little, I'll > try to clear

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

2004-10-19 Thread Robert Silva
roviding, together we should be able to come up with a solution that meets everyones needs. Bob Silva -Original Message- From: Marcus Boerger [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:23 AM To: Christian Schneider Cc: [EMAIL PROTECTED]; Andi Gutmans; Robert Silva; &#

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

2004-10-18 Thread Robert Silva
to handle them would be no different than if you didn't specify the type hint in the first place. Bob -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 7:33 PM To: Robert Silva Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] Type hints wi

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

2004-10-18 Thread Robert Silva
- From: Andi Gutmans [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 6:18 PM To: Robert Silva; 'Cristiano Duarte'; [EMAIL PROTECTED] Subject: RE: [PHP-DEV] Type hints with null default values Hi, First of all, I think most agree that it'd be nice to be able to distinct

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

2004-10-17 Thread Robert Silva
. Bob -Original Message- From: Cristiano Duarte [mailto:[EMAIL PROTECTED] Sent: Sunday, October 17, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] Type hints with null default values Robert Silva wrote: > Re-reading the previous discussion, it seems like the functionality that > p

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

2004-10-16 Thread Robert Silva
t; #>php -n -f test.php Got Object Got Object Empty Param Fatal error: Argument 1 must not be null in E:\php5\php5cvs\php5\Debug_TS\test.php on line 5 Bob Silva -Original Message- From: Cristiano Duarte [mailto:[EMAIL PROTECTED] Sent: Saturday, October 16, 2004 4:02 PM To: [EMAIL PRO

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

2004-10-16 Thread Robert Silva
ng it. Bob -Original Message- From: Cristiano Duarte [mailto:[EMAIL PROTECTED] Sent: Saturday, October 16, 2004 3:01 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] Type hints with null default values Robert Silva wrote: > I think Marcus B's final comments in the original discussion a

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

2004-10-16 Thread Robert Silva
I think Marcus B's final comments in the original discussion are right on track. Stab: I voted for NULL type hinted arguments before I voted against them. The main thing that changed my mind, is that in PHP there is no such thing as a NULL object. I came to the conclusion that PHP wasn't broken,

RE: [PHP-DEV] Fwd: New VM Architecture

2004-10-16 Thread Robert Silva
The script approach is much cleaner than the MACROs. Maintaining the script won't be a lot of extra work. It's a shame computed gotos arent more widely supported. Bob -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 9:16 PM To: [EMAIL PROTEC

RE: [PHP-DEV] [PATCH] Resubmitted for review

2004-10-15 Thread Robert Silva
oy_zend_class). Bob Silva -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 5:14 PM To: Robert Silva; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] [PATCH] Resubmitted for review Hi Robert, If I remember correctly, we came to the conclusi

RE: [PHP-DEV] ./configure, PHP, SuSE and the AMD64

2004-10-14 Thread Robert Silva
For #2, I believe he is referring to searching LD_LIBRARY_PATH directories for libraries rather than hardcoding /lib everywhere (which is how its done now). #3 would be something to effect of --with-libdir=lib64,lib Since just about every extension has custom code to check for the existance (and

[PHP-DEV] [PATCH] Resubmitted for review

2004-10-11 Thread Robert Silva
This patch allows php extension authors to declare constants on internal objects. This pretty much just duplicates the zend_declare_property_* functions but for constants. Currently there is no way for C level class authors to declare constants on their objects since the engine has to allocate spac

[PHP-DEV] [PATCH] Bug #30230 exception handler not working with objects

2004-10-11 Thread Robert Silva
The problem is that set_exception_handler allows you to reset the handler by passing an empty string as argument. It did not check to make sure it was a string before checking strlen, therefore when passed an array, it assumed the user was resetting the handler. This patch only resets when an empty

RE: [PHP-DEV] Static variable reflection

2004-10-10 Thread Robert Silva
In current CVS, this code works properly. Bob -Original Message- From: Benjamin Dischinger [mailto:[EMAIL PROTECTED] Sent: Sunday, October 10, 2004 4:36 PM To: [EMAIL PROTECTED] Subject: [PHP-DEV] Static variable reflection I sent this message to the php-general list and didn't get any

RE: [PHP-DEV] Static Constructors

2004-10-05 Thread Robert Silva
] Sent: Tuesday, October 05, 2004 5:54 PM To: Robert Silva; [EMAIL PROTECTED] Subject: RE: [PHP-DEV] Static Constructors I tend to think that static constructors are not a very important feature and therefore I wouldn't want to complicate the language. I don't see a problem with manu

RE: [PHP-DEV] Static Constructors

2004-10-05 Thread Robert Silva
ow that we have static class methods, it would be nice for the language to provide built in initialization facilities. Bob -Original Message- From: Noah Botimer [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 4:57 PM To: Robert Silva Cc: [EMAIL PROTECTED] Subject: Re: [

[PHP-DEV] Static Constructors

2004-10-05 Thread Robert Silva
I've put together a rough implementation of static constructors. I'd like to get peoples thoughts about it then I'll either clean it up and submit it or nuke it. Basically the class constructor __cconstruct (have any better ideas?) is called upon the first access to any static property and marks th

RE: [PHP-DEV] Dynamic class constants

2004-10-04 Thread Robert Silva
While this patch does add convienence at times, I don't think the benefit is great enough to blur the lines between class and object properties/methods. As was stated in the "goto" discussions, the language designers have somewhat of a responsibility to promote proper coding practices (which should

[PHP-DEV] [PATCH] Small ini file optimization

2004-10-01 Thread Robert Silva
During php_init_config() in php_ini.c, it currently loads environment settings, (on windows, system directories and registry settings), binary locations building the path to search for ini files. If you specify -n on the command line, any code that would use these paths are excluded so building th

RE: [PHP-DEV] [PATCH]Add SO_ORIGINAL_DST support and SOL_IP constant to socket_get_options()

2004-10-01 Thread Robert Silva
It looks like this is specific to the Linux kernel getsockopt implementation. There may be other ways to do it on different platforms, but SO_ORIGINAL_DST is not it. Bob Silva -Original Message- From: Leonardo Pedretti [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 7:02 AM To

RE: [PHP-DEV] New to PHP internals

2004-09-30 Thread Robert Silva
Try google('Clock skew detected'); -Original Message- From: Manuel Vázquez Acosta [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 2:33 PM To: [EMAIL PROTECTED] Subject: [PHP-DEV] New to PHP internals Hi all: I'm very new to PHP internals, and I would like to get some help:

RE: [PHP-DEV] CLI Constant

2004-09-30 Thread Robert Silva
PHP_SAPI constant or php_sapi_name -Original Message- From: Jason Garber [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 2:10 PM To: [EMAIL PROTECTED] Subject: [PHP-DEV] CLI Constant Hello internals, What is the best way, from within a php script, to tell that the scr

[PHP-DEV] PHP_MALIAS

2004-09-29 Thread Robert Silva
Would it make since to have a #define PHP_MALIAS ZEND_MALIAS in php.h? Reason being is CODING_STANDARDS #6, where it says to use PHP_* macros in PHP code and ZEND_* in zend code. A few of my classes need to make use of ZEND_MALIAS and there is no PHP_* equivalent (that I could find). Bob Silva

RE: [PHP-DEV] Class constants ... possible?

2004-09-28 Thread Robert Silva
From: Marcus Boerger [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:33 PM To: Robert Silva Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Class constants ... possible? Hello Robert, Tuesday, September 28, 2004, 9:01:00 PM, you wrote: > After 3 days tracing this thing, I found the

[PHP-DEV] Class constants ... possible?

2004-09-28 Thread Robert Silva
After 3 days tracing this thing, I found the problem. Any suggestions? Im trying to define a class constant by allocating a zval str using ALLOC_ZVAL in PHP_MINIT for my extension. This class constant is applied to the class and works as expected. The problem comes during shutdown. In php_request_

RE: [PHP-DEV] Newbie help

2004-09-27 Thread Robert Silva
e Schlossnagle Cc: Andrei Zmievski; Robert Silva; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Newbie help Is there a reason there is no macro for this? (took me a while to figure it out as well) And should it be done in PHP_MINIT_FUNCTION(), rather than __construct Regards Alan George Schlossna

RE: [PHP-DEV] ./configure, PHP, SuSE and the AMD64

2004-09-25 Thread Robert Silva
The root of your problem is that ext/domxml/config.m4 looks for libxml2 specifically in $DOMXML_DIR/lib And if it doesn't find it there, then it defaults to using -lxml instead of -lxml2. Now where this breaks for you is that libxml doesn't exist, but libxml2 does. If you look at that config.m4

[PHP-DEV] ZEND_BEGIN_ARG_INFO

2004-09-25 Thread Robert Silva
When defining class methods that take object parameters using ZEND_BEGIN_ARG_INFO and ZEND_ARG_OBJ_INFO, do you have to define it as pass_by_ref or does the engine implictly know to pass them by ref. Im assuming the pass_by_ref flag is more for backcompat reasons. Thanks Bob -- PHP Internals -

RE: [PHP-DEV] Ideas on hooking into the object cast handler

2004-09-25 Thread Robert Silva
I'm essentially trying to emulate the .NET style boxing/unboxing functionality natively in PHP while maintaining strict type checking and not affecting bc or performance (as part of a larger project converting the .NET BFL to a php extension). I already have a large component of it working in userl

[PHP-DEV] Object equality

2004-09-24 Thread Robert Silva
Hi Andi, Based on your response to my question on how to compare object equality properly. While looking through the code, in zend_operators.c in the is_identical_function, when comparing objects, it uses the same construct I came up with... result->value.lval = (Z_OBJ_HANDLE_P(op1) == Z_OBJ_HAND

[PHP-DEV] Ideas on hooking into the object cast handler

2004-09-24 Thread Robert Silva
I'm working on creating object wrappers for native php types. With ZE2 and the cast_object object handler, I am able to "unbox" the objects to their native php types with simple casts, but as ZE2 currently stands, (to my knowledge at least) there is no way to hook into the (object)native_type cast.

[PHP-DEV] Reference equality between objects

2004-09-23 Thread Robert Silva
Just wondering if there is a better way to test for reference equality than what is listed below. zval *objA; zval *objB; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "oo", &objA, &objB) == FAILURE) { return; } // Reference equality only if (Z_OBJ_HANDLE_P(objA) == Z_OBJ_HANDLE_