diff options
Diffstat (limited to 'tests/lang/foreachLoop.010.phpt')
| -rw-r--r-- | tests/lang/foreachLoop.010.phpt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lang/foreachLoop.010.phpt b/tests/lang/foreachLoop.010.phpt index 504132d035..e114e839b9 100644 --- a/tests/lang/foreachLoop.010.phpt +++ b/tests/lang/foreachLoop.010.phpt @@ -7,20 +7,20 @@ It will pass only if the 'contentious code' in PHPValue.decReferences() is enabl $a = array(1,2,3); $container = array(&$a); -// From php.net: +// From php.net: // "Unless the array is referenced, foreach operates on a copy of // the specified array and not the array itself." // At this point, the array $a is referenced. // The following line ensures $a is no longer references as a consequence -// of running the 'destructor' on $container. +// of running the 'destructor' on $container. $container = null; // At this point the array $a is no longer referenced, so foreach should operate on a copy of the array. // However, P8 does not invoke 'destructors' when refcount is decremented to 0. // Consequently, $a thinks it is still referenced, and foreach will operate on the array itself. // This provokes a difference in behaviour when changing the number of elements in the array while -// iterating over it. +// iterating over it. $i=0; foreach ($a as $v) { |
