Hi Andrew,
Welcome to the forum!
You didn't describe your environment (Ice version, operating system, PHP version, etc.), so I tried to reproduce this issue with Ice 3.3.1 on CentOS using the default PHP version (5.1.6). Everything works correctly with this combination.
However, I can see where the problem might lie. Add a call to Ice_dumpProfile to your PHP script:
Code:
<?php
Ice_loadProfile();
Ice_dumpProfile();
...
This will cause the Ice extension to display all of the PHP code it generates from your Slice definitions. In the output you'll see the following:
Code:
class opt4ice_priceRequestInfo
{
function __construct($productId=0, $customer='', $quantity=-1)
{
$this->productId = $productId;
$this->customer = $customer;
$this->quantity = $quantity == -1 ? new opt4ice_decimal() : $quantity;
}
The generated code is using the value -1 as a marker to determine whether the caller supplied a value for the argument. Apparently, the version of PHP you are using does not allow such a comparison.
We'll fix this bug in the next Ice release. Meanwhile, you can work around it as you suggested: by omitting the quantity argument and assigning the member after construction.
Let us know if you have any further questions.
Regards,
Mark