简体   繁体   English

PHP 进程() function

[英]PHP process() function

I was doing some reading through the PHP manual and ended up on this page:我正在阅读 PHP 手册并最终出现在此页面上:

http://php.net/manual/en/function.create-function.php http://php.net/manual/en/function.create-function.php

While reading example #2 I found an odd function being called that I have never seen before: process()在阅读示例 #2 时,我发现一个奇怪的 function 被称为我以前从未见过的: process()

I looked all through the PHP manual site and could not find any documentation.我浏览了 PHP 手册站点,找不到任何文档。 From what I could understand from looking at the example it seems pass the strings as the first 2 arguments through an array of create_function()'s.从我通过查看示例可以理解的情况来看,它似乎通过 create_function() 的数组将字符串作为前 2 个 arguments 传递。 Could anyone point me to some documentation on this?谁能给我指点这方面的一些文件? It seems like an interesting and possibly useful function.这似乎是一个有趣且可能有用的 function。 Examples of it effectively in use would be great too!有效使用它的例子也很棒!

At the top of example #2, they are defining that function.在示例 #2 的顶部,他们定义了 function。

function process($var1, $var2, $farr)
{
    foreach ($farr as $f) {
        echo $f($var1, $var2) . "\n";
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM