将逗号分隔的javascript函数转换为php

将逗号分隔的javascript函数转换为php,javascript,php,Javascript,Php,我想把这个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; Mat

我想把这个
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;

            }
        }
函数dob(t,e,a){
对于(var h=0;;){
警报(h)
如果(h+=1,h>=30)返回l;
数学abs(azimuth1-azimuth2)>180*Gt&(azimuth1
您也可以在PHP中执行此操作:

for ($i = 0; ;) {
// logic stuff
}
但是,这是一样的:

$i = 0;
while(true) {
// login stuff
}

这不是问题的答案,如果(l.setSeconds(t.getSeconds()-c),Math.abs(c)返回l;如何编写此linseif(h+=1,h>=30)返回l;Math.abs(azimuth1-azimuth2)>180*Gt&(azimuth1l应该是什么开始……您的代码没有定义该变量,甚至没有在任何地方为其赋值。