3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $parametersForSign = array( 'merchant-pos-id' => '185641', 'shop-name' => 'Název obchodu', 'total-amount' => '10.00', 'currency-code' => 'CZK', 'customer-language' => 'en', 'store-card'=> 'true', 'customer-email' => 'nemecoskar@gmail.com', ); $pk = 'db96e2ee781bb2045cc100db82f5944b'; function sigCalculate($parametersForSign, $privateKey) { ksort($parametersForSign); echo implode('', $parametersForSign) . "\n"; $str = implode('', $parametersForSign).$privateKey; echo $str . "\n"; return hash('sha256', $str); } echo sigCalculate($parametersForSign, $pk); ?>
based on T0UFN
Output for 5.1.2 - 7.2.0
CZKnemecoskar@gmail.comen185641Název obchodutrue10.00 CZKnemecoskar@gmail.comen185641Název obchodutrue10.00db96e2ee781bb2045cc100db82f5944b eb839a64d04704ba8f1b8d71ea955c5775f0da5e2b2e03b639af4ef6fa3a3fbf
Output for 5.0.0 - 5.1.1
CZKnemecoskar@gmail.comen185641Název obchodutrue10.00 CZKnemecoskar@gmail.comen185641Název obchodutrue10.00db96e2ee781bb2045cc100db82f5944b Fatal error: Call to undefined function hash() in /in/J04JU on line 18
Process exited with code 255.
Output for 4.4.5 - 4.4.9
CZKnemecoskar@gmail.comen185641Název obchodutrue10.00 CZKnemecoskar@gmail.comen185641Název obchodutrue10.00db96e2ee781bb2045cc100db82f5944b Fatal error: Call to undefined function: hash() in /in/J04JU on line 18
Process exited with code 255.
Output for 4.3.2 - 4.4.4
CZKnemecoskar@gmail.comen185641Název obchodutrue10.00 CZKnemecoskar@gmail.comen185641Název obchodutrue10.00db96e2ee781bb2045cc100db82f5944b Fatal error: Call to undefined function: hash() in /in/J04JU on line 18
Process exited with code 255.
Output for 4.3.0 - 4.3.1
CZKnemecoskar@gmail.comen185641Název obchodutrue10.00 CZKnemecoskar@gmail.comen185641Název obchodutrue10.00db96e2ee781bb2045cc100db82f5944b Fatal error: Call to undefined function: hash() in /in/J04JU on line 18