[PHP-DEV] Re: feature proposal: string types

2002-05-04 Thread vdhome
> > Well, I assumed that the overhead wouldn't be too significant, but I > > admit I didn't do any measurements whatsoever. Is there any existing > > good benchmark, or should I just loop a million times through a few > > random lines of code and measure this? > > Yup :) OK, I did some _very_ sim

[PHP-DEV] Re: feature proposal: string types

2002-05-03 Thread vdhome
> > IMHO the syntax you suggest is a bit terse, what about this instead: > > > > echo url"http://$host:$port/$path";; > > Looks perlish to me, I'd rather see a casting thing like this then: > > echo (url) "http://$host:$port/$path";; I was originally thinking about casting too, but although I'm s

[PHP-DEV] Re: feature proposal: string types

2002-05-03 Thread vdhome
> Those who pay attention to my occasional ramblings may remember that I > once suggested implementing "type hints", which is a more generic > version of this. Type hints is like your string types, except that they > apply to any type. I haven't been subscribed, so I don't remember. :-) I am cer

[PHP-DEV] feature proposal: string types (complete with a patch)

2002-05-01 Thread vdhome
Dear PHP developers, I propose a feature that I call "string types". I have also already coded a first version of it that you can try. There's a bug for it here: http://bugs.php.net/?id=16480 and a homepage with a description and a patch here: http://nebuchadnezzar.zion.cz/php_strings.php Please