Exemple #1
0
static Variant HHVM_FUNCTION(phpversion, const String& extension /*="" */) {
  Extension *ext;

  if (extension.empty()) {
    return get_PHP_VERSION();
  }

  if ((ext = ExtensionRegistry::get(extension)) != nullptr &&
      strcmp(ext->getVersion(), NO_EXTENSION_VERSION_YET) != 0) {
    return ext->getVersion();
  }

  return false;
}
Exemple #2
0
 DateTimeExtension() : Extension("date", get_PHP_VERSION().c_str()) { }