Re: [PHP-DEV] [RFC] path_join function

2023-06-27 Thread Tim Düsterhus
Hi Soner On 5/17/23 23:49, p...@shyim.de wrote: Yes I would like to work on an proper RFC and make thoughts on the already given feedback here :) My wiki name is: shyim Please apologize this large delay in handling your request. The number of folks with the necessary permissions is small (b

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Tim Düsterhus
Hi Please do not "top-post". Instead reply inline and cut the quoted parts to a minimum. On 5/17/23 23:49, p...@shyim.de wrote: No stripping would be needed at the end :) I don't follow then. Yes I would like to work on an proper RFC and make thoughts on the already given feedback here :

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread David Gebler
On Wed, May 17, 2023 at 4:31 PM Chase Peeler wrote: > Definitely a useful feature, but not sure it needs to be a core function. > > I feel the same. There are countless useful utility functions which could exist in core, many of which are even widely used and commonly reinvented as userland funct

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread php
No stripping would be needed at the end :) Yes I would like to work on an proper RFC and make thoughts on the already given feedback here :) My wiki name is: shyim Thanks! > On 17. May 2023, at 17:36, Tim Düsterhus wrote: > > Hi > > On 5/17/23 16:54, p...@shyim.de wrote: >> When you concat

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Pierre du Plessis
On Wed, 17 May 2023 at 18:24, Gunnard engebreth wrote: > > > Maybe im missing something here but the already available `dirname()` > does this. right? > https://www.php.net/manual/en/function.dirname.php > > dirname just traverses up the directory, it doesn't join paths. For example, this exampl

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Gunnard engebreth
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-pat

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Mikhail Galanin via internals
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.

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Tim Düsterhus
Hi On 5/17/23 16:54, p...@shyim.de wrote: When you concat just the paths you have to think about: - normalize string part to strip ending slash Why is it necessary to strip the ending slash? - for windows compatibility you have to use DIRECTORY_SEPERATOR I don't use Windows, but to the be

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Chase Peeler
On Wed, May 17, 2023 at 11:13 AM Timo Tijhof wrote: > In case it is of interest, the implementation we use on Wikipedia > as part of MediaWiki, is available on Packagist: > > https://packagist.org/packages/wikimedia/relpath > https://www.mediawiki.org/wiki/RelPath > > -- > Timo Tijhof, > Wikimedi

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Timo Tijhof
In case it is of interest, the implementation we use on Wikipedia as part of MediaWiki, is available on Packagist: https://packagist.org/packages/wikimedia/relpath https://www.mediawiki.org/wiki/RelPath -- Timo Tijhof, Wikimedia Foundation. https://timotijhof.net/ On Wed, May 17, 2023 at 3:54 

Re: [PHP-DEV] [RFC] path_join function

2023-05-17 Thread Lynn
On Wed, May 17, 2023 at 4:54 PM wrote: > Hey, > > I have created on GitHub a feature request for a path_join function ( > https://github.com/php/php-src/issues/11258) and got the label that this > requires a RFC. So I am here now :) > > The idea is to provide in PHP itself a function to join file

[PHP-DEV] [RFC] path_join function

2023-05-17 Thread php
Hey, I have created on GitHub a feature request for a path_join function (https://github.com/php/php-src/issues/11258) and got the label that this requires a RFC. So I am here now :) The idea is to provide in PHP itself a function to join filesystem paths (idea: path_join) like in other langua