Conversation
|
Hmm, where is the appendix? :) |
cmb69
left a comment
There was a problem hiding this comment.
I wonder whether the numeric-strings.xml file should better go into language/types/?
I was thinking about that but it's not really a type, so I thought an appendix might be better. But that's easily changeable. |
|
Well, neither declarations nor type-juggling are types. :) |
That's true... let me rework it |
language/types/float.xml
Outdated
|
|
||
| <note> | ||
| <para> | ||
| A notice is thrown if an <type>object</type> is converted to <type>float</type>. |
There was a problem hiding this comment.
I wonder why this note exits, as the same applies for integers but there it's just declared undefined behaviour (which would also apply for objects...)
There was a problem hiding this comment.
See https://github.com/php/doc-en/pull/156/files#diff-4af4f41802cf4b045bb14a24dfac1bea5f6bf1682797f0bf22c98925b8af0a60L92-R99. Apparently, that was not the case in PHP 4; could probably drop that note.
| The behaviour of an automatic conversion to <type>array</type> is currently | ||
| undefined. | ||
| An <type>array</type> cannot be coerced and will throw a | ||
| <classname>TypeError</classname> as of PHP 8.0.0. | ||
| Previously the behaviour was undefined. |
There was a problem hiding this comment.
Just realised that I probably misunderstood this note, probably should revert this.
Add a dedicated appendix explaining numeric strings, drive-by fixes.