Hi, I have a script:
<?php $string1 = $string2 = ''; registry_get_value("Software\\Microsoft\\Internet Explorer", "version", $string1); /// this is 62600.0000 in the registry registry_get_value("Software\\Microsoft\\Internet Explorer", "build", $string2); // this is 6.0.26000.0000 in the registry echo "String1<BR>"; var_dump($string1); echo "<BR>String2<BR>"; var_dump($string2); ?> // which outputs String1 string(10) "62600.0000" String2 string(10) "62600.0000" registry_get_value() is a function I've implemented in an extension and retrieves values from the registry, setting the third parameter passed, to be the value from the registry. In the script above though $string1 and $string2 seem to be linked to each other. I didn't think that $string1 = $string2 = ''; is supposed to set up the variables as references. If I change the first line of the script to $string1 = ''; $string2 = ''; I get output as expected, i.e. string1 = 62600.0000 and string2 = 6.0.26000.0000 . Is this expected behaviour or is it likely that I've done something wrong in my extension source. I'm currently using zend_parse_parameters to get the third argument as a zval which I then set to the required value using ZVAL_STRING(zThirdArg, szValueFromRegistry, 1); This seems to work fine in every case except the one above. So is it expected behaviour or is it me? Tested on php v4.1.1 and v4.2.3, as apache module, 1.3.26 on windows NT4 sp6a TIA Pete -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php