SteamID class for PHP. The class is documented with phpdoc, just read it to find out how to use it.
Works on both 32 and 64-bit PHP.
node.js version is also available, which can be browserified pretty easily.
<?phprequire_once'vendor/autoload.php';
useSteamID\SteamID;
$steamid = newSteamID('76561197960435530');
echo"SteamID2: " . $steamid->getSteam2RenderedID() . PHP_EOL;
echo"SteamID3: " . $steamid->getSteam3RenderedID() . PHP_EOL;
echo"SteamID64: " . $steamid->getSteamID64() . PHP_EOL;