Translating PHP code

The syntax to translate a single PHP file named MyPHP.php is shown in the following example:

sourceanalyzer -b <build_id> MyPHP.php

To translate a file where the source or the php.ini file entry includes a relative path name (starts with ./ or ../), consider setting the PHP source root as shown in the following example:

sourceanalyzer -php-source-root <path> -b <build_id> MyPHP.php

For more information about the -php-source-root option, see the description in PHP Command-Line Options.

When you translate PHP code, make sure that you specify all source files together in one invocation. OpenText SAST does not support adding new files to the file list associated with the build ID on subsequent invocations.

This section contains the following topics: