当然可以那样做,但分离函数组件总是最佳做法。
You could do that, but it's always best to keep your functional components separate.
这个数组应包含测试函数、测试装置(fixture)或同时包含两者。
The array should contain test functions, test fixtures, or a mix of both.
之后,此函数会创建一个新的结果数组以返回给调用者。
Then this function creates a new result array to be returned to the caller.
您只需使用json_encode函数来将已返回的数组转变为json代码。
You only need to use the json_encode function to turn the returned array into json code.
在发生错误的情况下,此函数会向调用者返回一个空数组。
In case of an error, this function returns an empty array to the caller.
写一系列的合适的函数组合,画出图4.1所示的花图案。
Write an appropriately general set of functions that can draw flowers as in Figure 4.1.
写一系列的合适的函数组合,画出图4.2所示的形状。
Write an appropriately general set of functions that can draw shapes as in Figure 4.2.
例如,假设一个函数会接受一个数组作为参数,并返回Task。
For example, consider a function that accepts an array and returns a Task.
函数返回了数组中当前元素的值。
The pos() function returns the value of the current element in an array.
函数删除了一个数组中的最后一个元素。
The array_pop() function deletes the last element of an array.
preg_replace函数可以对单个字符串或字符串数组进行操作。
The preg_replace function can operate on a single string or an array of strings.
每次调用函数时,您都将一个新条目添加到该数组中。
Each time a function is invoked, you add a new entry to this array.
file函数只是将文件复制到一个数组中。
在被调用函数中,可以通过数组下标访问或修改数组元素的值。
By subscripting this value, the function can access and alter any argument of the array.
函数的作用是:将数组内部的指针移动到数组中的第一个元素。
The reset() function moves the internal pointer to the first element of the array.
函数的作用是在数组中查找一个值所对应的键。
The array_search() function search an array for a value and returns the key.
函数的作用是:返回数组中当前元素的值。
The current function returns the value of the current element in an array.
函数的作用是用“自然排序”算法对数组排序。
In a natural algorithm, the number 2 is less than the number 10.
注意:该函数仅对数组中的值进行比较。
注意:该函数仅对数组中的值进行比较。
应用推荐