Earlier quoted context omitted.
PHP an older and more mature language. It also is synchronous so it runs similar to C/Java/Python. Programming full stack with JavaScript requires a different programming mindset with its asynchronous nature.
JavaScript predates PHP by five years. 'Maturity' is a subjective quality in my opinion and I also think PHP is a hot mess. JavaScript is synchronous unless you specifically utilize its asynchronous parts. Asynchronous execution is possible with PHP
Wikipedia tells me they're both from 1995.