1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-23 22:52:11 +01:00

Replace deprecated ${var} string interpolations with {$var}

9e6c3416c5
This commit is contained in:
Yoshinari Takaoka
2024-02-18 10:13:20 +09:00
parent 33a3c95602
commit aac7a53ec7
3 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8b647de71ab443cb2784a82902bfc87728d587ae Maintainer: takagi Status: ready -->
<!-- EN-Revision: 9e6c3416c5c285f807a734e4663c399612777d7e Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa -->
<chapter xml:id="faq.html" xmlns="http://docbook.org/ns/docbook">
<title>PHP と HTML</title>
@@ -316,7 +316,7 @@ if (isset($_GET['width']) AND isset($_GET['height'])) {
// -- POST 変数は別の方法で扱う必要がある)
echo "<script language='javascript'>\n";
echo " location.href=\"${_SERVER['SCRIPT_NAME']}?${_SERVER['QUERY_STRING']}"
echo " location.href=\"{$_SERVER['SCRIPT_NAME']}?{$_SERVER['QUERY_STRING']}"
. "&width=\" + screen.width + \"&height=\" + screen.height;\n";
echo "</script>\n";
exit();

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: ee52285714f7f7371364a3e5233d2ca2da078706 Maintainer: mumumu Status: ready -->
<!-- EN-Revision: 9e6c3416c5c285f807a734e4663c399612777d7e Maintainer: mumumu Status: ready -->
<chapter xml:id="mysql-xdevapi.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
@@ -111,7 +111,7 @@ array(4) {
<?php
$result = $collection->find()->execute();
foreach ($result as $doc) {
echo "${doc["name"]} is a ${doc["job"]}.\n";
echo "{$doc["name"]} is a {$doc["job"]}.\n";
}
?>
]]>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c2eca73ef79ebe78cebb34053e41b565af504c4f Maintainer: takagi Status: ready -->
<!-- EN-Revision: 9e6c3416c5c285f807a734e4663c399612777d7e Maintainer: takagi Status: ready -->
<refentry xml:id="function.pg-send-query-params" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>pg_send_query_params</refname>
@@ -101,10 +101,10 @@
// パラメータを使用する。パラメータにはクォートやエスケープが
// 必要ないことに注意
pg_send_query_params($dbconn, 'select count(*) from authors where city = $1', array('Perth'));
// 基本的な pg_send_query の使用法との比較
$str = pg_escape_string('Perth');
pg_send_query($dbconn, "select count(*) from authors where city = '${str}'");
pg_send_query($dbconn, "select count(*) from authors where city = '{$str}'");
?>
]]>
</programlisting>