<?php
function find($text,$openpos)
{
$closepos=$openpos;
$counter=1;
while($counter>0)
{
$c=$text[++$closepos];
if($c=='(')
{
$counter++;
}
else if($c==')')
{
$counter--;
}
}
return $closepos;
}
$c=find("(1+2*(5-2)/(3-1))","6");
echo $c;
?>
它显示错误
“sh:-c:第 0 行:意外标记
(' sh: -c: line 0:
php main.php (1+2*(5-2)/(3-1)) 6' 附近的语法错误”
如何解决这个问题?