Could somebody give me an example of how to use
I'm trying to write a custom PHP rule for the Rules module that will rewrite few fields of a new saved content, using the values from tokens.
As you are asking about how to replace tokens in a Rules action that is executing custom PHP code, you don't need to replace the tokens with
If you enter something similar to the following code, the tokens will be replaced by the Rules module.
drupal_set_message(t('This is the node ID: %node-id', array('%node-id' => [node:nid]));
The list of the available tokens is reported in the custom PHP action page.