3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $request = [ 'sso_id' => 'test', 'phone' => 'test', ]; ksort($request); echo http_build_query($request); echo ' '; echo hash_hmac('sha256', http_build_query($request), ''); echo ' '; $request = [ 'sso_id' => 'test', 'snils' => 'test', 'phone' => 'test', 'email' => 'email', ]; ksort($request); echo http_build_query($request); echo ' '; echo hash_hmac('sha256', http_build_query($request), ''); echo ' '; echo hash_hmac('sha256', 'email=4654%40mail.ru&phone=9999999999&snils=216-556-489%2083&sso_id=DIT2012%40mos.ruUUID12345', ''); $request = [ 'sso_id' => 'DIT2012@mos.ruUUID12345', 'snils' => '216-556-489 83', 'phone' => '9999999999', 'email' => '4654@mail.ru', ]; ksort($request); echo http_build_query($request); echo ' '; echo hash_hmac('sha256', http_build_query($request), '');
based on 9fBVK
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
phone=test&sso_id=test 61a17472d9446fd6684473dbc179c27f2fe961785a75f05d18de8cca80c580e9 email=email&phone=test&snils=test&sso_id=test 6977a4053542ca5d9b12b882406613b4dcd6bd3fc6765c17d00bcba075a3725c 3a03fe1bd79e352604d814dfd82d17bd490deaee2bb2c02cdfee9dd8707770ddemail=4654%40mail.ru&phone=9999999999&snils=216-556-489+83&sso_id=DIT2012%40mos.ruUUID12345 89b128623b39f83cbf902d8a1efca1a7efbb3698fee197703f9a0fe9e528cff4