php.serial class whackyness

You are sending three bytes to the Arduino to tell it that you are ready for it to send data. You do this as soon as you open the serial port.

Opening the serial port causes the Arduino to reset.It takes some time before the Arduino is ready to receive the data.

A slight pause in the PHP script, after opening the serial port, before sending data, might be useful.

Sending one byte is all that is needed.

When the Arduino does get all the data, it calls a function called doLEDS() which has absolutely nothing to do with LEDs. I'd rename that function, to something more meaningful, like gfhasdg8vSNGD().