From:             
Operating system: 
PHP version:      5.4.0alpha2
Package:          SNMP related
Bug Type:         Feature/Change Request
Bug description:Please change SNMP::VERSION_ constants to sensible values

Description:
------------
Currently the SNMP::VERSION class constants have the following internal
values:

const integer SNMP::VERSION_1 = 0 ;
const integer SNMP::VERSION_2C = 1 ;
const integer SNMP::VERSION_2c = 1 ;
const integer SNMP::VERSION_3 = 3 ;

As PHP does not yet have the concept of Enums the documentation just says
that the first parameter has to be numeric so people will be tempted to
enter 1, 2 or 3 as paramter which results in hard to debug errors (it
mostly works just some OIDs do not).

Would there be any drawbacks if we change the internal values to 1, 2, 2,
3?
It's still Alpha so no Backward Compatibility problems.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=55312&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55312&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55312&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55312&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55312&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55312&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55312&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55312&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55312&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55312&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55312&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55312&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55312&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55312&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55312&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55312&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55312&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55312&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55312&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55312&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55312&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55312&r=mysqlcfg

Reply via email to