Open adamjimenez opened 11 years ago
This valid code (from http://php.net/manual/en/functions.anonymous.php):
function ($quantity, $product) use ($tax, &$total) { $pricePerItem = constant(__CLASS__ . "::PRICE_" . strtoupper($product)); $total += ($pricePerItem * $quantity) * ($tax + 1.0); };
Gives this error:
Parse error: syntax error, unexpected T_STRING, expecting identifier in /console.htm on line 2
This valid code (from http://php.net/manual/en/functions.anonymous.php):
Gives this error: