Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100870 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64009 invoked from network); 12 Oct 2017 12:02:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2017 12:02:32 -0000 Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rhsoft.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: lists@rhsoft.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:62237] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/45-49033-6D95FD95 for ; Thu, 12 Oct 2017 08:02:31 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3yCTxF2RvszXMZ for ; Thu, 12 Oct 2017 14:02:25 +0200 (CEST) To: internals@lists.php.net References: <000301d34351$03585950$0a090bf0$@roze.lv> Message-ID: Date: Thu, 12 Oct 2017 14:02:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <000301d34351$03585950$0a090bf0$@roze.lv> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Mysql result data types From: lists@rhsoft.net ("lists@rhsoft.net") Am 12.10.2017 um 13:55 schrieb Reinis Rozitis: > is there a reason (technical or historical) why the data coming from MySQL is always strings? > I've found only one case where the data type is "honored" - PDO+mysqlnd+emulation off [1] not entirely true, our database-layer acts directly with mysqli and unconditionally enables native types for the last 8 months or so after we mirgated our whole code to PHP7 native types no idea what the state of PDO is http://blog.ulf-wendel.de/2008/php-new-network-traffic-cpu-and-memory-savings-with-mysqlnd/ if(mysqli_options($this->conn, MYSQLI_OPT_INT_AND_FLOAT_NATIVE, true) === false) { $this->error('mysqli_options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE) failed'); }