Yes, php can generate static websites.
You can use the "Output Buffering" functionality, rendering your pages using PHP, and then saving the output buffer to files.
Some early blogging systems used CakePHP and lithium output buffers to generate page caches.
http://php.net/manual/en/book.outcontrol.php
source share