[PHP] Converting binary data
Hi I'm retriving some binary data from a Interbase blob field (a custom format to do some drawing) into a php variable like this: $blh = ibase_blob_open($row[4]); while ($blob = ibase_blob_get($blh, 400)) $Objects .= $blob; ibase_blob_close($blh); Now I want to tell php to get first 4 bytes (btw, is there something that returns size of integer - sizeof seems to work on arrays only), and convert them to integer Thanks Lucijan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Object reference
I can't understand why this works like it does. class MyObj { var $Name; function MyObj($Name) { $this-Name = $Name; } } $a = new MyObj('MyObjName'); $b = $a; $b-Name = 'NoName'; echo $a-Name; Last line will output 'MyObjName' instead of 'NoName' (like I was expecting) I'd expect $a and $b to behave like reference pointers (change in $b is reflected in $a and vice versa) instead of copiing $a to $b (beiing a Delphi programmer this is as natural to me as the Sun raising in east and setting in west :-) So, is there a way to do this; pointers or something maybe? Lucijan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Object reference
Use to reference one variable to another! $b = $a; Thanks. Lucijan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php