3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $AMOUNT = '1000'; # wird natürlich dynamisch erzeugt $CURRENCY = 'CHF'; $LANGUAGE = 'DE_de'; $ORDERID = '1234'; # wird natürlich dynamisch erzeugt $OWNERTOWN = 'CH'; $OWNERCTY = 'Irgendwo'; $OWNERADDRESS = 'irgendwostrasse'; $EMAIL = 'info@sonstwas.ch'; $OWNERZIP = '2222'; $PSPID = 'pspidTEST'; # wird von Postfinace gegeben $SECUREID = 'testsecureid1999!?'; # wird in der systemverwaltung eingegeben $code = sha1("AMOUNT=$AMOUNT"."$SECUREID"."CURRENCY=$CURRENCY"."$SECUREID"."EMAIL=$EMAIL"."$SECUREID"."LANGUAGE=$LANGUAGE"."$SECUREID"."ORDERID=$ORDERID"."$SECUREID"."OWNERADDRESS=$OWNERADDRESS"."$SECUREID"."OWNERCTY=$OWNERCTY"."$SECUREID"."OWNERTOWN=$OWNERTOWN"."$SECUREID"."OWNERZIP=$OWNERZIP"."$SECUREID"."PSPID=$PSPID"."$SECUREID"); var_dump($code); $LANGUAGE = 'de_DE'; $code = sha1("AMOUNT=$AMOUNT"."$SECUREID". "CURRENCY=$CURRENCY"."$SECUREID". "EMAIL=$EMAIL"."$SECUREID". "LANGUAGE=$LANGUAGE"."$SECUREID". "ORDERID=$ORDERID"."$SECUREID". "OWNERADDRESS=$OWNERADDRESS"."$SECUREID". "OWNERCTY=$OWNERCTY"."$SECUREID". "OWNERTOWN=$OWNERTOWN"."$SECUREID". "OWNERZIP=$OWNERZIP"."$SECUREID". "PSPID=$PSPID"."$SECUREID" ); var_dump($code); $test = 'AMOUNT=1500Mysecretsig1875!?CURRENCY=EURMysecretsig1875!?LANGUAGE=en_USMysecretsig1875!?ORDERID=1234Mysecretsig1875!?PSPID=MyPSPIDMysecretsig1875!?'; $test = sha1($test); var_dump($test); if( strcmp ( $test , strtolower('F4CC376CD7A834D997B91598FA747825A238BE0A')) === 0) { echo 'gleich'; }
Output for 4.3.0 - 5.6.22, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0RC5
string(40) "f3ef90acde485d2bb1b9747fc4af8582e0e997c0" string(40) "3426dbab65728245471868c250e57458729304ec" string(40) "f4cc376cd7a834d997b91598fa747825a238be0a" gleich