This can depend. Usually, prices are determined by the hour. But, if you sign a longer term contract with a client, then a fixed price or fixed price plus cost might work better. Hourly wages range from $20 to $100+, while longer term contract prices range from $100's to $1000's to $10000's, depending on the complexity of the project.
PHP is a commonly used Programming language which many people can use. However, there are many people who code very badly and can caused the script to take a lot longer to load. You need to be careful how much you charge for your scripts. If your coding is very efficient and produces good quality results you will be able to charge more than a standard coder.
I personally charge per project as I have found this works best for both me and my clients. However, you can sometimes get things wrong, and over charge or undercharge due to problems that happen out of your contol.
You need to account for all possible situations in your quotes, such as a 3rd party changing their systems.