Trying to make a start on using EventSub (PHP)

Your topic title says “eventsub” but your code is for “webhooks”

Which are you trying to work with?

Here you assumed you got a HTTP 200 and assumed your got JSON.
You didn’t do any error code or JSON Decode error checking