By ParisLiakos on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Description:
D7
If (drupal_is_cli()) {
// Do stuff
}
D8
// Just check the PHP_SAPI constant, directly
if (PHP_SAPI === 'cli') {
// Do stuff
}
Impacts:
Module developers