PHP EventSubs Examples

I have one more Question. I’ve managed a subscription (channel.channel_points_custom_reward_redemption.add)

When I’m now click on one of my channelpoint “actions” I expected something on the eventhandler.
(twitch_misc/index.php at main · BarryCarlyon/twitch_misc · GitHub)

I uncommented the logfunctions…

Array
(
    [Content-Length] => 801
    [Content-Type] => application/json
    [Accept-Encoding] => gzip
    [Connection] => close
    [Host] => www.myhost.com
    [Twitch-Eventsub-Message-Id] => wz8gADSFpMLF_KOtkX66-ASDFsITjbysFg=
    [Twitch-Eventsub-Message-Retry] => 0
    [Twitch-Eventsub-Message-Signature] => sha256=f981c24c93eadasdfaasdfasfsafasfsdfb539161
    [Twitch-Eventsub-Message-Timestamp] => 2022-04-25T16:50:33.979124589Z
    [Twitch-Eventsub-Message-Type] => notification
    [Twitch-Eventsub-Subscription-Is-Batching-Enabled] => false
    [Twitch-Eventsub-Subscription-Type] => channel.channel_points_custom_reward_redemption.add
    [Twitch-Eventsub-Subscription-Version] => 1
    [User-Agent] => Go-http-client/1.1
)

That looks good… and in the body_data I’ve can see a “channel point” redemption… This looks also good.

BUT… the PHP File just jumps to the “endpoint” and delete the logging file after refresh…

For my understanding: After I click on my channel points, the PHP File should show me JSON in this part of the PHP File

if ($headers['Twitch-Eventsub-Message-Type'] == 'notification') {
            // lets parse the data from the notification into an object
            $data = json_decode($raw_data);
            // and check the data parse
            if (json_last_error() == JSON_ERROR_NONE) {
                // we passed all the checks
                // tell Twitch it's OK
                echo 'Ok';
                // and now do something with the $data

                // $data is an object, not an array
		**print_r($data);**  //<--------------- NEW

                // end doing something with the $data
                exit;
            }
        }

Do i missunderstood here something?
Thanks again for your good work and help!