Re: Re: Re: [PECL-DEV] New PHP extension for Win32

From: Date: Tue, 19 Oct 2004 12:20:47 +0000
Subject: Re: Re: Re: [PECL-DEV] New PHP extension for Win32
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1485@lists.php.net to get a copy of this message
Hello Frank, I agree having more modules doing the same is definitely not the best thing. Unfortunately following functions differ in parameters and semantics (see http://winreg.wz.cz/manual/index.htm) in a way that compatibility would be broken: reg_create_key & winreg_create_key reg_enum_key & winreg_enum_key reg_enum_value & winreg_enum_value reg_set_value & winreg_set_value When I was writing the module, I was trying to preserve the order and meaning of API calls parameters, while enabling all the power of PHP. Surprisingly, it was quite successful and I think the design complies all what programmers would require: 1) Laziness support - saves typing, because the module adds some intelligence of its own. 2) All the power - if you want it, you can claim it. 3) Ease of debugging - every helpful information is accessible For these resons I would like to leave the design of the Winreg module unmodified. We could solve the problem by incorporating whole Winreg module into Win32std and (because it is a superset of Win32std registry functions) either leave the existing functions untouched, just marking them superceded, or map their functionality to Winreg counterparts to avoid the duplicities in the code. Third possibility would be to release "new" Win32std version, replacing the reg_* functions completely. If so, we should do this while the Win32std module is not yet so widespread (the download counter shows cca. 1000 downloads). In future I would really like to include some kind of registry support directly in the standard Win32 PHP distribution. The access to registry is very important on Windows platform and can be compared with files access on *nix systems. Please let me know what is your opinion. Regards, T. Pavlicek > >Hi Tomas, > >It Seams to me that your code has a few more functions than currently >available in the Win32std extension. I would like to see these functions >merged into the win32std extension. Having two different extensions with >the exact same functionality does not make sence to me. > >As the author of the registry functions in win32std I would like to offer >any help you might need to merge the functions, and to keep as much BC >with the current module as well as your extension as possible. > >- Frank > >> Unfortunately I found out that such extension exists very recently. >> I was trying to search the PECL archive for "registry" and "windows" >> keywords, but these brought no results. Only now, when all work was >done, >> a person on IRC told me about win32std. >> Because of this, I would consider merging the code rather >> contraproductive. From what I've seen in win32std my module provides >far >> superior functionality and "merging" the code would mean "replacing" >all >> the win32std code concerning the registry API. But doing so would >affect >> the compatibility with existing scripts using win32std. >> Therefore I would like to submit the module rather as a standalone >> extension fully covering the Windows registry topic. Due to registry >> access importance on Windows OS I'd like also you to consider it >> to become the part of standard Win32 distribution. >> >> T. Pavlicek

« previous php.pecl.dev (#1485) next »