View Issue Details

IDProjectCategoryView StatusLast Update
0000174XdebugUncategorizedpublic2009-12-27 16:54
Reporterbeandog Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionnot fixable 
Summary0000174: 'echo' command does not work in eval function
Description

When doing an 'eval' through the DBGp protocol in XDebug, valid echo commands are not executed and return error messages.

TagsNo tags attached.
Operating SystemWindows XP Pro SP2
PHP Version5.0.5

Activities

derick

2009-12-27 16:54

administrator   ~0001211

You're correct that this doesn't work; however, internally Xdebug uses Zend's zend_do_string() which always prepends "return " to the string-to-be-parsed to be able to return the value of evaluated statements to be passed back. Obviously the string:
return echo "too\n";
creates a parse error. I can't fix this unless I repeat much of the Zend API functions, and I don't think it's worth it. Also, print "too\n"; works just fine (As it's a statement for PHP and returns something).