B.43 PhpEvalTask

With the PhpEvalTask, you can set a property to the results of evaluating a PHP expression or the result returned by a function/method call.

Table B.45: Attributes

functionStringThe name of the Property.n/aOne of these is required.
expressionStringThe expression to evaluate.n/a
classStringThe static class which contains function.n/aNo
returnPropertyStringThe name of the property to set with result of expression or function call. Note: if this attribute is set, the expression must return a value.n/aNo
levelStringControl the level at which php reports status messages. One of error, warning, info, verbose, debug.infoNo

B.43.1 Examples

<php function="crypt" returnProperty="enc_passwd">
  <param value="${auth.root_passwd}"/>
<php expression="3 + 4" returnProperty="sum"/>
<php expression="echo 'test';">
<php class="phing.Phing" function="start">
    <param value="-projecthelp"/>
    <param value="-buildfile"/>
    <param value="${phing.file}"/>

B.43.2 Supported Nested Tags

  • param