Last active
August 29, 2015 14:01
-
-
Save beporter/49b9b4054c1700c3fcfc to your computer and use it in GitHub Desktop.
Attempting to call PHP's `EmptyIterator->current()`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php -r '$i = new EmptyIterator(); echo $i->current();' | |
PHP Fatal error: Uncaught exception 'BadMethodCallException' with message | |
'Accessing the value of an EmptyIterator' in Command line code:1 | |
Stack trace: | |
#0 Command line code(1): EmptyIterator->current() | |
#1 {main} | |
thrown in Command line code on line 1 | |
Fatal error: Uncaught exception 'BadMethodCallException' with message | |
'Accessing the value of an EmptyIterator' in Command line code on line 1 | |
BadMethodCallException: Accessing the value of an EmptyIterator in | |
Command line code on line 1 | |
Call Stack: | |
0.0001 218888 1. {main}() Command line code:0 | |
0.0001 219688 2. EmptyIterator->current() Command line code:1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shows what happens if you try to use PHP's
EmptyIterator
. Linked to from this StackOverflow question.