diff --git a/build/gen_stub.php b/build/gen_stub.php index bd30913b69a..d6d43774288 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1074,6 +1074,10 @@ function initPhpParser() { return; } + if (!extension_loaded("tokenizer")) { + throw new Exception("The \"tokenizer\" extension is not available"); + } + $isInitialized = true; $version = "4.3.0"; $phpParserDir = __DIR__ . "/PHP-Parser-$version";