note 129681 added to function.pg-escape-bytea

From: Date: Wed, 31 Jul 2024 07:25:55 +0000
Subject: note 129681 added to function.pg-escape-bytea
Groups: php.notes 
Request: Send a blank email to php-notes+get-221453@lists.php.net to get a copy of this message
this method des the same as pg_escape_bytea have fun with it: public function escape_bytea($data) { $escaped = ''; for ($i = 0; $i < strlen($data); $i++) { $char = $data[$i]; $ascii = ord($char); $escaped.= ($ascii < 32 || $ascii > 126 ? sprintf('\\%03o', $ascii) : ($char == '\\' ? '\\\\' : $char) ); } return $escaped; } ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 82.218.41.185) ---- Manual Page -- https://php.net/manual/en/function.pg-escape-bytea.php Edit -- https://main.php.net/note/edit/129681 Del: integrated -- https://main.php.net/note/delete/129681/integrated Del: useless -- https://main.php.net/note/delete/129681/useless Del: bad code -- https://main.php.net/note/delete/129681/bad+code Del: spam -- https://main.php.net/note/delete/129681/spam Del: non-english -- https://main.php.net/note/delete/129681/non-english Del: in docs -- https://main.php.net/note/delete/129681/in+docs Del: other reasons-- https://main.php.net/note/delete/129681 Reject -- https://main.php.net/note/reject/129681 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221453) next »