<?php
$bin = 0b00001101; // 13 - ASCII Carriage return
$c = substr($bin, 0, 1); // read this character printf("Expectation: 00001101, reality: %08b\n", $c); // 00000001
PD9waHAKCgogICAgJGJpbiA9IDBiMDAwMDExMDE7IAkvLyAxMyAtIEFTQ0lJIENhcnJpYWdlIHJldHVybgogICAgJGMgPSBzdWJzdHIoJGJpbiwgMCwgMSk7ICAgIC8vIHJlYWQgdGhpcyBjaGFyYWN0ZXIKICAgIHByaW50ZigiRXhwZWN0YXRpb246IDAwMDAxMTAxLCByZWFsaXR5OiAlMDhiXG4iLCAkYyk7IC8vIDAwMDAwMDAxCg==