PHP函数使用包装器

时间:2011-06-14 15:11:47

标签: php wrapper

我正在升级PHP代码库以便能够在PHP5.3 +上运行,我需要一个使用包装器的函数列表。

http://www.php.net/manual/en/wrappers.php

此页提及; fopen(),copy(),file_exists()和filesize()。我知道还有其他功能; file_get_contents(),file()等。

有没有人有完整的清单?或者也许是通过目录“grep”以使用包装器查找函数的简单方法?

1 个答案:

答案 0 :(得分:3)

grep php_stream_open_wrapper_ex调用的php源代码,它应该提供与包装器直接交互的PHP_FUNCTION

粗略且可能部分错误的列表(-B 100并不准确):

$ find . -name '*.c'| xargs grep -B 100 php_stream_open_wrapper_ex| grep PHP_FUNCTION
./ext/standard/url.c-PHP_FUNCTION(rawurlencode)
./ext/standard/url.c-PHP_FUNCTION(rawurldecode)
./ext/standard/url.c-PHP_FUNCTION(get_headers)
./ext/standard/file.c-PHP_FUNCTION(file_get_contents)
./ext/standard/file.c-PHP_FUNCTION(file_put_contents)
./ext/standard/file.c-PHP_FUNCTION(file)
./ext/standard/file.c-PHP_FUNCTION(tempnam)
./ext/standard/file.c-PHP_FUNCTION(mkdir)
./ext/standard/file.c-PHP_FUNCTION(rmdir)
./ext/standard/file.c-PHP_FUNCTION(readfile)
./ext/oci8/oci8_interface.c-PHP_FUNCTION(oci_lob_export)
./ext/hash/hash.c-PHP_FUNCTION(hash)
./ext/hash/hash.c-PHP_FUNCTION(hash_file)
./ext/hash/hash.c-PHP_FUNCTION(hash_update)
./ext/hash/hash.c-PHP_FUNCTION(hash_update_stream)
./ext/hash/hash.c-PHP_FUNCTION(hash_update_file)