Last active
July 6, 2023 13:23
-
-
Save youkidearitai/8f3a8046fbf0e26cc8872b2c0e791086 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pdo = new PDO("mysql:host=127.0.0.1;dbname=ore", "root", "password"); | |
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); | |
$pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); | |
$results = $pdo->query("SELECT * FROM test"); | |
foreach ($results as $result) { | |
var_dump($result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
このことから、
PDO::ATTR_EMULATE_PREPARES
の影響でPHP 8.0でもPHP 8.1と同じ結果となったtrueもしくはコメントアウトなら
3.60
などとなる。