3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secretKey = '174983a9cd51a87a7c914e38661f27bd8b7a08c84474581ff67d5d825a0f4fe0'; $data = <<<WEBHOOK { "event-type":"single-order-labels-created", "order_id":"1008828", "reference":"9001186908", "order_status":"Ready for Print", "order":{ "id":"1008828", "reference":"9001186908", "shipping_method":"Gls National - Normal erhvervspakke", "carrier":"PostNord-NO-Consignor", "created_at":"2021-06-15 13:54:45", "receiver":{ "first_name":"test123", "last_name":"test", "email":"k.katzarov@vconnect.dk", "mobile":"+4551555860", "country":{ "name":"Denmark", "code":"DK" }, "city":"Copenhagen", "address":"test", "zip_code":"8660" }, "items":[ { "name":"Coca Cola 24 x 33 cl", "sku":"123645", "ean":"05740600997656", "weight":0.085, "volume":null, "quantity":1 } ] }, "data": { "event-type": "single-order-labels-created", "order_id": "1008828", "reference": "9001186908", "order_status": "Ready for Print", "data": { "label_url": "https:\/\/shippii-api-bojko.s3.eu-central-1.amazonaws.com\/order_Gogbqe\/6061b5855b537123cb4e0e91dd46af4a6cc396bb22a0a2f80bd14b2e9ae9ef69.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZ5CLJPOKWUO4IDQ%2F20210527%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210527T122901Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=d47ba5cda45091a663d4b1ba77327231691f441e93696b32e678c00ad59790e3", "number_of_labels": 1 }, "carrier": { "carrier_order_number": "083121553525,083121553532,083121553532", "carrier_tracking_url": "https:\/\/bdb.ee\/1y7Za1", "parcels": [{ "line": "1", "number": "373501099216022394", "pkgNo": "JJD149090000006312633", "barcode": "996013010300246754", "tracking_url": "https://sporing.posten.no/sporing/70722150620943466" }, { "line": "2", "number": "373501099216022400", "pkgNo": "JJD149090000006313198", "barcode": "996013010300246754", "tracking_url": "https://sporing.posten.no/sporing/70722150620943466" }, { "line": "3", "number": "373501099216022400", "pkgNo": "JJD149090000006313198", "barcode": "996013010300246754", "tracking_url": "https://sporing.posten.no/sporing/70722150620943466" }] } } } WEBHOOK; echo hash_hmac('sha256', $data, $secretKey);
Output for 8.0.1 - 8.0.27, 8.1.0 - 8.1.14, 8.2.0 - 8.2.1
4fc4d26ab4facd615bec36df64c2e5d6730d23dfb437f72593059eeb66b6a96b

preferences:
19.48 ms | 406 KiB | 5 Q