For Loop

Use different variable names. the second loop use like j then echo j. Utaona difference

[ATTACH=full]78553[/ATTACH]

I was talking about the for loop. Not the increment/decrement operators.

While that is true it has not made any impact elsewhere. Python can be used to make desktop apps, program raspberry pis e.t.c. Javascript is used in making games and native apps. Ruby can also make desktop apps. Java is basically everywhere.Same thing with C#. PHP is only on the web. If you specialize in it you will only be a webdev unless you learn a new language. That’s why it’s a waste, in my opinion, to learn.

That’s an endless loop. You want to jump out at some point.

Also pushing the CX register back and forth on the stack(which is in memory) seems a little expensive, just because it’s a counter. A modern processor will have a richer array of general purpose registers. To be fair, I haven’t seen what PHP does for this loop, but I suspect it has an optimized version.

So you’d have something like

mov  cx, 10

myloop:
    ; Your loop content
    sub  cx, 1
    cmp cx, 0
    jz myexit
    loop myloop

myexit:

You can write shell scripts that have nothing to with the web using PHP.

What will you make with it?

Anything you can do with bash for instance. Just richer because of PHP other specialized libraries.