What does @ mean in a PHP string? (Not an error suppression operator)

Possible duplicate:
@ (at sign) in drupal

I know that sometimes this is due to error suppression, but I look at the Drupal code and I cannot recognize the syntax:

Example 1:

$batch = array(
'operations' => $operations,
'finished' => '_install_profile_batch_finished',
'title' => st('Installing @drupal', array('@drupal' => drupal_install_profile_name())),
'error_message' => st('The installation has encountered an error.'),
);

Example 2:

drupal_set_title(st('@drupal installation complete', array('@drupal' => drupal_install_profile_name())));

Example 3:

$output .= '<p>'. (isset($messages['error']) ? st('Please review the messages above before continuing on to <a href="@url">your new site</a>.', array('@url' => url(''))) : st('You may now visit <a href="@url">your new site</a>.', array('@url' => url('')))) .'</p>';
+3
source share
3 answers

This is not related to php, but to drupal. @drupalis a variable used by the templating mechanism used by drupal.

+9
source

This is Drupal specific, which means that the variable is run via check_plain, which eludes HTML characters ( Related Drupal API documentation ).

The t () and st () functions are used for translatable strings.

+2

drupal. .

0

Source: https://habr.com/ru/post/1769235/


All Articles