bug35022.phpt
来自「PHP v6.0 For Linux 运行环境:Win9X/ WinME/ Wi」· PHPT 代码 · 共 28 行
PHPT
28 行
--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 + =
减小字号Ctrl + -
显示快捷键?