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
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
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
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;
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
-
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
.
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
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
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
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,
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
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
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
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
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
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
]
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
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: [
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
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
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
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
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:
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
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
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
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_
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
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
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 -
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
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
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.
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_
34 matches
Mail list logo