📄 bug35022.phpt
字号:
--TEST--Bug #35022 (Regression in the behavior of key/current functions)--FILE--<?php$state = array("one" => 1, "two" => 2, "three" => 3);function foo( &$state ) { $contentDict = end( $state ); for ( $contentDict = end( $state ); $contentDict !== false; $contentDict = prev( $state ) ) { echo key($state) . " => " . current($state) . "\n"; }}foo($state);reset($state);var_dump( key($state), current($state) );?>--EXPECT-- three => 3two => 2one => 1string(3) "one"int(1)--UEXPECT-- three => 3two => 2one => 1unicode(3) "one"int(1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -