# Deprecating php_dirname() in 5_3, removing in HEAD

- Thread: https://externals.io/message/35983
- Original archive: https://news-web.php.net/php.internals/35983
- Started by Lars Strojny on 2008-03-05T23:19:09+00:00
- Messages: 9
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #35983 — Lars Strojny — 2008-03-05T23:19:09+00:00

URL: https://externals.io/message/35983#35983

Hi,

I would like to deprecate php_dirname() in 5_3 as it has been moved to
the engine (zend_dirname()). Any concerns?

5_3: http://lars.schokokeks.org/php/5_3-deprecating-php_dirname.diff
HEAD: http://lars.schokokeks.org/php/HEAD-removing-php_dirname.diff

cu, Lars

---

## #35985 — Pierre Joye — 2008-03-06T00:22:38+00:00

URL: https://externals.io/message/35983#35985 · In reply to: #35983

hi,


> Hi,
>
>  I would like to deprecate php_dirname() in 5_3 as it has been moved to
>  the engine (zend_dirname()). Any concerns?
>
>  5_3: http://lars.schokokeks.org/php/5_3-deprecating-php_dirname.diff
>  HEAD: http://lars.schokokeks.org/php/HEAD-removing-php_dirname.diff

What's the gain of this change besides forcing code change and adding
more #ifdef? :)

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

---

## #35987 — Lars Strojny — 2008-03-06T00:26:12+00:00

URL: https://externals.io/message/35983#35987 · In reply to: #35985

Hi Pierre,

Am Donnerstag, den 06.03.2008, 01:22 +0100 schrieb Pierre Joye:
[...]
> > […]
> 
> What's the gain of this change besides forcing code change and adding
> more #ifdef? :)

Simply one useless alias less.

cu, Lars

---

## #35988 — Pierre Joye — 2008-03-06T00:30:43+00:00

URL: https://externals.io/message/35983#35988 · In reply to: #35987

> Hi Pierre,
>
>  Am Donnerstag, den 06.03.2008, 01:22 +0100 schrieb Pierre Joye:
>  [...]
>
> > […]
>
>  Simply one useless alias less.

I'm talking about extension developers. We will all have to add yet
another #ifdef for this function, in the implementation or to define
php_dirname to keep the implementation clean(er). As it is good to
clean up codes, I'm not sure to remove this function is a good thing.

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

---

## #35989 — Lars Strojny — 2008-03-06T00:32:56+00:00

URL: https://externals.io/message/35983#35989 · In reply to: #35988

Hi Pierre,

Am Donnerstag, den 06.03.2008, 01:30 +0100 schrieb Pierre Joye:
[...]
> I'm talking about extension developers. We will all have to add yet
> another #ifdef for this function, in the implementation or to define
> php_dirname to keep the implementation clean(er). As it is good to
> clean up codes, I'm not sure to remove this function is a good thing.

That's why I suggest removing it in 6, and deprecating it from now on.
As 6 "will break everything anyway".

cu, Lars

---

## #35990 — Pierre Joye — 2008-03-06T00:36:18+00:00

URL: https://externals.io/message/35983#35990 · In reply to: #35989

> Hi Pierre,
>
>  Am Donnerstag, den 06.03.2008, 01:30 +0100 schrieb Pierre Joye:
>  [...]
>
> > […]
>
>  That's why I suggest removing it in 6, and deprecating it from now on.
>  As 6 "will break everything anyway".

I go it but there is no easy to deprecate an internal function. Except
to spare two  #define php_(u)_dirname in HEAD, I still see no gain :)
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

---

## #35992 — David Coallier — 2008-03-06T02:52:52+00:00

URL: https://externals.io/message/35983#35992 · In reply to: #35990

> > […]
>
>  I go it but there is no easy to deprecate an internal function. Except
>  to spare two  #define php_(u)_dirname in HEAD, I still see no gain :)
>
>

Perhaps it's time to make a "compatibility" extension with all those
ifdefs everywhere and engine hooks.


-- 
David,
Re-read what you are replying.

---

## #35993 — Gwynne Raskind — 2008-03-06T02:56:52+00:00

URL: https://externals.io/message/35983#35993 · In reply to: #35992

> > […]
> Perhaps it's time to make a "compatibility" extension with all those
> ifdefs everywhere and engine hooks.


I'll +1 that. I'll even volunteer to maintain it, if someone who knows  
the engine better can give me a framework to start from.

-- Gwynne, Daughter of the Code
"This whole world is an asylum for the incurable."

---

## #36004 — Derick Rethans — 2008-03-06T15:33:21+00:00

URL: https://externals.io/message/35983#36004 · In reply to: #35992

> > […]
> 
> Perhaps it's time to make a "compatibility" extension with all those
> ifdefs everywhere and engine hooks.

That's fine, as long as nothing breaks. I'm with Pierre on this one. 

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
