drush php-evalfor drush 6x
Evaluate arbitrary php code after bootstrapping Drupal (if available).
drush php-eval
-
Aliases
php-eval has 2 alias/es:
drush eval
drush ev
-
Arguments
php-eval accepts 1 argument/s:
code : PHP code
-
Options
php-eval accepts 17 option/s:
--format
--format : format
--fields
--fields : fields
--list-separator
--list-separator : list-separator
--line-separator
--line-separator : line-separator
--field-labels
--field-labels : field-labels
--format=var_export
--format=var_export : format=var_export
--format=config
--format=config : format=config
--format=csv
--format=csv : format=csv
--format=json
--format=json : format=json
--format=labeled-export
--format=labeled-export : format=labeled-export
--format=list
--format=list : format=list
--format=php
--format=php : format=php
--format=print-r
--format=print-r : format=print-r
--format=string
--format=string : format=string
--format=table
--format=table : format=table
--format=variables
--format=variables : format=variables
--format=yaml
--format=yaml : format=yaml
-
Examples
Sets the hello variable using Drupal API.
drush php-eval "variable_set('hello', 'world');"
-
Comments
comments powered by Disqus