NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
debugger trouble parsing curly braces


Joined: 22 May 2005
Posts: 6
Reply with quote
Just activated 3.3.3 on windows, using debugger. Having problem with code using curly braces that works outside phped, but not in debugger or run. phped reports

Code:
Parse error: parse error, unexpected '(', expecting '}' in G:\test\curlyTest.php on line 14


output in nonphped php.exe:
Code:
line1(a Line)


[code]
<?php

class line {
var $line;
function line($line) {
$this->line = $line;
}
function getLine1() {
return $this->line;
}
}

$l = new line("a Line");
printf("line1({$l->getLine1()})");

?>
View user's profileFind all posts by johnnysockoSend private message


Joined: 22 May 2005
Posts: 6
Reply with quote
Seems to be a php4 vs. php5 difference.
Bummer
View user's profileFind all posts by johnnysockoSend private message


Joined: 09 Dec 2003
Posts: 92
Reply with quote
I'm not sure whether PHP4 allows for method calls in string substitution?

"Some string {$x->foo}" ist ok, but "test {$x->bar()}"?
View user's profileFind all posts by mpSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
Obviously you have to install PHP5 for NuSphere PHPED IDE package before using PHP5 syntax.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
debugger trouble parsing curly braces
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic