#31686 [NoF->Opn]: Incoherent behaviour
| From: | guth at fiifo dot u-psud dot fr | Date: | Sat, 07 May 2005 01:18:25 +0000 |
| Subject: | #31686 [NoF->Opn]: Incoherent behaviour | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-78742@lists.php.net to get a copy of this message | ||
ID: 31686
User updated by: guth at fiifo dot u-psud dot fr
Reported By: guth at fiifo dot u-psud dot fr
-Status: No Feedback
+Status: Open
Bug Type: Zend Engine 2 problem
Operating System: *
PHP Version: 5.0.3
New Comment:
No change.
Seems to be the same bug than bug #30140.
Previous Comments:
------------------------------------------------------------------------
[2005-03-20 18:06:03] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2005-02-28 20:58:09] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-01-25 15:37:27] guth at fiifo dot u-psud dot fr
replace "array(1) { [0]=> string(2) "43" }" by "array(1) { [0]=>
string(2) "12" }" in expected result.
sorry for the mistake..
------------------------------------------------------------------------
[2005-01-25 12:29:36] guth at fiifo dot u-psud dot fr
This is the reproduce code:
<?php
class A {
protected static $plop = 42;
public function __construct() {
self::$plop = 43;
}
}
class B extends A {
public function __construct() {
parent::__construct();
var_dump(self::$plop);
}
}
new B;
class C {
protected static $plop = array('42');
public function __construct() {
self::$plop = array('12');
}
}
class D extends C {
public function __construct() {
parent::__construct();
var_dump(self::$plop);
}
}
new D;
?>
------------------------------------------------------------------------
[2005-01-25 12:26:24] guth at fiifo dot u-psud dot fr
Description:
------------
hello,
Classes A/B and C/D are identical, i just changed a default value from
an 'int' to an 'array'.
See at the expected and actual results to understand the problem.
Reproduce code:
---------------
<?php
class A {
protected static $plop = 42;
}
class B extends A {
public function __construct() {
self::$plop = 43;
var_dump(self::$plop);
}
}
new B;
class C {
protected static $plop = array('42');
public function __construct() {
self::$plop = array('12');
}
}
class D extends C {
public function __construct() {
parent::__construct();
var_dump(self::$plop);
}
}
new D;
?>
Expected result:
----------------
int(43)
array(1) { [0]=> string(2) "43" }
Actual result:
--------------
int(43)
array(1) { [0]=> string(2) "42" }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31686&edit=1