On 11/08/2012 05:07 PM, Sara Golemon wrote:
From: http://php.net/manual/en/language.operators.comparison.php
An object compared to anything which is not a bool, null, or object
should result in the object appearing to be greater than the other
operand. For example:
$a = new stdClass();
$b =
...@golemon.com] On Behalf Of Sara Golemon
Sent: Friday, November 09, 2012 1:07 AM
To: PHP internals
Subject: [PHP-DEV] Object comparison
From: http://php.net/manual/en/language.operators.comparison.php
An object compared to anything which is not a bool, null, or object
should result in the object appearing
be
made usable for userland classes/objects, too.
Best regards
Christian Stoller
-Original Message-
From: p...@golemon.com [mailto:p...@golemon.com] On Behalf Of Sara Golemon
Sent: Friday, November 09, 2012 1:07 AM
To: PHP internals
Subject: [PHP-DEV] Object comparison
From
hi!
On Fri, Nov 9, 2012 at 1:07 AM, Sara Golemon poll...@php.net wrote:
From: http://php.net/manual/en/language.operators.comparison.php
An object compared to anything which is not a bool, null, or object
should result in the object appearing to be greater than the other
operand. For
On Fri, Nov 9, 2012 at 2:18 PM, Christian Stoller stol...@leonex.de wrote:
I would like to place a suggestion for comparing objects (I hope it is no
problem, because this does not have anything to do with Sara's question - but
it came to my mind when I read her mail). It would be a great
On Fri, Nov 9, 2012 at 2:00 PM, jpauli jpa...@php.net wrote:
On Fri, Nov 9, 2012 at 2:18 PM, Christian Stoller stol...@leonex.de
wrote:
I would like to place a suggestion for comparing objects (I hope it is
no problem, because this does not have anything to do with Sara's question
- but it
From: http://php.net/manual/en/language.operators.comparison.php
An object compared to anything which is not a bool, null, or object
should result in the object appearing to be greater than the other
operand. For example:
$a = new stdClass();
$b = new stdClass();
var_dump(null $a);
Hi!
Doc bug? Or code bug? I'm inclined to call it a code bug, but wanted
others' thoughts.
I would say comparing object to a number makes little sense, so no
reason to define any specific result there. It may be true, false or
bologna sandwich.
The docs say what happens when the first
On Thu, Nov 8, 2012 at 7:07 PM, Sara Golemon poll...@php.net wrote:
From: http://php.net/manual/en/language.operators.comparison.php
An object compared to anything which is not a bool, null, or object
should result in the object appearing to be greater than the other
operand. For example:
Hi,
I was in a discuss about PHP's features vs Python's features these days
and gat down in this BC:
http://bugs.php.net/bug.php?id=33626
Does it ring any bell to anyone?
[]s
André AE
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:
André Luis Ferreira da Silva Bacci wrote:
Hi,
I was in a discuss about PHP's features vs Python's features these days
and gat down in this BC:
http://bugs.php.net/bug.php?id=33626
Does it ring any bell to anyone?
[]s
André AE
In PHP4 an object was a value type in PHP5 it is a handle
and
Andrey Hristov wrote:
André Luis Ferreira da Silva Bacci wrote:
Hi,
I was in a discuss about PHP's features vs Python's features these
days and gat down in this BC:
http://bugs.php.net/bug.php?id=33626
Does it ring any bell to anyone?
In PHP4 an object was a value type in PHP5 it is a
On Tue, 31 Aug 2004, Andi Gutmans wrote:
Hi Christian,
This was a backwards compatibility issue and therefore, we made sure that
PHP 5 behaves the same way as PHP 4. So if both objects are PHP objects it
will do a PHP 4 object comparison.
If you use === (is identical) then we will only
Hi
The following came up in a bug report (http://bugs.php.net/?id=29911 ,
but it doesn't matter, as he tried something which doesn't work either way)
?php
class foo {};
$foo1 = new foo();
$foo2 = new foo();
var_dump($foo1 == $foo2);
?
prints now true, but according to Derick and
Hi Christian,
This was a backwards compatibility issue and therefore, we made sure that
PHP 5 behaves the same way as PHP 4. So if both objects are PHP objects it
will do a PHP 4 object comparison.
If you use === (is identical) then we will only compare handles unless in
I'm using PHP5.0.0RC2. I saw that there was a similar question posted,
but apparently that issue had already been fixed.
---code
class File {
public $var;
function __construct($val) {
$this-var = $val;
}
}
$t1 = new
16 matches
Mail list logo