Re: [RFC] path_join function
| From: | Gunnard engebreth | Date: | Wed, 17 May 2023 16:24:25 +0000 |
| Subject: | Re: [RFC] path_join function | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120329@lists.php.net to get a copy of this message | ||
hello!
On 5/17/23 10:53 AM, Mikhail Galanin via internals wrote:
Hi, Thank you for the proposal - it echoes somewhere inside me. Just a little side-view of the problem... Personally, I will be a fan of Kotlin-style Path API E.g., the path is an object so we can get path items, and get sub-path/resolve child nodes. It appeared to be quite useful in practice. Examples: - https://stonesoupprogramming.com/2017/11/27/kotlin-path-interface/ - https://www.baeldung.com/kotlin/kotlin-path-api On Wed, May 17, 2023 at 4:36 PM Tim Düsterhus <tim@bastelstu.be> wrote:Hi On 5/17/23 16:54, php@shyim.de wrote:Maybe im missing something here but the already availableWhen you concat just the paths you have to think about: - normalize string part to strip ending slashWhy is it necessary to strip the ending slash?- for windows compatibility you have to use DIRECTORY_SEPERATORI don't use Windows, but to the best of my knowledge, using the '/' is equivalent to the backslash. Is there a case where the difference matters?I am really looking for your feedback, right now I have no “karma points” to create a RFC in the wiki :)If you want to proceed with an actual RFC, the folks handing out the RFC karma would need your Wiki name. Best regards Tim Düsterhus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.phpdirname()does this. right? https://www.php.net/manual/en/function.dirname.php