wrap($arrays->arrayOf($plugins->loadClass("java.lang.String"), "hello", "world", "kotlin")); // 打乱数组元素的顺序 $Random = $plugins->loadClass("kotlin.random.Random"); $v = $reflectors->reflect($Random)->getField(null, function ($f) { $f->setName("Default"); }); $words->shuffle($v); // 打乱后的数组: ::: (随机结果) $words->forEach(function ($it) use ($console) { $console->log($it); });