(view source code of hex2bin_php.bat as plain text)
@ECHO OFF
:: https://www.robvanderwoude.com/batchphp.php
:: Usage: "hex2bin 0xF7" or "hex2bin F7" both return "11110111"
SETLOCAL
SET Hex=%~1
IF /I "%Hex:~0,2%"=="0x" SET Hex=%Hex:~2%
PHP -r print(decbin(hexdec(%Hex%)));
ENDLOCAL
page last modified: 2024-04-16; loaded in 0.0082 seconds