Weird offsets (bug #44808)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@268372 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2008-11-05 17:17:57 +00:00
parent 71ede4812c
commit e3be9c8da0

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.14 $ -->
<!-- $Revision: 1.15 $ -->
<sect1 xml:id="language.types.string">
<title>Strings</title>
@ -353,7 +353,7 @@ EOD
<programlisting role="php">
<![CDATA[
<?php
$str = <<<'EOD'
//~ $str = <<<'EOD'
Example of string
spanning multiple lines
using nowdoc syntax.
@ -375,7 +375,7 @@ class foo
$foo = new foo();
$name = 'MyName';
echo <<<'EOT'
//~ echo <<<'EOT'
My name is "$name". I am printing some $foo->foo.
Now, I am printing some {$foo->bar[1]}.
This should not print a capital 'A': \x41
@ -403,7 +403,7 @@ This should not print a capital 'A': \x41]]></screen>
<![CDATA[
<?php
class foo {
public $bar = <<<'EOT'
//~ public $bar = <<<'EOT'
bar
EOT;
}
@ -623,6 +623,17 @@ echo "I'd like to have another {${ strrev('reeb') }}, hips";
</simpara>
</note>
<warning>
<simpara>
Writing to an out of range offset pads the string with spaces.
Non-integer types are converted to integer.
Illegal offset type emits <constant>E_NOTICE</constant>.
Negative offset emits <constant>E_NOTICE</constant> in write but reads empty string.
Only the first character of an assigned string is used.
Assigning empty string assigns NUL byte.
</simpara>
</warning>
<example>
<title>Some string examples</title>
<programlisting role="php">