简体   繁体   English

PHP扩展与SPL

[英]PHP Extensions versus SPL

I keep hearing about php extensions, the standard php library, and built in classes. 我不断听到有关php扩展,标准php库和内置类的信息。 What are the differences? 有什么区别? Let me explain what i mean, 让我解释一下我的意思,

http://us3.php.net/manual/en/extensions.membership.php The page is labeled php core extensions but then it mentions that the following classes are not actual extensions. http://us3.php.net/manual/zh/extensions.membership.php该页面标记为php核心扩展,但是随后提到以下类不是实际的扩展。 Would it be the standard library? 会是标准库吗? What is php's standard library? 什么是php的标准库? are they classes that come with php? 它们是php附带的类吗?

thanks 谢谢

Core 核心

PHP has some functions that are part of PHP no matter what. 无论如何,PHP都有一些功能是PHP的一部分。 These are considered to be important to all of PHP. 这些被认为对所有PHP都很重要。 Those are considered Core . 这些被认为是核心

Bundled 捆绑

Some functions (like BC Math) are those you must choose to have as part of PHP. 有些功能(例如BC Math)是必须作为PHP的一部分选择的功能。 You can compile it with or without those libraries, allowing you the flexibility to decide what you do and don't need.. You can use a pre-compiled library to add those functions (ie in CentOS you can install the package php-bcmath to get BC Math). 您可以使用或不使用这些库编译它,让您可以灵活地决定你做什么,不需要。你可以使用预编译库添加这些功能(即在CentOS的,你可以安装包php-bcmath获得BC Math)。 In Windows, these will be in a separate DLL. 在Windows中,这些将位于单独的DLL中。

External 外部

Very similar to Bundled except that these functions also rely on programs outside PHP to work (ie you can't use MySQL functions without MySQL installed). 捆绑软件非常相似,除了这些功能还依赖PHP之外的程序才能工作(即,如果未安装MySQL,则无法使用MySQL函数)。

PECL PECL

These are completely outside the PHP project (as in the author of the extension is responsible and not the PHP team). 这些完全不在PHP项目之内(因为扩展的作者负责,而不是PHP团队)。 They must be compiled against PHP but you don't have to go to great lengths to do this thankfully, since the PEAR system contains a method that will download the project source and compile it. 它们必须针对 PHP进行编译但是您不必费劲地完成此操作,因为PEAR系统包含一种可以下载项目源代码并进行编译的方法。 Understand that if you upgrade the PHP Core to a major version (ie 5.4 to 5.5) you will have to recompile any PECL libraries you compiled yourself. 请理解,如果将PHP Core升级到主要版本(即5.4到5.5),则必须重新编译自己编译的所有PECL库。 Some libraries (especially Windows) offer pre-compiled versions as well. 一些库(尤其是Windows)也提供预编译的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM