A student recently asked me a question via email, and I thought it was a good question. Here’s a quick answer!
I would stick more to learning PHP. You can do WordPress websites without knowing PHP, but when it comes down to doing advanced customizations to the CMS, PHP is the language that connects to the database, so learning it can help you manipulate data like posts, comments, and other types of content or functionalities.
Minimal PHP knowledge is also good, since it helps you understand the code in your theme files. If you ever want to customize your theme files, you’ll have a sense of what you’re looking at if you know basic PHP.