1--TEST-- 2PDO MySQL Bug #39483 (Problem with handling of \ char in prepared statements) 3--EXTENSIONS-- 4pdo_mysql 5--SKIPIF-- 6<?php 7require_once __DIR__ . '/inc/mysql_pdo_test.inc'; 8MySQLPDOTest::skip(); 9?> 10--FILE-- 11<?php 12require_once __DIR__ . '/inc/mysql_pdo_test.inc'; 13$db = MySQLPDOTest::factory(); 14 15$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); 16$stmt = $db->prepare('SELECT UPPER(\'\0:D\0\'),?'); 17$stmt->execute([1]); 18var_dump($stmt->fetchAll(PDO::FETCH_NUM)); 19?> 20--EXPECTF-- 21array(1) { 22 [0]=> 23 array(2) { 24 [0]=> 25 string(4) "%0:D%0" 26 [1]=> 27 string(1) "1" 28 } 29} 30