diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index ce86b74875..1c5e861943 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -16,6 +16,7 @@
 use Drupal\Core\Site\Settings;
 use Drupal\Core\Utility\Error;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
+use Drupal\Core\Extension\ExtensionDiscovery;
 use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
 
 /**
@@ -142,7 +143,7 @@
  *
  * @see http://php.net/manual/language.functions.php
  */
-const DRUPAL_PHP_FUNCTION_PATTERN = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*';
+const DRUPAL_PHP_FUNCTION_PATTERN = ExtensionDiscovery::PHP_FUNCTION_PATTERN;
 
 /**
  * $config_directories key for active directory.
diff --git a/core/includes/install.inc b/core/includes/install.inc
index 360290430b..dcd11debeb 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -165,7 +165,7 @@ function drupal_get_database_types() {
   $drivers = [];
 
   // The internal database driver name is any valid PHP identifier.
-  $mask = '/^' . DRUPAL_PHP_FUNCTION_PATTERN . '$/';
+  $mask = ExtensionDiscovery::PHP_FUNCTION_PATTERN;
   /** @var \Drupal\Core\File\FileSystemInterface $file_system */
   $file_system = \Drupal::service('file_system');
   $files = $file_system->scanDirectory(DRUPAL_ROOT . '/core/lib/Drupal/Core/Database/Driver', $mask, ['recurse' => FALSE]);
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index 1327944481..df5ba634e0 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -693,7 +693,7 @@ function update_verify_update_archive($project, $archive_file, $directory) {
   $incompatible = [];
   /** @var \Drupal\Core\File\FileSystemInterface $file_system */
   $file_system = \Drupal::service('file_system');
-  $files = $file_system->scanDirectory("$directory/$project", '/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info.yml$/', ['key' => 'name', 'min_depth' => 0]);
+  $files = $file_system->scanDirectory("$directory/$project", '/^*\.info.yml$/', ['key' => 'name', 'min_depth' => 0]);
   foreach ($files as $file) {
     // Get the .info.yml file for the module or theme this file belongs to.
     $info = \Drupal::service('info_parser')->parse($file->uri);
