ID: 46627
Updated by: [EMAIL PROTECTED]
Reported By: nilgun at belgeler dot org
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Linux
PHP Version: 5.3.0alpha2
New Comment:
Thank you for not using search first: see bug #35050
Previous Comments:
------------------------------------------------------------------------
[2008-11-20 07:33:30] nilgun at belgeler dot org
Description:
------------
The following sample code gives an error
when run with the tr_TR.UTF-8 locale:
"Fatal error: Couldn't find implementation for method
myData::getiterator in Unknown on line 0"
And it works OK with the command:
$ LANG=C php ./sample.php
The code sample.php (from iteratoraggregate.xml):
<?php
class myData implements IteratorAggregate {
public $property1 = "Public property one";
public $property2 = "Public property two";
public $property3 = "Public property three";
public function __construct() {
$this->property4 = "last property";
}
public function getIterator() {
return new ArrayIterator($this);
}
}
$obj = new myData;
foreach($obj as $key => $value) {
var_dump($key, $value);
echo "\n";
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46627&edit=1