Please excuse if it is too basic a question in PHP.
I am a desktop app developer so not sure about it,
Just like we put lock, synchronize or use critical sections in different languages to access some common resource by multiple threads. Is my assumption true that if a script (php) is accessed by several different clients simultaneously would be processed in multiple threads ? and if they are updating a common record they would need some synchronization ?
How is it done in Php ?
In my case a PHP page may have multiple android clients accessing it and possibly modifying/accessing same record or table row(s).
PHP is explicitly single-threaded and each call to a PHP script will be handled by its own server thread / process.
Updating records simultaneously has to be handled by the underlying database layer. MySQL for example is widely used and thread safe. When using transactions, you can guarantee also other levels of atomicity.