PHP Code Deprecation

So. I currently target PHP8 for all projects - it is the most to date one.

However, if I program something - no matter how adherent to nowadays standsarts - what are the odds it will stay functional?

I have seen projects written in php7, no longer functional.* Functions deprecated, Code needing to be rewritten.

So, if I write code today - can I be sure it will still run tomorrow ? (Counterargument: Javascript: Despite ongoing "softdeprecation" aka "please use the the newer feature, thanks", most code is still operational today, backwardscompatibility. Even in markuplanguage - html - frames are still around)

*Excluding the possibility of enforcing a specific version via htaccess. That is a last resort some government institutions who cant afford to pay programmers to update code take... Even some universities. Would you believe it.

The versions itself are supported for roughly 2 years: " Each release branch of PHP is fully supported fortwo years from its initial stable release " Source