Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions language/control-structures/foreach.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ foreach ($array as list($a, $b)) {
<![CDATA[
A: 1; B: 2
A: 3; B: 4
A: 1; B: 2
A: 3; B: 4
]]>
</screen>
</informalexample>
Expand Down
2 changes: 2 additions & 0 deletions language/control-structures/goto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ echo "$i = $i";
<screen>
<![CDATA[
Fatal error: 'goto' into loop or switch statement is disallowed in script on line 2
Stack trace:
#0 {main}
]]>
</screen>
</example>
Expand Down
2 changes: 1 addition & 1 deletion language/control-structures/match.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ object(UnhandledMatchError)#1 (7) {
["file":protected]=>
string(6) "script"
["line":protected]=>
int(6)
int(5)
["trace":"Error":private]=>
array(0) {
}
Expand Down
5 changes: 3 additions & 2 deletions language/control-structures/switch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,15 @@ switch($beer)
&example.outputs;
<screen>
<![CDATA[

Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in script on line 6

Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in script on line 7

Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in script on line 8

Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in script on line 11
Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in script on line 9

Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in script on line 12
Please make a new selection...
]]>
</screen>
Expand Down
6 changes: 3 additions & 3 deletions language/oop5/basic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ var_dump($assigned);
NULL
NULL
object(SimpleClass)#1 (1) {
["var"]=>
string(30) "$assigned will have this value"
["var"]=>
string(30) "$assigned will have this value"
}
]]>
</screen>
Expand Down Expand Up @@ -535,7 +535,7 @@ $extended->displayVar();
<screen>
<![CDATA[
Extending class
Parent Class
Parent class
]]>
</screen>
</example>
Expand Down
4 changes: 2 additions & 2 deletions language/oop5/lazy-objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ var_dump($lazyObject->prop);
<screen>
<![CDATA[
lazy ghost object(Example)#3 (0) {
["prop"]=>
uninitialized(int)
["prop"]=>
uninitialized(int)
}
string(7) "Example"
Example::__construct
Expand Down
3 changes: 1 addition & 2 deletions language/oop5/overloading.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ Privates are visible inside the class, so __get() not used...
Privates not visible outside of class, so __get() is used...
Getting 'hidden'


Notice: Undefined property via __get(): hidden in <file> on line 70 in <file> on line 29
Notice: Undefined property via __get(): hidden in script on line 71 in script on line 27
]]>
</screen>

Expand Down
4 changes: 2 additions & 2 deletions language/types/array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,10 +1124,10 @@ var_dump((array) new B());
<screen>
<![CDATA[
array(3) {
["BA"]=>
NULL
["AA"]=>
NULL
["BA"]=>
NULL
["AA"]=>
NULL
}
Expand Down
2 changes: 1 addition & 1 deletion language/types/callable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Hello World!
Hello World!
Hello World!

Deprecated: Callables of the form ["B", "parent::who"] are deprecated in script on line 41
Deprecated: Callables of the form ["B", "parent::who"] are deprecated in script on line 44
A
Hello PHP!
]]>
Expand Down
10 changes: 5 additions & 5 deletions reference/array/functions/array-fill.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ print_r($a);
<![CDATA[
Array
(
[5] => banana
[6] => banana
[7] => banana
[8] => banana
[9] => banana
[5] => banana
[6] => banana
[7] => banana
[8] => banana
[9] => banana
[10] => banana
)
]]>
Expand Down
8 changes: 8 additions & 0 deletions reference/array/functions/array-map.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ Array
[3] => 8
[4] => 10
)
Array
(
[0] => 2
[1] => 4
[2] => 6
[3] => 8
[4] => 10
)
]]>
</screen>
</example>
Expand Down
7 changes: 4 additions & 3 deletions reference/array/functions/array-udiff-assoc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,19 @@ Array
(
[0.1] => cr Object
(
[priv_member:private] => 9
[priv_member:cr:private] => 9
)

[0.5] => cr Object
(
[priv_member:private] => 12
[priv_member:cr:private] => 12
)

[0] => cr Object
(
[priv_member:private] => 23
[priv_member:cr:private] => 23
)

)
]]>
</screen>
Expand Down
6 changes: 4 additions & 2 deletions reference/array/functions/array-unique.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ var_dump($result);
<screen role="php">
<![CDATA[
array(2) {
[0] => int(4)
[2] => string(1) "3"
[0]=>
int(4)
[2]=>
string(1) "3"
}
]]>
</screen>
Expand Down
8 changes: 4 additions & 4 deletions reference/array/functions/array-unshift.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ var_dump($queue);
<screen role="php">
<![CDATA[
array(4) {
[0] =>
[0]=>
string(5) "apple"
[1] =>
[1]=>
string(9) "raspberry"
[2] =>
[2]=>
string(6) "orange"
[3] =>
[3]=>
string(6) "banana"
}
]]>
Expand Down
3 changes: 1 addition & 2 deletions reference/array/functions/natsort.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ Array
[1] => 3
[5] => 9
)

Zero padding
Array
(
Expand All @@ -168,8 +167,8 @@ Array
(
[5] => 0
[1] => 8
[3] => 009
[0] => 09
[3] => 009
[2] => 10
[4] => 011
)
Expand Down
2 changes: 1 addition & 1 deletion reference/datetime/formats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ var_dump($res["warnings"]);
<screen>
<![CDATA[
array(1) {
[11] =>
[11]=>
string(27) "The parsed date was invalid"
}
]]>
Expand Down
3 changes: 2 additions & 1 deletion reference/datetime/functions/date-default-timezone-get.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ date.timezone: Europe/London
<![CDATA[
<?php
date_default_timezone_set('America/Los_Angeles');
echo date_default_timezone_get() . ' => ' . date('e') . ' => ' . date('T');
$ts = mktime(0, 0, 0, 1, 1, 2024);
echo date_default_timezone_get() . ' => ' . date('e') . ' => ' . date('T', $ts);
]]>
</programlisting>
&example.outputs;
Expand Down
2 changes: 1 addition & 1 deletion reference/datetime/functions/date-sun-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ echo "Length of day: ",
&example.outputs;
<screen>
<![CDATA[
Length of day: 13h 56s
Length of day: 13h 53s
]]>
</screen>
</example>
Expand Down
2 changes: 1 addition & 1 deletion reference/dom/dom/characterdata/before.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ echo $doc->saveXML();
&example.outputs;
<screen>
<![CDATA[
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<container>hello<beautiful/><![CDATA[world]]]]><![CDATA[></container>
]]>
</screen>
Expand Down
2 changes: 1 addition & 1 deletion reference/dom/dom/characterdata/remove.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ echo $doc->saveXML();
&example.outputs;
<screen>
<![CDATA[
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<container><world/></container>
]]>
</screen>
Expand Down
2 changes: 1 addition & 1 deletion reference/dom/dom/characterdata/replacewith.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ echo $doc->saveXML();
&example.outputs;
<screen>
<![CDATA[
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<container>beautiful<world/></container>
]]>
</screen>
Expand Down
2 changes: 1 addition & 1 deletion reference/dom/dom/htmldocument/createfromstring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ echo $dom->saveHtml();
<screen>
<![CDATA[
<!DOCTYPE html><html><head></head><body>
<p>Hello, world!</p>
<p>Hello, world!</p>

</body></html>
]]>
Expand Down
1 change: 1 addition & 0 deletions reference/dom/domdocument/append.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ echo $doc->saveXML();
&example.outputs;
<screen>
<![CDATA[
<?xml version="1.0"?>
<hello/>
beautiful
<world/>
Expand Down
3 changes: 1 addition & 2 deletions reference/dom/domdocumentfragment/replacechildren.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ echo $doc->saveXML($fragment);
&example.outputs;
<screen>
<![CDATA[
beautiful
<world/>
beautiful<world/>
]]>
</screen>
</example>
Expand Down
1 change: 1 addition & 0 deletions reference/dom/domelement/before.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ echo $doc->saveXML();
&example.outputs;
<screen>
<![CDATA[
<?xml version="1.0"?>
hello
<beautiful/>
<world/>
Expand Down
12 changes: 6 additions & 6 deletions reference/dom/domelement/getattributenames.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ var_dump($dom->documentElement->getAttributeNames());
<screen>
<![CDATA[
array(3) {
[0]=>
string(10) "xmlns:some"
[1]=>
string(9) "some:test"
[2]=>
string(5) "test2"
[0]=>
string(10) "xmlns:some"
[1]=>
string(9) "some:test"
[2]=>
string(5) "test2"
}
]]>
</screen>
Expand Down
2 changes: 1 addition & 1 deletion reference/dom/domnode/getlineno.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ printf('The <node> tag is defined on line %d', $dom->getElementsByTagName('node'
&example.outputs;
<screen>
<![CDATA[
The <node> tag is defined in line 3
The <node> tag is defined on line 3
]]>
</screen>
</example>
Expand Down
4 changes: 2 additions & 2 deletions reference/libxml/functions/libxml-get-errors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ function display_xml_error($error, $xml)
<screen>
<![CDATA[
<titles>PHP: Behind the Parser</title>
----------------------------------------------^
-----------------------------------------^
Fatal Error 76: Opening and ending tag mismatch: titles line 4 and title
Line: 4
Column: 46
Column: 41

--------------------------------------------
]]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,14 @@ var_dump($dd->validate());
string(10) "-//FOO/BAR"
string(25) "http://example.com/foobar"
array(4) {
["directory"] => NULL
["intSubName"] => NULL
["extSubURI"] => NULL
["extSubSystem"] => NULL
["directory"]=>
NULL
["intSubName"]=>
NULL
["extSubURI"]=>
NULL
["extSubSystem"]=>
NULL
}
bool(true)
]]>
Expand Down
3 changes: 1 addition & 2 deletions reference/pcre/functions/preg-replace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,7 @@ echo $count; //3
&example.outputs;
<screen>
<![CDATA[
xp***to
3
xp***to3
]]>
</screen>
</example>
Expand Down
20 changes: 10 additions & 10 deletions reference/reflection/reflectionclass/getdefaultproperties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ var_dump($reflectionClass->getDefaultProperties());
<screen>
<![CDATA[
array(5) {
["staticProperty"]=>
string(14) "staticProperty"
["property"]=>
string(15) "propertyDefault"
["privateProperty"]=>
string(22) "privatePropertyDefault"
["defaultlessProperty"]=>
NULL
["inheritedProperty"]=>
string(16) "inheritedDefault"
["staticProperty"]=>
string(14) "staticProperty"
["property"]=>
string(15) "propertyDefault"
["privateProperty"]=>
string(22) "privatePropertyDefault"
["defaultlessProperty"]=>
NULL
["inheritedProperty"]=>
string(16) "inheritedDefault"
}
]]>
</screen>
Expand Down
Loading