Skip to content

Commit a823ec7

Browse files
committed
[info] sync with en
1 parent b73490d commit a823ec7

File tree

8 files changed

+81
-88
lines changed

8 files changed

+81
-88
lines changed

reference/info/functions/assert.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 27dcb487a7e9c0f04559522a6d2aacf860d622cd Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: 2916fa4160bdf53bb316a5c7c018fc91df7cd951 Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi,mumumu -->
55
<refentry xml:id="function.assert" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -21,7 +21,7 @@
2121
運用環境では除去されて、まったくコストのかからないアサーションということです。
2222
</para>
2323
<para>
24-
アサーションは、デバッグ目的にのみ使用するべきです
24+
アサーションは、デバッグを支援する目的に使用するべきです
2525
アサーションを常に &true; となる条件を調べる不具合診断に使用し、
2626
true でない場合に何らかのプログラミングエラーを示したり、
2727
extension 関数または特定のシステム制限や機能といった、
@@ -244,6 +244,7 @@
244244
<simplelist>
245245
<member><literal>zend.assertions=0</literal></member>
246246
<member><literal>zend.assertions=-1</literal></member>
247+
<member><literal>assert.active=0</literal></member>
247248
<member><literal>assert.exception=1</literal></member>
248249
<member><literal>assert.bail=1</literal></member>
249250
<member>カスタムの例外オブジェクトが <parameter>description</parameter> に渡された場合</member>

reference/info/functions/get-magic-quotes-gpc.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 62aa2694baf7fe904744a9b0f8a2a26e7fc3cf12 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: 06313c3bb195d974aeba8f4364a6739833b18768 Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi,mumumu -->
55
<refentry xml:id="function.get-magic-quotes-gpc" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -47,10 +47,16 @@
4747
</row>
4848
</thead>
4949
<tbody>
50+
<row>
51+
<entry>8.0.0</entry>
52+
<entry>
53+
&removed.function;
54+
</entry>
55+
</row>
5056
<row>
5157
<entry>7.4.0</entry>
5258
<entry>
53-
この関数は推奨されなくなりました。
59+
&deprecated.function;
5460
</entry>
5561
</row>
5662
</tbody>

reference/info/functions/get-magic-quotes-runtime.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 62aa2694baf7fe904744a9b0f8a2a26e7fc3cf12 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: 06313c3bb195d974aeba8f4364a6739833b18768 Maintainer: hirokawa Status: ready -->
44
<!-- Credits: mumumu -->
55
<refentry xml:id="function.get-magic-quotes-runtime" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -47,10 +47,16 @@
4747
</row>
4848
</thead>
4949
<tbody>
50+
<row>
51+
<entry>8.0.0</entry>
52+
<entry>
53+
&removed.function;
54+
</entry>
55+
</row>
5056
<row>
5157
<entry>7.4.0</entry>
5258
<entry>
53-
この関数は推奨されなくなりました。
59+
&deprecated.function;
5460
</entry>
5561
</row>
5662
</tbody>

reference/info/functions/getrusage.xml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: e947f2e12b1e321d67f6560c5f2884e6d885858f Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: a277389c9d2d5a940fcd6dbe62da7e109282379d Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi,mumumu -->
55
<refentry xml:id="function.getrusage" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -46,30 +46,6 @@
4646
</para>
4747
</refsect1>
4848

49-
<refsect1 role="changelog">
50-
&reftitle.changelog;
51-
<para>
52-
<informaltable>
53-
<tgroup cols="2">
54-
<thead>
55-
<row>
56-
<entry>&Version;</entry>
57-
<entry>&Description;</entry>
58-
</row>
59-
</thead>
60-
<tbody>
61-
<row>
62-
<entry>7.0.0</entry>
63-
<entry>
64-
この関数は、Windows でサポートされるようになりました。
65-
</entry>
66-
</row>
67-
</tbody>
68-
</tgroup>
69-
</informaltable>
70-
</para>
71-
</refsect1>
72-
7349
<refsect1 role="examples">
7450
&reftitle.examples;
7551
<para>

reference/info/functions/ini-get.xml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: c8a8981a9df9a1564a4b9a79e84583d41a7b6ac5 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: 4c016ab334b90a98258b98e04752af7dc74954cd Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi,mumumu -->
55
<refentry xml:id="function.ini-get" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -57,38 +57,16 @@
5757
php.ini で以下のように設定されているものとします:
5858
5959
display_errors = On
60-
register_globals = Off
60+
opcache.enable_cli = Off
6161
post_max_size = 8M
6262
*/
6363
6464
echo 'display_errors = ' . ini_get('display_errors') . "\n";
65-
echo 'register_globals = ' . (int) ini_get('register_globals') . "\n";
65+
echo 'opcache.enable_cli = ' . (int) ini_get('opcache.enable_cli') . "\n";
6666
echo 'post_max_size = ' . ini_get('post_max_size') . "\n";
6767
echo 'post_max_size + 1 = ' . (rtrim(ini_get('post_max_size'), 'KMG') + 1) . "\n";
6868
echo 'post_max_size in bytes = ' . return_bytes(ini_get('post_max_size'));
6969
70-
function return_bytes($val)
71-
{
72-
$val = trim($val);
73-
$num = (int) rtrim($val, 'KMG');
74-
$last = strtolower($val[strlen($val) - 1]);
75-
76-
switch ($last) {
77-
// 'G' も使えます
78-
case 'g':
79-
$num = $num * 1024 * 1024 * 1024;
80-
break;
81-
case 'm':
82-
$num = $num * 1024 * 1024;
83-
break;
84-
case 'k':
85-
$num *= 1024;
86-
break;
87-
}
88-
89-
return $num;
90-
}
91-
9270
?>
9371
]]>
9472
</programlisting>
@@ -97,7 +75,7 @@ function return_bytes($val)
9775
<![CDATA[
9876
9977
display_errors = 1
100-
register_globals = 0
78+
opcache.enable_cli = 0
10179
post_max_size = 8M
10280
post_max_size+1 = 9
10381
post_max_size in bytes = 8388608
@@ -126,9 +104,9 @@ post_max_size in bytes = 8388608
126104
&php.ini;上で省略形で格納されています。
127105
<function>ini_get</function>は&php.ini;に格納されている値を
128106
そのままの形式で返します。整数表現に変換したりは<emphasis>しません</emphasis>。
129-
これらの値に通常の算術的な関数を施すと予期しない結果を
130-
得てしまいます。上の例では、省略形の表記から本来のバイト数に変換する
131-
PHP ソースのひとつの例を示しています
107+
これらの値に通常の算術的な関数を施すと予期しない結果になります。
108+
短縮記法をバイトに変換する用途として、
109+
<function>ini_parse_quantity</function> が使えます
132110
</para>
133111
</note>
134112
<note>
@@ -145,6 +123,7 @@ post_max_size in bytes = 8388608
145123
<simplelist>
146124
<member><function>get_cfg_var</function></member>
147125
<member><function>ini_get_all</function></member>
126+
<member><function>ini_parse_quantity</function></member>
148127
<member><function>ini_restore</function></member>
149128
<member><function>ini_set</function></member>
150129
</simplelist>

reference/info/functions/ini-parse-quantity.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 87955a630afd2a0321391437388eb816b8dc87eb Maintainer: mumumu Status: ready -->
3+
<!-- EN-Revision: 4c016ab334b90a98258b98e04752af7dc74954cd Maintainer: mumumu Status: ready -->
44
<refentry xml:id="function.ini-parse-quantity" xmlns="http://docbook.org/ns/docbook">
55
<refnamediv>
66
<refname>ini_parse_quantity</refname>
@@ -81,7 +81,7 @@ var_dump(ini_parse_quantity('10F'));
8181
?>
8282
]]>
8383
</programlisting>
84-
&example.outputs.similar;
84+
&example.outputs;
8585
<screen>
8686
<![CDATA[
8787

reference/info/functions/phpversion.xml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 4fd318ca791ef360c5b19a17c8045f7446aa9740 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: 30509282589c6fdee1bce55f3271caf464b5cd75 Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi -->
55
<refentry xml:id="function.phpversion" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -77,11 +77,13 @@
7777
<programlisting role="php">
7878
<![CDATA[
7979
<?php
80-
// たとえば 'Current PHP version: 4.1.1' などと表示します
80+
81+
// たとえば 'Current PHP version: 8.3.12' などと表示します
8182
echo 'Current PHP version: ' . phpversion();
8283
83-
// たとえば '2.0' などと表示します。拡張モジュールが有効でない場合は何も表示しません
84-
echo phpversion('tidy');
84+
// たとえば '1.22.3' などと表示します。拡張モジュールが有効でない場合は何も表示しません
85+
echo phpversion('zip');
86+
8587
?>
8688
]]>
8789
</programlisting>
@@ -93,35 +95,30 @@ echo phpversion('tidy');
9395
<programlisting role="php">
9496
<![CDATA[
9597
<?php
96-
// PHP_VERSION_ID は PHP 5.2.7 以降で使用可能です。
97-
// それより古いバージョンでは、このようにエミュレートします
98-
if (!defined('PHP_VERSION_ID')) {
99-
$version = explode('.', PHP_VERSION);
10098
101-
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
102-
}
99+
/**
100+
* PHP_VERSION_ID は数値として定義されており、数字が大きいほど PHP の
101+
* バージョンが新しいことになります。その定義は、上で使用しているような
102+
* 式となります。
103+
*
104+
* $version_id = $major_version * 10000 + $minor_version * 100 + $release_version;
105+
*
106+
* PHP_VERSION_ID を使えば、その PHP のバージョンで使える機能を調べる
107+
* ことができます。ある機能に対応しているかどうかを調べるために、毎回
108+
* version_compare() を使う必要がなくなります。
109+
*
110+
* たとえば、PHP 5.2.7 より前のバージョンには存在しない定数
111+
* PHP_VERSION_* を、次のように定義することができます。
112+
*/
103113
104-
// PHP_VERSION_ID は数値として定義されており、数字が大きいほど PHP の
105-
// バージョンが新しいことになります。その定義は、上で使用しているような
106-
// 式となります。
107-
//
108-
// $version_id = $major_version * 10000 + $minor_version * 100 + $release_version;
109-
//
110-
// PHP_VERSION_ID を使えば、その PHP のバージョンで使える機能を調べる
111-
// ことができます。ある機能に対応しているかどうかを調べるために、毎回
112-
// version_compare() を使う必要がなくなります。
113-
//
114-
// たとえば、PHP 5.2.7 より前のバージョンには存在しない定数
115-
// PHP_VERSION_* を、次のように定義することができます。
116-
117-
if(PHP_VERSION_ID < 50207)
118-
{
114+
if (PHP_VERSION_ID < 50207) {
119115
define('PHP_MAJOR_VERSION', $version[0]);
120116
define('PHP_MINOR_VERSION', $version[1]);
121117
define('PHP_RELEASE_VERSION', $version[2]);
122118
123119
// などなど
124120
}
121+
125122
?>
126123
]]>
127124
</programlisting>

reference/info/functions/restore-include-path.xml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 8dd14a886c7e954cef181c374b6f05cc7149e643 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: f112cc1ec6335a62d03a3de0da4f03ea3f5d0e03 Maintainer: hirokawa Status: ready -->
44
<!-- Credits: mumumu -->
55
<refentry xml:id="function.restore-include-path" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -36,6 +36,34 @@
3636
</para>
3737
</refsect1>
3838

39+
<refsect1 role="changelog">
40+
&reftitle.changelog;
41+
<informaltable>
42+
<tgroup cols="2">
43+
<thead>
44+
<row>
45+
<entry>&Version;</entry>
46+
<entry>&Description;</entry>
47+
</row>
48+
</thead>
49+
<tbody>
50+
<row>
51+
<entry>8.0.0</entry>
52+
<entry>
53+
&removed.function;
54+
</entry>
55+
</row>
56+
<row>
57+
<entry>7.4.0</entry>
58+
<entry>
59+
&deprecated.function;
60+
</entry>
61+
</row>
62+
</tbody>
63+
</tgroup>
64+
</informaltable>
65+
</refsect1>
66+
3967
<refsect1 role="examples">
4068
&reftitle.examples;
4169
<para>

0 commit comments

Comments
 (0)