💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[querylist](http://www.querylist.cc/)配合PhantomJS 安装 ``` composer require jaeger/querylist ``` php执行js的还有[v8js](https://www.php.net/manual/zh/book.v8js.php)扩展,用法 ~~~ <?php $start = microtime(true); $array = array(); for ($i=0; $i<50000; $i++) $array[] = $i*2;   $array2 = array(); for ($i=20000; $i<21000; $i++) $array2[] = $i*2;   foreach ($array as $val) {   foreach ($array2 as $val2) if ($val == $val2) {} } echo (microtime(true)-$start)."\n"; // 8.60s     $start = microtime(true); $v8 = new V8Js(); $JS = <<< EOT var array = []; for (i=0; i<50000; i++) array.push(i*2);   var array2 = []; for (i=20000; i<21000; i++) array2.push(i*2);   for (key=0; key<array.length; key++) {   for (key2=0; key2<array2.length; key2++) if (array[key] == array2[key2]) {} } print('done.'); EOT; $v8->executeString($JS, 'basic.js'); echo ' '.(microtime(true)-$start)."\n"; // 3.49s ~~~