Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] [PATCH] - Standardize argument parsing of objects [RSS Feed]

#1 Nov. 4, 2005 08:06:08

Bob S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


Please take under consideration this patch to fully utilize cast_object
handlers in the new parameter parsing API.

The old parameter API forced the called function to validate and convert its
arguments using the convert_to_* functions.
The convert_to_* functions make use of cast_object handlers if they exist on
objects which makes passing objects (which implement cast_object) to these
functions possible.

However, with the new parameter parsing API (zend_parse_parameters, et.al.),
it only makes use of the cast_object handler if the expected type is a
string.
This unnecessarily weakens the capability of the cast_object handler.
It makes sense that if an object implements a handler for a string cast,
then it should be able to be used anywhere a string can.

The patch is also attached as a .txt file in case the email really hoses it.


--- zend_API.c 2005-11-03 20:26:02.000000000 -0800
+++ zend_API.c 2005-11-03 20:26:02.000000000 -0800
@@ -312,8 +312,17 @@
*p = Z_LVAL_PP(arg);
break;

+ case IS_OBJECT: {
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)) {
+
SEPARATE_ZVAL_IF_NOT_REF(arg);
+ if
(Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_LONG, 0 TSRMLS_CC) ==
SUCCESS) {
+ *p =
Z_LVAL_PP(arg);
+ break;
+ }
+ }
+ }
+
case IS_ARRAY:
- case IS_OBJECT:
case IS_RESOURCE:
default:
return "long";
@@ -346,8 +355,17 @@
*p = Z_DVAL_PP(arg);
break;

+ case IS_OBJECT: {
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)) {
+
SEPARATE_ZVAL_IF_NOT_REF(arg);
+ if
(Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_DOUBLE, 0 TSRMLS_CC) ==
SUCCESS) {
+ *p =
Z_DVAL_PP(arg);
+ break;
+ }
+ }
+ }
+
case IS_ARRAY:
- case IS_OBJECT:
case IS_RESOURCE:
default:
return "double";
@@ -408,8 +426,17 @@
*p = Z_BVAL_PP(arg);
break;

+ case IS_OBJECT: {
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)) {
+
SEPARATE_ZVAL_IF_NOT_REF(arg);
+ if
(Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_BOOL, 0 TSRMLS_CC) ==
SUCCESS) {
+ *p =
Z_BVAL_PP(arg);
+ break;
+ }
+ }
+ }
+
case IS_ARRAY:
- case IS_OBJECT:
case IS_RESOURCE:
default:
return "boolean";
@@ -434,6 +461,15 @@
case 'a':
{
zval **p = va_arg(*va, zval **);
+ if (Z_TYPE_PP(arg) == IS_OBJECT) {
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)) {
+
SEPARATE_ZVAL_IF_NOT_REF(arg);
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)(*arg, *arg, IS_ARRAY, 0 TSRMLS_CC) == SUCCESS) {
+ *p = *arg;
+ break;
+ }
+ }
+ }
if (Z_TYPE_PP(arg) != IS_ARRAY) {
if (Z_TYPE_PP(arg) == IS_NULL &&
return_null) {
*p = NULL;--- zend_API.c 2005-11-03 20:26:02.000000000 -0800
+++ zend_API.c 2005-11-03 20:26:02.000000000 -0800
@@ -312,8 +312,17 @@
*p = Z_LVAL_PP(arg);
break;

+ case IS_OBJECT: {
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)) {
+
SEPARATE_ZVAL_IF_NOT_REF(arg);
+ if
(Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_LONG, 0 TSRMLS_CC) ==
SUCCESS) {
+ *p =
Z_LVAL_PP(arg);
+ break;
+ }
+ }
+ }
+
case IS_ARRAY:
- case IS_OBJECT:
case IS_RESOURCE:
default:
return "long";
@@ -346,8 +355,17 @@
*p = Z_DVAL_PP(arg);
break;

+ case IS_OBJECT: {
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)) {
+
SEPARATE_ZVAL_IF_NOT_REF(arg);
+ if
(Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_DOUBLE, 0 TSRMLS_CC) ==
SUCCESS) {
+ *p =
Z_DVAL_PP(arg);
+ break;
+ }
+ }
+ }
+
case IS_ARRAY:
- case IS_OBJECT:
case IS_RESOURCE:
default:
return "double";
@@ -408,8 +426,17 @@
*p = Z_BVAL_PP(arg);
break;

+ case IS_OBJECT: {
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)) {
+
SEPARATE_ZVAL_IF_NOT_REF(arg);
+ if
(Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_BOOL, 0 TSRMLS_CC) ==
SUCCESS) {
+ *p =
Z_BVAL_PP(arg);
+ break;
+ }
+ }
+ }
+
case IS_ARRAY:
- case IS_OBJECT:
case IS_RESOURCE:
default:
return "boolean";
@@ -434,6 +461,15 @@
case 'a':
{
zval **p = va_arg(*va, zval **);
+ if (Z_TYPE_PP(arg) == IS_OBJECT) {
+ if (Z_OBJ_HANDLER_PP(arg, cast_object))
{
+ SEPARATE_ZVAL_IF_NOT_REF(arg);
+ if (Z_OBJ_HANDLER_PP(arg,
cast_object)(*arg, *arg, IS_ARRAY, 0 TSRMLS_CC) == SUCCESS) {
+ *p = *arg;
+ break;
+ }
+ }
+ }
if (Z_TYPE_PP(arg) != IS_ARRAY) {
if (Z_TYPE_PP(arg) == IS_NULL &&
return_null) {
*p = NULL;--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#2 Nov. 4, 2005 08:29:00

Marcus B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


Hello Bob,

this is a) wrong in the way you call the cast handler and b) we will
definitively not add this behavior before the next major release aka
HEAD. However it would be better to call the conversion functions
(zend_operators.h) here to have get handler used when no cast handler
is available to avoid inconsistencies with auto conversions in other
places. I guess I know where you're heading, i am not quite sure this
is essantial or even the rigth thing to for PHP yet at least for stuff
like the array functions and objects that overload ArrayAccess it is
more than usefull.

regards
marcus

p.s.: You still haven't shown me any of your extension code :-/

Friday, November 4, 2005, 9:06:27 AM, you wrote:

> --- zend_API.c 2005-11-03 20:26:02.000000000 -0800
> +++ zend_API.c 2005-11-03 20:26:02.000000000 -0800
> @@ -312,8 +312,17 @@
> *p = Z_LVAL_PP(arg);
> break;

> + case IS_OBJECT: {
> + if (Z_OBJ_HANDLER_PP(arg,
> cast_object)) {
> +
> SEPARATE_ZVAL_IF_NOT_REF(arg);
> + if
> (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_LONG, 0 TSRMLS_CC) ==
> SUCCESS) {
> + *p =
> Z_LVAL_PP(arg);
> + break;
> + }
> + }
> + }
> +
> case IS_ARRAY:
> - case IS_OBJECT:
> case IS_RESOURCE:
> default:
> return "long";
> @@ -346,8 +355,17 @@
> *p = Z_DVAL_PP(arg);
> break;

> + case IS_OBJECT: {
> + if (Z_OBJ_HANDLER_PP(arg,
> cast_object)) {
> +
> SEPARATE_ZVAL_IF_NOT_REF(arg);
> + if
> (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_DOUBLE, 0 TSRMLS_CC) ==
> SUCCESS) {
> + *p =
> Z_DVAL_PP(arg);
> + break;
> + }
> + }
> + }
> +
> case IS_ARRAY:
> - case IS_OBJECT:
> case IS_RESOURCE:
> default:
> return "double";
> @@ -408,8 +426,17 @@
> *p = Z_BVAL_PP(arg);
> break;

> + case IS_OBJECT: {
> + if (Z_OBJ_HANDLER_PP(arg,
> cast_object)) {
> +
> SEPARATE_ZVAL_IF_NOT_REF(arg);
> + if
> (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_BOOL, 0 TSRMLS_CC) ==
> SUCCESS) {
> + *p =
> Z_BVAL_PP(arg);
> + break;
> + }
> + }
> + }
> +
> case IS_ARRAY:
> - case IS_OBJECT:
> case IS_RESOURCE:
> default:
> return "boolean";
> @@ -434,6 +461,15 @@
> case 'a':
> {
> zval **p = va_arg(*va, zval **);
> + if (Z_TYPE_PP(arg) == IS_OBJECT) {
> + if (Z_OBJ_HANDLER_PP(arg,
> cast_object)) {
> + SEPARATE_ZVAL_IF_NOT_REF(arg);
> + if (Z_OBJ_HANDLER_PP(arg,
> cast_object)(*arg, *arg, IS_ARRAY, 0 TSRMLS_CC) == SUCCESS) {
> + *p = *arg;
> + break;
> + }
> + }
> + }
> if (Z_TYPE_PP(arg) != IS_ARRAY) {
> if (Z_TYPE_PP(arg) == IS_NULL &&
> return_null) {
> *p = NULL;




Best regards,
Marcus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#3 Nov. 4, 2005 10:18:06

Bob S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


Hi Marcus,

OK, I got my learning cap on, why is it the wrong way to call cast_object? I
just copied it from the example for a string param and it worked so I am
curious why it is wrong. I agree the convert_to_* functions are a better
solution for the reasons you mentioned, again, I just followed the example
for the string case.

I guess I don't see what this modification has to do with the future of PHP
though. Why restrict the parameter API to objects that can only convert to a
string value? I'd say the current behavior is almost worthy of a bug.


Imagine we have a class that represents a String and supports the
cast_object handler for all base types. We'll name it ZString.

The following code works fine: (Ignore the fact that I should be using an
integer, not a string equivalent)

$str = new ZString('PHP Object Wrappers');
$start = new ZString('4');
$length = new ZString('6');

echo substr($str, $start, $length);

Result: Object

however, this will fail:

echo wordwrap($str, $length);

Result: Warning: wordwrap() expects parameter 2 to be long

The only difference is the method it uses to get its parameters.

substr() uses zend_get_parameters_ex and wordwrap() uses
zend_parse_parameters

I can work around this restriction by pulling in my parameters as zvals and
doing my own conversion, but IMHO, the engine really should handle it using
the built-in capabilities that already exist and aren't being used.

In regards to the extension, I have the base objects complete: ZArray,
ZChar, ZBoolean, ZDouble, ZInt, ZString. They all work interchangeably (for
the most part) with their PHP native counterparts as long as you aren't
using them on the left side of an expression.

$a = new ZString('PHP ');
$b = new ZString('Object ');
$c = new ZString('Wrappers');

echo $a.$b.$c; (no reliance on __toString, so concatenation is possible)
PHP Object Wrappers

$int = new ZInt(5);
echo $int + 5;
10

They make extended use of the ArrayAccess interface to implement properties
and indexers.

$a = new ZString('PHP');
echo $a; 3
echo $a; P
echo $a{1}; H
echo $a->offsetGet(2); P

Properties are also supported for derived user classes by defining
accessors.

class MyClass extends ZObject
{
function setMyProp($value)
{
if ($value is valid)
$this->_props = $value;
}
function getMyProp()
{
return $this->_props;
}

}

$e = new MyClass;
$e = 'PHP Object Wrappers';
echo $e;


Where appropriate, they implement Iterator or IteratorAggregate with C# type
wrappers.
foreach ($a as $c)
echo $c;

PHP

$enum = $a->GetEnumerator();
while ($enum->MoveNext())
echo $enum->GetCurrent();

PHP


Its also completely exception based, no PHP errors surface during runtime.
As you can tell, I am using C# as my model for the objects. They actually
flow pretty well in a real application as well. One last addition that would
be cool but likely to never happen in the PHP distro is the following:

$a = "some string";
$a->Substring(5,1);

$b = 5;
$b->Equals(3); (false)
$b++;
$b->Equals(6); (true)
echo gettype($b); "object"

Implicit conversion via cast handlers.


I still have a couple weeks of work left on them. This is my first dabble in
C so I have a lot of cleanup to do as well as learn how to turn it into a
PECL extension.

Why program if you can't have fun doing it?

Bob



> -----Original Message-----
> From: Marcus Boerger
> Sent: Friday, November 04, 2005 12:29 AM
> To: Bob Silva
> Cc: intern***@*ists.php.net
> Subject: Re: - Standardize argument parsing of objects
>
> Hello Bob,
>
> this is a) wrong in the way you call the cast handler and b) we will
> definitively not add this behavior before the next major release aka
> HEAD. However it would be better to call the conversion functions
> (zend_operators.h) here to have get handler used when no cast handler
> is available to avoid inconsistencies with auto conversions in other
> places. I guess I know where you're heading, i am not quite sure this
> is essantial or even the rigth thing to for PHP yet at least for stuff
> like the array functions and objects that overload ArrayAccess it is
> more than usefull.
>
> regards
> marcus
>
> p.s.: You still haven't shown me any of your extension code :-/
>
> Friday, November 4, 2005, 9:06:27 AM, you wrote:
>
> > --- zend_API.c 2005-11-03 20:26:02.000000000 -0800
> > +++ zend_API.c 2005-11-03 20:26:02.000000000 -0800
> > @@ -312,8 +312,17 @@
> > *p = Z_LVAL_PP(arg);
> > break;
>
> > + case IS_OBJECT: {
> > + if
> (Z_OBJ_HANDLER_PP(arg, cast_object)) {
> > +
> SEPARATE_ZVAL_IF_NOT_REF(arg);
> > + if
> > (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_LONG, 0 TSRMLS_CC) ==
> SUCCESS) {
> > + *p =
> Z_LVAL_PP(arg);
> > + break;
> > + }
> > + }
> > + }
> > +
> > case IS_ARRAY:
> > - case IS_OBJECT:
> > case IS_RESOURCE:
> > default:
> > return "long";
> > @@ -346,8 +355,17 @@
> > *p = Z_DVAL_PP(arg);
> > break;
>
> > + case IS_OBJECT: {
> > + if
> (Z_OBJ_HANDLER_PP(arg, cast_object)) {
> > +
> SEPARATE_ZVAL_IF_NOT_REF(arg);
> > + if
> > (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_DOUBLE, 0 TSRMLS_CC)
> == SUCCESS) {
> > + *p =
> Z_DVAL_PP(arg);
> > + break;
> > + }
> > + }
> > + }
> > +
> > case IS_ARRAY:
> > - case IS_OBJECT:
> > case IS_RESOURCE:
> > default:
> > return "double";
> > @@ -408,8 +426,17 @@
> > *p = Z_BVAL_PP(arg);
> > break;
>
> > + case IS_OBJECT: {
> > + if
> (Z_OBJ_HANDLER_PP(arg, cast_object)) {
> > +
> SEPARATE_ZVAL_IF_NOT_REF(arg);
> > + if
> > (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_BOOL, 0 TSRMLS_CC) ==
> SUCCESS) {
> > + *p =
> Z_BVAL_PP(arg);
> > + break;
> > + }
> > + }
> > + }
> > +
> > case IS_ARRAY:
> > - case IS_OBJECT:
> > case IS_RESOURCE:
> > default:
> > return "boolean";
> > @@ -434,6 +461,15 @@
> > case 'a':
> > {
> > zval **p = va_arg(*va, zval **);
> > + if (Z_TYPE_PP(arg) == IS_OBJECT) {
> > + if (Z_OBJ_HANDLER_PP(arg,
> cast_object)) {
> > +
> SEPARATE_ZVAL_IF_NOT_REF(arg);
> > + if
> (Z_OBJ_HANDLER_PP(arg,
> > cast_object)(*arg, *arg, IS_ARRAY, 0 TSRMLS_CC) == SUCCESS) {
> > + *p = *arg;
> > + break;
> > + }
> > + }
> > + }
> > if (Z_TYPE_PP(arg) != IS_ARRAY) {
> > if (Z_TYPE_PP(arg) == IS_NULL &&
> return_null) {
> > *p = NULL;
>
>
>
>
> Best regards,
> Marcus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#4 Nov. 4, 2005 18:59:02

Marcus B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


Hello Bob,

Friday, November 4, 2005, 11:19:23 AM, you wrote:

> Hi Marcus,

> OK, I got my learning cap on, why is it the wrong way to call cast_object? I
> just copied it from the example for a string param and it worked so I am
> curious why it is wrong. I agree the convert_to_* functions are a better
> solution for the reasons you mentioned, again, I just followed the example
> for the string case.

> I guess I don't see what this modification has to do with the future of PHP
> though. Why restrict the parameter API to objects that can only convert to a
> string value? I'd say the current behavior is almost worthy of a bug.



> In regards to the extension, I have the base objects complete: ZArray,
> ZChar, ZBoolean, ZDouble, ZInt, ZString. They all work interchangeably (for
> the most part) with their PHP native counterparts as long as you aren't
> using them on the left side of an expression.

And that is where get/set handlers come into play and why calling cat
handler alone is incorrect. Apart from that the 5 api has the parameter
should_free which should be non null if read and write zval are the same
so that the handler knows it must call zval_dtor on the readval prior to
assigning the new value. Since this interface is borked it has changed
in head. There read and write zval must be different and the caller has
to take care about any required free/destruction. That you had a look
into the stuff and haven't come accross this is again proof that the
old api was not only bork but also used wrong.

Best regards,
Marcus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#5 Nov. 5, 2005 02:11:15

Bob S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


Hi Marcus,

I think I understand what you are saying. I've added get and set handlers to
my objects and can now achieve this:

$a = new ZInt(5);
$a += 1;
echo ($a->Equals(6)) ? 'true':'false';

=true

as well as:

$a = new ZChar('A');
$a++;
echo ($a->Equals('B')) ? 'true':'false';

=true

Thanks for helping me understand this. An unexpected side-effect is that by
declaring my objects ahead of time like a typed language, I can use natives
in an object context which is what I was looking to achieve. I still have a
lot of testing to do though.

$a = new ZString('PHP');
$a .= ' Object Wrappers';
echo $a->ToString();

=PHP Object Wrappers

My ZString objects are immutable, $a is actually a new ZString object after
the concatenation.

The parameter API (even in HEAD) is still a stumbling block though since it
only converts objects for "syuTt" specifiers and not the others ("l", "b",
"d" and preferably "a" which doesn't look possible without breaking BC since
it relies on the get_properties handler first and convert_object_to_type
second).

Of course any good language provides a work around: (casting ahead of time)

echo wordwrap(new ZString('PHP is cool'), (int)new ZInt(3));
=PHP
is
cool


I really don't know if this will be useful for anyone else but it sure is
fun programming it and I'm learning a lot. People that are looking for a
strongly typed PHP may find it useful once I complete the rest of the object
framework. Next up is Collections. Again, I really appreciate you taking the
time to reply to my questions and point me in the right direction.

Bob




> -----Original Message-----
> From: Marcus Boerger
> Sent: Friday, November 04, 2005 10:59 AM
> To: Bob Silva
> Cc: intern***@*ists.php.net
> Subject: Re: - Standardize argument parsing of objects
>
> Hello Bob,
>
> Friday, November 4, 2005, 11:19:23 AM, you wrote:
>
> > Hi Marcus,
>
> > OK, I got my learning cap on, why is it the wrong way to call
> cast_object? I
> > just copied it from the example for a string param and it worked so I am
> > curious why it is wrong. I agree the convert_to_* functions are a better
> > solution for the reasons you mentioned, again, I just followed the
> example
> > for the string case.
>
> > I guess I don't see what this modification has to do with the future of
> PHP
> > though. Why restrict the parameter API to objects that can only convert
> to a
> > string value? I'd say the current behavior is almost worthy of a bug.
>
>
>
> > In regards to the extension, I have the base objects complete: ZArray,
> > ZChar, ZBoolean, ZDouble, ZInt, ZString. They all work interchangeably
> (for
> > the most part) with their PHP native counterparts as long as you aren't
> > using them on the left side of an expression.
>
> And that is where get/set handlers come into play and why calling cat
> handler alone is incorrect. Apart from that the 5 api has the parameter
> should_free which should be non null if read and write zval are the same
> so that the handler knows it must call zval_dtor on the readval prior to
> assigning the new value. Since this interface is borked it has changed
> in head. There read and write zval must be different and the caller has
> to take care about any required free/destruction. That you had a look
> into the stuff and haven't come accross this is again proof that the
> old api was not only bork but also used wrong.
>
> Best regards,
> Marcus
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit:http://www.php.net/unsub.php--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#6 Nov. 5, 2005 05:35:18

Jessie H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


Hi Bob,

BTW, several months back I started working on a similar String class (you
can see my post athttp://news.php.net/php.pecl.dev/2512). It was meant as
an OOP interface to all of the string-handling functions, and also had
smart buffer management for speed. I started working on this hoping to have
it be a part of the core, but at the time I was presented with several
objections (most of them were because of the generic name chosen, "String",
and because no one wanted it in the core, only on PECL). Even then, I was
advised to wait for the Unicode changes to be merged before I continued
(don't know if the Unicode work is done yet).

I stopped working on this extension shortly thereafter and started working
on the namespace patch (which is really more important anyways). I can post
what I had done at the time if you want to take a look at it (I think I
left the code at work, so it would have to wait till Monday).

(IMHO, I still think a core String class would be very useful. There are
many extensions that provide both a procedural and OOP interface. Take for
example SQLite. You can either use the sqlite_* functions or use the
SQLiteDatabase class. I don't see why strings should be any different.)


Regards,

Jessie


Bob Silva wrote:

> Hi Marcus,
>
> I think I understand what you are saying. I've added get and set handlers
> to my objects and can now achieve this:
>
> $a = new ZInt(5);
> $a += 1;
> echo ($a->Equals(6)) ? 'true':'false';
>
> =true
>
> as well as:
>
> $a = new ZChar('A');
> $a++;
> echo ($a->Equals('B')) ? 'true':'false';
>
> =true
>
> Thanks for helping me understand this. An unexpected side-effect is that
> by declaring my objects ahead of time like a typed language, I can use
> natives in an object context which is what I was looking to achieve. I
> still have a lot of testing to do though.
>
> $a = new ZString('PHP');
> $a .= ' Object Wrappers';
> echo $a->ToString();
>
> =PHP Object Wrappers
>
> My ZString objects are immutable, $a is actually a new ZString object
> after the concatenation.
>
> The parameter API (even in HEAD) is still a stumbling block though since
> it only converts objects for "syuTt" specifiers and not the others ("l",
> "b", "d" and preferably "a" which doesn't look possible without breaking
> BC since it relies on the get_properties handler first and
> convert_object_to_type second).
>
> Of course any good language provides a work around: (casting ahead of
> time)
>
> echo wordwrap(new ZString('PHP is cool'), (int)new ZInt(3));
> =PHP
> is
> cool
>
>
> I really don't know if this will be useful for anyone else but it sure is
> fun programming it and I'm learning a lot. People that are looking for a
> strongly typed PHP may find it useful once I complete the rest of the
> object framework. Next up is Collections. Again, I really appreciate you
> taking the time to reply to my questions and point me in the right
> direction.
>
> Bob
>
>
>
>
>> -----Original Message-----
>> From: Marcus Boerger
>> Sent: Friday, November 04, 2005 10:59 AM
>> To: Bob Silva
>> Cc: intern***@*ists.php.net
>> Subject: Re: - Standardize argument parsing of objects
>>
>> Hello Bob,
>>
>> Friday, November 4, 2005, 11:19:23 AM, you wrote:
>>
>> > Hi Marcus,
>>
>> > OK, I got my learning cap on, why is it the wrong way to call
>> cast_object? I
>> > just copied it from the example for a string param and it worked so I
>> > am curious why it is wrong. I agree the convert_to_* functions are a
>> > better solution for the reasons you mentioned, again, I just followed
>> > the
>> example
>> > for the string case.
>>
>> > I guess I don't see what this modification has to do with the future of
>> PHP
>> > though. Why restrict the parameter API to objects that can only convert
>> to a
>> > string value? I'd say the current behavior is almost worthy of a bug.
>>
>>
>>
>> > In regards to the extension, I have the base objects complete: ZArray,
>> > ZChar, ZBoolean, ZDouble, ZInt, ZString. They all work interchangeably
>> (for
>> > the most part) with their PHP native counterparts as long as you aren't
>> > using them on the left side of an expression.
>>
>> And that is where get/set handlers come into play and why calling cat
>> handler alone is incorrect. Apart from that the 5 api has the parameter
>> should_free which should be non null if read and write zval are the same
>> so that the handler knows it must call zval_dtor on the readval prior to
>> assigning the new value. Since this interface is borked it has changed
>> in head. There read and write zval must be different and the caller has
>> to take care about any required free/destruction. That you had a look
>> into the stuff and haven't come accross this is again proof that the
>> old api was not only bork but also used wrong.
>>
>> Best regards,
>> Marcus
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit:http://www.php.net/unsub.php--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#7 Nov. 5, 2005 06:48:40

Bob S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


Hi Jessie,

I'd be more than happy to get some examples of how others would implement a
string class. I am doing most of my modeling after the .NET 2.0 framework
for my objects. I find it to be a well organized and capable framework,
especially the new ASP.NET 2.0 features like the Role Manager. It also saves
on my documentation, just go look at msdn2.microsoft.com. :) kidding

I started this just for fun and an introduction to C, but I am planning on
putting into PECL when it is stable, which is quite far off for the whole
framework. Should be ready in time for PHP6.

I was just reading all the Unicode docs tonight preparing to start my
conversion to support it. Gets quite messy pretty fast.

Any word on whether the core team is going to accept the namespace patch? It
will be beneficial to my development as well for obvious reasons.

Bob



> -----Original Message-----
> From: Jessie Hernandez
> Sent: Friday, November 04, 2005 9:35 PM
> To: intern***@*ists.php.net
> Subject: RE: - Standardize argument parsing of objects
>
> Hi Bob,
>
> BTW, several months back I started working on a similar String class (you
> can see my post athttp://news.php.net/php.pecl.dev/2512). It was meant as
> an OOP interface to all of the string-handling functions, and also had
> smart buffer management for speed. I started working on this hoping to
> have
> it be a part of the core, but at the time I was presented with several
> objections (most of them were because of the generic name chosen,
> "String",
> and because no one wanted it in the core, only on PECL). Even then, I was
> advised to wait for the Unicode changes to be merged before I continued
> (don't know if the Unicode work is done yet).
>
> I stopped working on this extension shortly thereafter and started working
> on the namespace patch (which is really more important anyways). I can
> post
> what I had done at the time if you want to take a look at it (I think I
> left the code at work, so it would have to wait till Monday).
>
> (IMHO, I still think a core String class would be very useful. There are
> many extensions that provide both a procedural and OOP interface. Take for
> example SQLite. You can either use the sqlite_* functions or use the
> SQLiteDatabase class. I don't see why strings should be any different.)
>
>
> Regards,
>
> Jessie
>
>
> Bob Silva wrote:
>
> > Hi Marcus,
> >
> > I think I understand what you are saying. I've added get and set
> handlers
> > to my objects and can now achieve this:
> >
> > $a = new ZInt(5);
> > $a += 1;
> > echo ($a->Equals(6)) ? 'true':'false';
> >
> > =true
> >
> > as well as:
> >
> > $a = new ZChar('A');
> > $a++;
> > echo ($a->Equals('B')) ? 'true':'false';
> >
> > =true
> >
> > Thanks for helping me understand this. An unexpected side-effect is that
> > by declaring my objects ahead of time like a typed language, I can use
> > natives in an object context which is what I was looking to achieve. I
> > still have a lot of testing to do though.
> >
> > $a = new ZString('PHP');
> > $a .= ' Object Wrappers';
> > echo $a->ToString();
> >
> > =PHP Object Wrappers
> >
> > My ZString objects are immutable, $a is actually a new ZString object
> > after the concatenation.
> >
> > The parameter API (even in HEAD) is still a stumbling block though since
> > it only converts objects for "syuTt" specifiers and not the others ("l",
> > "b", "d" and preferably "a" which doesn't look possible without breaking
> > BC since it relies on the get_properties handler first and
> > convert_object_to_type second).
> >
> > Of course any good language provides a work around: (casting ahead of
> > time)
> >
> > echo wordwrap(new ZString('PHP is cool'), (int)new ZInt(3));
> > =PHP
> > is
> > cool
> >
> >
> > I really don't know if this will be useful for anyone else but it sure
> is
> > fun programming it and I'm learning a lot. People that are looking for a
> > strongly typed PHP may find it useful once I complete the rest of the
> > object framework. Next up is Collections. Again, I really appreciate you
> > taking the time to reply to my questions and point me in the right
> > direction.
> >
> > Bob
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: Marcus Boerger
> >> Sent: Friday, November 04, 2005 10:59 AM
> >> To: Bob Silva
> >> Cc: intern***@*ists.php.net
> >> Subject: Re: - Standardize argument parsing of
> objects
> >>
> >> Hello Bob,
> >>
> >> Friday, November 4, 2005, 11:19:23 AM, you wrote:
> >>
> >> > Hi Marcus,
> >>
> >> > OK, I got my learning cap on, why is it the wrong way to call
> >> cast_object? I
> >> > just copied it from the example for a string param and it worked so I
> >> > am curious why it is wrong. I agree the convert_to_* functions are a
> >> > better solution for the reasons you mentioned, again, I just followed
> >> > the
> >> example
> >> > for the string case.
> >>
> >> > I guess I don't see what this modification has to do with the future
> of
> >> PHP
> >> > though. Why restrict the parameter API to objects that can only
> convert
> >> to a
> >> > string value? I'd say the current behavior is almost worthy of a bug.
> >>
> >>
> >>
> >> > In regards to the extension, I have the base objects complete:
> ZArray,
> >> > ZChar, ZBoolean, ZDouble, ZInt, ZString. They all work
> interchangeably
> >> (for
> >> > the most part) with their PHP native counterparts as long as you
> aren't
> >> > using them on the left side of an expression.
> >>
> >> And that is where get/set handlers come into play and why calling cat
> >> handler alone is incorrect. Apart from that the 5 api has the parameter
> >> should_free which should be non null if read and write zval are the
> same
> >> so that the handler knows it must call zval_dtor on the readval prior
> to
> >> assigning the new value. Since this interface is borked it has changed
> >> in head. There read and write zval must be different and the caller has
> >> to take care about any required free/destruction. That you had a look
> >> into the stuff and haven't come accross this is again proof that the
> >> old api was not only bork but also used wrong.
> >>
> >> Best regards,
> >> Marcus
> >>
> >> --
> >> PHP Internals - PHP Runtime Development Mailing List
> >> To unsubscribe, visit:http://www.php.net/unsub.php>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit:http://www.php.net/unsub.php--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#8 Nov. 5, 2005 15:39:03

Wez F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


On 11/5/05, Bob Silva <> wrote:
> Any word on whether the core team is going to accept the namespace patch? It
> will be beneficial to my development as well for obvious reasons.

That's one of the things we'll be discussing in Paris next week.

> I was just reading all the Unicode docs tonight preparing to start my
> conversion to support it. Gets quite messy pretty fast.

I'd hold off from writing any code for that just yet; we're also
discussing some of the unicode implementation details next week.

--Wez.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#9 Nov. 16, 2005 22:59:16

Jessie H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] [PATCH] - Standardize argument parsing of objects


Bob,

As mentioned, attached is what I had for the String class (have not touched
the code for many months now). It contains the methods below. What I was
aiming for was to have the best of the C++ and Java String methods, plus
some new methods named after the PHP-specific string functions.

__construct
__toString
append
clear
contains
empty
indexOf
length
makeCopy
reserve
startsWith
toLowerCase
toUpperCase
trim


Regards,

Jessie Hernandez


""Bob Silva"" <> wrote in message

> Hi Jessie,
>
> I'd be more than happy to get some examples of how others would implement
a
> string class. I am doing most of my modeling after the .NET 2.0 framework
> for my objects. I find it to be a well organized and capable framework,
> especially the new ASP.NET 2.0 features like the Role Manager. It also
saves
> on my documentation, just go look at msdn2.microsoft.com. :) kidding
>
> I started this just for fun and an introduction to C, but I am planning on
> putting into PECL when it is stable, which is quite far off for the whole
> framework. Should be ready in time for PHP6.
>
> I was just reading all the Unicode docs tonight preparing to start my
> conversion to support it. Gets quite messy pretty fast.
>
> Any word on whether the core team is going to accept the namespace patch?
It
> will be beneficial to my development as well for obvious reasons.
>
> Bob
>
>
>
> > -----Original Message-----
> > From: Jessie Hernandez
> > Sent: Friday, November 04, 2005 9:35 PM
> > To: intern***@*ists.php.net
> > Subject: RE: - Standardize argument parsing of objects
> >
> > Hi Bob,
> >
> > BTW, several months back I started working on a similar String class
(you
> > can see my post athttp://news.php.net/php.pecl.dev/2512). It was meant
as
> > an OOP interface to all of the string-handling functions, and also had
> > smart buffer management for speed. I started working on this hoping to
> > have
> > it be a part of the core, but at the time I was presented with several
> > objections (most of them were because of the generic name chosen,
> > "String",
> > and because no one wanted it in the core, only on PECL). Even then, I
was
> > advised to wait for the Unicode changes to be merged before I continued
> > (don't know if the Unicode work is done yet).
> >
> > I stopped working on this extension shortly thereafter and started
working
> > on the namespace patch (which is really more important anyways). I can
> > post
> > what I had done at the time if you want to take a look at it (I think I
> > left the code at work, so it would have to wait till Monday).
> >
> > (IMHO, I still think a core String class would be very useful. There are
> > many extensions that provide both a procedural and OOP interface. Take
for
> > example SQLite. You can either use the sqlite_* functions or use the
> > SQLiteDatabase class. I don't see why strings should be any different.)
> >
> >
> > Regards,
> >
> > Jessie
> >
> >
> > Bob Silva wrote:
> >
> > > Hi Marcus,
> > >
> > > I think I understand what you are saying. I've added get and set
> > handlers
> > > to my objects and can now achieve this:
> > >
> > > $a = new ZInt(5);
> > > $a += 1;
> > > echo ($a->Equals(6)) ? 'true':'false';
> > >
> > > =true
> > >
> > > as well as:
> > >
> > > $a = new ZChar('A');
> > > $a++;
> > > echo ($a->Equals('B')) ? 'true':'false';
> > >
> > > =true
> > >
> > > Thanks for helping me understand this. An unexpected side-effect is
that
> > > by declaring my objects ahead of time like a typed language, I can use
> > > natives in an object context which is what I was looking to achieve. I
> > > still have a lot of testing to do though.
> > >
> > > $a = new ZString('PHP');
> > > $a .= ' Object Wrappers';
> > > echo $a->ToString();
> > >
> > > =PHP Object Wrappers
> > >
> > > My ZString objects are immutable, $a is actually a new ZString object
> > > after the concatenation.
> > >
> > > The parameter API (even in HEAD) is still a stumbling block though
since
> > > it only converts objects for "syuTt" specifiers and not the others
("l",
> > > "b", "d" and preferably "a" which doesn't look possible without
breaking
> > > BC since it relies on the get_properties handler first and
> > > convert_object_to_type second).
> > >
> > > Of course any good language provides a work around: (casting ahead of
> > > time)
> > >
> > > echo wordwrap(new ZString('PHP is cool'), (int)new ZInt(3));
> > > =PHP
> > > is
> > > cool
> > >
> > >
> > > I really don't know if this will be useful for anyone else but it sure
> > is
> > > fun programming it and I'm learning a lot. People that are looking for
a
> > > strongly typed PHP may find it useful once I complete the rest of the
> > > object framework. Next up is Collections. Again, I really appreciate
you
> > > taking the time to reply to my questions and point me in the right
> > > direction.
> > >
> > > Bob
> > >
> > >
> > >
> > >
> > >> -----Original Message-----
> > >> From: Marcus Boerger
> > >> Sent: Friday, November 04, 2005 10:59 AM
> > >> To: Bob Silva
> > >> Cc: intern***@*ists.php.net
> > >> Subject: Re: - Standardize argument parsing of
> > objects
> > >>
> > >> Hello Bob,
> > >>
> > >> Friday, November 4, 2005, 11:19:23 AM, you wrote:
> > >>
> > >> > Hi Marcus,
> > >>
> > >> > OK, I got my learning cap on, why is it the wrong way to call
> > >> cast_object? I
> > >> > just copied it from the example for a string param and it worked so
I
> > >> > am curious why it is wrong. I agree the convert_to_* functions are
a
> > >> > better solution for the reasons you mentioned, again, I just
followed
> > >> > the
> > >> example
> > >> > for the string case.
> > >>
> > >> > I guess I don't see what this modification has to do with the
future
> > of
> > >> PHP
> > >> > though. Why restrict the parameter API to objects that can only
> > convert
> > >> to a
> > >> > string value? I'd say the current behavior is almost worthy of a
bug.
> > >>
> > >>
> > >>
> > >> > In regards to the extension, I have the base objects complete:
> > ZArray,
> > >> > ZChar, ZBoolean, ZDouble, ZInt, ZString. They all work
> > interchangeably
> > >> (for
> > >> > the most part) with their PHP native counterparts as long as you
> > aren't
> > >> > using them on the left side of an expression.
> > >>
> > >> And that is where get/set handlers come into play and why calling cat
> > >> handler alone is incorrect. Apart from that the 5 api has the
parameter
> > >> should_free which should be non null if read and write zval are the
> > same
> > >> so that the handler knows it must call zval_dtor on the readval prior
> > to
> > >> assigning the new value. Since this interface is borked it has
changed
> > >> in head. There read and write zval must be different and the caller
has
> > >> to take care about any required free/destruction. That you had a look
> > >> into the stuff and haven't come accross this is again proof that the
> > >> old api was not only bork but also used wrong.
> > >>
> > >> Best regards,
> > >> Marcus
> > >>
> > >> --
> > >> PHP Internals - PHP Runtime Development Mailing List
> > >> To unsubscribe, visit:http://www.php.net/unsub.php> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit:http://www.php.net/unsub.phpbegin 666 string.c
M(VEN8VQU9&4@(G-T<FEN9U]C;&%S<RYH(@T*#0H-"EI%3D1?1$5#3$%215]-
M3T153$5?1TQ/0D%,4RAS=')I;F<I#0H-"GIE;F1?8VQA<W-?96YT<
M<FEN9U]C95]P='(S=')I;F=?;V)J96-T
M#0IO8FIE8W0@<W1D.PT*"6-H87(@:7-?8V]P>3L-"@EE>'1?
M<W1R('-T<CL-"GT@<W1R:6YG7V]B:F5C=#L-"@T*(V1E9FEN92!&151#2%]3
M5%))3D=?3T)**'IV*2 H<W1R:6YG7V]B:F5C="HI>F5N9%]O8FIE8W1?<W1O
M<F5?9V5T7V]B:F5C="@H>G8I(%134DU,4U]#0RD-"B-D969I;
M15]35%))3D=?3T)**"D@<W1R:6YG7V]B:F5C="&AI<U]O8FH@/2!&151#
M2%]35%))3D=?3T)**&=E=%1H:7,H*2D-"B-D969I;'7TE&7T-/
M4%E?4D5455).*" T*"2\J(&-H96-K('1O('-E92!I9B!T:&ES(&ES(&$@
M;F5W;'DM8W)E871E9"!C;W!Y("HO(%P-"@EI9B H=&AI<U]O8FHM/FES7V-O
M<'DI(' T*"0DO*B!I;F1I8V%T92!T:&%T('1H:7,@:7,@;F\@;&]N9V5R
M(&$@;F5W;'DM8W)E871E9"!C;W!Y("HO(%P-"@D)=&AI<U]O8FHM/FES7V-O
M<'D@/2 P.R!<#0H)"2\J(&EN8W)E87-E('1H92!R969E<;G0@
M;&AI<R!O8FIE8W0@<&AA="!I="!I<R!P<F5S97) T*"0D@
M("!W:&5N(')E='5R;F5D("HO(%P-"@D)*RMT:&ES7W!T<BT^<F5F8V]U;G0P='(L(# L(# I.R!<#0H)?0T*#0H-"B\J(%]?8V]N<W1R=6-T
M(&%R9W5M96YT<R J+PT*<W1A=&EC#0I:14Y$7T)%1TE.7T%21U])3D9/*&%R
M9VEN9F]?87)R87E?7U]C;VYS=')U8W0L(# I#0H)6D5.1%]!4D=?24Y&
M+"!I;FET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3T0H4W1R
M:6YG+"!L96YG=&amp;a***@*.PT*4$A07TU%5$A/1"A3=')I;F<L(&UA:V5#;W!Y*3L-
M"E!(4%]-151(3T0H4W1R:6YG+"!R97-E<G9E*3L-"E!(4%]-151(3T0H4W1R
M:6YG+"!S=&%R='-7:71H*3L-"E!(4%]-151(3T0H4W1R:6YG+"!T;TQO=V5R
M0V%S92D$*%-T<&]5<'!E<D-A<V4I.PT*4$A0
@7TU%5$A/1"A3=')I;F<L('1R:6TI.PT*#0HC96YD:68`
`
end

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

  • Root
  • » PHP
  • » [PHP-DEV] [PATCH] - Standardize argument parsing of objects [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support