虽然我不会拍黄片,但是帮你找到了一个网站
https://wtools.io/javascript-to-php-converter<?php
$var = 'function convert(input = "") {
let pdst = input.toUpperCase().trim();
let pit = [];
let isg = "";
while (/[0-9A-Z]+/.exec(pdst) !== null) {
let data = /[0-9A-Z]+/.exec(pdst);
if (data !== null) {
let pd = data[0];
let pdt = pd.length;
if (/[0-9]+/.test(pd) && pd.length < 8) isg += pd;
if (isg.length == 15) pd = isg;
if (isg.length >= 15) isg = "";
if (/[0-9]+/.test(pd) && pd.length == 11 && pd.substring(0, 1).toLowerCase() == "s") pit.push(pd.trim().substring(1, 11));
if (/[0-9]+/.test(pd) && pd.length == 13 && pd.substring(0, 1).toLowerCase() == "s") pit.push(pd.trim().substring(1, 13));
if ((/[0-9]+/.test(pd) && pd.length == 15) || pd.length == 12 || pd.length == 10 || (/[0-9]+/.test(pd) && pd.length == 8)) pit.push(pd);
pdst = pdst.substring(pdt).trim();
}
}
return Array.from(new Set(pit));
}