Re: STH Docs.

From: Date: Tue, 28 Apr 2015 04:16:23 +0000
Subject: Re: STH Docs.
References: 1 2 3  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969385610@lists.php.net to get a copy of this message
W dniu 2015-04-27 o 23:50, Christoph Becker pisze:
Rowan Collins wrote:
Pasindu De Silva wrote on 27/04/2015 04:37:
I am doing some documentation for STH but not sure where to put it. Current type hintings are under oop5 (http://php.net/manual/en/language.oop5.typehinting.php). So should we make something called oop7 and put STH under that or else under oop5.
If I'm not mistaken oop5 had been introduced to cater to the massive change in the OO implementation of PHP 5, and to distinguish it from the oop section which referred to PHP 4. However, the PHP 4 documentation is mostly gone, so sometime oop5 might be renamed to oop. Anyhow, the OO related changes from PHP 5.6 to PHP 7 don't seem to necessitate an own oop7 section.
I cannot confirm whether was it actual reasoning back in that times, but it makes perfect sense, so I would be +1 on that change.
Technically, the new type hinting features have nothing to do with OOP, since the whole point is that we're hinting types other than objects. (Arguably, that was already true of "array" and "callable", added in 5.1 and 5.4, respectively.) I would have thought the page should be moved into either the "Types" chapter [1] (which covers Type Juggling) or the "Functions" chapter [2] (which covers things like default and variable-length argument lists), with a clear note about which parts are new to PHP 7.
+1
"language.oop5.typehinting" should then become some kind of redirect (I'm not sure what the options are for that outside function aliases...)
As far as I know, there are quite a few redirects already in place, so supposedly, this shouldn't be a particular issue.
Yes, is it should be quite easy to do. https://github.com/php/web-php/blob/master/error.php#L218
[1] http://php.net/manual/en/language.types.php [2] http://php.net/manual/en/language.functions.php


« previous php.doc (#969385610) next »