Hello jtl,
Friday, July 9, 2004, 1:07:49 AM, you wrote:
> Hello,
> My name is Joe Lapp, and I have written high-speed portal-side parsers in
> Java for XML, HTML, and various other XML-related syntaxes (e.g. XQL).
> I am planning a series of new parsing technologies that I'd like to
> implemen
Hello Daniel,
Friday, July 9, 2004, 4:33:42 AM, you wrote:
> Why not just call it the issetor, or the setor operator?
That's the point here. How shall we call the new operator.
--
Best regards,
Marcusmailto:[EMAIL PROTECTED]
--
PHP Internals - PHP Runtime Develo
Hello Marc,
Friday, July 9, 2004, 1:33:02 AM, you wrote:
> Rasmus Lerdorf wrote:
>> On Thu, 8 Jul 2004, Marc Richards wrote:
>>
>>>Rasmus Lerdorf wrote:
>>>
On Thu, 8 Jul 2004, Marc Richards wrote:
>Does it? There are other similar constructs that don't e.g. +=, $a ? $b
>>>
* Thus wrote Marc Richards:
>
>
> Jason Garber wrote:
>
>
> I am interested in the new construct for the exact same reason, E_ALL
> development. I am intersted in the ?: operator because it looks alot
> simpler, especially if you want to chain them together:
>
> $user = $_SESSION['user] ?:
Why not just call it the issetor, or the setor operator? Also, why does
www.php.net/ternary not link to what one would assume it might link to? We
could do the same with www.php.net/setor.
Dan
> But the fact still remains that if we did go with
> this syntax, we could and probably should find a
Oh baby, oh baby. I was undecided (and really just didn't care about it
either way) but when Marc put it this way (see the bottom line there) I was
sold. That's just sexy.
-Dan, who perhaps gets a bit *too* into this sort of thing...
> I am interested in the new construct for the exact same rea
Marc Richards wrote:
> They won't. Not until they hear about it or read about it. But that is
> true whether it is a function or and operator. Making it a function
> won't make everyone magically cogniscent of it. Of course it will be
> important to make it easy to search for information about
Hi Marc,
To be honest, I don't care at this point. As long as we have something
implemented in 5.1 for allowing PHP users to simplify working in E_ALL
error mode.
This thing:
a) it has to base it's decision on the same logic isset() uses
b) it should not evaluate the second part unless it is ne
Adam Maccabee Trachtenberg wrote:
On Thu, 8 Jul 2004, Marc Richards wrote:
Compound Ternary operator:
$a = $b ?: $c;
You realize that ternary means it takes three arguments? It has
nothing to do with question marks and colons. Your new "compound
ternary" operator is really a "binary" operator.
Goo
Jason Garber wrote:
The original reason that I asked for this functionality was to make it
significantly easier to work with E_ALL error reporting. When I say
easier, I mean by reducing duplicate code.
//This
$foo = (integer) ifsetor($_POST['foo'], 0);
//Instead of
$foo = (integer) (isset($_PO
On Thu, 8 Jul 2004, Marc Richards wrote:
> Are you saying PHP will never introduce an operator that doesn't already
> exist in a large number of other languages?
I certainly hope not. (Well, I guess === and !=== are exceptions to
this statement.)
> Compound Ternary operator:
>
> $a = $b ?: $c;
Olivier Hill wrote:
Marc Richards wrote:
What? Why? There is obviously a way around it, because that is what
people are using now.
$a = $b ? $b : $c;
If $b is not set, it will throw notices.
The correct way is something similar to:
$a = (!isset($b) && !isnull($b)) ? $b : $c
Right. Sorry. I mea
Rasmus Lerdorf wrote:
On Thu, 8 Jul 2004, Marc Richards wrote:
Rasmus Lerdorf wrote:
On Thu, 8 Jul 2004, Marc Richards wrote:
Does it? There are other similar constructs that don't e.g. +=, $a ? $b
: $c, .=;
These have roots in other languages and as such have a familiarity to
them. ?: would
Hi Joe,
At 7/8/2004 07:07 PM -0400, [EMAIL PROTECTED] wrote:
Hello,
My name is Joe Lapp, and I have written high-speed portal-side parsers in
Java for XML, HTML, and various other XML-related syntaxes (e.g. XQL).
I am planning a series of new parsing technologies that I'd like to
implement in PHP.
The original reason that I asked for this functionality was to make it
significantly easier to work with E_ALL error reporting. When I say
easier, I mean by reducing duplicate code.
//This
$foo = (integer) ifsetor($_POST['foo'], 0);
//Instead of
$foo = (integer) (isset($_POST['foo']) ? $_POST['
Marc Richards wrote:
What? Why? There is obviously a way around it, because that is what
people are using now.
$a = $b ? $b : $c;
If $b is not set, it will throw notices.
The correct way is something similar to:
$a = (!isset($b) && !isnull($b)) ? $b : $c
Which defeats the whole reason of introduc
Marcus Boerger wrote:
it would allow two versions by having the default optional:
1) $a = ifsetor($b)
2) $a = ifsetor($b, NULL)
$a = $b ?: NULL;
How would the operator do the second? Will it look like the
following?
$a = $b ?:;
I defitively don't want that.
Me either. What I am saying is that
Hello,
My name is Joe Lapp, and I have written high-speed portal-side parsers in
Java for XML, HTML, and various other XML-related syntaxes (e.g. XQL).
I am planning a series of new parsing technologies that I'd like to
implement in PHP. To allow my parsers to perform with high efficiency in
P
Olivier Hill wrote:
Marc Richards wrote:
That is true for other things as well:
$a = $b += $c += $d;
$a = $b + $c = $d;
Well.. yes and no...
If you are afraid of making mistake, you can force yourself to never use
+= -= *= operators, because you can simply write $a = $a + $b
But if PHP introduc
Marc Richards wrote:
That is true for other things as well:
$a = $b += $c += $d;
$a = $b + $c = $d;
Well.. yes and no...
If you are afraid of making mistake, you can force yourself to never use
+= -= *= operators, because you can simply write $a = $a + $b
But if PHP introduces the ?: operator, yo
On Thu, 8 Jul 2004, Marc Richards wrote:
> Rasmus Lerdorf wrote:
> > On Thu, 8 Jul 2004, Marc Richards wrote:
> >
> >>Does it? There are other similar constructs that don't e.g. +=, $a ? $b
> >>: $c, .=;
> >
> >
> > These have roots in other languages and as such have a familiarity to
> > the
Hello Marc,
Thursday, July 8, 2004, 11:54:59 PM, you wrote:
> Marcus Boerger wrote:
>>
>> ?: would require a default value. ifsetor() allows to assume NULL hence
>> the latter is more powerfull. Hence id like to see a new keyword.
>>
> Well am not sure what you mean by more powerful, but the
Rasmus Lerdorf wrote:
On Thu, 8 Jul 2004, Marc Richards wrote:
Does it? There are other similar constructs that don't e.g. +=, $a ? $b
: $c, .=;
These have roots in other languages and as such have a familiarity to
them. ?: would be a brand new operator nobody has seen before and one
that loo
On Thu, 8 Jul 2004, Marc Richards wrote:
> Does it? There are other similar constructs that don't e.g. +=, $a ? $b
> : $c, .=;
These have roots in other languages and as such have a familiarity to
them. ?: would be a brand new operator nobody has seen before and one
that looks a lot like the
Marcus Boerger wrote:
?: would require a default value. ifsetor() allows to assume NULL hence
the latter is more powerfull. Hence id like to see a new keyword.
Well am not sure what you mean by more powerful, but the character count
is about the same:
$a = ifsetor($b);
$a = $b ?: NULL;
And the se
Rasmus Lerdorf wrote:
On Thu, 8 Jul 2004, Marc Richards wrote:
Christian Schneider wrote:
Before it gets forgotten: I still think that
$x = ifsetor(mixed var, mixed var [, ...]);
with expressions in all parts is the way to go.
Example usage:
$a = ifsetor($_REQUEST['x'], $db->get('x'), 'default_x'
Marcus Boerger wrote:
As i wrote before several times before to me this seems impossible. But
maybe someone can come up with a working patch?
I'll have a look at it as soon as I find time (not this week anyway).
What I'm looking for is the equivalent of
coalesce($a, $b) == @($a ? $a : b)
or
coalesc
Hello Christian,
Thursday, July 8, 2004, 5:13:36 PM, you wrote:
> Jason Garber wrote:
>> What we basically settled on was to use this syntax (as a new language
>> construct):
>> $x = ifsetor(mixed variable, mixed default);
> Before it gets forgotten: I still think that
> $x = ifsetor(mixed var,
Hello Marc,
Thursday, July 8, 2004, 4:07:54 PM, you wrote:
> Marcus Boerger wrote:
>> Hello Marc,
>>
>> it somply was far too lat3e in relase process. That's wy we ae all agreed
>> to delay that until 5.1. Also we were very unsure about the name of such
>> an operatorif you can collect all t
Hello Jay,
Thursday, July 8, 2004, 5:31:08 PM, you wrote:
> Marc Richards wrote:
>>
>> Well I'm partial to ?: and there seemed to be some support for it, but
>> there also seemed to be a non-trivial (though not necessarily difficult)
>> amount of work to get it to work right.
>>
>> ifsetor() is
Christian Schneider <[EMAIL PROTECTED]> writes:
> Before it gets forgotten: I still think that
> $x = ifsetor(mixed var, mixed var [, ...]);
> with expressions in all parts is the way to go.
>
> Example usage:
> $a = ifsetor($_REQUEST['x'], $db->get('x'), 'default_x');
>
> And I also think that th
On Thu, 8 Jul 2004, Marc Richards wrote:
> Christian Schneider wrote:
>
> > Before it gets forgotten: I still think that
> > $x = ifsetor(mixed var, mixed var [, ...]);
> > with expressions in all parts is the way to go.
> >
> > Example usage:
> > $a = ifsetor($_REQUEST['x'], $db->get('x'), 'defa
Marc Richards wrote:
>
> Well I'm partial to ?: and there seemed to be some support for it, but
> there also seemed to be a non-trivial (though not necessarily difficult)
> amount of work to get it to work right.
>
> ifsetor() is obviously less concise, but also the name at first glance
> is a li
Christian Schneider wrote:
Before it gets forgotten: I still think that
$x = ifsetor(mixed var, mixed var [, ...]);
with expressions in all parts is the way to go.
Example usage:
$a = ifsetor($_REQUEST['x'], $db->get('x'), 'default_x');
The other syntax could work for that as well...
$a = $_REQUEST
George Schlossnagle wrote:
Poking through the output buffering code, it seems like the only way
to force a sapi_flush() is to have implicit_flush set to true. Is
this correct? Is this intended? It seems like ob_flush() should
trigger sapi_flush(), at least if you're at the top level of buffer
Jason Garber wrote:
What we basically settled on was to use this syntax (as a new language
construct):
$x = ifsetor(mixed variable, mixed default);
Before it gets forgotten: I still think that
$x = ifsetor(mixed var, mixed var [, ...]);
with expressions in all parts is the way to go.
Example usage
Poking through the output buffering code, it seems like the only way to
force a sapi_flush() is to have implicit_flush set to true. Is this
correct? Is this intended? It seems like ob_flush() should trigger
sapi_flush(), at least if you're at the top level of buffers.
George
--
PHP Internals
Marcus Boerger wrote:
Hello Marc,
it somply was far too lat3e in relase process. That's wy we ae all agreed
to delay that until 5.1. Also we were very unsure about the name of such
an operatorif you can collect all the ideas or can come up with ther
perfect one!?!
Well I'm partial to ?: and th
From: Zeev Suraski
> The correct solution, I think, would be adding a boolean function (or even
> just a bit) to the handlers structure, that instructs the engine whether
it
> should use get_ptr_ptr for incdec or not, since it's an
> optimization. Maybe we can just check whether we're dealing wit
Hi
Using socket_read() on windows with PHP_NORMAL_READ (mean read till the next
'\n' or '\r'), php always raise an error even when socket still response.
sniffing around a bit:
http://cvs.php.net/co.php/php-src/ext/sockets/sockets.c?r=1.165#870
http://cvs.php.net/co.php/php-src/ext/sockets/sockets
Hi Moriyoshi,
Sorry to copy the INIT_DATA macro in the mail.
#define INIT_DATA(ht, p, pData, nDataSize)
if (nDataSize == sizeof(void*)) {
memcpy(&(p)->pDataPtr, pData, sizeof(void *));
(p)->pData = &(p)->pDataPtr;
} else {
(p)->pData =
Zeev Suraski zend.com> writes:
> The correct solution, I think, would be adding a boolean function (or even
> just a bit) to the handlers structure, that instructs the engine whether it
> should use get_ptr_ptr for incdec or not, since it's an
> optimization. Maybe we can just check whether w
On 2004/07/08, at 14:41, Kamesh Jayachandran wrote:
The last parameter sizeof(zend_class_entry) of value say 292 to
zend_hash_copy indicate it to dereference the value of one of the
hashtable entry.
This value is of type zend_class_entry** which when dereferenced once
gives rise to zend_class_entry
Consider this piece of code:
query($create_query);
if ($db->lastError() != SQLITE_OK) {
echo $db->lastError();
}
?>
As you can see there are two typoes (REATE instead of CREATE) so
obviously I expected to get a result value other than SQLITE_OK back,
but that didn't happen, and no
Hi, Derick
Please visit http://fastcgi.coremail.cn, source code and doc there ^_^
Thanks
Qingfeng Pan
"Derick Rethans" <[EMAIL PROTECTED]>
news:[EMAIL PROTECTED]
> Hey,
>
> sounds cool, do you have any code to show as I'm interested in trying it
> out.
>
> regards,
> Derick
>
>
> On Mon, 5
Hey,
sounds cool, do you have any code to show as I'm interested in trying it
out.
regards,
Derick
On Mon, 5 Jul 2004, Qingfeng Pan wrote:
> There are some advantages...
> a) mod_fastcgi talk to PHP process with TCP socket, but this module use
> UNIX domain socket(or named pipe on Win32) inst
On Wed, 7 Jul 2004, Scott MacVicar wrote:
> Last one expired today in Canada. So will we be seeing GIF support in
> 4.3.8 and 5.0.0? I'm hoping it's not too late for 5.0.0 at least.
It can't be in 5.0.0 as we're waaay to close to release.
Derick
--
PHP Internals - PHP Runtime Development Maili
47 matches
Mail list logo