3v4l.org

run code in 300+ PHP versions simultaneously
<?php $concatString = "20161017T215257|580501e9f37ee|F3C0K54C|START_LOAN_DEMAND|123456|MS|5000000|0|104|CZK|||TV Samsung S25|15001|NESS|Navratil|Zdenek|604123456||zdenek.navratil@cofidis.cz|||||||||||http://www.myelectro.cz/callback.php"; $encod = mb_detect_encoding($concatString); $utfString = mb_convert_encoding($concatString,"UTF-16LE",$encod); $hashTag = sha1($utfString,true); echo $hashTag; echo "\r\n"; $base64Tag = base64_encode($hashTag); echo $base64Tag; echo "\r\n"; $forTriple = bin2hex(mb_convert_encoding($base64Tag,"UTF-16LE")); echo $forTriple; echo "\r\n";
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
X�q�K/����,��–^ WNdxshZLL/GL7t4GtSytErLCll4= 57004e0064007800730068005a004c004c002f0047004c0037007400340047007400530079007400450072004c0043006c006c0034003d00
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 X�q�K/����,��–^ WNdxshZLL/GL7t4GtSytErLCll4= 57004e0064007800730068005a004c004c002f0047004c0037007400340047007400530079007400450072004c0043006c006c0034003d00

preferences:
157.95 ms | 402 KiB | 171 Q