note 102265 added to function.strtr

From: Date: Fri, 04 Feb 2011 20:49:04 +0000
Subject: note 102265 added to function.strtr
Groups: php.notes 
Request: Send a blank email to php-notes+get-176692@lists.php.net to get a copy of this message
Hope this is useful when you need to see ASCII control characters: <?php $xlate = array(chr(0) => '^@/NUL/null', chr(1) => '^A/SOH/start of heading', chr(2) => '^B/STX/start of text', chr(3) => '^C/ETX/end of text', chr(4) => '^D/EOT/end of transmisssion', chr(5) => '^E/ENQ/enquiry', chr(6) => '^F/ACK/acknowledge', chr(7) => '^G/BEL/bell', chr(8) => '^H/BS/backspace', chr(9) => '^I/TAB/horizontal tab', chr(10) => '^J/LF/NL/line feed/new line', chr(11) => '^K/VT/vertical tab', chr(12) => '^L/FF/NP/form feed/new page/', chr(13) => '^M/CR/carrige return', chr(14) => '^N/SO/shift out', chr(15) => '^O/SI/shift in', chr(16) => '^P/DLE/data link escape', chr(17) => '^Q/DC1/device control 1', chr(18) => '^R/DC2/device control 2', chr(19) => '^S/DC3/device control 3', chr(20) => '^T/DC4/device control 4', chr(21) => '^U/NAK/negative acknowledge', chr(22) => '^V/SYN/synchronous idle', chr(23) => '^W/ETB/end of transmission block', chr(24) => '^X/CAN/cancel', chr(25) => '^Y/EM/end of medium', chr(26) => '^Z/SUB/substiute', chr(27) => '^[/ESC/escape', chr(28) => '^\/FS/file separator', chr(29) => '^]/GS/group separator', chr(30) => '^^/RS/record separator', chr(31) => '^_/US/unit separator', chr(32) => 'Space'); $x = 0; $pad = strlen(strlen($str)); while(isset($str[$x])) echo 'character ', str_pad($x+1, $pad), ' = ', strtr($str[$x], $xlate), ' (ascii ', ord($str[$x++]), ')'; ?> ---- Server IP: 64.71.164.2 Probable Submitter: 65.41.147.195 ---- Manual Page -- http://www.php.net/manual/en/function.strtr.php Edit -- https://master.php.net/note/edit/102265 Del: integrated -- https://master.php.net/note/delete/102265/integrated Del: useless -- https://master.php.net/note/delete/102265/useless Del: bad code -- https://master.php.net/note/delete/102265/bad+code Del: spam -- https://master.php.net/note/delete/102265/spam Del: non-english -- https://master.php.net/note/delete/102265/non-english Del: in docs -- https://master.php.net/note/delete/102265/in+docs Del: other reasons-- https://master.php.net/note/delete/102265 Reject -- https://master.php.net/note/reject/102265 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#176692) next »