ID: 14538 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Any PHP Version: 4.1.0 New Comment:
This bug has been fixed in CVS. Previous Comments: ------------------------------------------------------------------------ [2001-12-15 20:59:17] [EMAIL PROTECTED] Reclassifying as a documentation problem (and reopened). Manuel did a good job tracking down when the behaviour of dirname() has changed and it won't hurt us putting this information into the documentation. ------------------------------------------------------------------------ [2001-12-15 20:19:58] [EMAIL PROTECTED] Daniel, I don't think you are realizing how serious this is! dirname was added to PHP 3.0a3 which was released more than 4 years ago. Until a year ago it had a behaviour that Andi thought it was not correct, so he fixed it for PHP 4.0.3 eventually breaking the code of people that did not realize it then because they don't upgrade PHP on every minor release. So, the point is that what he thought was just a fix, was rather a behaviour change but he really didn't realize it until I reported today. I am not proposing a php.ini option. What I am saying is: 1) Admit that Andi did not make a wise decision then and so avoid any future decisions like this. 2) Decisions like this break end users code and prevents them from upgrading. 3) Everytime a developer faces a decision like this, always provide a backwards compatible solution to not cause harm to people code base and not hurt their applications or even their businesses. I think PHP developers were wise enough to avoid backwards compatibily problems of registering global by having a php.ini switch. I don't see why that could be bad for dirname. I am not even saying that you should always add a php.ini switch, but at least is a solution that does not leave people out there in the cold. ------------------------------------------------------------------------ [2001-12-15 19:50:54] [EMAIL PROTECTED] Actually, you both (Zeev and Manuel) are demanding the same thing, in case you didn't recognize. You both want a high backwards compatibility, but whereas Manuel is proposing a switch in php.ini for every little thing, Zeev rather prefers to have this compatibility "out of the box" (i.e. every script should run with the same behaviour on every PHP installation - which isn't 100% possible, what he accepts). providing seperate switches for every little thing would extremely complexify PHP programming, as you have to take care of every additional switch in PHP, therefore I agree with Zeev. The best thing would be to never change a language behaviour, but sometimes it seems to be unavoidable. ------------------------------------------------------------------------ [2001-12-15 19:06:47] [EMAIL PROTECTED] Zeev, As always I am trying to be constructive here. I am trying to bring the attention to the fact that as in the past, many ISPs did not upgrade from old PHP versions because they have bad experiences of having their clients code broken in new PHP versions. In this case, an old PHP version is 4.0.0 which is the previous major version. If you decide to not be sensitive to this point , I am afraid you will be leaving a lot of people annoyed and loosing business. As to the eventual accusation of being unprofessional, I mean that I am afraid that it will be what other people will think about who made these backward incompatible changes. Forget that I am the person reporting here. I am not relying on that you ever make a wise decision regarding this. I'll have to make my code work similarly to what you suggested because I am well aware of the problem, but I am afraid that most people isn't. I was just trying to help you avoid any future problems of credibility and professionalism before other people that may arise from these backward incompatible incidents (I am afraid there are more issues than just dirname). I am just trying to help here, I regret the fact that my report is just being discarded as if I never made it to help you release PHP with a more professional attitude. Anyway, I am used to this systematic "ignore Manuel Lemos" atitude of yours. So, do whatever you think is best for your business and keep not caring about me spending time to help you. :-( ------------------------------------------------------------------------ [2001-12-15 18:47:57] [EMAIL PROTECTED] Manuel, This behavior is not going to change, and we're not going to introduce a new headache-causing INI option to toggle this behavior. If you really can't fix the code, you can create my_dirname() that wraps around dirname, and returns "" if the result is "". Then, all you have to do is a search&replace of dirname -> my_dirname. You use this 'threat' of being accused in unprofessionalism a bit too often, in my humble opinion :) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/14538 -- Edit this bug report at http://bugs.php.net/?id=14538&edit=1