How to make functions in PHP synchronized so that same function won\'t be executed concurrently ? 2nd user must wait till 1st user is done with the function. Then 2nd user
off the top of my head:
but somehow i think what you are trying to do is "wrong" and can be achieved in another way. could help if you said more details
edit: wasn't aware of php semaphores, the answer above will be way faster.