diff --git a/reference/info/functions/assert.xml b/reference/info/functions/assert.xml index ab2dad4ddae4..9bcd9883e3d9 100644 --- a/reference/info/functions/assert.xml +++ b/reference/info/functions/assert.xml @@ -13,32 +13,32 @@ mixedassertion Throwablestringnulldescription&null; - + assert allows for the definition of expectations: assertions that take effect in development and testing environments, but are optimised away to have zero cost in production. - - + + Assertions can be used to aid debugging. One use case for them is to act as sanity-checks for preconditions that should always be &true; and that if they aren't upheld this indicates some programming errors. Another use case is to ensure the presence of certain features like extension functions or certain system limits and features. - - + + As assertions can be configured to be eliminated, they should not be used for normal runtime operations like input parameter checks. As a rule of thumb code should behave as expected even if assertion checking is deactivated. - - + + assert will check that the expectation given in assertion holds. If not, and thus the result is &false;, it will take the appropriate action depending on how assert was configured. - + The behaviour of assert is dictated by the @@ -121,7 +121,7 @@ assert.exception &true; - If &true; will throw an AssertionError if the + If &true; will throw an AssertionError if the expectation isn't upheld. @@ -165,20 +165,20 @@ assertion - + This is any expression that returns a value, which will be executed and the result is used to indicate whether the assertion succeeded or failed. - + - + Prior to PHP 8.0.0, if assertion was a string it was interpreted as PHP code and executed via eval. This string would be passed to the callback as the third argument. This behaviour was DEPRECATED in PHP 7.2.0, and REMOVED in PHP 8.0.0. - + @@ -187,40 +187,40 @@ If description is an instance of - Throwable, it will be thrown only if the + Throwable, it will be thrown only if the assertion is executed and fails. - + As of PHP 8.0.0, this is done prior to calling the potentially defined assertion callback. - + - + As of PHP 8.0.0, the &object; will be thrown regardless of the configuration of assert.exception. - + - + As of PHP 8.0.0, the assert.bail setting has no effect in this case. - + - + If description is a &string; this message will be used if an exception or a warning is emitted. An optional description that will be included in the failure message if the assertion fails. - - + + If description is omitted. A default description equal to the source code for the invocation of assert is created at compile time. - + @@ -229,21 +229,18 @@ &reftitle.returnvalues; - + assert will always return &true; if at least one of the following is true: - + zend.assertions=0 zend.assertions=-1 assert.active=0 - assert.exception=1 - assert.bail=1 - A custom exception object is passed to description. - + If none of the conditions are true assert will return &true; if assertion is truthy and &false; otherwise. - + @@ -278,7 +275,7 @@ 8.0.0 If description is an instance of - Throwable, the object is thrown if the assertion + Throwable, the object is thrown if the assertion fails, regardless of the value of assert.exception. @@ -287,7 +284,7 @@ 8.0.0 If description is an instance of - Throwable, no user callback is called even + Throwable, no user callback is called even if it set. @@ -332,10 +329,10 @@ assert(1 > 2); echo 'Hi!'; ]]> - + If assertions are enabled (zend.assertions=1) the above example will output: - + 2) in example.php:2 @@ -345,10 +342,10 @@ Stack trace: thrown in example.php on line 2 ]]> - + If assertions are disabled (zend.assertions=0 or zend.assertions=-1) the above example will output: - + 2, "Expected one to be greater than two"); echo 'Hi!'; ]]> - + If assertions are enabled the above example will output: - + - + If assertions are disabled the above example will output: - + 2, new ArithmeticAssertionError("Expected one to be greater than two" echo 'Hi!'; ]]> - + If assertions are enabled the above example will output: - + - + If assertions are disabled the above example will output: - + &reftitle.returnvalues; - + &return.success; If the functionality of loading modules is not available or has been disabled (by setting enable_dl off - in &php.ini;) an E_ERROR is emitted - and execution is stopped. If dl fails because the + in &php.ini;) an E_WARNING is emitted + and &false; is returned. If dl fails because the specified library couldn't be loaded, in addition to &false; an E_WARNING message is emitted. - + diff --git a/reference/info/functions/get-defined-constants.xml b/reference/info/functions/get-defined-constants.xml index e0d3f8d7c27a..0a01c80d565d 100644 --- a/reference/info/functions/get-defined-constants.xml +++ b/reference/info/functions/get-defined-constants.xml @@ -57,7 +57,7 @@ Array [E_USER_ERROR] => 256 [E_USER_WARNING] => 512 [E_USER_NOTICE] => 1024 - [E_ALL] => 2047 + [E_ALL] => 30719 [TRUE] => 1 ) @@ -124,7 +124,7 @@ Array [E_USER_ERROR] => 256 [E_USER_WARNING] => 512 [E_USER_NOTICE] => 1024 - [E_ALL] => 2047 + [E_ALL] => 30719 [TRUE] => 1 ) ]]> diff --git a/reference/info/functions/getrusage.xml b/reference/info/functions/getrusage.xml index 8d79689984d8..ef2dd3e32582 100644 --- a/reference/info/functions/getrusage.xml +++ b/reference/info/functions/getrusage.xml @@ -100,12 +100,11 @@ echo $dat["ru_stime.tv_sec"]; // system time used (seconds) - - If getrusage is called with mode - set to 1 (RUSAGE_CHILDREN), then - resource usage for threads are collected (meaning that internally the function - is called with RUSAGE_THREAD). - + + If getrusage is called with mode + set to 1 (RUSAGE_CHILDREN), then + resource usage for child processes are collected. + diff --git a/reference/info/versions.xml b/reference/info/versions.xml index 1309fa7bee9e..5c54a058a3ca 100644 --- a/reference/info/versions.xml +++ b/reference/info/versions.xml @@ -19,7 +19,6 @@ - @@ -28,7 +27,6 @@ -