wrap($arrays->arrayOf($plugins->loadClass("java.lang.String"), "hello", "world", "kotlin")); // 打印每个单词,并返回原始数组 $result = $words->onEach(function ($it) use ($console) { $console->log($it); }); // 输出:结果: [Ljava.lang.String;@::: $console->log("结果: ", $result); // 同时打印: // hello // world // kotlin