|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-05-11 20:58 UTC] hanskrentel at yahoo dot de
Description:
------------
Extending form SimpleXMLElement and implementing Iterator does not work. I can
understand that (albeit it is a little pity). However this report is about getting
a message box for a fatal error when running in CLI / Phpstorm.
I normally reported this kind of problems here in the bugtracker because the error
shouldn't be given as a windows msgbox.
Test script:
---------------
class MySimpleXMLelement extends SimpleXMLElement implements Iterator
{
public function current() {
return current($this);
}
public function next() {
next($this);
}
public function key() {
return key($this);
}
public function valid() {
return each($this);
}
public function rewind() {
reset($this);
}
}
Actual result:
--------------
Getting a standard Windows MsgBox with the following text:
"Class MySimpleXMLelement could not implement interface Iterator"
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
You should be able to reproduce this with the following two php.ini settings: [PHP] display_startup_errors = On log_errors = On Both need to be set to on as I have found out, otherwise the Msgbox is not shown. You should be able to reproduce from command-line on windows with: php -n -d display_startup_errors=1 -d log_errors=1 -r "class M extends SimpleXMLElement implements Iterator {}"