📄 005.phpt
字号:
--TEST--Test array_shift behaviour--FILE--<?phparray_shift($GLOBALS);$a = array("foo", "bar", "fubar");$b = array("3" => "foo", "4" => "bar", "5" => "fubar");$c = array("a" => "foo", "b" => "bar", "c" => "fubar");/* simple array */echo array_shift($a), "\n";var_dump($a);/* numerical assoc indices */echo array_shift($b), "\n";var_dump($b);/* assoc indices */echo array_shift($c), "\n";var_dump($c);?>--EXPECT--fooarray(2) { [0]=> string(3) "bar" [1]=> string(5) "fubar"}fooarray(2) { [0]=> string(3) "bar" [1]=> string(5) "fubar"}fooarray(2) { ["b"]=> string(3) "bar" ["c"]=> string(5) "fubar"}--UEXPECT--fooarray(2) { [0]=> unicode(3) "bar" [1]=> unicode(5) "fubar"}fooarray(2) { [0]=> unicode(3) "bar" [1]=> unicode(5) "fubar"}fooarray(2) { [u"b"]=> unicode(3) "bar" [u"c"]=> unicode(5) "fubar"}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -