PHP code example of clue / caret-notation

1. Go to this page and download the library: Download clue/caret-notation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

clue / caret-notation example snippets


$encoder = new Encoder();

$string = "Hello\r\nworld\0";
// Output: Hello^M^Jworld^@
echo $encoder->encode($string);

$string = "No control chars";
// Output: No control chars
echo $encoder->encode($string);