Advanced PHP settings - selectively, including built-in PHP functions

There are many features of PHP's built-in functions . I was curious that after almost two and a half years of work as a software engineer, I use almost nothing. But they are all defined and can be used with the default PHP settings.

I read somewhere in SO that PHP provides all of these built-in things, but doing things like this with languages ​​like JAVA requires a lot of coding. It's right? I am not very experienced in other languages.

In addition, can I assume that most of these functions are not used by any of the other built-in functions or anything (internal dependencies)? For instance. these functions pdf_fit_table () , gzopen () are necessary only in the case of PDF and gzip files, respectively.

If so, then as advanced programmers, does PHP provide us with any opportunity to selectively load them based on specific project requirements or more dynamically, based on a specific module? for example, download PDF related functions only if I have PDF related tasks. If possible, at what level can this be done? If at the installation level of PHP, then I think that this is not possible in the case of shared hosting. Is a better solution for this possible?

I am just speaking in terms of common sense, we include files containing functions based on needs.

Will this increase productivity?

I do not know very well the main libraries, etc. PHP So, please shed some light.

Update:
Thanks for the answers.

@pygorex1 - HipHop - PHP . , , , 1 , HipHop, 0,7 . (, 0,1 0,07 HipHop). , HipHop - . , , , , . , , , , , . , , ? - ?

@Tyler - , , , , . . , is_numeric(), is_array(), array_walk(), func_get_args() .. , , , , , socket_connect(), , . , , , pygorex1.

+3
4

dl() PHP .

:

if (!extension_loaded('sqlite')) {
    $prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '';
    dl($prefix . 'sqlite.' . PHP_SHLIB_SUFFIX);
}

http://php.net/manual/en/function.dl.php

+1

, , , , PHP. : HipHop, Facebook PHP ++. --, APC eAccelerator / PHP- memcached, PHP , / PHP.

, , PHP:

PHP

PHP . , gzopen(), zlib . .

PHP

PHP php.ini - DLL Windows .so Linux. php.ini:

...
extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dblib.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
...
+2

php-, .

, . , -, , , , .

+1

. Linux. ( ) , . pygorex1, , PHP- .

@powtac: do dl() ( dl()), , , , )

@Tyler Eaves: - . , ..

, -, knwo PHP- C/++, . , php , , , .

+1

Source: https://habr.com/ru/post/1780090/


All Articles