Error - passing variables by reference
2 posts
• Page 1 of 1
Error - passing variables by reference
I have following code:
<?
$info=array();
getimagesize ("c:\\temp\\HPIM3517.JPG",$info);
var_dump($info);
?>
On PHP 4 works fine, on Phalanger 2 works not :-(
If I rewrite this code to Visual Basic it also doesn't work.
The $info variable should return some info about an image, so it's passed by reference. I tryed placing & before it with no effect.
IMHO the problem is that Phalanger doesn't pass the variable as reference, so it cannot return value :-(
Is there any way to fix it?
thx
<?
$info=array();
getimagesize ("c:\\temp\\HPIM3517.JPG",$info);
var_dump($info);
?>
On PHP 4 works fine, on Phalanger 2 works not :-(
If I rewrite this code to Visual Basic it also doesn't work.
The $info variable should return some info about an image, so it's passed by reference. I tryed placing & before it with no effect.
IMHO the problem is that Phalanger doesn't pass the variable as reference, so it cannot return value :-(
Is there any way to fix it?
thx
- Dzonny@codeplex
- Posts: 4
- Joined: January 7th, 2012, 8:54 pm
RE: Error - passing variables by reference
Hi,
I will look into this issue. Thanks for the feedback.
Btw, if you don't need extended information about the image you can use the getimagesize function in the following way:
$info = getimagesize("c:\\temp\\HPIM3517.JPG");
But the second parameter doesn't work - It is probably a problem in interoperability with PHP extension, because you can use references in Phalanger otherwise.
Tomas
I will look into this issue. Thanks for the feedback.
Btw, if you don't need extended information about the image you can use the getimagesize function in the following way:
$info = getimagesize("c:\\temp\\HPIM3517.JPG");
But the second parameter doesn't work - It is probably a problem in interoperability with PHP extension, because you can use references in Phalanger otherwise.
Tomas
- tomasp
- Posts: 46
- Joined: January 7th, 2012, 8:37 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 17 guests