These code snippets show you how to get the timestamp of the first day of month in PHP using the PHP date function.
The date function in PHP makes it really easy to obtain specific results with plain english. This is emphasised in this example where we can actually ask for 'first day of *month* *year*'.
Here's an example of retrieving a timestamp of the first day of the month, where we fill the text gap with the current month and year represented by 'F Y' (which would return for example August 2014):
echo strtotime( 'first day of ' . date( 'F Y'));
This would produce a 11 digit timestamp like '1406851200'.
If you wanted to, you could now re-use the date function to re-format the timestamp:
echo date( 'd-m-Y', strtotime( 'first day of ' . date( 'F Y')));
This would produce a formatted date like '01-08-2014'.
You can read all the options available in the PHP documentation.