File: application_octetstream__hex.inc.php

package info (click to toggle)
phpmyadmin 4%3A2.9.1.1-3
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 13,224 kB
  • ctags: 119,177
  • sloc: php: 148,860; sh: 636; sql: 224; perl: 142
file content (22 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/* $Id: application_octetstream__hex.inc.php 8705 2006-03-02 17:27:07Z nijel $ */
// vim: expandtab sw=4 ts=4 sts=4:

function PMA_transformation_application_octetstream__hex($buffer, $options = array(), $meta = '') {
    // possibly use a global transform and feed it with special options:
    // include('./libraries/transformations/global.inc.php');
    if (!isset($options[0])) {
        $options[0] = 2;
    } else {
        $options[0] = (int)$options[0];
    }

    if ($options[0] < 1) {
        return bin2hex($buffer);
    } else {
        return chunk_split(bin2hex($buffer), $options[0], ' ');
    }

}

?>