sqlite_udf_encode_binary

(PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)

sqlite_udf_encode_binaryEncode binary data before returning it from an UDF

说明

sqlite_udf_encode_binary ( string $data ) : string

sqlite_udf_encode_binary() applies a binary encoding to the data so that it can be safely returned from queries (since the underlying libsqlite API is not binary safe).

If there is a chance that your data might be binary unsafe (e.g.: it contains a NUL byte in the middle rather than at the end, or if it has and 0x01 byte as the first character) then you must call this function to encode the return value from your UDF.

PHP does not perform this encode/decode operation automatically as it would severely impact performance if it did.

Note:

Do not use sqlite_escape_string() to quote strings returned from UDF's as it will lead to double-quoting of the data. Use sqlite_udf_encode_binary() instead!

参数

data

The string being encoded.

返回值

The encoded string.

参见

相关文章
php cubrid 过时的别名和函数 read data from a glo instance and save it in a filephp cubrid 过时的别名和函数 read data from glo and send it to std outputphp libevent 函数 read data from a buffered eventphp ingres 函数 set the row position before fetching dataphp ldap 函数 get all binary values from a result entryphp mcve 函数 get the raw comma delimited data returned from mcvephp mailparse 函数 scans the data from fp and extract each embedded uuencoded filephp semaphore 函数 returns information from the message queue data structurephp radius 函数 derives mppe keys from mangled dataphp socket 函数 receives data from a socket whether or not it is connection orientedphp sqlite 函数 fetches all rows from a result set as an array of arraysphp sqlite 函数 fetches the next row from a result set as an arrayphp sqlite 函数 return an array of column types from a particular tablephp sqlite 函数 opens an sqlite database and create the database if it does not existphp sqlite 函数 opens a persistent handle to an sqlite database and create the database if it does not existphp sqlite 函数 decode binary data passed as parameters to an udfphp sqlite 函数 encode binary data before returning it from an udfphp 杂项 函数 unpack data from binary stringphp sdo das relational 函数 returns the special root object in an otherwise empty data graph. used when creating a data graph from scratchphp swoole websocket server unpack the binary data received from the client.
关注编程学问公众号