diff --git a/language/control-structures/foreach.xml b/language/control-structures/foreach.xml
index ded0de4dee78..a424f4964612 100644
--- a/language/control-structures/foreach.xml
+++ b/language/control-structures/foreach.xml
@@ -177,6 +177,8 @@ foreach ($array as list($a, $b)) {
diff --git a/language/control-structures/goto.xml b/language/control-structures/goto.xml
index 9422253da580..b16af828acac 100644
--- a/language/control-structures/goto.xml
+++ b/language/control-structures/goto.xml
@@ -95,6 +95,8 @@ echo "$i = $i";
diff --git a/language/control-structures/match.xml b/language/control-structures/match.xml
index 9d663afe0e07..6735f154d18a 100644
--- a/language/control-structures/match.xml
+++ b/language/control-structures/match.xml
@@ -228,7 +228,7 @@ object(UnhandledMatchError)#1 (7) {
["file":protected]=>
string(6) "script"
["line":protected]=>
- int(6)
+ int(5)
["trace":"Error":private]=>
array(0) {
}
diff --git a/language/control-structures/switch.xml b/language/control-structures/switch.xml
index 3b4303a4a7f0..cd829abd611d 100644
--- a/language/control-structures/switch.xml
+++ b/language/control-structures/switch.xml
@@ -336,14 +336,15 @@ switch($beer)
&example.outputs;
diff --git a/language/oop5/basic.xml b/language/oop5/basic.xml
index 74d188eaa695..ea87be554544 100644
--- a/language/oop5/basic.xml
+++ b/language/oop5/basic.xml
@@ -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"
}
]]>
@@ -535,7 +535,7 @@ $extended->displayVar();
diff --git a/language/oop5/lazy-objects.xml b/language/oop5/lazy-objects.xml
index a985e53da624..ec99a2e0afed 100644
--- a/language/oop5/lazy-objects.xml
+++ b/language/oop5/lazy-objects.xml
@@ -82,8 +82,8 @@ var_dump($lazyObject->prop);
-uninitialized(int)
+ ["prop"]=>
+ uninitialized(int)
}
string(7) "Example"
Example::__construct
diff --git a/language/oop5/overloading.xml b/language/oop5/overloading.xml
index dd2ec3cbba04..d9ccc717343d 100644
--- a/language/oop5/overloading.xml
+++ b/language/oop5/overloading.xml
@@ -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 on line 70 in on line 29
+Notice: Undefined property via __get(): hidden in script on line 71 in script on line 27
]]>
diff --git a/language/types/array.xml b/language/types/array.xml
index a45389522570..9f1e66310b58 100644
--- a/language/types/array.xml
+++ b/language/types/array.xml
@@ -1124,10 +1124,10 @@ var_dump((array) new B());
- NULL
["AA"]=>
NULL
+ ["BA"]=>
+ NULL
["AA"]=>
NULL
}
diff --git a/language/types/callable.xml b/language/types/callable.xml
index 1b9fa4aa8ebc..71df364a1bcb 100644
--- a/language/types/callable.xml
+++ b/language/types/callable.xml
@@ -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!
]]>
diff --git a/reference/array/functions/array-fill.xml b/reference/array/functions/array-fill.xml
index 8c8e822eea0a..9265b98ad076 100644
--- a/reference/array/functions/array-fill.xml
+++ b/reference/array/functions/array-fill.xml
@@ -124,11 +124,11 @@ print_r($a);
banana
- [6] => banana
- [7] => banana
- [8] => banana
- [9] => banana
+ [5] => banana
+ [6] => banana
+ [7] => banana
+ [8] => banana
+ [9] => banana
[10] => banana
)
]]>
diff --git a/reference/array/functions/array-map.xml b/reference/array/functions/array-map.xml
index b1c6a8aacfa2..e1e59abcb647 100644
--- a/reference/array/functions/array-map.xml
+++ b/reference/array/functions/array-map.xml
@@ -167,6 +167,14 @@ Array
[3] => 8
[4] => 10
)
+Array
+(
+ [0] => 2
+ [1] => 4
+ [2] => 6
+ [3] => 8
+ [4] => 10
+)
]]>
diff --git a/reference/array/functions/array-udiff-assoc.xml b/reference/array/functions/array-udiff-assoc.xml
index dd1e023486fe..d03f53bf32e1 100644
--- a/reference/array/functions/array-udiff-assoc.xml
+++ b/reference/array/functions/array-udiff-assoc.xml
@@ -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
)
+
)
]]>
diff --git a/reference/array/functions/array-unique.xml b/reference/array/functions/array-unique.xml
index 88a79d128721..2ec4980816ab 100644
--- a/reference/array/functions/array-unique.xml
+++ b/reference/array/functions/array-unique.xml
@@ -158,8 +158,10 @@ var_dump($result);
int(4)
- [2] => string(1) "3"
+ [0]=>
+ int(4)
+ [2]=>
+ string(1) "3"
}
]]>
diff --git a/reference/array/functions/array-unshift.xml b/reference/array/functions/array-unshift.xml
index bcb308139d0b..111d17349855 100644
--- a/reference/array/functions/array-unshift.xml
+++ b/reference/array/functions/array-unshift.xml
@@ -101,13 +101,13 @@ var_dump($queue);
+ [0]=>
string(5) "apple"
- [1] =>
+ [1]=>
string(9) "raspberry"
- [2] =>
+ [2]=>
string(6) "orange"
- [3] =>
+ [3]=>
string(6) "banana"
}
]]>
diff --git a/reference/array/functions/natsort.xml b/reference/array/functions/natsort.xml
index e88a1c13e8c6..ed33dc1b0f80 100644
--- a/reference/array/functions/natsort.xml
+++ b/reference/array/functions/natsort.xml
@@ -153,7 +153,6 @@ Array
[1] => 3
[5] => 9
)
-
Zero padding
Array
(
@@ -168,8 +167,8 @@ Array
(
[5] => 0
[1] => 8
- [3] => 009
[0] => 09
+ [3] => 009
[2] => 10
[4] => 011
)
diff --git a/reference/datetime/formats.xml b/reference/datetime/formats.xml
index 7a4d96fb53e8..ad3fb08a8be5 100644
--- a/reference/datetime/formats.xml
+++ b/reference/datetime/formats.xml
@@ -90,7 +90,7 @@ var_dump($res["warnings"]);
+ [11]=>
string(27) "The parsed date was invalid"
}
]]>
diff --git a/reference/datetime/functions/date-default-timezone-get.xml b/reference/datetime/functions/date-default-timezone-get.xml
index b949851ef160..e3740af77c2d 100644
--- a/reference/datetime/functions/date-default-timezone-get.xml
+++ b/reference/datetime/functions/date-default-timezone-get.xml
@@ -83,7 +83,8 @@ date.timezone: Europe/London
' . date('e') . ' => ' . date('T');
+$ts = mktime(0, 0, 0, 1, 1, 2024);
+echo date_default_timezone_get() . ' => ' . date('e') . ' => ' . date('T', $ts);
]]>
&example.outputs;
diff --git a/reference/datetime/functions/date-sun-info.xml b/reference/datetime/functions/date-sun-info.xml
index 6b9a781ee1d7..185e446e52cd 100644
--- a/reference/datetime/functions/date-sun-info.xml
+++ b/reference/datetime/functions/date-sun-info.xml
@@ -282,7 +282,7 @@ echo "Length of day: ",
&example.outputs;
diff --git a/reference/dom/dom/characterdata/before.xml b/reference/dom/dom/characterdata/before.xml
index 3bcf13ae87ba..9ec57f225cbb 100644
--- a/reference/dom/dom/characterdata/before.xml
+++ b/reference/dom/dom/characterdata/before.xml
@@ -40,7 +40,7 @@ echo $doc->saveXML();
&example.outputs;
+
hello
]]>
diff --git a/reference/dom/dom/characterdata/remove.xml b/reference/dom/dom/characterdata/remove.xml
index fa9b2a31c617..3ebe46d05d37 100644
--- a/reference/dom/dom/characterdata/remove.xml
+++ b/reference/dom/dom/characterdata/remove.xml
@@ -39,7 +39,7 @@ echo $doc->saveXML();
&example.outputs;
+
]]>
diff --git a/reference/dom/dom/characterdata/replacewith.xml b/reference/dom/dom/characterdata/replacewith.xml
index 9e41aad17c45..9a3baa081502 100644
--- a/reference/dom/dom/characterdata/replacewith.xml
+++ b/reference/dom/dom/characterdata/replacewith.xml
@@ -40,7 +40,7 @@ echo $doc->saveXML();
&example.outputs;
+
beautiful
]]>
diff --git a/reference/dom/dom/htmldocument/createfromstring.xml b/reference/dom/dom/htmldocument/createfromstring.xml
index c7dc4f8f3d51..4207ba4aa8b0 100644
--- a/reference/dom/dom/htmldocument/createfromstring.xml
+++ b/reference/dom/dom/htmldocument/createfromstring.xml
@@ -85,7 +85,7 @@ echo $dom->saveHtml();
- Hello, world!
+ Hello, world!
]]>
diff --git a/reference/dom/domdocument/append.xml b/reference/dom/domdocument/append.xml
index fde57677de18..a7330f8b99ad 100644
--- a/reference/dom/domdocument/append.xml
+++ b/reference/dom/domdocument/append.xml
@@ -43,6 +43,7 @@ echo $doc->saveXML();
&example.outputs;
beautiful
diff --git a/reference/dom/domdocumentfragment/replacechildren.xml b/reference/dom/domdocumentfragment/replacechildren.xml
index a7fc0f64640e..44ffb1221e92 100644
--- a/reference/dom/domdocumentfragment/replacechildren.xml
+++ b/reference/dom/domdocumentfragment/replacechildren.xml
@@ -45,8 +45,7 @@ echo $doc->saveXML($fragment);
&example.outputs;
+beautiful
]]>
diff --git a/reference/dom/domelement/before.xml b/reference/dom/domelement/before.xml
index c51c2c788646..4e7b2f1538f0 100644
--- a/reference/dom/domelement/before.xml
+++ b/reference/dom/domelement/before.xml
@@ -44,6 +44,7 @@ echo $doc->saveXML();
&example.outputs;
hello
diff --git a/reference/dom/domelement/getattributenames.xml b/reference/dom/domelement/getattributenames.xml
index 3e3cb67ed516..58c52fac93fb 100644
--- a/reference/dom/domelement/getattributenames.xml
+++ b/reference/dom/domelement/getattributenames.xml
@@ -46,12 +46,12 @@ var_dump($dom->documentElement->getAttributeNames());
- 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"
}
]]>
diff --git a/reference/dom/domnode/getlineno.xml b/reference/dom/domnode/getlineno.xml
index 6a8ccd44c1b5..fa05a3de839e 100644
--- a/reference/dom/domnode/getlineno.xml
+++ b/reference/dom/domnode/getlineno.xml
@@ -60,7 +60,7 @@ printf('The tag is defined on line %d', $dom->getElementsByTagName('node'
&example.outputs;
tag is defined in line 3
+The tag is defined on line 3
]]>
diff --git a/reference/libxml/functions/libxml-get-errors.xml b/reference/libxml/functions/libxml-get-errors.xml
index dbcfac898b78..03a8fe4e667c 100644
--- a/reference/libxml/functions/libxml-get-errors.xml
+++ b/reference/libxml/functions/libxml-get-errors.xml
@@ -103,10 +103,10 @@ function display_xml_error($error, $xml)
PHP: Behind the Parser
-----------------------------------------------^
+-----------------------------------------^
Fatal Error 76: Opening and ending tag mismatch: titles line 4 and title
Line: 4
- Column: 46
+ Column: 41
--------------------------------------------
]]>
diff --git a/reference/libxml/functions/libxml-set-external-entity-loader.xml b/reference/libxml/functions/libxml-set-external-entity-loader.xml
index fcff518c25b6..49527aa52b2a 100644
--- a/reference/libxml/functions/libxml-set-external-entity-loader.xml
+++ b/reference/libxml/functions/libxml-set-external-entity-loader.xml
@@ -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)
]]>
diff --git a/reference/pcre/functions/preg-replace.xml b/reference/pcre/functions/preg-replace.xml
index cfee1a313ee8..40f35caba48c 100644
--- a/reference/pcre/functions/preg-replace.xml
+++ b/reference/pcre/functions/preg-replace.xml
@@ -282,8 +282,7 @@ echo $count; //3
&example.outputs;
diff --git a/reference/reflection/reflectionclass/getdefaultproperties.xml b/reference/reflection/reflectionclass/getdefaultproperties.xml
index 068d931a5074..66e271cd8ce1 100644
--- a/reference/reflection/reflectionclass/getdefaultproperties.xml
+++ b/reference/reflection/reflectionclass/getdefaultproperties.xml
@@ -68,16 +68,16 @@ var_dump($reflectionClass->getDefaultProperties());
- 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"
}
]]>
diff --git a/reference/reflection/reflectionclass/getdoccomment.xml b/reference/reflection/reflectionclass/getdoccomment.xml
index 650d2e504cd3..ab3b1392703d 100644
--- a/reference/reflection/reflectionclass/getdoccomment.xml
+++ b/reference/reflection/reflectionclass/getdoccomment.xml
@@ -56,7 +56,7 @@ var_dump($rc->getDocComment());
&example.outputs;
getName();
+echo (new \ReflectionConstant('Foo\BAR'))->getShortName();
?>
]]>
diff --git a/reference/simplexml/functions/simplexml-load-string.xml b/reference/simplexml/functions/simplexml-load-string.xml
index 2003795e80fc..b3b9da19e54e 100644
--- a/reference/simplexml/functions/simplexml-load-string.xml
+++ b/reference/simplexml/functions/simplexml-load-string.xml
@@ -127,11 +127,12 @@ print_r($xml);
Forty What?
- [from] => Joe
- [to] => Jane
- [body] =>
- I know that's the answer -- but what's the question?
+ [title] => Forty What?
+ [from] => Joe
+ [to] => Jane
+ [body] =>
+ I know that's the answer -- but what's the question?
+
)
]]>
diff --git a/reference/simplexml/simplexmlelement/children.xml b/reference/simplexml/simplexmlelement/children.xml
index 28ccfbb8badd..bb23775c3527 100644
--- a/reference/simplexml/simplexmlelement/children.xml
+++ b/reference/simplexml/simplexmlelement/children.xml
@@ -94,8 +94,7 @@ foreach ($xml->children() as $second_gen) {
&example.outputs;
diff --git a/reference/simplexml/simplexmlelement/getDocNamespaces.xml b/reference/simplexml/simplexmlelement/getDocNamespaces.xml
index 7d17fe92d94f..3b1132bcf49b 100644
--- a/reference/simplexml/simplexmlelement/getDocNamespaces.xml
+++ b/reference/simplexml/simplexmlelement/getDocNamespaces.xml
@@ -82,8 +82,8 @@ var_dump($namespaces);
- string(21) "http://example.org/ns"
+ ["p"]=>
+ string(21) "http://example.org/ns"
}
]]>
diff --git a/reference/strings/functions/explode.xml b/reference/strings/functions/explode.xml
index 4e186e77a108..4b26c4834bab 100644
--- a/reference/strings/functions/explode.xml
+++ b/reference/strings/functions/explode.xml
@@ -163,20 +163,22 @@ var_dump( explode( ',', $input3 ) );
&example.outputs;
string(5) "hello"
-)
-array(2)
-(
- [0] => string(5) "hello"
- [1] => string(5) "there"
-)
-array(2)
-(
- [0] => string(0) ""
- [1] => string(0) ""
-)
+array(1) {
+ [0]=>
+ string(5) "hello"
+}
+array(2) {
+ [0]=>
+ string(5) "hello"
+ [1]=>
+ string(5) "there"
+}
+array(2) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+}
]]>
diff --git a/reference/strings/functions/htmlentities.xml b/reference/strings/functions/htmlentities.xml
index 7e612d0c721c..0368910464d6 100644
--- a/reference/strings/functions/htmlentities.xml
+++ b/reference/strings/functions/htmlentities.xml
@@ -207,7 +207,7 @@ echo htmlentities($str, ENT_COMPAT);
diff --git a/reference/strings/functions/ltrim.xml b/reference/strings/functions/ltrim.xml
index 1a2d35a09b88..44ea4a44acf8 100644
--- a/reference/strings/functions/ltrim.xml
+++ b/reference/strings/functions/ltrim.xml
@@ -88,8 +88,8 @@ var_dump($clean);
&example.outputs;
diff --git a/reference/strings/functions/str-word-count.xml b/reference/strings/functions/str-word-count.xml
index 3f5cc84c0a9e..9ae7ccdd82f8 100644
--- a/reference/strings/functions/str-word-count.xml
+++ b/reference/strings/functions/str-word-count.xml
@@ -149,18 +149,16 @@ Array
[5] => good
[6] => today
)
-
Array
(
[0] => Hello
[6] => fri
[10] => nd
[14] => you're
- [29] => looking
- [46] => good
- [51] => today
+ [28] => looking
+ [45] => good
+ [50] => today
)
-
Array
(
[0] => Hello
@@ -170,7 +168,6 @@ Array
[4] => good
[5] => today
)
-
7
]]>
diff --git a/reference/strings/functions/strtok.xml b/reference/strings/functions/strtok.xml
index e1a3076198ac..0607bff3f46c 100644
--- a/reference/strings/functions/strtok.xml
+++ b/reference/strings/functions/strtok.xml
@@ -145,8 +145,8 @@ var_dump($first_token, $second_token);
&example.outputs;
diff --git a/reference/strings/functions/trim.xml b/reference/strings/functions/trim.xml
index 7813d77128b8..6c1f0c1354c6 100644
--- a/reference/strings/functions/trim.xml
+++ b/reference/strings/functions/trim.xml
@@ -89,8 +89,8 @@ var_dump($clean);
&example.outputs;
Uri\Rfc3986\Uri::withFragment basic example
withFragment("bar");
diff --git a/reference/xmlwriter/xmlwriter/writecdata.xml b/reference/xmlwriter/xmlwriter/writecdata.xml
index 323a7ad1532a..0e010c3d190b 100644
--- a/reference/xmlwriter/xmlwriter/writecdata.xml
+++ b/reference/xmlwriter/xmlwriter/writecdata.xml
@@ -95,9 +95,10 @@ echo $xml->outputMemory(true);
&example.outputs;
-
+
]]>