diff --git a/build/gen_stub.php b/build/gen_stub.php index e1e225dc201..4a293972f04 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2184,7 +2184,7 @@ OUPUT_EXAMPLE $defaultValue = $arg->getDefaultValueAsMethodSynopsisString(); if ($defaultValue !== null) { $initializer = $doc->createElement('initializer'); - if (preg_match('/^[a-zA-Z_][a-zA-Z_0-9]*$/', $defaultValue)) { + if (preg_match('/^[a-zA-Z_][a-zA-Z_0-9\:\\\\]*$/', $defaultValue)) { $constant = $doc->createElement('constant', $defaultValue); $initializer->appendChild($constant); } else {