3v4l.org

run code in 300+ PHP versions simultaneously
<?php $api_key = '552542759d42133d1b37023c2baf36ca6871d006'; $now = new DateTime(); $url = "https://sellercenter-api.linio.com.mx/?"; $parameters = array( 'UserID' => 'john.doe@company.comd', 'Version' => '1.0', 'Action' => 'FeedList', 'Timestamp' => $now->format(DateTime::ISO8601), ); // Sort parameters by name ksort($parameters); $params = array(); foreach ($parameters as $name => $value) { $params[] = rawurlencode($name) . '=' . rawurlencode($value); } $strToSign = implode('&', $params); // Compute signature and add it to the parameters $parameters['Signature'] = rawurlencode(hash_hmac('sha256', $strToSign, $api_key, false)); echo $parameters['Signature'];
Output for 5.6.28, 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
22d2ff8f01edc859811cbf88e702a039528fa8c54793f31e4b85621c07e677bf
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 22d2ff8f01edc859811cbf88e702a039528fa8c54793f31e4b85621c07e677bf
Output for 7.3.32 - 7.3.33, 8.0.13
08c8e473f1816a15b100350ae5fd173350c5ac18d4d28eef942d55be76ea6f4c
Output for 7.0.6
8dc2fb40135c678f580456c808ca84b2eab2dfb7c9113da87185c482ce9472d9
Output for 7.0.5
2a91c4a24cd3a78388df717639347946449765effbe7d1bb19e10d729a9763ef
Output for 7.0.4
e3234c51110bda7cd131cc3c9f76930e0284255a44c70ba80cf523832f710995
Output for 7.0.3
b0542d400a2ecc506a1612b9b48cd107928d21d8b1a683cd1c7b7c8511811def
Output for 7.0.2
f6ea4964988d3332480ed41e9a5272c3e410d4e28b92ada1f59c2ccbb2c463fb
Output for 7.0.1
daf43e1988c164f63d35c1b0c0fbe69f9a4362f51239b18659fb1629a8c429d0
Output for 7.0.0
3210b45618f1c5080534b7c1f1384df63ae3e3816fa2438c69d12b63c85eba8f
Output for 5.6.21
a0da2487f41da39da37a24585afdcb73f1da9554056224f20cd65b12c0893908
Output for 5.6.20
44571165a3e40b0be45fa4dc1053e949176abaa8f78f962579e4ae4f244f3af5
Output for 5.6.19
4c56f7db6bc3e8ea7214205af621d4d1c62622108311d94fc65dbd7a9936d749
Output for 5.6.18
3845d93fef36af1b9f4621fec51e098fc0b6dbca415eddd311690fdf32105780
Output for 5.6.17
bf7b68c6dbfe4ea807e58c698409dc963f860ca165515f9d80ad1d956019431c
Output for 5.6.16
b3183501c9605ac970693e9821fb11a529badfa3a34229e39c2a00a08a16d976
Output for 5.6.15
c1663b108a0b4cd95d5b87b7de36e3c181378949f8911d16f700bf8a24f741e1
Output for 5.6.14
41330098d5c3c15bcb8db719d53ea9523bbcb4af92809a5d1d8edf43cc9d55a5
Output for 5.6.13
507f21ae0feaf8c00d0c68646f4e26b88396d07d97ba3bafe346092a014d7cd2
Output for 5.6.12
75f768f80eaf2ac503d4b4f620cd113b3886b83c8a71f5b2aca46cc181f07587
Output for 5.6.11
7282964fc47969c43227498bc499f7a847a83f9cddca8589088860c5a91a8474
Output for 5.6.10
71499749996956faa48a0576c5dcd21869c9c595579605113f55b2222483758d
Output for 5.6.9
d1355de957c1175ec478d9efc0facd36d98ac7b37f68ef69461c592e0c8847f4
Output for 5.6.8
fd8b25fcd18141e8c78be61e43cf917f5debe86dcdd3b570f5eccdef1539fb3c
Output for 5.5.35
4ab86a4bae2fd0488bc61569f820d2ceff35c9dd123d800b0d726d003d0f1264
Output for 5.5.34
3542e66d64449841b7712096c88471c01d48c60a79de1a12d23866d133e99579
Output for 5.5.33
3c2207e1120ac6f4e821e7be6591c622f377c98b139c0b268203b8b27ceb409c
Output for 5.5.32
f31d905ca4c3b96f8b2491a333bf584f568fefc4288d87f8351314e97e33bd3a
Output for 5.5.31
80d5edcc4cdb0a3ea58c6345a28b0b152c37485c25fc2643b520c87d78c98fa2
Output for 5.5.30
b1f37600633c71eec0610f414c67255f792f745584417bf115d5eec658637984
Output for 5.5.29
5bc07143b2607146665f914d547c761269081de845c7f13b1e2d14374737dff6
Output for 5.5.28
2377139f5ee0ac33e1d2abc36bc3d554bd2e1516a3906f5d241ebdc084922ef4
Output for 5.5.27
2be3fd0569a728ea272db261d3e0cce9e1c6a63fa9a98125dd62ede44e449cb8
Output for 5.5.26
d041c2543841bbcca7b06fe24805e0b5d342102d0e607497639f34565488b5e3
Output for 5.5.25
4afce93018f468dcd689a2810486aafedf26e653a5d49d21e451f52eac6cbb7b
Output for 5.5.24
461b07bcecf90efdc38e257573c3b826f88452487a7b3bb17c30bf07b817710a

preferences:
179.66 ms | 401 KiB | 182 Q