note 124951 added to pdo.construct
| From: | FrancescoMontanari@php.net | Date: | Mon, 27 Apr 2020 08:16:38 +0000 |
| Subject: | note 124951 added to pdo.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214543@lists.php.net to get a copy of this message | ||
Most of the information in the comment here is outdated or wrong.
You do can use host=localhost to connect via socket, which is faster than TCP, so setting 127.0.0.1
is a performance loss.
To use proper utf you should use utf8mb4, for example:
$db = new PDO('mysql:host=' . DATABASE_HOST . ';dbname='. DATABASE_NAME
.';charset=utf8mb4', DATABASE_USER, DATABASE_PASSWORD);
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.195 (proxied: 188.27.52.53)
----
Manual Page -- http://php.net/manual/en/pdo.construct.php
Edit -- https://master.php.net/note/edit/124951
Del: integrated -- https://master.php.net/note/delete/124951/integrated
Del: useless -- https://master.php.net/note/delete/124951/useless
Del: bad code -- https://master.php.net/note/delete/124951/bad+code
Del: spam -- https://master.php.net/note/delete/124951/spam
Del: non-english -- https://master.php.net/note/delete/124951/non-english
Del: in docs -- https://master.php.net/note/delete/124951/in+docs
Del: other reasons-- https://master.php.net/note/delete/124951
Reject -- https://master.php.net/note/reject/124951
Search -- https://master.php.net/manage/user-notes.php