2009-06-30 08:09:20 +00:00
|
|
|
<?php
|
|
|
|
|
2009-06-30 08:10:17 +00:00
|
|
|
echo "<pre>";
|
2009-06-30 08:09:20 +00:00
|
|
|
|
|
|
|
require_once realpath( 'functions.php' );
|
|
|
|
|
|
|
|
$dns1 = array( 'cn=joe,dc=example,dc=com', 'cn=joe,dc=example,dc=com', 'cn = bob, dc= example,dc =com' );
|
|
|
|
$dns2 = array( 'cn=joe,dc=example,dc=com', 'CN =joe,dc=Example,dc =com', 'cn= bob, dc= example,dc =com' );
|
|
|
|
|
|
|
|
for( $i=0; $i<count($dns1); $i++ ) {
|
|
|
|
var_dump( pla_compare_dns( $dns1[$i], $dns2[$i] ) );
|
|
|
|
echo "\n";
|
|
|
|
}
|
|
|
|
|
2009-06-30 08:10:17 +00:00
|
|
|
// TESTING PLA_EXPLODE_DN()
|
|
|
|
var_dump( pla_explode_dn( "cn=<stuff>,dc=example,dc=<com>" ) );
|
|
|
|
var_dump( ldap_explode_dn( "cn=<stuff>,dc=example,dc=<com>", 0 ) );
|