我想将此javascript
函数转换为php
但是某些行和规则(类似于(var h = 0 ;;)或逗号分隔的行不会在php中使用,所以我很困惑如何在PHP中编写此代码。
此功能返回时间和日期
function dob(t, e, a) {
for (var h = 0;;) {
alert(h)
if (h += 1, h >= 30) return l;
Math.abs(azimuth1 - azimuth2) > 180 * Gt && (azimuth1 < azimuth2 ? azimuth2 -= Qt : azimuth1 -= Qt);
var u = 1e3;
if (l.setSeconds(t.getSeconds() - c), Math.abs(c) < 1) return l;
}
}
答案 0 :(得分:0)
您也可以在PHP中执行此操作:
for ($i = 0; ;) {
// logic stuff
}
但是,它是一样的:
$i = 0;
while(true) {
// login stuff
}