目录搜索
序言入门指引简介PHP 是什么?PHP 能做什么?简明教程需要些什么?第一个 PHP 页面实用的脚本处理表单在新版本的 PHP 中使用旧的 PHP 代码下一步做什么?安装与配置安装前需要考虑的事项Unix 系统下的安装Unix 系统下的 Apache 1.3.xUnix 系统下的 Apache 2.xUnix 系统下的 Nginx 1.4.xUnix 平台的 Lighttpd 1.4Sun Solaris 上的 Sun、iPlanet 和 Netscape 服务器CGI 和命令行设置针对 HP-UX 平台的安装提示在 OpenBSD 系统下的安装针对 Solaris 的安装提示Debian GNU/Linux 安装说明Mac OS X 系统下的安装使用软件包使用内置的 PHP在 Mac OS X 下编译 PHPWindows 系统下的安装Windows 安装程序(PHP 5.1.0 及更早版本)Windows 安装程序(PHP 5.2 及更新版本)手工安装步骤Microsoft IISMicrosoft IIS 5.1 和 IIS 6.0Microsoft IIS 7.0 及更高版本Microsoft Windows 下的 Apache 1.3.xMicrosoft Windows 下的 Apache 2.xMicrosoft Windows 下的 Sun,iPlanet 和 Netscape 服务器Microsoft Windows 下的 Sambar 服务器Microsoft Windows 下的 Xitami从源程序编译Windows 下安装扩展库PHP 在 Microsoft Windows 下的命令行方式云计算平台上的安装Microsoft AzureAmazon EC2FastCGI 进程管理器(FPM)安装配置PECL 扩展库安装PECL 安装介绍下载 PECL 扩展库在 Windows 上安装 PHP 扩展用 PEAR 编译共享 PECL 扩展库用 phpize 编译共享 PECL 扩展库php-config将 PECL 扩展库静态编译入 PHP还有问题?阅读 FAQ其它问题错误报告运行时配置配置文件.user.ini 文件配置可被设定范围怎样修改配置设定语言参考基本语法PHP 标记从 HTML 中分离指令分隔符注释类型简介Boolean 布尔类型Integer 整型Float 浮点型String 字符串Array 数组Object 对象Resource 资源类型NULLCallback 回调类型本文档中使用的伪类型与变量类型转换的判别变量基础预定义变量变量范围可变变量来自 PHP 之外的变量常量语法魔术常量表达式运算符运算符优先级算术运算符赋值运算符位运算符比较运算符错误控制运算符执行运算符递增/递减运算符逻辑运算符字符串运算符数组运算符类型运算符流程控制简介ifelseelseif/else if流程控制的替代语法whiledo-whileforforeachbreakcontinueswitchdeclarereturnrequireincluderequire_onceinclude_oncegoto函数用户自定义函数函数的参数返回值可变函数内部(内置)函数匿名函数类与对象简介基本概念属性类常量自动加载类构造函数和析构函数访问控制(可见性)对象继承范围解析操作符(::)Static(静态)关键字抽象类对象接口TraitsAnonymous classes重载遍历对象魔术方法Final 关键字对象复制对象比较类型约束后期静态绑定对象和引用对象序列化OOP 变更日志命名空间命名空间概述定义命名空间定义子命名空间在同一个文件中定义多个命名空间使用命名空间:基础命名空间和动态语言特征namespace关键字和__NAMESPACE__常量使用命名空间:别名/导入全局空间使用命名空间:后备全局函数/常量名称解析规则FAQ: things you need to know about namespacesErrorsBasicsErrors in PHP 7异常处理扩展(extend) PHP 内置的异常处理类生成器生成器总览生成器语法Comparing generators with Iterator objects引用的解释引用是什么引用做什么引用不是什么引用传递引用返回取消引用引用定位预定义变量超全局变量$GLOBALS$_SERVER$HTTP_SERVER_VARS$_GET$HTTP_GET_VARS$_POST$HTTP_POST_VARS$_FILES$HTTP_POST_FILES$_REQUEST$_SESSION$HTTP_SESSION_VARS$_ENV$HTTP_ENV_VARS$_COOKIE$HTTP_COOKIE_VARS$php_errormsg$HTTP_RAW_POST_DATA$http_response_header$argc$argv预定义异常ExceptionException::__constructException::getMessageException::getPreviousException::getCodeException::getFileException::getLineException::getTraceException::getTraceAsStringException::__toStringException::__cloneErrorExceptionErrorException::__constructErrorException::getSeverity预定义接口遍历迭代器Iterator::currentIterator::keyIterator::nextIterator::rewindIterator::valid聚合式迭代器IteratorAggregate::getIterator数组式访问ArrayAccess::offsetExistsArrayAccess::offsetGetArrayAccess::offsetSetArrayAccess::offsetUnset序列化Serializable::serializeSerializable::unserializeClosureClosure::__constructClosure::bindClosure::bindTo生成器Generator::currentGenerator::keyGenerator::nextGenerator::rewindGenerator::sendGenerator::throwGenerator::validGenerator::__wakeup上下文(Context)选项和参数套接字上下文选项HTTP context 选项FTP context optionsSSL 上下文选项CURL context optionsPhar 上下文(context)选项MongoDB context optionsContext 参数支持的协议和封装协议file://http://https://ftp://ftps://php://zlib://bzip2://zip://data://glob://phar://ssh2://rar://ogg://expect://安全简介总则以 CGI 模式安装时可能受到的攻击情形一:只运行公开的文件情形二:使用 --enable-force-cgi-redirect 选项情形三:设置 doc_root 或 user_dir情形四:PHP 解释器放在 web 目录以外以 Apache 模块安装时文件系统安全Null 字符问题数据库安全设计数据库连接数据库加密存储模型SQL 注入错误报告使用 Register Globals用户提交的数据魔术引号什么是魔术引号为什么要用魔术引号为什么不用魔术引号关闭魔术引号隐藏 PHP保持更新特点用 PHP 进行 HTTP 认证Cookie会话处理 XForms文件上传处理POST 方法上传错误信息说明常见缺陷上传多个文件对 PUT 方法的支持使用远程文件连接处理数据库持久连接安全模式保安措施和安全模式被安全模式限制或屏蔽的函数PHP 的命令行模式内置Web ServerINI 配置垃圾回收机制引用计数基本知识回收周期(Collecting Cycles)性能方面考虑的因素DTrace 动态跟踪PHP 和 DTrace 介绍使用 PHP 和 DTrace使用 SystemTap 监控 PHP DTrace 静态探针函数参考影响 PHP 行为的扩展APC简介安装/配置需求安装运行时配置资源类型预定义常量APC 函数apc_addapc_bin_dumpapc_bin_dumpfileapc_bin_loadapc_bin_loadfileapc_cache_infoapc_casapc_clear_cacheapc_compile_fileapc_decapc_define_constantsapc_delete_fileapc_deleteapc_existsapc_fetchapc_incapc_load_constantsapc_sma_infoapc_storeAPCIteratorAPCIterator::__constructAPCIterator::currentAPCIterator::getTotalCountAPCIterator::getTotalHitsAPCIterator::getTotalSizeAPCIterator::keyAPCIterator::nextAPCIterator::rewindAPCIterator::validAPCu简介安装/配置需求安装运行时配置资源类型预定义常量APCu 函数apcu_addapcu_cache_infoapcu_casapcu_clear_cacheapcu_decapcu_deleteapcu_entryapcu_existsapcu_fetchapcu_incapcu_sma_infoapcu_storeAPCUIteratorAPCUIterator::__constructAPCUIterator::currentAPCUIterator::getTotalCountAPCUIterator::getTotalHitsAPCUIterator::getTotalSizeAPCUIterator::keyAPCUIterator::nextAPCUIterator::rewindAPCUIterator::validAPD简介安装/配置需求安装Building on Win32运行时配置资源类型预定义常量范例How to use PHP-APD in your scriptsAPD 函数apd_breakpointapd_callstackapd_clunkapd_continueapd_croakapd_dump_function_tableapd_dump_persistent_resourcesapd_dump_regular_resourcesapd_echoapd_get_active_symbolsapd_set_pprof_traceapd_set_session_trace_socketapd_set_session_traceapd_set_sessionoverride_functionrename_functionbcompiler简介安装/配置需求安装运行时配置资源类型预定义常量bcompiler 函数bcompiler_load_exebcompiler_loadbcompiler_parse_classbcompiler_readbcompiler_write_classbcompiler_write_constantbcompiler_write_exe_footerbcompiler_write_filebcompiler_write_footerbcompiler_write_functionbcompiler_write_functions_from_filebcompiler_write_headerbcompiler_write_included_filenameBLENC简介安装/配置需求安装运行时配置资源类型预定义常量Blenc 函数blenc_encrypt错误处理简介安装/配置需求安装运行时配置资源类型预定义常量范例错误处理 函数debug_backtracedebug_print_backtraceerror_clear_lasterror_get_lasterror_logerror_reportingrestore_error_handlerrestore_exception_handlerset_error_handlerset_exception_handlertrigger_erroruser_errorhtscanner简介安装/配置需求安装运行时配置资源类型inclued简介安装/配置需求安装运行时配置资源类型预定义常量范例Example that implements inclued into an applicationinclued 函数inclued_get_dataMemtrack简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageOPcache简介安装/配置需求安装运行时配置资源类型OPcache 函数opcache_compile_fileopcache_get_configurationopcache_get_statusopcache_invalidateopcache_is_script_cachedopcache_reset输出控制简介安装/配置需求安装运行时配置资源类型预定义常量范例基本用法Output Control 函数flushob_cleanob_end_cleanob_end_flushob_flushob_get_cleanob_get_contentsob_get_flushob_get_lengthob_get_levelob_get_statusob_gzhandlerob_implicit_flushob_list_handlersob_startoutput_add_rewrite_varoutput_reset_rewrite_varsPHP 选项/信息简介安装/配置需求安装运行时配置资源类型预定义常量PHP 选项/信息 函数assert_optionsassertcli_get_process_titlecli_set_process_titledlextension_loadedgc_collect_cyclesgc_disablegc_enablegc_enabledgc_mem_cachesget_cfg_varget_current_userget_defined_constantsget_extension_funcsget_include_pathget_included_filesget_loaded_extensionsget_magic_quotes_gpcget_magic_quotes_runtimeget_required_filesget_resourcesgetenvgetlastmodgetmygidgetmyinodegetmypidgetmyuidgetoptgetrusageini_alterini_get_allini_getini_restoreini_setmagic_quotes_runtimemainmemory_get_peak_usagememory_get_usagephp_ini_loaded_filephp_ini_scanned_filesphp_logo_guidphp_sapi_namephp_unamephpcreditsphpinfophpversionputenvrestore_include_pathset_include_pathset_magic_quotes_runtimeset_time_limitsys_get_temp_dirversion_comparezend_logo_guidzend_thread_idzend_versionrunkit简介预定义常量安装/配置需求安装运行时配置资源类型runkit 函数Runkit_SandboxRunkit_Sandbox_Parentrunkit_class_adoptrunkit_class_emancipaterunkit_constant_addrunkit_constant_redefinerunkit_constant_removerunkit_function_addrunkit_function_copyrunkit_function_redefinerunkit_function_removerunkit_function_renamerunkit_importrunkit_lint_filerunkit_lintrunkit_method_addrunkit_method_copyrunkit_method_redefinerunkit_method_removerunkit_method_renamerunkit_return_value_usedrunkit_sandbox_output_handlerrunkit_superglobalsscream简介安装/配置需求安装运行时配置资源类型范例Example that shows the effect of screamuopz简介安装/配置需求安装运行时配置资源类型预定义常量Uopz 函数uopz_backupuopz_composeuopz_copyuopz_deleteuopz_extenduopz_flagsuopz_functionuopz_implementuopz_overloaduopz_redefineuopz_renameuopz_restoreuopz_undefineWeakref简介安装/配置需求安装资源类型WeakRefWeakref::acquireWeakref::__constructWeakref::getWeakref::releaseWeakref::validWeakMapWeakMap::__constructWeakMap::countWeakMap::currentWeakMap::keyWeakMap::nextWeakMap::offsetExistsWeakMap::offsetGetWeakMap::offsetSetWeakMap::offsetUnsetWeakMap::rewindWeakMap::validWinCache简介安装/配置需求安装运行时配置WinCache Statistics ScriptWinCache Session HandlerWinCache Functions Reroutes资源类型预定义常量WinCache 函数wincache_fcache_fileinfowincache_fcache_meminfowincache_lockwincache_ocache_fileinfowincache_ocache_meminfowincache_refresh_if_changedwincache_rplist_fileinfowincache_rplist_meminfowincache_scache_infowincache_scache_meminfowincache_ucache_addwincache_ucache_caswincache_ucache_clearwincache_ucache_decwincache_ucache_deletewincache_ucache_existswincache_ucache_getwincache_ucache_incwincache_ucache_infowincache_ucache_meminfowincache_ucache_setwincache_unlockBuilding for WindowsPrerequisitesCompiling and buildingVerifying the buildXhprof简介安装/配置需求安装运行时配置资源类型预定义常量范例Xhprof 函数xhprof_disablexhprof_enablexhprof_sample_disablexhprof_sample_enable音频格式操作ID3简介安装/配置需求安装运行时配置资源类型Predefined ConstantsID3 函数id3_get_frame_long_nameid3_get_frame_short_nameid3_get_genre_idid3_get_genre_listid3_get_genre_nameid3_get_tagid3_get_versionid3_remove_tagid3_set_tagKTaglib简介安装/配置需求安装预定义常量KTaglib_MPEG_FileKTaglib_MPEG_File::__constructKTaglib_MPEG_File::getAudioPropertiesKTaglib_MPEG_File::getID3v1TagKTaglib_MPEG_File::getID3v2TagKTaglib_MPEG_AudioPropertiesKTaglib_MPEG_AudioProperties::getBitrateKTaglib_MPEG_AudioProperties::getChannelsKTaglib_MPEG_AudioProperties::getLayerKTaglib_MPEG_AudioProperties::getLengthKTaglib_MPEG_AudioProperties::getSampleBitrateKTaglib_MPEG_AudioProperties::getVersionKTaglib_MPEG_AudioProperties::isCopyrightedKTaglib_MPEG_AudioProperties::isOriginalKTaglib_MPEG_AudioProperties::isProtectionEnabledKTaglib_TagKTaglib_Tag::getAlbumKTaglib_Tag::getArtistKTaglib_Tag::getCommentKTaglib_Tag::getGenreKTaglib_Tag::getTitleKTaglib_Tag::getTrackKTaglib_Tag::getYearKTaglib_Tag::isEmptyKTaglib_ID3v2_TagKTaglib_ID3v2_Tag::addFrameKTaglib_ID3v2_Tag::getFrameListKTaglib_ID3v2_FrameKTaglib_ID3v2_Frame::getSizeKTaglib_ID3v2_Frame::__toStringKTaglib_ID3v2_AttachedPictureFrameKTaglib_ID3v2_AttachedPictureFrame::getDescriptionKTaglib_ID3v2_AttachedPictureFrame::getMimeTypeKTaglib_ID3v2_AttachedPictureFrame::getTypeKTaglib_ID3v2_AttachedPictureFrame::savePictureKTaglib_ID3v2_AttachedPictureFrame::setMimeTypeKTaglib_ID3v2_AttachedPictureFrame::setPictureKTaglib_ID3v2_AttachedPictureFrame::setTypeoggvorbis简介安装/配置需求安装运行时配置资源类型预定义常量Context options范例Examples on using the ogg:// wrapper.OpenAL简介安装/配置需求安装运行时配置资源类型预定义常量OpenAL 函数openal_buffer_createopenal_buffer_dataopenal_buffer_destroyopenal_buffer_getopenal_buffer_loadwavopenal_context_createopenal_context_currentopenal_context_destroyopenal_context_processopenal_context_suspendopenal_device_closeopenal_device_openopenal_listener_getopenal_listener_setopenal_source_createopenal_source_destroyopenal_source_getopenal_source_pauseopenal_source_playopenal_source_rewindopenal_source_setopenal_source_stopopenal_stream身份认证服务KADM5简介安装/配置需求安装运行时配置资源类型预定义常量Constants for Attribute FlagsConstants for Options范例Basic usageKADM5 函数kadm5_chpass_principalkadm5_create_principalkadm5_delete_principalkadm5_destroykadm5_flushkadm5_get_policieskadm5_get_principalkadm5_get_principalskadm5_init_with_passwordkadm5_modify_principalRadius简介安装/配置需求安装运行时配置资源类型预定义常量RADIUS OptionsRADIUS Packet TypesRADIUS Attribute TypesRADIUS Vendor Specific Attribute Types范例Radius 函数radius_acct_openradius_add_serverradius_auth_openradius_closeradius_configradius_create_requestradius_cvt_addrradius_cvt_intradius_cvt_stringradius_demangle_mppe_keyradius_demangleradius_get_attrradius_get_tagged_attr_dataradius_get_tagged_attr_tagradius_get_vendor_attrradius_put_addrradius_put_attrradius_put_intradius_put_stringradius_put_vendor_addrradius_put_vendor_attrradius_put_vendor_intradius_put_vendor_stringradius_request_authenticatorradius_salt_encrypt_attrradius_send_requestradius_server_secretradius_strerror针对命令行的扩展Ncurses简介安装/配置需求安装运行时配置资源类型预定义常量Error codesColorsKeysMouseNcurses 函数ncurses_addchncurses_addchnstrncurses_addchstrncurses_addnstrncurses_addstrncurses_assume_default_colorsncurses_attroffncurses_attronncurses_attrsetncurses_baudratencurses_beepncurses_bkgdncurses_bkgdsetncurses_borderncurses_bottom_panelncurses_can_change_colorncurses_cbreakncurses_clearncurses_clrtobotncurses_clrtoeolncurses_color_contentncurses_color_setncurses_curs_setncurses_def_prog_modencurses_def_shell_modencurses_define_keyncurses_del_panelncurses_delay_outputncurses_delchncurses_deletelnncurses_delwinncurses_doupdatencurses_echoncurses_echocharncurses_endncurses_erasencurses_erasecharncurses_filterncurses_flashncurses_flushinpncurses_getchncurses_getmaxyxncurses_getmousencurses_getyxncurses_halfdelayncurses_has_colorsncurses_has_icncurses_has_ilncurses_has_keyncurses_hide_panelncurses_hlinencurses_inchncurses_init_colorncurses_init_pairncurses_initncurses_inschncurses_insdellnncurses_insertlnncurses_insstrncurses_instrncurses_isendwinncurses_keyokncurses_keypadncurses_killcharncurses_longnamencurses_metancurses_mouse_trafoncurses_mouseintervalncurses_mousemaskncurses_move_panelncurses_movencurses_mvaddchncurses_mvaddchnstrncurses_mvaddchstrncurses_mvaddnstrncurses_mvaddstrncurses_mvcurncurses_mvdelchncurses_mvgetchncurses_mvhlinencurses_mvinchncurses_mvvlinencurses_mvwaddstrncurses_napmsncurses_new_panelncurses_newpadncurses_newwinncurses_nlncurses_nocbreakncurses_noechoncurses_nonlncurses_noqiflushncurses_norawncurses_pair_contentncurses_panel_abovencurses_panel_belowncurses_panel_windowncurses_pnoutrefreshncurses_prefreshncurses_putpncurses_qiflushncurses_rawncurses_refreshncurses_replace_panelncurses_reset_prog_modencurses_reset_shell_modencurses_resettyncurses_savettyncurses_scr_dumpncurses_scr_initncurses_scr_restorencurses_scr_setncurses_scrlncurses_show_panelncurses_slk_attrncurses_slk_attroffncurses_slk_attronncurses_slk_attrsetncurses_slk_clearncurses_slk_colorncurses_slk_initncurses_slk_noutrefreshncurses_slk_refreshncurses_slk_restorencurses_slk_setncurses_slk_touchncurses_standendncurses_standoutncurses_start_colorncurses_termattrsncurses_termnamencurses_timeoutncurses_top_panelncurses_typeaheadncurses_ungetchncurses_ungetmousencurses_update_panelsncurses_use_default_colorsncurses_use_envncurses_use_extended_namesncurses_vidattrncurses_vlinencurses_waddchncurses_waddstrncurses_wattroffncurses_wattronncurses_wattrsetncurses_wborderncurses_wclearncurses_wcolor_setncurses_werasencurses_wgetchncurses_whlinencurses_wmouse_trafoncurses_wmovencurses_wnoutrefreshncurses_wrefreshncurses_wstandendncurses_wstandoutncurses_wvlineNewt简介安装/配置需求安装运行时配置资源类型预定义常量Newt form exit reasonsNewt colorsetsNewt argument flagsNewt Flags SenseNewt Components FlagsFile Descriptor FlagsCheckbox Tree FlagsEntry FlagsListbox FlagsTextbox FlagsForm FlagsNewt KeysNewt AnchorsGrid Flags范例Basic usageNewt 函数newt_bellnewt_button_barnewt_buttonnewt_centered_windownewt_checkbox_get_valuenewt_checkbox_set_flagsnewt_checkbox_set_valuenewt_checkbox_tree_add_itemnewt_checkbox_tree_find_itemnewt_checkbox_tree_get_currentnewt_checkbox_tree_get_entry_valuenewt_checkbox_tree_get_multi_selectionnewt_checkbox_tree_get_selectionnewt_checkbox_tree_multinewt_checkbox_tree_set_currentnewt_checkbox_tree_set_entry_valuenewt_checkbox_tree_set_entrynewt_checkbox_tree_set_widthnewt_checkbox_treenewt_checkboxnewt_clear_key_buffernewt_clsnewt_compact_buttonnewt_component_add_callbacknewt_component_takes_focusnewt_create_gridnewt_cursor_offnewt_cursor_onnewt_delaynewt_draw_formnewt_draw_root_textnewt_entry_get_valuenewt_entry_set_filternewt_entry_set_flagsnewt_entry_setnewt_entrynewt_finishednewt_form_add_componentnewt_form_add_componentsnewt_form_add_hot_keynewt_form_destroynewt_form_get_currentnewt_form_runnewt_form_set_backgroundnewt_form_set_heightnewt_form_set_sizenewt_form_set_timernewt_form_set_widthnewt_form_watch_fdnewt_formnewt_get_screen_sizenewt_grid_add_components_to_formnewt_grid_basic_windownewt_grid_freenewt_grid_get_sizenewt_grid_h_close_stackednewt_grid_h_stackednewt_grid_placenewt_grid_set_fieldnewt_grid_simple_windownewt_grid_v_close_stackednewt_grid_v_stackednewt_grid_wrapped_window_atnewt_grid_wrapped_windownewt_initnewt_label_set_textnewt_labelnewt_listbox_append_entrynewt_listbox_clear_selectionnewt_listbox_clearnewt_listbox_delete_entrynewt_listbox_get_currentnewt_listbox_get_selectionnewt_listbox_insert_entrynewt_listbox_item_countnewt_listbox_select_itemnewt_listbox_set_current_by_keynewt_listbox_set_currentnewt_listbox_set_datanewt_listbox_set_entrynewt_listbox_set_widthnewt_listboxnewt_listitem_get_datanewt_listitem_setnewt_listitemnewt_open_windownewt_pop_help_linenewt_pop_windownewt_push_help_linenewt_radio_get_currentnewt_radiobuttonnewt_redraw_help_linenewt_reflow_textnewt_refreshnewt_resize_screennewt_resumenewt_run_formnewt_scale_setnewt_scalenewt_scrollbar_setnewt_set_help_callbacknewt_set_suspend_callbacknewt_suspendnewt_textbox_get_num_linesnewt_textbox_reflowednewt_textbox_set_heightnewt_textbox_set_textnewt_textboxnewt_vertical_scrollbarnewt_wait_for_keynewt_win_choicenewt_win_entriesnewt_win_menunewt_win_messagenewt_win_messagevnewt_win_ternaryReadline简介安装/配置需求安装运行时配置资源类型预定义常量Readline 函数readline_add_historyreadline_callback_handler_installreadline_callback_handler_removereadline_callback_read_charreadline_clear_historyreadline_completion_functionreadline_inforeadline_list_historyreadline_on_new_linereadline_read_historyreadline_redisplayreadline_write_historyreadline压缩与归档扩展Bzip2简介安装/配置需求安装运行时配置资源类型预定义常量范例Bzip2 函数bzclosebzcompressbzdecompressbzerrnobzerrorbzerrstrbzflushbzopenbzreadbzwriteLZF简介安装/配置需求安装运行时配置资源类型预定义常量LZF 函数lzf_compresslzf_decompresslzf_optimized_forPhar简介安装/配置需求安装运行时配置资源类型预定义常量Using Phar ArchivesUsing Phar Archives: IntroductionUsing Phar Archives: the phar stream wrapperUsing Phar Archives: the Phar and PharData classCreating Phar ArchivesCreating Phar Archives: IntroductionWhat makes a phar a phar and not a tar or a zip?Ingredients of all Phar archives, independent of file formatPhar file stubHead-to-head comparison of Phar, Tar and ZipTar-based pharsZip-based pharsPhar File FormatGlobal Phar bitmapped flagsPhar manifest file entry definitionPhar Signature formatPharPhar::addEmptyDirPhar::addFilePhar::addFromStringPhar::apiVersionPhar::buildFromDirectoryPhar::buildFromIteratorPhar::canCompressPhar::canWritePhar::compressPhar::compressAllFilesBZIP2Phar::compressAllFilesGZPhar::compressFilesPhar::__constructPhar::convertToDataPhar::convertToExecutablePhar::copyPhar::countPhar::createDefaultStubPhar::decompressPhar::decompressFilesPhar::delMetadataPhar::deletePhar::extractToPhar::getMetadataPhar::getModifiedPhar::getSignaturePhar::getStubPhar::getSupportedCompressionPhar::getSupportedSignaturesPhar::getVersionPhar::hasMetadataPhar::interceptFileFuncsPhar::isBufferingPhar::isCompressedPhar::isFileFormatPhar::isValidPharFilenamePhar::isWritablePhar::loadPharPhar::mapPharPhar::mountPhar::mungServerPhar::offsetExistsPhar::offsetGetPhar::offsetSetPhar::offsetUnsetPhar::runningPhar::setAliasPhar::setDefaultStubPhar::setMetadataPhar::setSignatureAlgorithmPhar::setStubPhar::startBufferingPhar::stopBufferingPhar::uncompressAllFilesPhar::unlinkArchivePhar::webPharPharDataPharData::addEmptyDirPharData::addFilePharData::addFromStringPharData::buildFromDirectoryPharData::buildFromIteratorPharData::compressPharData::compressFilesPharData::__constructPharData::convertToDataPharData::convertToExecutablePharData::copyPharData::decompressPharData::decompressFilesPharData::delMetadataPharData::deletePharData::extractToPharData::isWritablePharData::offsetSetPharData::offsetUnsetPharData::setAliasPharData::setDefaultStubPhar::setMetadataPhar::setSignatureAlgorithmPharData::setStubPharFileInfoPharFileInfo::chmodPharFileInfo::compressPharFileInfo::__constructPharFileInfo::decompressPharFileInfo::delMetadataPharFileInfo::getCRC32PharFileInfo::getCompressedSizePharFileInfo::getMetadataPharFileInfo::getPharFlagsPharFileInfo::hasMetadataPharFileInfo::isCRCCheckedPharFileInfo::isCompressedPharFileInfo::isCompressedBZIP2PharFileInfo::isCompressedGZPharFileInfo::setCompressedBZIP2PharFileInfo::setCompressedGZPharFileInfo::setMetadataPharFileInfo::setUncompressedPharExceptionPharExceptionRar简介安装/配置需求安装运行时配置资源类型预定义常量范例Rar 函数rar_wrapper_cache_statsRarArchiveRarArchive::closerar_closeRarArchive::getCommentrar_comment_getRarArchive::getEntriesrar_listRarArchive::getEntryrar_entry_getRarArchive::isBrokenrar_broken_isRarArchive::isSolidrar_solid_isRarArchive::openrar_openRarArchive::setAllowBrokenRarArchive::__toStringRarEntryRarEntry::extractRarEntry::getAttrRarEntry::getCrcRarEntry::getFileTimeRarEntry::getHostOsRarEntry::getMethodRarEntry::getNameRarEntry::getPackedSizeRarEntry::getStreamRarEntry::getUnpackedSizeRarEntry::getVersionRarEntry::isDirectoryRarEntry::isEncryptedRarEntry::__toStringRarExceptionRarException::isUsingExceptionsRarException::setUsingExceptionsZip简介安装/配置需求安装运行时配置资源类型预定义常量范例ZipArchiveZipArchive::addEmptyDirZipArchive::addFileZipArchive::addFromStringZipArchive::addGlobZipArchive::addPatternZipArchive::closeZipArchive::deleteIndexZipArchive::deleteNameZipArchive::extractToZipArchive::getArchiveCommentZipArchive::getCommentIndexZipArchive::getCommentNameZipArchive::getExternalAttributesIndexZipArchive::getExternalAttributesNameZipArchive::getFromIndexZipArchive::getFromNameZipArchive::getNameIndexZipArchive::getStatusStringZipArchive::getStreamZipArchive::locateNameZipArchive::openZipArchive::renameIndexZipArchive::renameNameZipArchive::setArchiveCommentZipArchive::setCommentIndexZipArchive::setCommentNameZipArchive::setCompressionIndexZipArchive::setCompressionNameZipArchive::setExternalAttributesIndexZipArchive::setExternalAttributesNameZipArchive::setPasswordZipArchive::statIndexZipArchive::statNameZipArchive::unchangeAllZipArchive::unchangeArchiveZipArchive::unchangeIndexZipArchive::unchangeNameZip 函数zip_closezip_entry_closezip_entry_compressedsizezip_entry_compressionmethodzip_entry_filesizezip_entry_namezip_entry_openzip_entry_readzip_openzip_readZlib简介安装/配置需求安装运行时配置资源类型预定义常量范例Zlib 函数gzclosegzcompressgzdecodegzdeflategzencodegzeofgzfilegzgetcgzgetsgzgetssgzinflategzopengzpassthrugzputsgzreadgzrewindgzseekgztellgzuncompressgzwritereadgzfilezlib_decodezlib_encodezlib_get_coding_type信用卡处理MCVE简介安装/配置需求安装运行时配置资源类型预定义常量MCVE 函数m_checkstatusm_completeauthorizationsm_connectm_connectionerrorm_deletetransm_destroyconnm_destroyenginem_getcellm_getcellbynumm_getcommadelimitedm_getheaderm_initconnm_initenginem_iscommadelimitedm_maxconntimeoutm_monitorm_numcolumnsm_numrowsm_parsecommadelimitedm_responsekeysm_responseparamm_returnstatusm_setblockingm_setdropfilem_setipm_setssl_cafilem_setssl_filesm_setsslm_settimeoutm_sslcert_gen_hashm_transactionssentm_transinqueuem_transkeyvalm_transnewm_transsendm_uwaitm_validateidentifierm_verifyconnectionm_verifysslcertSPPLUS简介安装/配置需求安装运行时配置资源类型预定义常量SPPLUS 函数calcul_hmaccalculhmacnthmacsigneurlpaiement加密扩展Crack简介安装/配置需求安装运行时配置资源类型预定义常量范例Crack 函数crack_checkcrack_closedictcrack_getlastmessagecrack_opendictCSPRNG简介安装/配置需求安装运行时配置资源类型预定义常量CSPRNG 函数random_bytesrandom_intHash简介安装/配置需求安装运行时配置资源类型预定义常量Hash 函数hash_algoshash_copyhash_equalshash_filehash_finalhash_hmac_filehash_hmachash_inithash_pbkdf2hash_update_filehash_update_streamhash_updatehashMcrypt简介安装/配置需求安装运行时配置资源类型预定义常量Mcrypt 密码范例Mcrypt 函数mcrypt_cbcmcrypt_cfbmcrypt_create_ivmcrypt_decryptmcrypt_ecbmcrypt_enc_get_algorithms_namemcrypt_enc_get_block_sizemcrypt_enc_get_iv_sizemcrypt_enc_get_key_sizemcrypt_enc_get_modes_namemcrypt_enc_get_supported_key_sizesmcrypt_enc_is_block_algorithm_modemcrypt_enc_is_block_algorithmmcrypt_enc_is_block_modemcrypt_enc_self_testmcrypt_encryptmcrypt_generic_deinitmcrypt_generic_endmcrypt_generic_initmcrypt_genericmcrypt_get_block_sizemcrypt_get_cipher_namemcrypt_get_iv_sizemcrypt_get_key_sizemcrypt_list_algorithmsmcrypt_list_modesmcrypt_module_closemcrypt_module_get_algo_block_sizemcrypt_module_get_algo_key_sizemcrypt_module_get_supported_key_sizesmcrypt_module_is_block_algorithm_modemcrypt_module_is_block_algorithmmcrypt_module_is_block_modemcrypt_module_openmcrypt_module_self_testmcrypt_ofbmdecrypt_genericMhash简介安装/配置需求安装运行时配置资源类型预定义常量范例Mhash 函数mhash_countmhash_get_block_sizemhash_get_hash_namemhash_keygen_s2kmhashOpenSSL简介安装/配置需求安装运行时配置资源类型预定义常量Purpose checking flagsPadding flags for asymmetric encryptionKey typesPKCS7 Flags/ConstantsSignature AlgorithmsCiphersVersion constantsServer Name Indication constantsKey/Certificate parametersCertificate VerificationOpenSSL 函数openssl_cipher_iv_lengthopenssl_csr_export_to_fileopenssl_csr_exportopenssl_csr_get_public_keyopenssl_csr_get_subjectopenssl_csr_newopenssl_csr_signopenssl_decryptopenssl_dh_compute_keyopenssl_digestopenssl_encryptopenssl_error_stringopenssl_free_keyopenssl_get_cert_locationsopenssl_get_cipher_methodsopenssl_get_md_methodsopenssl_get_privatekeyopenssl_get_publickeyopenssl_openopenssl_pbkdf2openssl_pkcs12_export_to_fileopenssl_pkcs12_exportopenssl_pkcs12_readopenssl_pkcs7_decryptopenssl_pkcs7_encryptopenssl_pkcs7_signopenssl_pkcs7_verifyopenssl_pkey_export_to_fileopenssl_pkey_exportopenssl_pkey_freeopenssl_pkey_get_detailsopenssl_pkey_get_privateopenssl_pkey_get_publicopenssl_pkey_newopenssl_private_decryptopenssl_private_encryptopenssl_public_decryptopenssl_public_encryptopenssl_random_pseudo_bytesopenssl_sealopenssl_signopenssl_spki_export_challengeopenssl_spki_exportopenssl_spki_newopenssl_spki_verifyopenssl_verifyopenssl_x509_check_private_keyopenssl_x509_checkpurposeopenssl_x509_export_to_fileopenssl_x509_exportopenssl_x509_fingerprintopenssl_x509_freeopenssl_x509_parseopenssl_x509_readPassword Hashing简介安装/配置需求安装运行时配置资源类型预定义常量Password Hashing 函数password_get_infopassword_hashpassword_needs_rehashpassword_verify数据库扩展数据库抽象层DBA简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageDBA 函数dba_closedba_deletedba_existsdba_fetchdba_firstkeydba_handlersdba_insertdba_key_splitdba_listdba_nextkeydba_opendba_optimizedba_popendba_replacedba_syncdbx简介安装/配置需求安装运行时配置资源类型预定义常量dbx 函数dbx_closedbx_comparedbx_connectdbx_errordbx_escape_stringdbx_fetch_rowdbx_querydbx_sortODBC简介安装/配置需求安装运行时配置资源类型预定义常量ODBC 函数odbc_autocommitodbc_binmodeodbc_close_allodbc_closeodbc_columnprivilegesodbc_columnsodbc_commitodbc_connectodbc_cursorodbc_data_sourceodbc_doodbc_errorodbc_errormsgodbc_execodbc_executeodbc_fetch_arrayodbc_fetch_intoodbc_fetch_objectodbc_fetch_rowodbc_field_lenodbc_field_nameodbc_field_numodbc_field_precisionodbc_field_scaleodbc_field_typeodbc_foreignkeysodbc_free_resultodbc_gettypeinfoodbc_longreadlenodbc_next_resultodbc_num_fieldsodbc_num_rowsodbc_pconnectodbc_prepareodbc_primarykeysodbc_procedurecolumnsodbc_proceduresodbc_result_allodbc_resultodbc_rollbackodbc_setoptionodbc_specialcolumnsodbc_statisticsodbc_tableprivilegesodbc_tablesPDO简介安装/配置需求安装运行时配置资源类型预定义常量连接与连接管理事务与自动提交预处理语句与存储过程错误与错误处理大对象 (LOBs)PDOPDO::beginTransactionPDO::commitPDO::__constructPDO::errorCodePDO::errorInfoPDO::execPDO::getAttributePDO::getAvailableDriversPDO::inTransactionPDO::lastInsertIdPDO::preparePDO::queryPDO::quotePDO::rollBackPDO::setAttributePDOStatementPDOStatement::bindColumnPDOStatement::bindParamPDOStatement::bindValuePDOStatement::closeCursorPDOStatement::columnCountPDOStatement::debugDumpParamsPDOStatement::errorCodePDOStatement::errorInfoPDOStatement::executePDOStatement::fetchPDOStatement::fetchAllPDOStatement::fetchColumnPDOStatement::fetchObjectPDOStatement::getAttributePDOStatement::getColumnMetaPDOStatement::nextRowsetPDOStatement::rowCountPDOStatement::setAttributePDOStatement::setFetchModePDOExceptionPDO 驱动CUBRID (PDO)PDO_CUBRID DSNPDO::cubrid_schemaMS SQL Server (PDO)PDO_DBLIB DSNFirebird (PDO)PDO_FIREBIRD DSNIBM (PDO)PDO_IBM DSNInformix (PDO)PDO_INFORMIX DSNMySQL (PDO)PDO_MYSQL DSNMS SQL Server (PDO)PDO_SQLSRV DSNOracle (PDO)PDO_OCI DSNODBC and DB2 (PDO)PDO_ODBC DSNPostgreSQL (PDO)PDO_PGSQL DSNPDO::pgsqlCopyFromArrayPDO::pgsqlCopyFromFilePDO::pgsqlCopyToArrayPDO::pgsqlCopyToFilePDO::pgsqlGetNotifyPDO::pgsqlGetPidPDO::pgsqlLOBCreatePDO::pgsqlLOBOpenPDO::pgsqlLOBUnlinkSQLite (PDO)PDO_SQLITE DSNPDO::sqliteCreateAggregatePDO::sqliteCreateCollationPDO::sqliteCreateFunction4D (PDO)PDO_4D DSNConstants for PDO_4DSQL types with PDO_4D and PHPSQL acceptable by 4DExamples with PDO_4D针对各数据库系统对应的扩展CUBRID简介安装/配置需求安装运行时配置资源类型预定义常量范例CUBRID 函数cubrid_bindcubrid_close_preparecubrid_close_requestcubrid_col_getcubrid_col_sizecubrid_column_namescubrid_column_typescubrid_commitcubrid_connect_with_urlcubrid_connectcubrid_current_oidcubrid_disconnectcubrid_dropcubrid_error_code_facilitycubrid_error_codecubrid_error_msgcubrid_executecubrid_fetchcubrid_free_resultcubrid_get_autocommitcubrid_get_charsetcubrid_get_class_namecubrid_get_client_infocubrid_get_db_parametercubrid_get_query_timeoutcubrid_get_server_infocubrid_getcubrid_insert_idcubrid_is_instancecubrid_lob_closecubrid_lob_exportcubrid_lob_getcubrid_lob_sendcubrid_lob_sizecubrid_lob2_bindcubrid_lob2_closecubrid_lob2_exportcubrid_lob2_importcubrid_lob2_newcubrid_lob2_readcubrid_lob2_seek64cubrid_lob2_seekcubrid_lob2_size64cubrid_lob2_sizecubrid_lob2_tell64cubrid_lob2_tellcubrid_lob2_writecubrid_lock_readcubrid_lock_writecubrid_move_cursorcubrid_next_resultcubrid_num_colscubrid_num_rowscubrid_pconnect_with_urlcubrid_pconnectcubrid_preparecubrid_putcubrid_rollbackcubrid_schemacubrid_seq_dropcubrid_seq_insertcubrid_seq_putcubrid_set_addcubrid_set_autocommitcubrid_set_db_parametercubrid_set_dropcubrid_set_query_timeoutcubrid_versionCUBRID MySQL 兼容性函数cubrid_affected_rowscubrid_client_encodingcubrid_closecubrid_data_seekcubrid_db_namecubrid_errnocubrid_errorcubrid_fetch_arraycubrid_fetch_assoccubrid_fetch_fieldcubrid_fetch_lengthscubrid_fetch_objectcubrid_fetch_rowcubrid_field_flagscubrid_field_lencubrid_field_namecubrid_field_seekcubrid_field_tablecubrid_field_typecubrid_list_dbscubrid_num_fieldscubrid_pingcubrid_querycubrid_real_escape_stringcubrid_resultcubrid_unbuffered_queryCUBRID 过时的别名和函数cubrid_load_from_glocubrid_new_glocubrid_save_to_glocubrid_send_gloDB++简介安装/配置需求安装运行时配置资源类型预定义常量db++ error codesDB++ 函数dbplus_adddbplus_aqldbplus_chdirdbplus_closedbplus_currdbplus_errcodedbplus_errnodbplus_finddbplus_firstdbplus_flushdbplus_freealllocksdbplus_freelockdbplus_freerlocksdbplus_getlockdbplus_getuniquedbplus_infodbplus_lastdbplus_lockreldbplus_nextdbplus_opendbplus_prevdbplus_rchpermdbplus_rcreatedbplus_rcrtexactdbplus_rcrtlikedbplus_resolvedbplus_restoreposdbplus_rkeysdbplus_ropendbplus_rquerydbplus_rrenamedbplus_rsecindexdbplus_runlinkdbplus_rzapdbplus_saveposdbplus_setindexdbplus_setindexbynumberdbplus_sqldbplus_tcldbplus_tremovedbplus_undodbplus_undopreparedbplus_unlockreldbplus_unselectdbplus_updatedbplus_xlockreldbplus_xunlockreldBase简介安装/配置需求安装运行时配置资源类型预定义常量dBase 函数dbase_add_recorddbase_closedbase_createdbase_delete_recorddbase_get_header_infodbase_get_record_with_namesdbase_get_recorddbase_numfieldsdbase_numrecordsdbase_opendbase_packdbase_replace_recordfilePro简介安装/配置需求安装运行时配置资源类型预定义常量filePro 函数filepro_fieldcountfilepro_fieldnamefilepro_fieldtypefilepro_fieldwidthfilepro_retrievefilepro_rowcountfileproFirebird/InterBase简介安装/配置需求安装运行时配置资源类型预定义常量Firebird/InterBase 函数ibase_add_useribase_affected_rowsibase_backupibase_blob_addibase_blob_cancelibase_blob_closeibase_blob_createibase_blob_echoibase_blob_getibase_blob_importibase_blob_infoibase_blob_openibase_closeibase_commit_retibase_commitibase_connectibase_db_infoibase_delete_useribase_drop_dbibase_errcodeibase_errmsgibase_executeibase_fetch_associbase_fetch_objectibase_fetch_rowibase_field_infoibase_free_event_handleribase_free_queryibase_free_resultibase_gen_idibase_maintain_dbibase_modify_useribase_name_resultibase_num_fieldsibase_num_paramsibase_param_infoibase_pconnectibase_prepareibase_queryibase_restoreibase_rollback_retibase_rollbackibase_server_infoibase_service_attachibase_service_detachibase_set_event_handleribase_transibase_wait_eventFrontBase简介安装/配置需求安装运行时配置资源类型预定义常量FrontBase 函数fbsql_affected_rowsfbsql_autocommitfbsql_blob_sizefbsql_change_userfbsql_clob_sizefbsql_closefbsql_commitfbsql_connectfbsql_create_blobfbsql_create_clobfbsql_create_dbfbsql_data_seekfbsql_database_passwordfbsql_databasefbsql_db_queryfbsql_db_statusfbsql_drop_dbfbsql_errnofbsql_errorfbsql_fetch_arrayfbsql_fetch_assocfbsql_fetch_fieldfbsql_fetch_lengthsfbsql_fetch_objectfbsql_fetch_rowfbsql_field_flagsfbsql_field_lenfbsql_field_namefbsql_field_seekfbsql_field_tablefbsql_field_typefbsql_free_resultfbsql_get_autostart_infofbsql_hostnamefbsql_insert_idfbsql_list_dbsfbsql_list_fieldsfbsql_list_tablesfbsql_next_resultfbsql_num_fieldsfbsql_num_rowsfbsql_passwordfbsql_pconnectfbsql_queryfbsql_read_blobfbsql_read_clobfbsql_resultfbsql_rollbackfbsql_rows_fetchedfbsql_select_dbfbsql_set_charactersetfbsql_set_lob_modefbsql_set_passwordfbsql_set_transactionfbsql_start_dbfbsql_stop_dbfbsql_table_namefbsql_tablenamefbsql_usernamefbsql_warningsIBM DB2简介安装/配置需求安装运行时配置资源类型预定义常量IBM DB2 函数db2_autocommitdb2_bind_paramdb2_client_infodb2_closedb2_column_privilegesdb2_columnsdb2_commitdb2_conn_errordb2_conn_errormsgdb2_connectdb2_cursor_typedb2_escape_stringdb2_execdb2_executedb2_fetch_arraydb2_fetch_assocdb2_fetch_bothdb2_fetch_objectdb2_fetch_rowdb2_field_display_sizedb2_field_namedb2_field_numdb2_field_precisiondb2_field_scaledb2_field_typedb2_field_widthdb2_foreign_keysdb2_free_resultdb2_free_stmtdb2_get_optiondb2_last_insert_iddb2_lob_readdb2_next_resultdb2_num_fieldsdb2_num_rowsdb2_pclosedb2_pconnectdb2_preparedb2_primary_keysdb2_procedure_columnsdb2_proceduresdb2_resultdb2_rollbackdb2_server_infodb2_set_optiondb2_special_columnsdb2_statisticsdb2_stmt_errordb2_stmt_errormsgdb2_table_privilegesdb2_tablesInformix简介安装/配置需求安装运行时配置资源类型预定义常量Informix 函数ifx_affected_rowsifx_blobinfile_modeifx_byteasvarcharifx_closeifx_connectifx_copy_blobifx_create_blobifx_create_charifx_doifx_errorifx_errormsgifx_fetch_rowifx_fieldpropertiesifx_fieldtypesifx_free_blobifx_free_charifx_free_resultifx_get_blobifx_get_charifx_getsqlcaifx_htmltbl_resultifx_nullformatifx_num_fieldsifx_num_rowsifx_pconnectifx_prepareifx_queryifx_textasvarcharifx_update_blobifx_update_charifxus_close_slobifxus_create_slobifxus_free_slobifxus_open_slobifxus_read_slobifxus_seek_slobifxus_tell_slobifxus_write_slobIngres简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageIngres 函数ingres_autocommit_stateingres_autocommitingres_charsetingres_closeingres_commitingres_connectingres_cursoringres_errnoingres_erroringres_errsqlstateingres_escape_stringingres_executeingres_fetch_arrayingres_fetch_associngres_fetch_objectingres_fetch_proc_returningres_fetch_rowingres_field_lengthingres_field_nameingres_field_nullableingres_field_precisioningres_field_scaleingres_field_typeingres_free_resultingres_next_erroringres_num_fieldsingres_num_rowsingres_pconnectingres_prepareingres_queryingres_result_seekingres_rollbackingres_set_environmentingres_unbuffered_queryMaxDB简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageMaxDB 函数maxdb_affected_rowsmaxdb::affected_rowsmaxdb_autocommitmaxdb::auto_commitmaxdb_bind_parammaxdb_bind_resultmaxdb_change_usermaxdb::change_usermaxdb_character_set_namemaxdb::character_set_namemaxdb_client_encodingmaxdb_close_long_datamaxdb::close_long_datamaxdb_closemaxdb::closemaxdb_commitmaxdb::commitmaxdb_connect_errnomaxdb_connect_errormaxdb_connectmaxdb::__constructmaxdb_data_seekmaxdb_result::data_seekmaxdb_debugmaxdb_disable_reads_from_mastermaxdb::disable_reads_from_mastermaxdb_disable_rpl_parsemaxdb_dump_debug_infomaxdb_embedded_connectmaxdb_enable_reads_from_mastermaxdb_enable_rpl_parsemaxdb_errnomaxdb::errnomaxdb_errormaxdb::errormaxdb_escape_stringmaxdb_executemaxdb_fetch_arraymaxdb_result::fetch_arraymaxdb_fetch_assocmaxdb_result::fetch_assocmaxdb_fetch_field_directmaxdb_result::fetch_field_directmaxdb_fetch_fieldmaxdb_result::fetch_fieldmaxdb_fetch_fieldsmaxdb_result::fetch_fieldsmaxdb_fetch_lengthsmaxdb_result::lengthsmaxdb_fetch_objectmaxdb_result::fetch_objectmaxdb_fetch_rowmaxdb_result::fetch_rowmaxdb_fetchmaxdb_field_countmaxdb::field_countmaxdb_field_seekmaxdb_result::field_seekmaxdb_field_tellmaxdb_result::current_fieldmaxdb_free_resultmaxdb_result::freemaxdb_get_client_infomaxdb_get_client_versionmaxdb_get_host_infomaxdb::get_host_infomaxdb_get_metadatamaxdb_get_proto_infomaxdb::protocol_versionmaxdb_get_server_infomaxdb::server_infomaxdb_get_server_versionmaxdb::server_versionmaxdb_infomaxdb::infomaxdb_initmaxdb_insert_idmaxdb::insert_idmaxdb_killmaxdb::killmaxdb_master_querymaxdb_more_resultsmaxdb::more_resultsmaxdb_multi_querymaxdb::multi_querymaxdb_next_resultmaxdb::next_resultmaxdb_num_fieldsmaxdb_result::field_countmaxdb_num_rowsmaxdb::num_rowsmaxdb_optionsmaxdb::optionsmaxdb_param_countmaxdb_pingmaxdb::pingmaxdb_preparemaxdb::preparemaxdb_querymaxdb::querymaxdb_real_connectmaxdb::real_connectmaxdb_real_escape_stringmaxdb::real_escape_stringmaxdb_real_querymaxdb::real_querymaxdb_reportmaxdb_rollbackmaxdb::rollbackmaxdb_rpl_parse_enabledmaxdb_rpl_probemaxdb_rpl_query_typemaxdb::rpl_query_typemaxdb_select_dbmaxdb::select_dbmaxdb_send_long_datamaxdb_send_querymaxdb::send_querymaxdb_server_endmaxdb_server_initmaxdb_set_optmaxdb_sqlstatemaxdb::sqlstatemaxdb_ssl_setmaxdb::ssl_setmaxdb_statmaxdb::statmaxdb_stmt_affected_rowsmaxdb_stmt::affected_rowsmaxdb_stmt_bind_parammaxdb_stmt::bind_parammaxdb_stmt_bind_resultmaxdb_stmt::bind_resultmaxdb_stmt_close_long_datamaxdb_stmt::close_long_datamaxdb_stmt_closemaxdb_stmt::closemaxdb_stmt_data_seekmaxdb_stmt::data_seekmaxdb_stmt_errnomaxdb_stmt::errnomaxdb_stmt_errormaxdb_stmt::errormaxdb_stmt_executemaxdb_stmt::executemaxdb_stmt_fetchmaxdb_stmt::fetchmaxdb_stmt_free_resultmaxdb_stmt::free_resultmaxdb_stmt_initmaxdb::stmt_initmaxdb_stmt_num_rowsmaxdb_stmt::num_rowsmaxdb_stmt_param_countmaxdb_stmt::param_countmaxdb_stmt_preparemaxdb_stmt::preparemaxdb_stmt_resetmaxdb_stmt::resetmaxdb_stmt_result_metadatamaxdb_stmt::result_metadatamaxdb_stmt_send_long_datamaxdb_stmt::send_long_datamaxdb_stmt_sqlstatemaxdb_stmt_store_resultmaxdb_stmt::store_resultmaxdb_store_resultmaxdb::store_resultmaxdb_thread_idmaxdb::thread_idmaxdb_thread_safemaxdb_use_resultmaxdb::use_resultmaxdb_warning_countmaxdb::warning_countMongo安装/配置需求安装运行时配置手册教程连接数据库获取数据库实例获取集合实例插入一个文档使用 MongoCollection::findOne 方法添加多个文档计算文档数量使用游标获取所有文档设置查询条件获取一个子集建立索引读取首选项Write ConcernsSQL 到 Mongo 的对应表链接服务器认证复制集合ShardingUnix Domain Socket支持Connection Pooling (version 1.2.0-1.2.12 *only*)Persistent Connections (version up to 1.1.4 *only*)WritesQueryingUpdatesSecurity故障排除Running the Driver's Tests核心类MongoClientMongoClient::closeMongoClient::connectMongoClient::__constructMongoClient::dropDBMongoClient::__getMongoClient::getConnectionsMongoClient::getHostsMongoClient::getReadPreferenceMongoClient::getWriteConcernMongoClient::killCursorMongoClient::listDBsMongoClient::selectCollectionMongoClient::selectDBMongoClient::setReadPreferenceMongoClient::setWriteConcernMongoClient::__toStringMongoDBMongoDB::authenticateMongoDB::commandMongoDB::__constructMongoDB::createCollectionMongoDB::createDBRefMongoDB::dropMongoDB::dropCollectionMongoDB::executeMongoDB::forceErrorMongoDB::__getMongoDB::getCollectionInfoMongoDB::getCollectionNamesMongoDB::getDBRefMongoDB::getGridFSMongoDB::getProfilingLevelMongoDB::getReadPreferenceMongoDB::getSlaveOkayMongoDB::getWriteConcernMongoDB::lastErrorMongoDB::listCollectionsMongoDB::prevErrorMongoDB::repairMongoDB::resetErrorMongoDB::selectCollectionMongoDB::setProfilingLevelMongoDB::setReadPreferenceMongoDB::setSlaveOkayMongoDB::setWriteConcernMongoDB::__toStringMongoCollectionMongoCollection::aggregateMongoCollection::aggregateCursorMongoCollection::batchInsertMongoCollection::__constructMongoCollection::countMongoCollection::createDBRefMongoCollection::createIndexMongoCollection::deleteIndexMongoCollection::deleteIndexesMongoCollection::distinctMongoCollection::dropMongoCollection::ensureIndexMongoCollection::findMongoCollection::findAndModifyMongoCollection::findOneMongoCollection::__getMongoCollection::getDBRefMongoCollection::getIndexInfoMongoCollection::getNameMongoCollection::getReadPreferenceMongoCollection::getSlaveOkayMongoCollection::getWriteConcernMongoCollection::groupMongoCollection::insertMongoCollection::parallelCollectionScanMongoCollection::removeMongoCollection::saveMongoCollection::setReadPreferenceMongoCollection::setSlaveOkayMongoCollection::setWriteConcernMongoCollection::toIndexStringMongoCollection::__toStringMongoCollection::updateMongoCollection::validateMongoCursorMongoCursor::addOptionMongoCursor::awaitDataMongoCursor::batchSizeMongoCursor::__constructMongoCursor::countMongoCursor::currentMongoCursor::deadMongoCursor::doQueryMongoCursor::explainMongoCursor::fieldsMongoCursor::getNextMongoCursor::getReadPreferenceMongoCursor::hasNextMongoCursor::hintMongoCursor::immortalMongoCursor::infoMongoCursor::keyMongoCursor::limitMongoCursor::maxTimeMSMongoCursor::nextMongoCursor::partialMongoCursor::resetMongoCursor::rewindMongoCursor::setFlagMongoCursor::setReadPreferenceMongoCursor::skipMongoCursor::slaveOkayMongoCursor::snapshotMongoCursor::sortMongoCursor::tailableMongoCursor::timeoutMongoCursor::validTypesMongoIdMongoId::__constructMongoId::getHostnameMongoId::getIncMongoId::getPIDMongoId::getTimestampMongoId::isValidMongoId::__set_stateMongoId::__toStringMongoCodeMongoCode::__constructMongoCode::__toStringMongoDateMongoDate::__constructMongoDate::toDateTimeMongoDate::__toStringMongoRegexMongoRegex::__constructMongoRegex::__toStringMongoBinDataMongoBinData::__constructMongoBinData::__toStringMongoInt32MongoInt32::__constructMongoInt32::__toStringMongoInt64MongoInt64::__constructMongoInt64::__toStringMongoDBRefMongoDBRef::createMongoDBRef::getMongoDBRef::isRefMongoMinKeyMongoMaxKeyMongoTimestampMongoTimestamp::__constructMongoTimestamp::__toStringGridFS ClassesMongoGridFSMongoGridFS::__constructMongoGridFS::deleteMongoGridFS::dropMongoGridFS::findMongoGridFS::findOneMongoGridFS::getMongoGridFS::putMongoGridFS::removeMongoGridFS::storeBytesMongoGridFS::storeFileMongoGridFS::storeUploadMongoGridFSFileMongoGridfsFile::__constructMongoGridFSFile::getBytesMongoGridFSFile::getFilenameMongoGridFSFile::getResourceMongoGridFSFile::getSizeMongoGridFSFile::writeMongoGridFSCursorMongoGridFSCursor::__constructMongoGridFSCursor::currentMongoGridFSCursor::getNextMongoGridFSCursor::keyMiscellaneousMongoLogMongoLog::getCallbackMongoLog::getLevelMongoLog::getModuleMongoLog::setCallbackMongoLog::setLevelMongoLog::setModuleMongoPoolMongoPool::getSizeMongoPool::infoMongoPool::setSizeMongoMongo::connectUtilMongo::__constructMongo::getPoolSizeMongo::getSlaveMongo::getSlaveOkayMongo::poolDebugMongo::setPoolSizeMongo::setSlaveOkayMongo::switchSlaveMongo 函数bson_decodebson_encodeExceptionsMongoExceptionMongoResultExceptionMongoResultException::getDocumentMongoCursorExceptionMongoCursorException::getHostMongoCursorTimeoutExceptionMongoConnectionExceptionMongoGridFSExceptionMongoDuplicateKeyExceptionMongoProtocolExceptionMongoExecutionTimeoutExceptionMongoWriteConcernExceptionMongoWriteConcernException::getDocument更新日志MongoDB安装/配置需求安装PHPHHVM运行时配置预定义常量TutorialsInstalling the driverInstallation with HHVMInstallation with PHPUsing the libraryDriver Architecture and InternalsArchitecturePersisting DataMongoDB\DriverMongoDB\Driver\ManagerMongoDB\Driver\Manager::__constructMongoDB\Driver\Manager::executeBulkWriteMongoDB\Driver\Manager::executeCommandMongoDB\Driver\Manager::executeQueryMongoDB\Driver\Manager::getServersMongoDB\Driver\Manager::selectServerMongoDB\Driver\CommandMongoDB\Driver\Command::__constructMongoDB\Driver\QueryMongoDB\Driver\Query::__constructMongoDB\Driver\BulkWriteMongoDB\Driver\BulkWrite::__constructMongoDB\Driver\BulkWrite::countMongoDB\Driver\BulkWrite::deleteMongoDB\Driver\BulkWrite::insertMongoDB\Driver\BulkWrite::updateMongoDB\Driver\WriteConcernMongoDB\Driver\WriteConcern::__constructMongoDB\Driver\ReadPreferenceMongoDB\Driver\ReadPreference::__constructMongoDB\Driver\CursorMongoDB\Driver\Cursor::__constructMongoDB\Driver\Cursor::getIdMongoDB\Driver\Cursor::getServerMongoDB\Driver\Cursor::isDeadMongoDB\Driver\Cursor::setTypeMapMongoDB\Driver\Cursor::toArrayMongoDB\Driver\CursorIdMongoDB\Driver\CursorId::__constructMongoDB\Driver\CursorId::__toStringMongoDB\Driver\ServerMongoDB\Driver\Server::__constructMongoDB\Driver\Server::executeBulkWriteMongoDB\Driver\Server::executeCommandMongoDB\Driver\Server::executeQueryMongoDB\Driver\Server::getHostMongoDB\Driver\Server::getInfoMongoDB\Driver\Server::getLatencyMongoDB\Driver\Server::getPortMongoDB\Driver\Server::getTagsMongoDB\Driver\Server::getTypeMongoDB\Driver\Server::isArbiterMongoDB\Driver\Server::isHiddenMongoDB\Driver\Server::isPassiveMongoDB\Driver\Server::isPrimaryMongoDB\Driver\Server::isSecondaryMongoDB\Driver\WriteConcernErrorMongoDB\Driver\WriteConcernError::getCodeMongoDB\Driver\WriteConcernError::getInfoMongoDB\Driver\WriteConcernError::getMessageMongoDB\Driver\WriteErrorMongoDB\Driver\WriteError::getCodeMongoDB\Driver\WriteError::getIndexMongoDB\Driver\WriteError::getMessageMongoDB\Driver\WriteResultMongoDB\Driver\WriteResult::getDeletedCountMongoDB\Driver\WriteResult::getInfoMongoDB\Driver\WriteResult::getInsertedCountMongoDB\Driver\WriteResult::getMatchedCountMongoDB\Driver\WriteResult::getModifiedCountMongoDB\Driver\WriteResult::getServerMongoDB\Driver\WriteResult::getUpsertedCountMongoDB\Driver\WriteResult::getUpsertedIdsMongoDB\Driver\WriteResult::getWriteConcernErrorMongoDB\Driver\WriteResult::getWriteErrorsMongoDB\Driver\BSON函数MongoDB\BSON\fromJSONMongoDB\BSON\fromPHPMongoDB\BSON\toJSONMongoDB\BSON\toPHPMongoDB\BSON\BinaryMongoDB\BSON\Binary::__constructMongoDB\BSON\Binary::getSubTypeMongoDB\BSON\JavascriptMongoDB\BSON\Javascript::__constructMongoDB\BSON\MaxKeyMongoDB\BSON\MinKeyMongoDB\BSON\ObjectIDMongoDB\BSON\ObjectID::__constructMongoDB\BSON\ObjectID::__toStringMongoDB\BSON\RegexMongoDB\BSON\Regex::__constructMongoDB\BSON\Regex::getFlagsMongoDB\BSON\Regex::getPatternMongoDB\BSON\Regex::__toStringMongoDB\BSON\TimestampMongoDB\BSON\Timestamp::__constructMongoDB\BSON\Timestamp::__toStringMongoDB\BSON\UTCDatetimeMongoDB\BSON\UTCDatetime::__constructMongoDB\BSON\UTCDatetime::toDateTimeMongoDB\BSON\UTCDatetime::__toStringMongoDB\BSON\TypeMongoDB\BSON\PersistableMongoDB\BSON\SerializableMongoDB\BSON\Serializable::bsonSerializeMongoDB\BSON\UnserializableMongoDB\BSON\Unserializable::bsonUnserializeMongoDB\Driver\ExceptionMongoDB\Driver\Exception\AuthenticationExceptionMongoDB\Driver\Exception\BulkWriteExceptionMongoDB\Driver\Exception\ConnectionExceptionMongoDB\Driver\Exception\ConnectionTimeoutExceptionMongoDB\Driver\Exception\ExceptionMongoDB\Driver\Exception\ExecutionTimeoutExceptionMongoDB\Driver\Exception\InvalidArgumentExceptionMongoDB\Driver\Exception\LogicExceptionMongoDB\Driver\Exception\RuntimeExceptionMongoDB\Driver\Exception\SSLConnectionExceptionMongoDB\Driver\Exception\UnexpectedValueExceptionMongoDB\Driver\Exception\WriteExceptionMongoDB\Driver\Exception\WriteException::getWriteResultmSQL简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usagemSQL 函数msql_affected_rowsmsql_closemsql_connectmsql_create_dbmsql_createdbmsql_data_seekmsql_db_querymsql_dbnamemsql_drop_dbmsql_errormsql_fetch_arraymsql_fetch_fieldmsql_fetch_objectmsql_fetch_rowmsql_field_flagsmsql_field_lenmsql_field_namemsql_field_seekmsql_field_tablemsql_field_typemsql_fieldflagsmsql_fieldlenmsql_fieldnamemsql_fieldtablemsql_fieldtypemsql_free_resultmsql_list_dbsmsql_list_fieldsmsql_list_tablesmsql_num_fieldsmsql_num_rowsmsql_numfieldsmsql_numrowsmsql_pconnectmsql_querymsql_regcasemsql_resultmsql_select_dbmsql_tablenamemsqlMssql简介安装/配置需求安装运行时配置资源类型预定义常量Mssql 函数mssql_bindmssql_closemssql_connectmssql_data_seekmssql_executemssql_fetch_arraymssql_fetch_assocmssql_fetch_batchmssql_fetch_fieldmssql_fetch_objectmssql_fetch_rowmssql_field_lengthmssql_field_namemssql_field_seekmssql_field_typemssql_free_resultmssql_free_statementmssql_get_last_messagemssql_guid_stringmssql_initmssql_min_error_severitymssql_min_message_severitymssql_next_resultmssql_num_fieldsmssql_num_rowsmssql_pconnectmssql_querymssql_resultmssql_rows_affectedmssql_select_dbMySQLOverview of the MySQL PHP driversTerminology overviewChoosing an APIChoosing a libraryConceptsBuffered and Unbuffered queriesCharacter setsMysql简介安装/配置需求安装运行时配置资源类型更新日志预定义常量范例MySQL 扩展概述范例MySQL 函数mysql_affected_rowsmysql_client_encodingmysql_closemysql_connectmysql_create_dbmysql_data_seekmysql_db_namemysql_db_querymysql_drop_dbmysql_errnomysql_errormysql_escape_stringmysql_fetch_arraymysql_fetch_assocmysql_fetch_fieldmysql_fetch_lengthsmysql_fetch_objectmysql_fetch_rowmysql_field_flagsmysql_field_lenmysql_field_namemysql_field_seekmysql_field_tablemysql_field_typemysql_free_resultmysql_get_client_infomysql_get_host_infomysql_get_proto_infomysql_get_server_infomysql_infomysql_insert_idmysql_list_dbsmysql_list_fieldsmysql_list_processesmysql_list_tablesmysql_num_fieldsmysql_num_rowsmysql_pconnectmysql_pingmysql_querymysql_real_escape_stringmysql_resultmysql_select_dbmysql_set_charsetmysql_statmysql_tablenamemysql_thread_idmysql_unbuffered_queryMysqli简介OverviewQuick start guideDual procedural and object-oriented interfaceConnectionsExecuting statementsPrepared StatementsStored ProceduresMultiple StatementsAPI support for transactionsMetadata安装/配置需求安装运行时配置资源类型mysqli扩展和持久化连接预定义常量NotesMySQLi扩展功能概述MySQLimysqli::$affected_rowsmysqli_affected_rowsmysqli::autocommitmysqli_autocommitmysqli::begin_transactionmysqli_begin_transactionmysqli::change_usermysqli_change_usermysqli::character_set_namemysqli_character_set_namemysqli::$client_infomysqli_get_client_infomysqli::$client_versionmysqli_get_client_versionmysqli::closemysqli_closemysqli::commitmysqli_commitmysqli::$connect_errnomysqli_connect_errnomysqli::$connect_errormysqli_connect_errormysqli::__constructmysqli_connectmysqli::debugmysqli_debugmysqli::dump_debug_infomysqli_dump_debug_infomysqli::errnomysqli_errnomysqli::$error_listmysqli_error_listmysqli::$errormysqli_errormysqli::$field_countmysqli_field_countmysqli::get_charsetmysqli_get_charsetmysqli::get_client_infomysqli_get_client_infomysqli_get_client_statsmysqli_get_client_versionmysqli::$client_versionmysqli::get_connection_statsmysqli_get_connection_statsmysqli::$host_infomysqli_get_host_infomysqli::$protocol_versionmysqli_get_proto_infomysqli::$server_infomysqli_get_server_infomysqli::$server_versionmysqli_get_server_versionmysqli::get_warningsmysqli_get_warningsmysqli::$infomysqli_infomysqli::initmysqli_initmysqli::$insert_idmysqli_insert_idmysqli::killmysqli_killmysqli::more_resultsmysqli_more_resultsmysqli::multi_querymysqli_multi_querymysqli::next_resultmysqli_next_resultmysqli::optionsmysqli_optionsmysqli::pingmysqli_pingmysqli::pollmysqli_pollmysqli::preparemysqli_preparemysqli::querymysqli_querymysqli::real_connectmysqli_real_connectmysqli::real_escape_stringmysqli_real_escape_stringmysqli::real_querymysqli_real_querymysqli::reap_async_querymysqli_reap_async_querymysqli::refreshmysqli_refreshmysqli::release_savepointmysqli_release_savepointmysqli::rollbackmysqli_rollbackmysqli::rpl_query_typemysqli_rpl_query_typemysqli::savepointmysqli_savepointmysqli::select_dbmysqli_select_dbmysqli::send_querymysqli_send_querymysqli::set_charsetmysqli_set_charsetmysqli::set_local_infile_defaultmysqli_set_local_infile_defaultmysqli::set_local_infile_handlermysqli_set_local_infile_handlermysqli::$sqlstatemysqli_sqlstatemysqli::ssl_setmysqli_ssl_setmysqli::statmysqli_statmysqli::stmt_initmysqli_stmt_initmysqli::store_resultmysqli_store_resultmysqli::$thread_idmysqli_thread_idmysqli::thread_safemysqli_thread_safemysqli::use_resultmysqli_use_resultmysqli::$warning_countmysqli_warning_countMySQLi_STMTmysqli_stmt::$affected_rowsmysqli_stmt_affected_rowsmysqli_stmt::attr_getmysqli_stmt_attr_getmysqli_stmt::attr_setmysqli_stmt_attr_setmysqli_stmt::bind_parammysqli_stmt_bind_parammysqli_stmt::bind_resultmysqli_stmt_bind_resultmysqli_stmt::closemysqli_stmt_closemysqli_stmt::__constructmysqli_stmt::data_seekmysqli_stmt_data_seekmysqli_stmt::$errnomysqli_stmt_errnomysqli_stmt::$error_listmysqli_stmt_error_listmysqli_stmt::$errormysqli_stmt_errormysqli_stmt::executemysqli_stmt_executemysqli_stmt::fetchmysqli_stmt_fetchmysqli_stmt::$field_countmysqli_stmt_field_countmysqli_stmt::free_resultmysqli_stmt_free_resultmysqli_stmt::get_resultmysqli_stmt_get_resultmysqli_stmt::get_warningsmysqli_stmt_get_warningsmysqli_stmt::$insert_idmysqli_stmt_insert_idmysqli_stmt::more_resultsmysqli_stmt_more_resultsmysqli_stmt::next_resultmysqli_stmt_next_resultmysqli_stmt::$num_rowsmysqli_stmt_num_rowsmysqli_stmt::$param_countmysqli_stmt_param_countmysqli_stmt::preparemysqli_stmt_preparemysqli_stmt::resetmysqli_stmt_resetmysqli_stmt::result_metadatamysqli_stmt_result_metadatamysqli_stmt::send_long_datamysqli_stmt_send_long_datamysqli_stmt::$sqlstatemysqli_stmt_sqlstatemysqli_stmt::store_resultmysqli_stmt_store_resultmysqli_resultmysqli_result::$current_fieldmysqli_field_tellmysqli_result::data_seekmysqli_data_seekmysqli_result::fetch_allmysqli_fetch_allmysqli_result::fetch_arraymysqli_fetch_arraymysqli_result::fetch_assocmysqli_fetch_assocmysqli_result::fetch_field_directmysqli_fetch_field_directmysqli_result::fetch_fieldmysqli_fetch_fieldmysqli_result::fetch_fieldsmysqli_fetch_fieldsmysqli_result::fetch_objectmysqli_fetch_objectmysqli_result::fetch_rowmysqli_fetch_rowmysqli_result::$field_countmysqli_num_fieldsmysqli_result::field_seekmysqli_field_seekmysqli_result::freemysqli_free_resultmysqli_result::$lengthsmysqli_fetch_lengthsmysqli_result::$num_rowsmysqli_num_rowsMySQLi_Drivermysqli_driver::embedded_server_endmysqli_embedded_server_endmysqli_driver::embedded_server_startmysqli_embedded_server_startmysqli_driver::$report_modemysqli_reportMySQLi_Warningmysqli_warning::__constructmysqli_warning::nextmysqli_sql_exception别名和过时的Mysqli 函数mysqli_bind_parammysqli_bind_resultmysqli_client_encodingmysqli_connectmysqli::disable_reads_from_mastermysqli_disable_reads_from_mastermysqli_disable_rpl_parsemysqli_enable_reads_from_mastermysqli_enable_rpl_parsemysqli_escape_stringmysqli_executemysqli_fetchmysqli_get_cache_statsmysqli_get_links_statsmysqli_get_metadatamysqli_master_querymysqli_param_countmysqli_reportmysqli_rpl_parse_enabledmysqli_rpl_probemysqli_send_long_datamysqli_set_optmysqli_slave_queryMysqlnd简介OverviewInstallation运行时配置IncompatibilitiesPersistent ConnectionsStatisticsNotesMemory managementMySQL Native Driver Plugin APIA comparison of mysqlnd plugins with MySQL ProxyObtaining the mysqlnd plugin APIMySQL Native Driver Plugin ArchitectureThe mysqlnd plugin APIGetting started building a mysqlnd pluginmysqlnd_ms简介快速入门与例子SetupRunning statements连接状态SQL Hints (SQL 优化器)事务XA/Distributed Transactions服务级别和一致性Global transaction IDs (GTID)Cache integration故障转移分区和分片MySQL Fabric概念Architecture连接池与切换事务控制错误处理短错误错误处理负载均衡Read-write splittingFilterService level and consistencyGlobal transaction IDsCache integrationSupported clustersXA/Distributed transactions安装/配置需求安装运行时配置Plugin configuration file (>=1.1.x)预定义常量Mysqlnd_ms 函数mysqlnd_ms_dump_serversmysqlnd_ms_fabric_select_globalmysqlnd_ms_fabric_select_shardmysqlnd_ms_get_last_gtidmysqlnd_ms_get_last_used_connectionmysqlnd_ms_get_statsmysqlnd_ms_match_wildmysqlnd_ms_query_is_selectmysqlnd_ms_set_qosmysqlnd_ms_set_user_pick_servermysqlnd_ms_xa_beginmysqlnd_ms_xa_commitmysqlnd_ms_xa_gcmysqlnd_ms_xa_rollbackChange HistoryPECL/mysqlnd_ms 1.6 seriesPECL/mysqlnd_ms 1.5 seriesPECL/mysqlnd_ms 1.4 seriesPECL/mysqlnd_ms 1.3 seriesPECL/mysqlnd_ms 1.2 seriesPECL/mysqlnd_ms 1.1 seriesPECL/mysqlnd_ms 1.0 seriesmysqlnd_qc简介Quickstart and ExamplesArchitecture and ConceptsSetupCaching queriesSetting the TTLPattern based cachingSlam defenseFinding cache candidatesMeasuring cache efficiencyBeyond TTL: user-defined storage安装/配置需求安装运行时配置预定义常量mysqlnd_qc 函数mysqlnd_qc_clear_cachemysqlnd_qc_get_available_handlersmysqlnd_qc_get_cache_infomysqlnd_qc_get_core_statsmysqlnd_qc_get_normalized_query_trace_logmysqlnd_qc_get_query_trace_logmysqlnd_qc_set_cache_conditionmysqlnd_qc_set_is_selectmysqlnd_qc_set_storage_handlermysqlnd_qc_set_user_handlersChange HistoryPECL/mysqlnd_qc 1.2 seriesPECL/mysqlnd_qc 1.1 seriesPECL/mysqlnd_qc 1.0 seriesmysqlnd_uh简介Quickstart and ExamplesSetupHow it worksInstalling a proxyBasic query monitoring安装/配置需求安装运行时配置资源类型预定义常量MysqlndUhConnectionMysqlndUhConnection::changeUserMysqlndUhConnection::charsetNameMysqlndUhConnection::closeMysqlndUhConnection::connectMysqlndUhConnection::__constructMysqlndUhConnection::endPSessionMysqlndUhConnection::escapeStringMysqlndUhConnection::getAffectedRowsMysqlndUhConnection::getErrorNumberMysqlndUhConnection::getErrorStringMysqlndUhConnection::getFieldCountMysqlndUhConnection::getHostInformationMysqlndUhConnection::getLastInsertIdMysqlndUhConnection::getLastMessageMysqlndUhConnection::getProtocolInformationMysqlndUhConnection::getServerInformationMysqlndUhConnection::getServerStatisticsMysqlndUhConnection::getServerVersionMysqlndUhConnection::getSqlstateMysqlndUhConnection::getStatisticsMysqlndUhConnection::getThreadIdMysqlndUhConnection::getWarningCountMysqlndUhConnection::initMysqlndUhConnection::killConnectionMysqlndUhConnection::listFieldsMysqlndUhConnection::listMethodMysqlndUhConnection::moreResultsMysqlndUhConnection::nextResultMysqlndUhConnection::pingMysqlndUhConnection::queryMysqlndUhConnection::queryReadResultsetHeaderMysqlndUhConnection::reapQueryMysqlndUhConnection::refreshServerMysqlndUhConnection::restartPSessionMysqlndUhConnection::selectDbMysqlndUhConnection::sendCloseMysqlndUhConnection::sendQueryMysqlndUhConnection::serverDumpDebugInformationMysqlndUhConnection::setAutocommitMysqlndUhConnection::setCharsetMysqlndUhConnection::setClientOptionMysqlndUhConnection::setServerOptionMysqlndUhConnection::shutdownServerMysqlndUhConnection::simpleCommandMysqlndUhConnection::simpleCommandHandleResponseMysqlndUhConnection::sslSetMysqlndUhConnection::stmtInitMysqlndUhConnection::storeResultMysqlndUhConnection::txCommitMysqlndUhConnection::txRollbackMysqlndUhConnection::useResultMysqlndUhPreparedStatementMysqlndUhPreparedStatement::__constructMysqlndUhPreparedStatement::executeMysqlndUhPreparedStatement::prepareMysqlnd_uh 函数mysqlnd_uh_convert_to_mysqlndmysqlnd_uh_set_connection_proxymysqlnd_uh_set_statement_proxyChange HistoryPECL/mysqlnd_uh 1.0 seriesmysqlnd_mux简介ConceptsArchitectureConnection poolSharing connections安装/配置需求安装运行时配置预定义常量Change HistoryPECL/mysqlnd_mux 1.0 seriesmysqlnd_memcache简介Quickstart and ExamplesSetupUsage安装/配置需求安装运行时配置预定义常量Mysqlnd_memcache 函数mysqlnd_memcache_get_configmysqlnd_memcache_setChange HistoryPECL/mysqlnd_memcache 1.0 seriesOCI8简介安装/配置需求安装Testing运行时配置预定义常量范例OCI8 Connection Handling and Connection PoolingOCI8 Fast Application Notification (FAN) SupportOCI8 and DTrace Dynamic TracingSupported DatatypesOCI8 函数oci_bind_array_by_nameoci_bind_by_nameoci_canceloci_client_versionoci_closeoci_commitoci_connectoci_define_by_nameoci_erroroci_executeoci_fetch_alloci_fetch_arrayoci_fetch_assococi_fetch_objectoci_fetch_rowoci_fetchoci_field_is_nulloci_field_nameoci_field_precisionoci_field_scaleoci_field_sizeoci_field_type_rawoci_field_typeoci_free_descriptoroci_free_statementoci_get_implicit_resultsetoci_internal_debugoci_lob_copyoci_lob_is_equaloci_new_collectionoci_new_connectoci_new_cursoroci_new_descriptoroci_num_fieldsoci_num_rowsoci_parseoci_password_changeoci_pconnectoci_resultoci_rollbackoci_server_versionoci_set_actionoci_set_client_identifieroci_set_client_infooci_set_editionoci_set_module_nameoci_set_prefetchoci_statement_typeOCI-CollectionOCI-Collection::appendOCI-Collection::assignOCI-Collection::assignElemOCI-Collection::freeOCI-Collection::getElemOCI-Collection::maxOCI-Collection::sizeOCI-Collection::trimOCI-LobOCI-Lob::appendOCI-Lob::closeOCI-Lob::eofOCI-Lob::eraseOCI-Lob::exportOCI-Lob::flushOCI-Lob::freeOCI-Lob::getBufferingOCI-Lob::importOCI-Lob::loadOCI-Lob::readOCI-Lob::rewindOCI-Lob::saveOCI-Lob::saveFileOCI-Lob::seekOCI-Lob::setBufferingOCI-Lob::sizeOCI-Lob::tellOCI-Lob::truncateOCI-Lob::writeOCI-Lob::writeTemporaryOCI-Lob::writeToFileOCI8 Obsolete Aliases and FunctionsocibindbynameocicancelocicloselobocicollappendocicollassignocicollassignelemocicollgetelemocicollmaxocicollsizeocicolltrimocicolumnisnullocicolumnnameocicolumnprecisionocicolumnscaleocicolumnsizeocicolumntypeocicolumntyperawocicommitocidefinebynameocierrorociexecuteocifetchocifetchintoocifetchstatementocifreecollectionocifreecursorocifreedescocifreestatementociinternaldebugociloadlobocilogoffocilogonocinewcollectionocinewcursorocinewdescriptorocinlogonocinumcolsociparseociplogonociresultocirollbackocirowcountocisavelobocisavelobfileociserverversionocisetprefetchocistatementtypeociwritelobtofileociwritetemporarylobParadox简介安装/配置需求安装运行时配置资源类型预定义常量Paradox 函数px_closepx_create_fppx_date2stringpx_delete_recordpx_deletepx_get_fieldpx_get_infopx_get_parameterpx_get_recordpx_get_schemapx_get_valuepx_insert_recordpx_newpx_numfieldspx_numrecordspx_open_fppx_put_recordpx_retrieve_recordpx_set_blob_filepx_set_parameterpx_set_tablenamepx_set_targetencodingpx_set_valuepx_timestamp2stringpx_update_recordPostgreSQL简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usagePostgreSQL 函数pg_affected_rowspg_cancel_querypg_client_encodingpg_closepg_connect_pollpg_connectpg_connection_busypg_connection_resetpg_connection_statuspg_consume_inputpg_convertpg_copy_frompg_copy_topg_dbnamepg_deletepg_end_copypg_escape_byteapg_escape_identifierpg_escape_literalpg_escape_stringpg_executepg_fetch_all_columnspg_fetch_allpg_fetch_arraypg_fetch_assocpg_fetch_objectpg_fetch_resultpg_fetch_rowpg_field_is_nullpg_field_namepg_field_numpg_field_prtlenpg_field_sizepg_field_tablepg_field_type_oidpg_field_typepg_flushpg_free_resultpg_get_notifypg_get_pidpg_get_resultpg_hostpg_insertpg_last_errorpg_last_noticepg_last_oidpg_lo_closepg_lo_createpg_lo_exportpg_lo_importpg_lo_openpg_lo_read_allpg_lo_readpg_lo_seekpg_lo_tellpg_lo_truncatepg_lo_unlinkpg_lo_writepg_meta_datapg_num_fieldspg_num_rowspg_optionspg_parameter_statuspg_pconnectpg_pingpg_portpg_preparepg_put_linepg_query_paramspg_querypg_result_error_fieldpg_result_errorpg_result_seekpg_result_statuspg_selectpg_send_executepg_send_preparepg_send_query_paramspg_send_querypg_set_client_encodingpg_set_error_verbositypg_socketpg_tracepg_transaction_statuspg_ttypg_unescape_byteapg_untracepg_updatepg_versionSQLite简介安装/配置需求安装运行时配置资源类型预定义常量SQLite 函数sqlite_array_querySQLiteDatabase::arrayQuerysqlite_busy_timeoutSQLiteDatabase::busyTimeoutsqlite_changesSQLiteDatabase::changessqlite_closesqlite_columnSQLiteResult::columnSQLiteUnbuffered::columnsqlite_create_aggregateSQLiteDatabase::createAggregatesqlite_create_functionSQLiteDatabase::createFunctionsqlite_currentSQLiteResult::currentSQLiteUnbuffered::currentsqlite_error_stringsqlite_escape_stringsqlite_execSQLiteDatabase::execsqlite_factorysqlite_fetch_allSQLiteResult::fetchAllSQLiteUnbuffered::fetchAllsqlite_fetch_arraySQLiteResult::fetchSQLiteUnbuffered::fetchsqlite_fetch_column_typesSQLiteDatabase::fetchColumnTypessqlite_fetch_objectSQLiteResult::fetchObjectSQLiteUnbuffered::fetchObjectsqlite_fetch_singleSQLiteResult::fetchSingleSQLiteUnbuffered::fetchSinglesqlite_fetch_stringsqlite_field_nameSQLiteResult::fieldNameSQLiteUnbuffered::fieldNamesqlite_has_moresqlite_has_prevSQLiteResult::hasPrevsqlite_keySQLiteResult::keysqlite_last_errorSQLiteDatabase::lastErrorsqlite_last_insert_rowidSQLiteDatabase::lastInsertRowidsqlite_libencodingsqlite_libversionsqlite_nextSQLiteResult::nextSQLiteUnbuffered::nextsqlite_num_fieldsSQLiteResult::numFieldsSQLiteUnbuffered::numFieldssqlite_num_rowsSQLiteResult::numRowssqlite_opensqlite_popensqlite_prevSQLiteResult::prevsqlite_querySQLiteDatabase::querysqlite_rewindSQLiteResult::rewindsqlite_seekSQLiteResult::seeksqlite_single_querySQLiteDatabase::singleQuerysqlite_udf_decode_binarysqlite_udf_encode_binarysqlite_unbuffered_querySQLiteDatabase::unbufferedQuerysqlite_validSQLiteResult::validSQLiteUnbuffered::validSQLite3简介安装/配置需求安装运行时配置资源类型预定义常量SQLite3SQLite3::busyTimeoutSQLite3::changesSQLite3::closeSQLite3::__constructSQLite3::createAggregateSQLite3::createCollationSQLite3::createFunctionSQLite3::escapeStringSQLite3::execSQLite3::lastErrorCodeSQLite3::lastErrorMsgSQLite3::lastInsertRowIDSQLite3::loadExtensionSQLite3::openSQLite3::prepareSQLite3::querySQLite3::querySingleSQLite3::versionSQLite3StmtSQLite3Stmt::bindParamSQLite3Stmt::bindValueSQLite3Stmt::clearSQLite3Stmt::closeSQLite3Stmt::executeSQLite3Stmt::paramCountSQLite3Stmt::resetSQLite3ResultSQLite3Result::columnNameSQLite3Result::columnTypeSQLite3Result::fetchArraySQLite3Result::finalizeSQLite3Result::numColumnsSQLite3Result::resetSQLSRV简介安装/配置需求安装运行时配置资源类型预定义常量SQLSRV 函数sqlsrv_begin_transactionsqlsrv_cancelsqlsrv_client_infosqlsrv_closesqlsrv_commitsqlsrv_configuresqlsrv_connectsqlsrv_errorssqlsrv_executesqlsrv_fetch_arraysqlsrv_fetch_objectsqlsrv_fetchsqlsrv_field_metadatasqlsrv_free_stmtsqlsrv_get_configsqlsrv_get_fieldsqlsrv_has_rowssqlsrv_next_resultsqlsrv_num_fieldssqlsrv_num_rowssqlsrv_preparesqlsrv_querysqlsrv_rollbacksqlsrv_rows_affectedsqlsrv_send_stream_datasqlsrv_server_infoSybase简介安装/配置需求安装运行时配置资源类型预定义常量Sybase 函数sybase_affected_rowssybase_closesybase_connectsybase_data_seeksybase_deadlock_retry_countsybase_fetch_arraysybase_fetch_assocsybase_fetch_fieldsybase_fetch_objectsybase_fetch_rowsybase_field_seeksybase_free_resultsybase_get_last_messagesybase_min_client_severitysybase_min_error_severitysybase_min_message_severitysybase_min_server_severitysybase_num_fieldssybase_num_rowssybase_pconnectsybase_querysybase_resultsybase_select_dbsybase_set_message_handlersybase_unbuffered_querytokyo_tyrant简介安装/配置需求安装运行时配置资源类型预定义常量范例TokyoTyrantTokyoTyrant::addTokyoTyrant::connectTokyoTyrant::connectUriTokyoTyrant::__constructTokyoTyrant::copyTokyoTyrant::extTokyoTyrant::fwmKeysTokyoTyrant::getTokyoTyrant::getIteratorTokyoTyrant::numTokyoTyrant::outTokyoTyrant::putTokyoTyrant::putCatTokyoTyrant::putKeepTokyoTyrant::putNrTokyoTyrant::putShlTokyoTyrant::restoreTokyoTyrant::setMasterTokyoTyrant::sizeTokyoTyrant::statTokyoTyrant::syncTokyoTyrant::tuneTokyoTyrant::vanishTokyoTyrantTableTokyoTyrantTable::addTokyoTyrantTable::genUidTokyoTyrantTable::getTokyoTyrantTable::getIteratorTokyoTyrantTable::getQueryTokyoTyrantTable::outTokyoTyrantTable::putTokyoTyrantTable::putCatTokyoTyrantTable::putKeepTokyoTyrantTable::putNrTokyoTyrantTable::putShlTokyoTyrantTable::setIndexTokyoTyrantQueryTokyoTyrantQuery::addCondTokyoTyrantQuery::__constructTokyoTyrantQuery::countTokyoTyrantQuery::currentTokyoTyrantQuery::hintTokyoTyrantQuery::keyTokyoTyrantQuery::metaSearchTokyoTyrantQuery::nextTokyoTyrantQuery::outTokyoTyrantQuery::rewindTokyoTyrantQuery::searchTokyoTyrantQuery::setLimitTokyoTyrantQuery::setOrderTokyoTyrantQuery::validTokyoTyrantIteratorTokyoTyrantIterator::__constructTokyoTyrantIterator::currentTokyoTyrantIterator::keyTokyoTyrantIterator::nextTokyoTyrantIterator::rewindTokyoTyrantIterator::validTokyoTyrantException日期与时间相关扩展Calendar简介安装/配置需求安装运行时配置资源类型预定义常量日历 函数cal_days_in_monthcal_from_jdcal_infocal_to_jdeaster_dateeaster_daysFrenchToJDGregorianToJDJDDayOfWeekJDMonthNameJDToFrenchJDToGregorianjdtojewishJDToJulianjdtounixJewishToJDJulianToJDunixtojd日期/时间简介安装/配置需求安装运行时配置资源类型预定义常量DateTimeDateTime::adddate_addDateTime::__constructdate_createDateTime::createFromFormatdate_create_from_formatDateTime::getLastErrorsdate_get_last_errorsDateTime::modifydate_modifyDateTime::__set_stateDateTime::setDatedate_date_setDateTime::setISODatedate_isodate_setDateTime::setTimedate_time_setDateTime::setTimestampdate_timestamp_setDateTime::setTimezonedate_timezone_setDateTime::subdate_subDateTimeImmutableDateTimeImmutable::addDateTimeImmutable::__constructdate_create_immutableDateTimeImmutable::createFromFormatdate_create_immutable_from_formatDateTimeImmutable::createFromMutableDateTimeImmutable::getLastErrorsDateTimeImmutable::modifyDateTimeImmutable::__set_stateDateTimeImmutable::setDateDateTimeImmutable::setISODateDateTimeImmutable::setTimeDateTimeImmutable::setTimestampDateTimeImmutable::setTimezoneDateTimeImmutable::subDateTimeInterfaceDateTime::diffDateTimeImmutable::diffDateTimeInterface::diffdate_diffDateTime::formatDateTimeImmutable::formatDateTimeInterface::formatdate_formatDateTime::getOffsetDateTimeImmutable::getOffsetDateTimeInterface::getOffsetdate_offset_getDateTime::getTimestampDateTimeImmutable::getTimestampDateTimeInterface::getTimestampdate_timestamp_getDateTime::getTimezoneDateTimeImmutable::getTimezoneDateTimeInterface::getTimezonedate_timezone_getDateTime::__wakeupDateTimeImmutable::__wakeupDateTimeInterface::__wakeupDateTimeZoneDateTimeZone::__constructtimezone_openDateTimeZone::getLocationtimezone_location_getDateTimeZone::getNametimezone_name_getDateTimeZone::getOffsettimezone_offset_getDateTimeZone::getTransitionstimezone_transitions_getDateTimeZone::listAbbreviationstimezone_abbreviations_listDateTimeZone::listIdentifierstimezone_identifiers_listDateIntervalDateInterval::__constructDateInterval::createFromDateStringDateInterval::formatDatePeriodDatePeriod::__constructDate/Time 函数checkdatedate_adddate_create_from_formatdate_create_immutable_from_formatdate_create_immutabledate_createdate_date_setdate_default_timezone_getdate_default_timezone_setdate_diffdate_formatdate_get_last_errorsdate_interval_create_from_date_stringdate_interval_formatdate_isodate_setdate_modifydate_offset_getdate_parse_from_formatdate_parsedate_subdate_sun_infodate_sunrisedate_sunsetdate_time_setdate_timestamp_getdate_timestamp_setdate_timezone_getdate_timezone_setdategetdategettimeofdaygmdategmmktimegmstrftimeidatelocaltimemicrotimemktimestrftimestrptimestrtotimetimetimezone_abbreviations_listtimezone_identifiers_listtimezone_location_gettimezone_name_from_abbrtimezone_name_gettimezone_offset_gettimezone_opentimezone_transitions_gettimezone_version_getSupported Date and Time FormatsTime FormatsDate FormatsCompound FormatsRelative Formats所支持的时区列表非洲美洲南极洲北极亚洲大西洋澳洲欧洲印度太平洋地区其他HRTime简介安装/配置安装范例Basic usageHRTime\PerformanceCounterHRTime\PerformanceCounter::getElapsedTicksHRTime\PerformanceCounter::getFrequencyHRTime\PerformanceCounter::getLastElapsedTicksHRTime\PerformanceCounter::isRunningHRTime\PerformanceCounter::startHRTime\PerformanceCounter::stopHRTime\StopWatchHRTime\StopWatch::getElapsedTimeHRTime\StopWatch::getLastElapsedTimeHRTime\Unit文件系统相关扩展Direct IO简介安装/配置需求安装运行时配置资源类型预定义常量Direct IO 函数dio_closedio_fcntldio_opendio_readdio_seekdio_statdio_tcsetattrdio_truncatedio_write目录安装/配置需求安装运行时配置资源类型预定义常量DirectoryDirectory::closeDirectory::readDirectory::rewindDirectory 函数chdirchrootclosedirdirgetcwdopendirreaddirrewinddirscandirFileinfo简介安装/配置需求安装运行时配置资源类型预定义常量Fileinfo 函数finfo_bufferfinfo::bufferfinfo_closefinfo_filefinfo::filefinfo_openfinfo::__constructfinfo_set_flagsfinfo::set_flagsmime_content_typefinfofinfo::bufferfinfo::__constructfinfo::filefinfo::set_flagsFilesystem简介安装/配置需求安装运行时配置资源类型预定义常量Filesystem 函数basenamechgrpchmodchownclearstatcachecopydeletedirnamedisk_free_spacedisk_total_spacediskfreespacefclosefeoffflushfgetcfgetcsvfgetsfgetssfile_existsfile_get_contentsfile_put_contentsfilefileatimefilectimefilegroupfileinodefilemtimefileownerfilepermsfilesizefiletypeflockfnmatchfopenfpassthrufputcsvfputsfreadfscanffseekfstatftellftruncatefwriteglobis_diris_executableis_fileis_linkis_readableis_uploaded_fileis_writableis_writeablelchgrplchownlinklinkinfolstatmkdirmove_uploaded_fileparse_ini_fileparse_ini_stringpathinfopclosepopenreadfilereadlinkrealpath_cache_getrealpath_cache_sizerealpathrenamerewindrmdirset_file_bufferstatsymlinktempnamtmpfiletouchumaskunlinkInotify简介安装/配置需求安装/配置运行时配置资源类型预定义常量Inotify 函数inotify_add_watchinotify_initinotify_queue_leninotify_readinotify_rm_watchMimetype简介安装/配置需求安装运行时配置资源类型预定义常量Proctitle简介安装/配置需求安装运行时配置资源类型预定义常量Proctitle 函数setproctitlesetthreadtitlexattr简介安装/配置需求安装运行时配置资源类型预定义常量xattr 函数xattr_getxattr_listxattr_removexattr_setxattr_supportedxdiff简介安装/配置需求安装运行时配置资源类型预定义常量xdiff 函数xdiff_file_bdiff_sizexdiff_file_bdiffxdiff_file_bpatchxdiff_file_diff_binaryxdiff_file_diffxdiff_file_merge3xdiff_file_patch_binaryxdiff_file_patchxdiff_file_rabdiffxdiff_string_bdiff_sizexdiff_string_bdiffxdiff_string_bpatchxdiff_string_diff_binaryxdiff_string_diffxdiff_string_merge3xdiff_string_patch_binaryxdiff_string_patchxdiff_string_rabdiff国际化与字符编码支持Enchant简介安装/配置需求安装运行时配置资源类型预定义常量范例Enchant 函数enchant_broker_describeenchant_broker_dict_existsenchant_broker_free_dictenchant_broker_freeenchant_broker_get_dict_pathenchant_broker_get_errorenchant_broker_initenchant_broker_list_dictsenchant_broker_request_dictenchant_broker_request_pwl_dictenchant_broker_set_dict_pathenchant_broker_set_orderingenchant_dict_add_to_personalenchant_dict_add_to_sessionenchant_dict_checkenchant_dict_describeenchant_dict_get_errorenchant_dict_is_in_sessionenchant_dict_quick_checkenchant_dict_store_replacementenchant_dict_suggestFriBiDi简介安装/配置需求安装运行时配置资源类型预定义常量FriBiDi 函数fribidi_log2visGender简介安装/配置安装范例Usage example.Gender\GenderGender\Gender::connectGender\Gender::__constructGender\Gender::countryGender\Gender::getGender\Gender::isNickGender\Gender::similarNamesGettext简介安装/配置需求安装运行时配置资源类型预定义常量Gettext 函数bind_textdomain_codesetbindtextdomaindcgettextdcngettextdgettextdngettextgettextngettexttextdomainiconv简介安装/配置需求安装运行时配置资源类型预定义常量iconv 函数iconv_get_encodingiconv_mime_decode_headersiconv_mime_decodeiconv_mime_encodeiconv_set_encodingiconv_strleniconv_strposiconv_strrposiconv_substriconvob_iconv_handlerintl简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usage of this extensionCollatorCollator::asortcollator_asortCollator::comparecollator_compareCollator::__constructCollator::createcollator_createCollator::getAttributecollator_get_attributeCollator::getErrorCodecollator_get_error_codeCollator::getErrorMessagecollator_get_error_messageCollator::getLocalecollator_get_localeCollator::getSortKeycollator_get_sort_keyCollator::getStrengthcollator_get_strengthCollator::setAttributecollator_set_attributeCollator::setStrengthcollator_set_strengthCollator::sortWithSortKeyscollator_sort_with_sort_keysCollator::sortcollator_sortNumberFormatterNumberFormatter::createnumfmt_createNumberFormatter::__constructNumberFormatter::formatCurrencynumfmt_format_currencyNumberFormatter::formatnumfmt_formatNumberFormatter::getAttributenumfmt_get_attributeNumberFormatter::getErrorCodenumfmt_get_error_codeNumberFormatter::getErrorMessagenumfmt_get_error_messageNumberFormatter::getLocalenumfmt_get_localeNumberFormatter::getPatternnumfmt_get_patternNumberFormatter::getSymbolnumfmt_get_symbolNumberFormatter::getTextAttributenumfmt_get_text_attributeNumberFormatter::parseCurrencynumfmt_parse_currencyNumberFormatter::parsenumfmt_parseNumberFormatter::setAttributenumfmt_set_attributeNumberFormatter::setPatternnumfmt_set_patternNumberFormatter::setSymbolnumfmt_set_symbolNumberFormatter::setTextAttributenumfmt_set_text_attributeLocaleLocale::acceptFromHttplocale_accept_from_httpLocale::canonicalizelocale_canonicalizeLocale::composeLocalelocale_composeLocale::filterMatcheslocale_filter_matchesLocale::getAllVariantslocale_get_all_variantsLocale::getDefaultlocale_get_defaultLocale::getDisplayLanguagelocale_get_display_languageLocale::getDisplayNamelocale_get_display_nameLocale::getDisplayRegionlocale_get_display_regionLocale::getDisplayScriptlocale_get_display_scriptLocale::getDisplayVariantlocale_get_display_variantLocale::getKeywordslocale_get_keywordsLocale::getPrimaryLanguagelocale_get_primary_languageLocale::getRegionlocale_get_regionLocale::getScriptlocale_get_scriptLocale::lookuplocale_lookupLocale::parseLocalelocale_parseLocale::setDefaultlocale_set_defaultNormalizerNormalizer::isNormalizednormalizer_is_normalizedNormalizer::normalizenormalizer_normalizeMessageFormatterMessageFormatter::createMessageFormatter::__constructmsgfmt_createMessageFormatter::formatMessagemsgfmt_format_messageMessageFormatter::formatmsgfmt_formatMessageFormatter::getErrorCodemsgfmt_get_error_codeMessageFormatter::getErrorMessagemsgfmt_get_error_messageMessageFormatter::getLocalemsgfmt_get_localeMessageFormatter::getPatternmsgfmt_get_patternMessageFormatter::parseMessagemsgfmt_parse_messageMessageFormatter::parsemsgfmt_parseMessageFormatter::setPatternmsgfmt_set_patternIntlCalendarIntlCalendar::addIntlCalendar::afterIntlCalendar::beforeIntlCalendar::clearIntlCalendar::__constructIntlCalendar::createInstanceIntlCalendar::equalsIntlCalendar::fieldDifferenceIntlCalendar::fromDateTimeIntlCalendar::getIntlCalendar::getActualMaximumIntlCalendar::getActualMinimumIntlCalendar::getAvailableLocalesIntlCalendar::getDayOfWeekTypeIntlCalendar::getErrorCodeintlcal_get_error_codeIntlCalendar::getErrorMessageintlcal_get_error_messageIntlCalendar::getFirstDayOfWeekIntlCalendar::getGreatestMinimumIntlCalendar::getKeywordValuesForLocaleIntlCalendar::getLeastMaximumIntlCalendar::getLocaleIntlCalendar::getMaximumIntlCalendar::getMinimalDaysInFirstWeekIntlCalendar::getMinimumIntlCalendar::getNowIntlCalendar::getRepeatedWallTimeOptionIntlCalendar::getSkippedWallTimeOptionIntlCalendar::getTimeIntlCalendar::getTimeZoneIntlCalendar::getTypeIntlCalendar::getWeekendTransitionIntlCalendar::inDaylightTimeIntlCalendar::isEquivalentToIntlCalendar::isLenientIntlCalendar::isSetIntlCalendar::isWeekendIntlCalendar::rollIntlCalendar::setIntlCalendar::setFirstDayOfWeekIntlCalendar::setLenientIntlCalendar::setMinimalDaysInFirstWeekIntlCalendar::setRepeatedWallTimeOptionIntlCalendar::setSkippedWallTimeOptionIntlCalendar::setTimeIntlCalendar::setTimeZoneIntlCalendar::toDateTimeIntlTimeZoneIntlTimeZone::countEquivalentIDsIntlTimeZone::createDefaultIntlTimeZone::createEnumerationIntlTimeZone::createTimeZoneIntlTimeZone::fromDateTimeZoneIntlTimeZone::getCanonicalIDIntlTimeZone::getDisplayNameIntlTimeZone::getDSTSavingsIntlTimeZone::getEquivalentIDIntlTimeZone::getErrorCodeintltz_get_error_codeIntlTimeZone::getErrorMessageintltz_get_error_messageIntlTimeZone::getGMTIntlTimeZone::getIDIntlTimeZone::getOffsetIntlTimeZone::getRawOffsetIntlTimeZone::getTZDataVersionIntlTimeZone::hasSameRulesIntlTimeZone::toDateTimeZoneIntlTimeZone::useDaylightTimeIntlDateFormatterIntlDateFormatter::createdatefmt_createIntlDateFormatter::__constructIntlDateFormatter::formatdatefmt_formatIntlDateFormatter::formatObjectdatefmt_format_objectIntlDateFormatter::getCalendardatefmt_get_calendarIntlDateFormatter::getDateTypedatefmt_get_datetypeIntlDateFormatter::getErrorCodedatefmt_get_error_codeIntlDateFormatter::getErrorMessagedatefmt_get_error_messageIntlDateFormatter::getLocaledatefmt_get_localeIntlDateFormatter::getPatterndatefmt_get_patternIntlDateFormatter::getTimeTypedatefmt_get_timetypeIntlDateFormatter::getTimeZoneIddatefmt_get_timezone_idIntlDateFormatter::getCalendarObjectdatefmt_get_calendar_objectIntlDateFormatter::getTimeZonedatefmt_get_timezoneIntlDateFormatter::isLenientdatefmt_is_lenientIntlDateFormatter::localtimedatefmt_localtimeIntlDateFormatter::parsedatefmt_parseIntlDateFormatter::setCalendardatefmt_set_calendarIntlDateFormatter::setLenientdatefmt_set_lenientIntlDateFormatter::setPatterndatefmt_set_patternIntlDateFormatter::setTimeZoneIddatefmt_set_timezone_idIntlDateFormatter::setTimeZonedatefmt_set_timezoneResourceBundleResourceBundle::countresourcebundle_countResourceBundle::createresourcebundle_createResourceBundle::__constructResourceBundle::getErrorCoderesourcebundle_get_error_codeResourceBundle::getErrorMessageresourcebundle_get_error_messageResourceBundle::getresourcebundle_getResourceBundle::getLocalesresourcebundle_localesSpoofcheckerSpoofchecker::areConfusableSpoofchecker::__constructSpoofchecker::isSuspiciousSpoofchecker::setAllowedLocalesSpoofchecker::setChecksTransliteratorTransliterator::__constructTransliterator::createtransliterator_createTransliterator::createFromRulestransliterator_create_from_rulesTransliterator::createInversetransliterator_create_inverseTransliterator::getErrorCodetransliterator_get_error_codeTransliterator::getErrorMessagetransliterator_get_error_messageTransliterator::listIDstransliterator_list_idsTransliterator::transliteratetransliterator_transliterateIntlBreakIteratorIntlBreakIterator::__constructIntlBreakIterator::createCharacterInstanceIntlBreakIterator::createCodePointInstanceIntlBreakIterator::createLineInstanceIntlBreakIterator::createSentenceInstanceIntlBreakIterator::createTitleInstanceIntlBreakIterator::createWordInstanceIntlBreakIterator::currentIntlBreakIterator::firstIntlBreakIterator::followingIntlBreakIterator::getErrorCodeintl_get_error_codeIntlBreakIterator::getErrorMessageintl_get_error_messageIntlBreakIterator::getLocaleIntlBreakIterator::getPartsIteratorIntlBreakIterator::getTextIntlBreakIterator::isBoundaryIntlBreakIterator::lastIntlBreakIterator::nextIntlBreakIterator::precedingIntlBreakIterator::previousIntlBreakIterator::setTextIntlRuleBasedBreakIteratorIntlRuleBasedBreakIterator::__constructIntlRuleBasedBreakIterator::getBinaryRulesIntlRuleBasedBreakIterator::getRulesIntlRuleBasedBreakIterator::getRuleStatusIntlRuleBasedBreakIterator::getRuleStatusVecIntlCodePointBreakIteratorIntlCodePointBreakIterator::getLastCodePointIntlPartsIteratorIntlPartsIterator::getBreakIteratorUConverterUConverter::__constructUConverter::convertUConverter::fromUCallbackUConverter::getAliasesUConverter::getAvailableUConverter::getDestinationEncodingUConverter::getDestinationTypeUConverter::getErrorCodeintl_get_error_codeUConverter::getErrorMessageUConverter::getSourceEncodingUConverter::getSourceTypeUConverter::getStandardsUConverter::getSubstCharsUConverter::reasonTextUConverter::setDestinationEncodingUConverter::setSourceEncodingUConverter::setSubstCharsUConverter::toUCallbackUConverter::transcodeGrapheme 函数grapheme_extractgrapheme_striposgrapheme_stristrgrapheme_strlengrapheme_strposgrapheme_strriposgrapheme_strrposgrapheme_strstrgrapheme_substrIDN 函数idn_to_asciiidn_to_unicodeidn_to_utf8IntlCharIntlChar::charAgeIntlChar::charDigitValueIntlChar::charDirectionIntlChar::charFromNameIntlChar::charMirrorIntlChar::charNameIntlChar::charTypeIntlChar::chrIntlChar::digitIntlChar::enumCharNamesIntlChar::enumCharTypesIntlChar::foldCaseIntlChar::forDigitIntlChar::getBidiPairedBracketIntlChar::getBlockCodeIntlChar::getCombiningClassIntlChar::getFC_NFKC_ClosureIntlChar::getIntPropertyMaxValueIntlChar::getIntPropertyMinValueIntlChar::getIntPropertyValueIntlChar::getNumericValueIntlChar::getPropertyEnumIntlChar::getPropertyNameIntlChar::getPropertyValueEnumIntlChar::getPropertyValueNameIntlChar::getUnicodeVersionIntlChar::hasBinaryPropertyIntlChar::isalnumIntlChar::isalphaIntlChar::isbaseIntlChar::isblankIntlChar::iscntrlIntlChar::isdefinedIntlChar::isdigitIntlChar::isgraphIntlChar::isIDIgnorableIntlChar::isIDPartIntlChar::isIDStartIntlChar::isISOControlIntlChar::isJavaIDPartIntlChar::isJavaIDStartIntlChar::isJavaSpaceCharIntlChar::islowerIntlChar::isMirroredIntlChar::isprintIntlChar::ispunctIntlChar::isspaceIntlChar::istitleIntlChar::isUAlphabeticIntlChar::isULowercaseIntlChar::isupperIntlChar::isUUppercaseIntlChar::isUWhiteSpaceIntlChar::isWhitespaceIntlChar::isxdigitIntlChar::ordIntlChar::tolowerIntlChar::totitleIntlChar::toupperIntlExceptionIntlIteratorIntlIterator::currentIntlIterator::keyIntlIterator::nextIntlIterator::rewindIntlIterator::validintl 函数intl_error_nameintl_get_error_codeintl_get_error_messageintl_is_failure多字节字符串简介安装/配置需求安装运行时配置资源类型预定义常量支持编码的摘要日文字符多字节编码基础HTTP 输入和输出支持的字符编码函数重载功能PHP字符编码的要求多字节字符串 函数mb_check_encodingmb_convert_casemb_convert_encodingmb_convert_kanamb_convert_variablesmb_decode_mimeheadermb_decode_numericentitymb_detect_encodingmb_detect_ordermb_encode_mimeheadermb_encode_numericentitymb_encoding_aliasesmb_ereg_matchmb_ereg_replace_callbackmb_ereg_replacemb_ereg_search_getposmb_ereg_search_getregsmb_ereg_search_initmb_ereg_search_posmb_ereg_search_regsmb_ereg_search_setposmb_ereg_searchmb_eregmb_eregi_replacemb_eregimb_get_infomb_http_inputmb_http_outputmb_internal_encodingmb_languagemb_list_encodingsmb_output_handlermb_parse_strmb_preferred_mime_namemb_regex_encodingmb_regex_set_optionsmb_send_mailmb_splitmb_strcutmb_strimwidthmb_striposmb_stristrmb_strlenmb_strposmb_strrchrmb_strrichrmb_strriposmb_strrposmb_strstrmb_strtolowermb_strtouppermb_strwidthmb_substitute_charactermb_substr_countmb_substrPspell简介安装/配置需求安装运行时配置资源类型预定义常量Pspell 函数pspell_add_to_personalpspell_add_to_sessionpspell_checkpspell_clear_sessionpspell_config_createpspell_config_data_dirpspell_config_dict_dirpspell_config_ignorepspell_config_modepspell_config_personalpspell_config_replpspell_config_runtogetherpspell_config_save_replpspell_new_configpspell_new_personalpspell_newpspell_save_wordlistpspell_store_replacementpspell_suggestRecode简介安装/配置需求安装运行时配置资源类型预定义常量Recode 函数recode_filerecode_stringrecode图像生成和处理Cairo简介安装/配置需求安装运行时配置资源类型预定义常量范例Cairo 函数cairo_createcairo_font_face_get_typecairo_font_face_statuscairo_font_options_createcairo_font_options_equalcairo_font_options_get_antialiascairo_font_options_get_hint_metricscairo_font_options_get_hint_stylecairo_font_options_get_subpixel_ordercairo_font_options_hashcairo_font_options_mergecairo_font_options_set_antialiascairo_font_options_set_hint_metricscairo_font_options_set_hint_stylecairo_font_options_set_subpixel_ordercairo_font_options_statuscairo_format_stride_for_widthcairo_image_surface_create_for_datacairo_image_surface_create_from_pngcairo_image_surface_createcairo_image_surface_get_datacairo_image_surface_get_formatcairo_image_surface_get_heightcairo_image_surface_get_stridecairo_image_surface_get_widthcairo_matrix_create_scalecairo_matrix_create_translatecairo_matrix_invertcairo_matrix_multiplycairo_matrix_rotatecairo_matrix_transform_distancecairo_matrix_transform_pointcairo_matrix_translatecairo_pattern_add_color_stop_rgbcairo_pattern_add_color_stop_rgbacairo_pattern_create_for_surfacecairo_pattern_create_linearcairo_pattern_create_radialcairo_pattern_create_rgbcairo_pattern_create_rgbacairo_pattern_get_color_stop_countcairo_pattern_get_color_stop_rgbacairo_pattern_get_extendcairo_pattern_get_filtercairo_pattern_get_linear_pointscairo_pattern_get_matrixcairo_pattern_get_radial_circlescairo_pattern_get_rgbacairo_pattern_get_surfacecairo_pattern_get_typecairo_pattern_set_extendcairo_pattern_set_filtercairo_pattern_set_matrixcairo_pattern_statuscairo_pdf_surface_createcairo_pdf_surface_set_sizecairo_ps_get_levelscairo_ps_level_to_stringcairo_ps_surface_createcairo_ps_surface_dsc_begin_page_setupcairo_ps_surface_dsc_begin_setupcairo_ps_surface_dsc_commentcairo_ps_surface_get_epscairo_ps_surface_restrict_to_levelcairo_ps_surface_set_epscairo_ps_surface_set_sizecairo_scaled_font_createcairo_scaled_font_extentscairo_scaled_font_get_ctmcairo_scaled_font_get_font_facecairo_scaled_font_get_font_matrixcairo_scaled_font_get_font_optionscairo_scaled_font_get_scale_matrixcairo_scaled_font_get_typecairo_scaled_font_glyph_extentscairo_scaled_font_statuscairo_scaled_font_text_extentscairo_surface_copy_pagecairo_surface_create_similarcairo_surface_finishcairo_surface_flushcairo_surface_get_contentcairo_surface_get_device_offsetcairo_surface_get_font_optionscairo_surface_get_typecairo_surface_mark_dirty_rectanglecairo_surface_mark_dirtycairo_surface_set_device_offsetcairo_surface_set_fallback_resolutioncairo_surface_show_pagecairo_surface_statuscairo_surface_write_to_pngcairo_svg_surface_createcairo_svg_surface_restrict_to_versioncairo_svg_version_to_stringCairoCairo::availableFontscairo_available_fontsCairo::availableSurfacescairo_available_surfacesCairo::statusToStringcairo_status_to_stringCairo::versioncairo_versionCairo::versionStringcairo_version_stringCairoContextCairoContext::appendPathcairo_append_pathCairoContext::arccairo_arcCairoContext::arcNegativecairo_arc_negativeCairoContext::clipcairo_clipCairoContext::clipExtentscairo_clip_extentsCairoContext::clipPreservecairo_clip_preserveCairoContext::clipRectangleListcairo_clip_rectangle_listCairoContext::closePathcairo_close_pathCairoContext::__constructCairoContext::copyPagecairo_copy_pageCairoContext::copyPathcairo_copy_pathCairoContext::copyPathFlatcairo_copy_path_flatCairoContext::curveTocairo_curve_toCairoContext::deviceToUsercairo_device_to_userCairoContext::deviceToUserDistancecairo_device_to_user_distanceCairoContext::fillcairo_fillCairoContext::fillExtentscairo_fill_extentsCairoContext::fillPreservecairo_fill_preserveCairoContext::fontExtentscairo_font_extentsCairoContext::getAntialiascairo_get_antialiasCairoContext::getCurrentPointcairo_get_current_pointCairoContext::getDashcairo_get_dashCairoContext::getDashCountcairo_get_dash_countCairoContext::getFillRulecairo_get_fill_ruleCairoContext::getFontFacecairo_get_font_faceCairoContext::getFontMatrixcairo_get_font_matrixCairoContext::getFontOptionscairo_get_font_optionsCairoContext::getGroupTargetcairo_get_group_targetCairoContext::getLineCapcairo_get_line_capCairoContext::getLineJoincairo_get_line_joinCairoContext::getLineWidthcairo_get_line_widthCairoContext::getMatrixcairo_get_matrixCairoContext::getMiterLimitcairo_get_miter_limitCairoContext::getOperatorcairo_get_operatorCairoContext::getScaledFontcairo_get_scaled_fontCairoContext::getSourcecairo_get_sourceCairoContext::getTargetcairo_get_targetCairoContext::getTolerancecairo_get_toleranceCairoContext::glyphPathcairo_glyph_pathCairoContext::hasCurrentPointcairo_has_current_pointCairoContext::identityMatrixcairo_identity_matrixCairoContext::inFillcairo_in_fillCairoContext::inStrokecairo_in_strokeCairoContext::lineTocairo_line_toCairoContext::maskcairo_maskCairoContext::maskSurfacecairo_mask_surfaceCairoContext::moveTocairo_move_toCairoContext::newPathcairo_new_pathCairoContext::newSubPathcairo_new_sub_pathCairoContext::paintcairo_paintCairoContext::paintWithAlphacairo_paint_with_alphaCairoContext::pathExtentscairo_path_extentsCairoContext::popGroupcairo_pop_groupCairoContext::popGroupToSourcecairo_pop_group_to_sourceCairoContext::pushGroupcairo_push_groupCairoContext::pushGroupWithContentcairo_push_group_with_contentCairoContext::rectanglecairo_rectangleCairoContext::relCurveTocairo_rel_curve_toCairoContext::relLineTocairo_rel_line_toCairoContext::relMoveTocairo_rel_move_toCairoContext::resetClipcairo_reset_clipCairoContext::restorecairo_restoreCairoContext::rotatecairo_rotateCairoContext::savecairo_saveCairoContext::scalecairo_scaleCairoContext::selectFontFacecairo_select_font_faceCairoContext::setAntialiascairo_set_antialiasCairoContext::setDashcairo_set_dashCairoContext::setFillRulecairo_set_fill_ruleCairoContext::setFontFacecairo_set_font_faceCairoContext::setFontMatrixcairo_set_font_matrixCairoContext::setFontOptionscairo_set_font_optionsCairoContext::setFontSizecairo_set_font_sizeCairoContext::setLineCapcairo_set_line_capCairoContext::setLineJoincairo_set_line_joinCairoContext::setLineWidthcairo_set_line_widthCairoContext::setMatrixcairo_set_matrixCairoContext::setMiterLimitcairo_set_miter_limitCairoContext::setOperatorcairo_set_operatorCairoContext::setScaledFontcairo_set_scaled_fontCairoContext::setSourcecairo_set_sourceCairoContext::setSourceRGBcairo_set_sourceCairoContext::setSourceRGBAcairo_set_sourceCairoContext::setSourceSurfacecairo_set_source_surfaceCairoContext::setTolerancecairo_set_toleranceCairoContext::showPagecairo_show_pageCairoContext::showTextcairo_show_textCairoContext::statuscairo_statusCairoContext::strokecairo_strokeCairoContext::strokeExtentscairo_stroke_extentsCairoContext::strokePreservecairo_stroke_preserveCairoContext::textExtentscairo_text_extentsCairoContext::textPathcairo_text_pathCairoContext::transformcairo_transformCairoContext::translatecairo_translateCairoContext::userToDevicecairo_user_to_deviceCairoContext::userToDeviceDistancecairo_user_to_device_distanceCairoExceptionCairoStatusCairoSurfaceCairoSurface::__constructCairoSurface::copyPagecairo_copy_pageCairoSurface::createSimilarCairoSurface::finishCairoSurface::flushCairoSurface::getContentCairoSurface::getDeviceOffsetCairoSurface::getFontOptionscairo_get_font_optionsCairoSurface::getTypeCairoSurface::markDirtyCairoSurface::markDirtyRectangleCairoSurface::setDeviceOffsetCairoSurface::setFallbackResolutionCairoSurface::showPagecairo_show_pageCairoSurface::statuscairo_statusCairoSurface::writeToPngCairoSvgSurfaceCairoSvgSurface::__constructCairoSvgSurface::getVersionscairo_svg_surface_get_versionsCairoSvgSurface::restrictToVersionCairoSvgSurface::versionToStringCairoImageSurfaceCairoImageSurface::__constructCairoImageSurface::createForDataCairoImageSurface::createFromPngCairoImageSurface::getDataCairoImageSurface::getFormatCairoImageSurface::getHeightCairoImageSurface::getStrideCairoImageSurface::getWidthCairoPdfSurfaceCairoPdfSurface::__constructCairoPdfSurface::setSizeCairoPsSurfaceCairoPsSurface::__constructCairoPsSurface::dscBeginPageSetupCairoPsSurface::dscBeginSetupCairoPsSurface::dscCommentCairoPsSurface::getEpsCairoPsSurface::getLevelsCairoPsSurface::levelToStringCairoPsSurface::restrictToLevelCairoPsSurface::setEpsCairoPsSurface::setSizeCairoSurfaceTypeCairoFontFaceCairoFontFace::__constructCairoFontFace::getTypeCairoFontFace::statuscairo_font_face_statusCairoFontOptionsCairoFontOptions::__constructCairoFontOptions::equalCairoFontOptions::getAntialiascairo_get_antialiasCairoFontOptions::getHintMetricsCairoFontOptions::getHintStyleCairoFontOptions::getSubpixelOrderCairoFontOptions::hashCairoFontOptions::mergeCairoFontOptions::setAntialiascairo_set_antialiasCairoFontOptions::setHintMetricsCairoFontOptions::setHintStyleCairoFontOptions::setSubpixelOrderCairoFontOptions::statuscairo_statusCairoFontSlantCairoFontTypeCairoFontWeightCairoScaledFontCairoScaledFont::__constructCairoScaledFont::extentsCairoScaledFont::getCtmCairoScaledFont::getFontFacecairo_get_font_faceCairoScaledFont::getFontMatrixcairo_get_font_matrixCairoScaledFont::getFontOptionscairo_get_font_optionsCairoScaledFont::getScaleMatrixCairoScaledFont::getTypeCairoScaledFont::glyphExtentsCairoScaledFont::statuscairo_statusCairoScaledFont::textExtentscairo_text_extentsCairoToyFontFaceCairoPatternTypeCairoPatternCairoPattern::__constructCairoPattern::getMatrixcairo_get_matrixCairoPattern::getTypeCairoPattern::setMatrixcairo_set_matrixCairoPattern::statuscairo_statusCairoGradientPatternCairoGradientPattern::addColorStopRgbCairoGradientPattern::addColorStopRgbaCairoGradientPattern::getColorStopCountCairoGradientPattern::getColorStopRgbaCairoGradientPattern::getExtendCairoGradientPattern::setExtendCairoSolidPatternCairoSolidPattern::__constructCairoSolidPattern::getRgbaCairoSurfacePatternCairoSurfacePattern::__constructCairoSurfacePattern::getExtendCairoSurfacePattern::getFilterCairoSurfacePattern::getSurfaceCairoSurfacePattern::setExtendCairoSurfacePattern::setFilterCairoLinearGradientCairoLinearGradient::__constructCairoLinearGradient::getPointsCairoRadialGradientCairoRadialGradient::__constructCairoRadialGradient::getCirclesCairoAntialiasCairoContentCairoExtendCairoFormatCairoFormat::strideForWidthCairoFillRuleCairoFilterCairoHintMetricsCairoHintStyleCairoLineCapCairoLineJoinCairoMatrixCairoMatrix::__constructcairo_matrix_initCairoMatrix::initIdentitycairo_matrix_init_identityCairoMatrix::initRotatecairo_matrix_init_rotateCairoMatrix::initScalecairo_matrix_init_scalecairo_matrix_create_scaleCairoMatrix::initTranslatecairo_matrix_init_translateCairoMatrix::invertCairoMatrix::multiplyCairoMatrix::rotatecairo_rotateCairoMatrix::scalecairo_matrix_scaleCairoMatrix::transformDistanceCairoMatrix::transformPointCairoMatrix::translatecairo_translateCairoOperatorCairoPathCairoPsLevelCairoSubpixelOrderCairoSvgVersionExif简介安装/配置需求安装运行时配置资源类型预定义常量Exif 函数exif_imagetypeexif_read_dataexif_tagnameexif_thumbnailread_exif_dataGD简介安装/配置需求安装运行时配置资源类型预定义常量范例使用 PHP 创建 PNG 图像使用 Alpha 通道为图像加水印使用 imagecopymerge 函数创建半透明水印GD 和图像处理 函数gd_infogetimagesizegetimagesizefromstringimage_type_to_extensionimage_type_to_mime_typeimage2wbmpimageaffineimageaffinematrixconcatimageaffinematrixgetimagealphablendingimageantialiasimagearcimagecharimagecharupimagecolorallocateimagecolorallocatealphaimagecoloratimagecolorclosestimagecolorclosestalphaimagecolorclosesthwbimagecolordeallocateimagecolorexactimagecolorexactalphaimagecolormatchimagecolorresolveimagecolorresolvealphaimagecolorsetimagecolorsforindeximagecolorstotalimagecolortransparentimageconvolutionimagecopyimagecopymergeimagecopymergegrayimagecopyresampledimagecopyresizedimagecreateimagecreatefromgd2imagecreatefromgd2partimagecreatefromgdimagecreatefromgifimagecreatefromjpegimagecreatefrompngimagecreatefromstringimagecreatefromwbmpimagecreatefromwebpimagecreatefromxbmimagecreatefromxpmimagecreatetruecolorimagecropimagecropautoimagedashedlineimagedestroyimageellipseimagefillimagefilledarcimagefilledellipseimagefilledpolygonimagefilledrectangleimagefilltoborderimagefilterimageflipimagefontheightimagefontwidthimageftbboximagefttextimagegammacorrectimagegd2imagegdimagegifimagegrabscreenimagegrabwindowimageinterlaceimageistruecolorimagejpegimagelayereffectimagelineimageloadfontimagepalettecopyimagepalettetotruecolorimagepngimagepolygonimagepsbboximagepsencodefontimagepsextendfontimagepsfreefontimagepsloadfontimagepsslantfontimagepstextimagerectangleimagerotateimagesavealphaimagescaleimagesetbrushimagesetinterpolationimagesetpixelimagesetstyleimagesetthicknessimagesettileimagestringimagestringupimagesximagesyimagetruecolortopaletteimagettfbboximagettftextimagetypesimagewbmpimagewebpimagexbmiptcembediptcparsejpeg2wbmppng2wbmpGmagick简介安装/配置需求安装运行时配置预定义常量范例GmagickGmagick::addimageGmagick::addnoiseimageGmagick::annotateimageGmagick::blurimageGmagick::borderimageGmagick::charcoalimageGmagick::chopimageGmagick::clearGmagick::commentimageGmagick::compositeimageGmagick::__constructGmagick::cropimageGmagick::cropthumbnailimageGmagick::currentGmagick::cyclecolormapimageGmagick::deconstructimagesGmagick::despeckleimageGmagick::destroyGmagick::drawimageGmagick::edgeimageGmagick::embossimageGmagick::enhanceimageGmagick::equalizeimageGmagick::flipimageGmagick::flopimageGmagick::frameimageGmagick::gammaimageGmagick::getcopyrightGmagick::getfilenameGmagick::getimagebackgroundcolorGmagick::getimageblueprimaryGmagick::getimagebordercolorGmagick::getimagechanneldepthGmagick::getimagecolorsGmagick::getimagecolorspaceGmagick::getimagecomposeGmagick::getimagedelayGmagick::getimagedepthGmagick::getimagedisposeGmagick::getimageextremaGmagick::getimagefilenameGmagick::getimageformatGmagick::getimagegammaGmagick::getimagegreenprimaryGmagick::getimageheightGmagick::getimagehistogramGmagick::getimageindexGmagick::getimageinterlaceschemeGmagick::getimageiterationsGmagick::getimagematteGmagick::getimagemattecolorGmagick::getimageprofileGmagick::getimageredprimaryGmagick::getimagerenderingintentGmagick::getimageresolutionGmagick::getimagesceneGmagick::getimagesignatureGmagick::getimagetypeGmagick::getimageunitsGmagick::getimagewhitepointGmagick::getimagewidthGmagick::getpackagenameGmagick::getquantumdepthGmagick::getreleasedateGmagick::getsamplingfactorsGmagick::getsizeGmagick::getversionGmagick::hasnextimageGmagick::haspreviousimageGmagick::implodeimageGmagick::labelimageGmagick::levelimageGmagick::magnifyimageGmagick::mapimageGmagick::medianfilterimageGmagick::minifyimageGmagick::modulateimageGmagick::motionblurimageGmagick::newimageGmagick::nextimageGmagick::normalizeimageGmagick::oilpaintimageGmagick::previousimageGmagick::profileimageGmagick::quantizeimageGmagick::quantizeimagesGmagick::queryfontmetricsGmagick::queryfontsGmagick::queryformatsGmagick::radialblurimageGmagick::raiseimageGmagick::readGmagick::readimageGmagick::readimageblobGmagick::readimagefileGmagick::reducenoiseimageGmagick::removeimageGmagick::removeimageprofileGmagick::resampleimageGmagick::resizeimageGmagick::rollimageGmagick::rotateimageGmagick::scaleimageGmagick::separateimagechannelGmagick::setfilenameGmagick::setimagebackgroundcolorGmagick::setimageblueprimaryGmagick::setimagebordercolorGmagick::setimagechanneldepthGmagick::setimagecolorspaceGmagick::setimagecomposeGmagick::setimagedelayGmagick::setimagedepthGmagick::setimagedisposeGmagick::setimagefilenameGmagick::setimageformatGmagick::setimagegammaGmagick::setimagegreenprimaryGmagick::setimageindexGmagick::setimageinterlaceschemeGmagick::setimageiterationsGmagick::setimageprofileGmagick::setimageredprimaryGmagick::setimagerenderingintentGmagick::setimageresolutionGmagick::setimagesceneGmagick::setimagetypeGmagick::setimageunitsGmagick::setimagewhitepointGmagick::setsamplingfactorsGmagick::setsizeGmagick::shearimageGmagick::solarizeimageGmagick::spreadimageGmagick::stripimageGmagick::swirlimageGmagick::thumbnailimageGmagick::trimimageGmagick::writeGmagick::writeimageGmagickDrawGmagickDraw::annotateGmagickDraw::arcGmagickDraw::bezierGmagickDraw::ellipseGmagickDraw::getfillcolorGmagickDraw::getfillopacityGmagickDraw::getfontGmagickDraw::getfontsizeGmagickDraw::getfontstyleGmagickDraw::getfontweightGmagickDraw::getstrokecolorGmagickDraw::getstrokeopacityGmagickDraw::getstrokewidthGmagickDraw::gettextdecorationGmagickDraw::gettextencodingGmagickDraw::lineGmagickDraw::pointGmagickDraw::polygonGmagickDraw::polylineGmagickDraw::rectangleGmagickDraw::rotateGmagickDraw::roundrectangleGmagickDraw::scaleGmagickDraw::setfillcolorGmagickDraw::setfillopacityGmagickDraw::setfontGmagickDraw::setfontsizeGmagickDraw::setfontstyleGmagickDraw::setfontweightGmagickDraw::setstrokecolorGmagickDraw::setstrokeopacityGmagickDraw::setstrokewidthGmagickDraw::settextdecorationGmagickDraw::settextencodingGmagickPixelGmagickPixel::__constructGmagickPixel::getcolorGmagickPixel::getcolorcountGmagickPixel::getcolorvalueGmagickPixel::setcolorGmagickPixel::setcolorvalueImageMagick简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageImagickImagick::adaptiveBlurImageImagick::adaptiveResizeImageImagick::adaptiveSharpenImageImagick::adaptiveThresholdImageImagick::addImageImagick::addNoiseImageImagick::affineTransformImageImagick::animateImagesImagick::annotateImageImagick::appendImagesImagick::autoLevelImageImagick::averageImagesImagick::blackThresholdImageImagick::blueShiftImageImagick::blurImageImagick::borderImageImagick::brightnessContrastImageImagick::charcoalImageImagick::chopImageImagick::clampImageImagick::clearImagick::clipImageImagick::clipImagePathImagick::clipPathImageImagick::cloneImagick::clutImageImagick::coalesceImagesImagick::colorFloodfillImageImagick::colorizeImageImagick::colorMatrixImageImagick::combineImagesImagick::commentImageImagick::compareImageChannelsImagick::compareImageLayersImagick::compareImagesImagick::compositeImageImagick::__constructImagick::contrastImageImagick::contrastStretchImageImagick::convolveImageImagick::countImagick::cropImageImagick::cropThumbnailImageImagick::currentImagick::cycleColormapImageImagick::decipherImageImagick::deconstructImagesImagick::deleteImageArtifactImagick::deleteImagePropertyImagick::deskewImageImagick::despeckleImageImagick::destroyImagick::displayImageImagick::displayImagesImagick::distortImageImagick::drawImageImagick::edgeImageImagick::embossImageImagick::encipherImageImagick::enhanceImageImagick::equalizeImageImagick::evaluateImageImagick::exportImagePixelsImagick::extentImageImagick::filterImagick::flattenImagesImagick::flipImageImagick::floodFillPaintImageImagick::flopImageImagick::forwardFourierTransformImageImagick::frameImageImagick::functionImageImagick::fxImageImagick::gammaImageImagick::gaussianBlurImageImagick::getColorspaceImagick::getCompressionImagick::getCompressionQualityImagick::getCopyrightImagick::getFilenameImagick::getFontImagick::getFormatImagick::getGravityImagick::getHomeURLImagick::getImageImagick::getImageAlphaChannelImagick::getImageArtifactImagick::getImageAttributeImagick::getImageBackgroundColorImagick::getImageBlobImagick::getImageBluePrimaryImagick::getImageBorderColorImagick::getImageChannelDepthImagick::getImageChannelDistortionImagick::getImageChannelDistortionsImagick::getImageChannelExtremaImagick::getImageChannelKurtosisImagick::getImageChannelMeanImagick::getImageChannelRangeImagick::getImageChannelStatisticsImagick::getImageClipMaskImagick::getImageColormapColorImagick::getImageColorsImagick::getImageColorspaceImagick::getImageComposeImagick::getImageCompressionImagick::getImageCompressionQualityImagick::getImageDelayImagick::getImageDepthImagick::getImageDisposeImagick::getImageDistortionImagick::getImageExtremaImagick::getImageFilenameImagick::getImageFormatImagick::getImageGammaImagick::getImageGeometryImagick::getImageGravityImagick::getImageGreenPrimaryImagick::getImageHeightImagick::getImageHistogramImagick::getImageIndexImagick::getImageInterlaceSchemeImagick::getImageInterpolateMethodImagick::getImageIterationsImagick::getImageLengthImagick::getImageMagickLicenseImagick::getImageMatteImagick::getImageMatteColorImagick::getImageMimeTypeImagick::getImageOrientationImagick::getImagePageImagick::getImagePixelColorImagick::getImageProfileImagick::getImageProfilesImagick::getImagePropertiesImagick::getImagePropertyImagick::getImageRedPrimaryImagick::getImageRegionImagick::getImageRenderingIntentImagick::getImageResolutionImagick::getImagesBlobImagick::getImageSceneImagick::getImageSignatureImagick::getImageSizeImagick::getImageTicksPerSecondImagick::getImageTotalInkDensityImagick::getImageTypeImagick::getImageUnitsImagick::getImageVirtualPixelMethodImagick::getImageWhitePointImagick::getImageWidthImagick::getInterlaceSchemeImagick::getIteratorIndexImagick::getNumberImagesImagick::getOptionImagick::getPackageNameImagick::getPageImagick::getPixelIteratorImagick::getPixelRegionIteratorImagick::getPointSizeImagick::getQuantumImagick::getQuantumDepthImagick::getQuantumRangeImagick::getRegistryImagick::getReleaseDateImagick::getResourceImagick::getResourceLimitImagick::getSamplingFactorsImagick::getSizeImagick::getSizeOffsetImagick::getVersionImagick::haldClutImageImagick::hasNextImageImagick::hasPreviousImageImagick::identifyFormatImagick::identifyImageImagick::implodeImageImagick::importImagePixelsImagick::inverseFourierTransformImageImagick::labelImageImagick::levelImageImagick::linearStretchImageImagick::liquidRescaleImageImagick::listRegistryImagick::magnifyImageImagick::mapImageImagick::matteFloodfillImageImagick::medianFilterImageImagick::mergeImageLayersImagick::minifyImageImagick::modulateImageImagick::montageImageImagick::morphImagesImagick::morphologyImagick::mosaicImagesImagick::motionBlurImageImagick::negateImageImagick::newImageImagick::newPseudoImageImagick::nextImageImagick::normalizeImageImagick::oilPaintImageImagick::opaquePaintImageImagick::optimizeImageLayersImagick::orderedPosterizeImageImagick::paintFloodfillImageImagick::paintOpaqueImageImagick::paintTransparentImageImagick::pingImageImagick::pingImageBlobImagick::pingImageFileImagick::polaroidImageImagick::posterizeImageImagick::previewImagesImagick::previousImageImagick::profileImageImagick::quantizeImageImagick::quantizeImagesImagick::queryFontMetricsImagick::queryFontsImagick::queryFormatsImagick::radialBlurImageImagick::raiseImageImagick::randomThresholdImageImagick::readImageImagick::readImageBlobImagick::readImageFileImagick::readimagesImagick::recolorImageImagick::reduceNoiseImageImagick::remapImageImagick::removeImageImagick::removeImageProfileImagick::renderImagick::resampleImageImagick::resetImagePageImagick::resizeImageImagick::rollImageImagick::rotateImageImagick::rotationalBlurImageImagick::roundCornersImagick::sampleImageImagick::scaleImageImagick::segmentImageImagick::selectiveBlurImageImagick::separateImageChannelImagick::sepiaToneImageImagick::setBackgroundColorImagick::setColorspaceImagick::setCompressionImagick::setCompressionQualityImagick::setFilenameImagick::setFirstIteratorImagick::setFontImagick::setFormatImagick::setGravityImagick::setImageImagick::setImageAlphaChannelImagick::setImageArtifactImagick::setImageAttributeImagick::setImageBackgroundColorImagick::setImageBiasImagick::setImageBiasQuantumImagick::setImageBluePrimaryImagick::setImageBorderColorImagick::setImageChannelDepthImagick::setImageClipMaskImagick::setImageColormapColorImagick::setImageColorspaceImagick::setImageComposeImagick::setImageCompressionImagick::setImageCompressionQualityImagick::setImageDelayImagick::setImageDepthImagick::setImageDisposeImagick::setImageExtentImagick::setImageFilenameImagick::setImageFormatImagick::setImageGammaImagick::setImageGravityImagick::setImageGreenPrimaryImagick::setImageIndexImagick::setImageInterlaceSchemeImagick::setImageInterpolateMethodImagick::setImageIterationsImagick::setImageMatteImagick::setImageMatteColorImagick::setImageOpacityImagick::setImageOrientationImagick::setImagePageImagick::setImageProfileImagick::setImagePropertyImagick::setImageRedPrimaryImagick::setImageRenderingIntentImagick::setImageResolutionImagick::setImageSceneImagick::setImageTicksPerSecondImagick::setImageTypeImagick::setImageUnitsImagick::setImageVirtualPixelMethodImagick::setImageWhitePointImagick::setInterlaceSchemeImagick::setIteratorIndexImagick::setLastIteratorImagick::setOptionImagick::setPageImagick::setPointSizeImagick::setProgressMonitorImagick::setRegistryImagick::setResolutionImagick::setResourceLimitImagick::setSamplingFactorsImagick::setSizeImagick::setSizeOffsetImagick::setTypeImagick::shadeImageImagick::shadowImageImagick::sharpenImageImagick::shaveImageImagick::shearImageImagick::sigmoidalContrastImageImagick::sketchImageImagick::smushImagesImagick::solarizeImageImagick::sparseColorImageImagick::spliceImageImagick::spreadImageImagick::statisticImageImagick::steganoImageImagick::stereoImageImagick::stripImageImagick::subImageMatchImagick::swirlImageImagick::textureImageImagick::thresholdImageImagick::thumbnailImageImagick::tintImageImagick::__toStringImagick::transformImageImagick::transformImageColorspaceImagick::transparentPaintImageImagick::transposeImageImagick::transverseImageImagick::trimImageImagick::uniqueImageColorsImagick::unsharpMaskImageImagick::validImagick::vignetteImageImagick::waveImageImagick::whiteThresholdImageImagick::writeImageImagick::writeImageFileImagick::writeImagesImagick::writeImagesFileImagickDrawImagickDraw::affineImagickDraw::annotationImagickDraw::arcImagickDraw::bezierImagickDraw::circleImagickDraw::clearImagickDraw::cloneImagickDraw::colorImagickDraw::commentImagickDraw::compositeImagickDraw::__constructImagickDraw::destroyImagickDraw::ellipseImagickDraw::getClipPathImagickDraw::getClipRuleImagickDraw::getClipUnitsImagickDraw::getFillColorImagickDraw::getFillOpacityImagickDraw::getFillRuleImagickDraw::getFontImagickDraw::getFontFamilyImagickDraw::getFontSizeImagickDraw::getFontStretchImagickDraw::getFontStyleImagickDraw::getFontWeightImagickDraw::getGravityImagickDraw::getStrokeAntialiasImagickDraw::getStrokeColorImagickDraw::getStrokeDashArrayImagickDraw::getStrokeDashOffsetImagickDraw::getStrokeLineCapImagickDraw::getStrokeLineJoinImagickDraw::getStrokeMiterLimitImagickDraw::getStrokeOpacityImagickDraw::getStrokeWidthImagickDraw::getTextAlignmentImagickDraw::getTextAntialiasImagickDraw::getTextDecorationImagickDraw::getTextEncodingImagickDraw::getTextInterlineSpacingImagickDraw::getTextInterwordSpacingImagickDraw::getTextKerningImagickDraw::getTextUnderColorImagickDraw::getVectorGraphicsImagickDraw::lineImagickDraw::matteImagickDraw::pathCloseImagickDraw::pathCurveToAbsoluteImagickDraw::pathCurveToQuadraticBezierAbsoluteImagickDraw::pathCurveToQuadraticBezierRelativeImagickDraw::pathCurveToQuadraticBezierSmoothAbsoluteImagickDraw::pathCurveToQuadraticBezierSmoothRelativeImagickDraw::pathCurveToRelativeImagickDraw::pathCurveToSmoothAbsoluteImagickDraw::pathCurveToSmoothRelativeImagickDraw::pathEllipticArcAbsoluteImagickDraw::pathEllipticArcRelativeImagickDraw::pathFinishImagickDraw::pathLineToAbsoluteImagickDraw::pathLineToHorizontalAbsoluteImagickDraw::pathLineToHorizontalRelativeImagickDraw::pathLineToRelativeImagickDraw::pathLineToVerticalAbsoluteImagickDraw::pathLineToVerticalRelativeImagickDraw::pathMoveToAbsoluteImagickDraw::pathMoveToRelativeImagickDraw::pathStartImagickDraw::pointImagickDraw::polygonImagickDraw::polylineImagickDraw::popImagickDraw::popClipPathImagickDraw::popDefsImagickDraw::popPatternImagickDraw::pushImagickDraw::pushClipPathImagickDraw::pushDefsImagickDraw::pushPatternImagickDraw::rectangleImagickDraw::renderImagickDraw::resetVectorGraphicsImagickDraw::rotateImagickDraw::roundRectangleImagickDraw::scaleImagickDraw::setClipPathImagickDraw::setClipRuleImagickDraw::setClipUnitsImagickDraw::setFillAlphaImagickDraw::setFillColorImagickDraw::setFillOpacityImagickDraw::setFillPatternURLImagickDraw::setFillRuleImagickDraw::setFontImagickDraw::setFontFamilyImagickDraw::setFontSizeImagickDraw::setFontStretchImagickDraw::setFontStyleImagickDraw::setFontWeightImagickDraw::setGravityImagickDraw::setResolutionImagickDraw::setStrokeAlphaImagickDraw::setStrokeAntialiasImagickDraw::setStrokeColorImagickDraw::setStrokeDashArrayImagickDraw::setStrokeDashOffsetImagickDraw::setStrokeLineCapImagickDraw::setStrokeLineJoinImagickDraw::setStrokeMiterLimitImagickDraw::setStrokeOpacityImagickDraw::setStrokePatternURLImagickDraw::setStrokeWidthImagickDraw::setTextAlignmentImagickDraw::setTextAntialiasImagickDraw::setTextDecorationImagickDraw::setTextEncodingImagickDraw::setTextInterlineSpacingImagickDraw::setTextInterwordSpacingImagickDraw::setTextKerningImagickDraw::setTextUnderColorImagickDraw::setVectorGraphicsImagickDraw::setViewboxImagickDraw::skewXImagickDraw::skewYImagickDraw::translateImagickPixelImagickPixel::clearImagickPixel::__constructImagickPixel::destroyImagickPixel::getColorImagickPixel::getColorAsStringImagickPixel::getColorCountImagickPixel::getColorQuantumImagickPixel::getColorValueImagickPixel::getColorValueQuantumImagickPixel::getHSLImagickPixel::getIndexImagickPixel::isPixelSimilarImagickPixel::isPixelSimilarQuantumImagickPixel::isSimilarImagickPixel::setColorImagickPixel::setColorCountImagickPixel::setColorValueImagickPixel::setColorValueQuantumImagickPixel::setHSLImagickPixel::setIndexImagickPixelIteratorImagickPixelIterator::clearImagickPixelIterator::__constructImagickPixelIterator::destroyImagickPixelIterator::getCurrentIteratorRowImagickPixelIterator::getIteratorRowImagickPixelIterator::getNextIteratorRowImagickPixelIterator::getPreviousIteratorRowImagickPixelIterator::newPixelIteratorImagickPixelIterator::newPixelRegionIteratorImagickPixelIterator::resetIteratorImagickPixelIterator::setIteratorFirstRowImagickPixelIterator::setIteratorLastRowImagickPixelIterator::setIteratorRowImagickPixelIterator::syncIterator邮件相关扩展Cyrus简介安装/配置需求安装运行时配置资源类型预定义常量Cyrus 函数cyrus_authenticatecyrus_bindcyrus_closecyrus_connectcyrus_querycyrus_unbindIMAP简介安装/配置需求安装运行时配置资源类型预定义常量IMAP 函数imap_8bitimap_alertsimap_appendimap_base64imap_binaryimap_bodyimap_bodystructimap_checkimap_clearflag_fullimap_closeimap_createimap_createmailboximap_deleteimap_deletemailboximap_errorsimap_expungeimap_fetch_overviewimap_fetchbodyimap_fetchheaderimap_fetchmimeimap_fetchstructureimap_fetchtextimap_gcimap_get_quotaimap_get_quotarootimap_getaclimap_getmailboxesimap_getsubscribedimap_headerimap_headerinfoimap_headersimap_last_errorimap_listimap_listmailboximap_listscanimap_listsubscribedimap_lsubimap_mail_composeimap_mail_copyimap_mail_moveimap_mailimap_mailboxmsginfoimap_mime_header_decodeimap_msgnoimap_num_msgimap_num_recentimap_openimap_pingimap_qprintimap_renameimap_renamemailboximap_reopenimap_rfc822_parse_adrlistimap_rfc822_parse_headersimap_rfc822_write_addressimap_savebodyimap_scanimap_scanmailboximap_searchimap_set_quotaimap_setaclimap_setflag_fullimap_sortimap_statusimap_subscribeimap_threadimap_timeoutimap_uidimap_undeleteimap_unsubscribeimap_utf7_decodeimap_utf7_encodeimap_utf8Mail简介安装/配置需求安装运行时配置资源类型预定义常量Mail 函数ezmlm_hashmailMailparse简介安装/配置需求安装运行时配置资源类型预定义常量Mailparse 函数mailparse_determine_best_xfer_encodingmailparse_msg_createmailparse_msg_extract_part_filemailparse_msg_extract_partmailparse_msg_extract_whole_part_filemailparse_msg_freemailparse_msg_get_part_datamailparse_msg_get_partmailparse_msg_get_structuremailparse_msg_parse_filemailparse_msg_parsemailparse_rfc822_parse_addressesmailparse_stream_encodemailparse_uudecode_allvpopmail简介安装/配置需求安装运行时配置资源类型预定义常量vpopmail 函数vpopmail_add_alias_domain_exvpopmail_add_alias_domainvpopmail_add_domain_exvpopmail_add_domainvpopmail_add_uservpopmail_alias_addvpopmail_alias_del_domainvpopmail_alias_delvpopmail_alias_get_allvpopmail_alias_getvpopmail_auth_uservpopmail_del_domain_exvpopmail_del_domainvpopmail_del_uservpopmail_errorvpopmail_passwdvpopmail_set_user_quota数学扩展BC Math简介安装/配置需求安装运行时配置资源类型预定义常量BC 数学 函数bcaddbccompbcdivbcmodbcmulbcpowbcpowmodbcscalebcsqrtbcsubGMP简介安装/配置需求安装运行时配置资源类型预定义常量范例GMP 函数gmp_absgmp_addgmp_andgmp_clrbitgmp_cmpgmp_comgmp_div_qgmp_div_qrgmp_div_rgmp_divgmp_divexactgmp_exportgmp_factgmp_gcdgmp_gcdextgmp_hamdistgmp_importgmp_initgmp_intvalgmp_invertgmp_jacobigmp_legendregmp_modgmp_mulgmp_neggmp_nextprimegmp_orgmp_perfect_squaregmp_popcountgmp_powgmp_powmgmp_prob_primegmp_random_bitsgmp_random_rangegmp_random_seedgmp_randomgmp_rootgmp_rootremgmp_scan0gmp_scan1gmp_setbitgmp_signgmp_sqrtgmp_sqrtremgmp_strvalgmp_subgmp_testbitgmp_xorGMPLapack简介安装/配置需求安装运行时配置资源类型预定义常量LapackLapack::eigenValuesLapack::identityLapack::leastSquaresByFactorisationLapack::leastSquaresBySVDLapack::pseudoInverseLapack::singularValuesLapack::solveLinearEquationLapackExceptionMath简介安装/配置需求安装运行时配置资源类型预定义常量Math 函数absacosacoshasinasinhatan2atanatanhbase_convertbindecceilcoscoshdecbindechexdecoctdeg2radexpexpm1floorfmodgetrandmaxhexdechypotintdivis_finiteis_infiniteis_nanlcg_valuelog10log1plogmaxminmt_getrandmaxmt_randmt_srandoctdecpipowrad2degrandroundsinsinhsqrtsrandtantanhStatistics简介安装/配置需求安装运行时配置资源类型预定义常量Statistic 函数stats_absolute_deviationstats_cdf_betastats_cdf_binomialstats_cdf_cauchystats_cdf_chisquarestats_cdf_exponentialstats_cdf_fstats_cdf_gammastats_cdf_laplacestats_cdf_logisticstats_cdf_negative_binomialstats_cdf_noncentral_chisquarestats_cdf_noncentral_fstats_cdf_poissonstats_cdf_tstats_cdf_uniformstats_cdf_weibullstats_covariancestats_den_uniformstats_dens_betastats_dens_cauchystats_dens_chisquarestats_dens_exponentialstats_dens_fstats_dens_gammastats_dens_laplacestats_dens_logisticstats_dens_negative_binomialstats_dens_normalstats_dens_pmf_binomialstats_dens_pmf_hypergeometricstats_dens_pmf_poissonstats_dens_tstats_dens_weibullstats_harmonic_meanstats_kurtosisstats_rand_gen_betastats_rand_gen_chisquarestats_rand_gen_exponentialstats_rand_gen_fstats_rand_gen_funiformstats_rand_gen_gammastats_rand_gen_ibinomial_negativestats_rand_gen_ibinomialstats_rand_gen_intstats_rand_gen_ipoissonstats_rand_gen_iuniformstats_rand_gen_noncenral_chisquarestats_rand_gen_noncentral_fstats_rand_gen_noncentral_tstats_rand_gen_normalstats_rand_gen_tstats_rand_get_seedsstats_rand_phrase_to_seedsstats_rand_ranfstats_rand_setallstats_skewstats_standard_deviationstats_stat_binomial_coefstats_stat_correlationstats_stat_gennchstats_stat_independent_tstats_stat_innerproductstats_stat_noncentral_tstats_stat_paired_tstats_stat_percentilestats_stat_powersumstats_varianceTrader简介安装/配置需求安装运行时配置预定义常量Trader 函数trader_acostrader_adtrader_addtrader_adosctrader_adxtrader_adxrtrader_apotrader_aroontrader_aroonosctrader_asintrader_atantrader_atrtrader_avgpricetrader_bbandstrader_betatrader_boptrader_ccitrader_cdl2crowstrader_cdl3blackcrowstrader_cdl3insidetrader_cdl3linestriketrader_cdl3outsidetrader_cdl3starsinsouthtrader_cdl3whitesoldierstrader_cdlabandonedbabytrader_cdladvanceblocktrader_cdlbeltholdtrader_cdlbreakawaytrader_cdlclosingmarubozutrader_cdlconcealbabyswalltrader_cdlcounterattacktrader_cdldarkcloudcovertrader_cdldojitrader_cdldojistartrader_cdldragonflydojitrader_cdlengulfingtrader_cdleveningdojistartrader_cdleveningstartrader_cdlgapsidesidewhitetrader_cdlgravestonedojitrader_cdlhammertrader_cdlhangingmantrader_cdlharamitrader_cdlharamicrosstrader_cdlhighwavetrader_cdlhikkaketrader_cdlhikkakemodtrader_cdlhomingpigeontrader_cdlidentical3crowstrader_cdlinnecktrader_cdlinvertedhammertrader_cdlkickingtrader_cdlkickingbylengthtrader_cdlladderbottomtrader_cdllongleggeddojitrader_cdllonglinetrader_cdlmarubozutrader_cdlmatchinglowtrader_cdlmatholdtrader_cdlmorningdojistartrader_cdlmorningstartrader_cdlonnecktrader_cdlpiercingtrader_cdlrickshawmantrader_cdlrisefall3methodstrader_cdlseparatinglinestrader_cdlshootingstartrader_cdlshortlinetrader_cdlspinningtoptrader_cdlstalledpatterntrader_cdlsticksandwichtrader_cdltakuritrader_cdltasukigaptrader_cdlthrustingtrader_cdltristartrader_cdlunique3rivertrader_cdlupsidegap2crowstrader_cdlxsidegap3methodstrader_ceiltrader_cmotrader_correltrader_costrader_coshtrader_dematrader_divtrader_dxtrader_ematrader_errnotrader_exptrader_floortrader_get_compattrader_get_unstable_periodtrader_ht_dcperiodtrader_ht_dcphasetrader_ht_phasortrader_ht_sinetrader_ht_trendlinetrader_ht_trendmodetrader_kamatrader_linearreg_angletrader_linearreg_intercepttrader_linearreg_slopetrader_linearregtrader_lntrader_log10trader_matrader_macdtrader_macdexttrader_macdfixtrader_mamatrader_mavptrader_maxtrader_maxindextrader_medpricetrader_mfitrader_midpointtrader_midpricetrader_mintrader_minindextrader_minmaxtrader_minmaxindextrader_minus_ditrader_minus_dmtrader_momtrader_multtrader_natrtrader_obvtrader_plus_ditrader_plus_dmtrader_ppotrader_roctrader_rocptrader_rocr100trader_rocrtrader_rsitrader_sartrader_sarexttrader_set_compattrader_set_unstable_periodtrader_sintrader_sinhtrader_smatrader_sqrttrader_stddevtrader_stochtrader_stochftrader_stochrsitrader_subtrader_sumtrader_t3trader_tantrader_tanhtrader_tematrader_trangetrader_trimatrader_trixtrader_tsftrader_typpricetrader_ultosctrader_vartrader_wclpricetrader_willrtrader_wma非文本内容的 MIME 输出FDF简介安装/配置需求安装运行时配置资源类型预定义常量范例FDF 函数fdf_add_doc_javascriptfdf_add_templatefdf_closefdf_createfdf_enum_valuesfdf_errnofdf_errorfdf_get_apfdf_get_attachmentfdf_get_encodingfdf_get_filefdf_get_flagsfdf_get_optfdf_get_statusfdf_get_valuefdf_get_versionfdf_headerfdf_next_field_namefdf_open_stringfdf_openfdf_remove_itemfdf_save_stringfdf_savefdf_set_apfdf_set_encodingfdf_set_filefdf_set_flagsfdf_set_javascript_actionfdf_set_on_import_javascriptfdf_set_optfdf_set_statusfdf_set_submit_form_actionfdf_set_target_framefdf_set_valuefdf_set_versionGnuPG简介安装/配置需求安装运行时配置资源类型预定义常量范例Clearsign textGnuPG 函数gnupg_adddecryptkeygnupg_addencryptkeygnupg_addsignkeygnupg_cleardecryptkeysgnupg_clearencryptkeysgnupg_clearsignkeysgnupg_decryptgnupg_decryptverifygnupg_encryptgnupg_encryptsigngnupg_exportgnupg_geterrorgnupg_getprotocolgnupg_importgnupg_initgnupg_keyinfognupg_setarmorgnupg_seterrormodegnupg_setsignmodegnupg_signgnupg_verifyharu简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic PECL/haru exampleBuiltin Fonts And EncodingsBuiltin FontsBuiltin EncodingsHaruExceptionHaruDocHaruDoc::addPageHaruDoc::addPageLabelHaruDoc::__constructHaruDoc::createOutlineHaruDoc::getCurrentEncoderHaruDoc::getCurrentPageHaruDoc::getEncoderHaruDoc::getFontHaruDoc::getInfoAttrHaruDoc::getPageLayoutHaruDoc::getPageModeHaruDoc::getStreamSizeHaruDoc::insertPageHaruDoc::loadJPEGHaruDoc::loadPNGHaruDoc::loadRawHaruDoc::loadTTCHaruDoc::loadTTFHaruDoc::loadType1HaruDoc::outputHaruDoc::readFromStreamHaruDoc::resetErrorHaruDoc::resetStreamHaruDoc::saveHaruDoc::saveToStreamHaruDoc::setCompressionModeHaruDoc::setCurrentEncoderHaruDoc::setEncryptionModeHaruDoc::setInfoAttrHaruDoc::setInfoDateAttrHaruDoc::setOpenActionHaruDoc::setPageLayoutHaruDoc::setPageModeHaruDoc::setPagesConfigurationHaruDoc::setPasswordHaruDoc::setPermissionHaruDoc::useCNSEncodingsHaruDoc::useCNSFontsHaruDoc::useCNTEncodingsHaruDoc::useCNTFontsHaruDoc::useJPEncodingsHaruDoc::useJPFontsHaruDoc::useKREncodingsHaruDoc::useKRFontsHaruPageHaruPage::arcHaruPage::beginTextHaruPage::circleHaruPage::closePathHaruPage::concatHaruPage::createDestinationHaruPage::createLinkAnnotationHaruPage::createTextAnnotationHaruPage::createURLAnnotationHaruPage::curveTo2HaruPage::curveTo3HaruPage::curveToHaruPage::drawImageHaruPage::ellipseHaruPage::endPathHaruPage::endTextHaruPage::eofillHaruPage::eoFillStrokeHaruPage::fillHaruPage::fillStrokeHaruPage::getCharSpaceHaruPage::getCMYKFillHaruPage::getCMYKStrokeHaruPage::getCurrentFontHaruPage::getCurrentFontSizeHaruPage::getCurrentPosHaruPage::getCurrentTextPosHaruPage::getDashHaruPage::getFillingColorSpaceHaruPage::getFlatnessHaruPage::getGModeHaruPage::getGrayFillHaruPage::getGrayStrokeHaruPage::getHeightHaruPage::getHorizontalScalingHaruPage::getLineCapHaruPage::getLineJoinHaruPage::getLineWidthHaruPage::getMiterLimitHaruPage::getRGBFillHaruPage::getRGBStrokeHaruPage::getStrokingColorSpaceHaruPage::getTextLeadingHaruPage::getTextMatrixHaruPage::getTextRenderingModeHaruPage::getTextRiseHaruPage::getTextWidthHaruPage::getTransMatrixHaruPage::getWidthHaruPage::getWordSpaceHaruPage::lineToHaruPage::measureTextHaruPage::moveTextPosHaruPage::moveToHaruPage::moveToNextLineHaruPage::rectangleHaruPage::setCharSpaceHaruPage::setCMYKFillHaruPage::setCMYKStrokeHaruPage::setDashHaruPage::setFlatnessHaruPage::setFontAndSizeHaruPage::setGrayFillHaruPage::setGrayStrokeHaruPage::setHeightHaruPage::setHorizontalScalingHaruPage::setLineCapHaruPage::setLineJoinHaruPage::setLineWidthHaruPage::setMiterLimitHaruPage::setRGBFillHaruPage::setRGBStrokeHaruPage::setRotateHaruPage::setSizeHaruPage::setSlideShowHaruPage::setTextLeadingHaruPage::setTextMatrixHaruPage::setTextRenderingModeHaruPage::setTextRiseHaruPage::setWidthHaruPage::setWordSpaceHaruPage::showTextHaruPage::showTextNextLineHaruPage::strokeHaruPage::textOutHaruPage::textRectHaruFontHaruFont::getAscentHaruFont::getCapHeightHaruFont::getDescentHaruFont::getEncodingNameHaruFont::getFontNameHaruFont::getTextWidthHaruFont::getUnicodeWidthHaruFont::getXHeightHaruFont::measureTextHaruImageHaruImage::getBitsPerComponentHaruImage::getColorSpaceHaruImage::getHeightHaruImage::getSizeHaruImage::getWidthHaruImage::setColorMaskHaruImage::setMaskImageHaruEncoderHaruEncoder::getByteTypeHaruEncoder::getTypeHaruEncoder::getUnicodeHaruEncoder::getWritingModeHaruOutlineHaruOutline::setDestinationHaruOutline::setOpenedHaruAnnotationHaruAnnotation::setBorderStyleHaruAnnotation::setHighlightModeHaruAnnotation::setIconHaruAnnotation::setOpenedHaruDestinationHaruDestination::setFitHaruDestination::setFitBHaruDestination::setFitBHHaruDestination::setFitBVHaruDestination::setFitHHaruDestination::setFitRHaruDestination::setFitVHaruDestination::setXYZMing简介安装/配置需求安装运行时配置资源类型预定义常量范例SWFAction ExamplesSWFSPrite basic examplesMing 函数ming_keypressming_setcubicthresholdming_setscaleming_setswfcompressionming_useconstantsming_useswfversionSWFActionSWFAction::__constructSWFBitmapSWFBitmap::__constructSWFBitmap::getHeightSWFBitmap::getWidthSWFButtonSWFButton::addActionSWFButton::addASoundSWFButton::addShapeSWFButton::__constructSWFButton::setActionSWFButton::setDownSWFButton::setHitSWFButton::setMenuSWFButton::setOverSWFButton::setUpSWFDisplayItemSWFDisplayItem::addActionSWFDisplayItem::addColorSWFDisplayItem::endMaskSWFDisplayItem::getRotSWFDisplayItem::getXSWFDisplayItem::getXScaleSWFDisplayItem::getXSkewSWFDisplayItem::getYSWFDisplayItem::getYScaleSWFDisplayItem::getYSkewSWFDisplayItem::moveSWFDisplayItem::moveToSWFDisplayItem::multColorSWFDisplayItem::removeSWFDisplayItem::rotateSWFDisplayItem::rotateToSWFDisplayItem::scaleSWFDisplayItem::scaleToSWFDisplayItem::setDepthSWFDisplayItem::setMaskLevelSWFDisplayItem::setMatrixSWFDisplayItem::setNameSWFDisplayItem::setRatioSWFDisplayItem::skewXSWFDisplayItem::skewXToSWFDisplayItem::skewYSWFDisplayItem::skewYToSWFFillSWFFill::moveToSWFFill::rotateToSWFFill::scaleToSWFFill::skewXToSWFFill::skewYToSWFFontSWFFont::__constructSWFFont::getAscentSWFFont::getDescentSWFFont::getLeadingSWFFont::getShapeSWFFont::getUTF8WidthSWFFont::getWidthSWFFontCharSWFFontChar::addCharsSWFFontChar::addUTF8CharsSWFGradientSWFGradient::addEntrySWFGradient::__constructSWFMorphSWFMorph::__constructSWFMorph::getShape1SWFMorph::getShape2SWFMovieSWFMovie::addSWFMovie::addExportSWFMovie::addFontSWFMovie::__constructSWFMovie::importCharSWFMovie::importFontSWFMovie::labelFrameSWFMovie::nextFrameSWFMovie::outputSWFMovie::removeSWFMovie::saveSWFMovie::saveToFileSWFMovie::setbackgroundSWFMovie::setDimensionSWFMovie::setFramesSWFMovie::setRateSWFMovie::startSoundSWFMovie::stopSoundSWFMovie::streamMP3SWFMovie::writeExportsSWFPrebuiltClipSWFPrebuiltClip::__constructSWFShapeSWFShape::addFillSWFShape::__constructSWFShape::drawArcSWFShape::drawCircleSWFShape::drawCubicSWFShape::drawCubicToSWFShape::drawCurveSWFShape::drawCurveToSWFShape::drawGlyphSWFShape::drawLineSWFShape::drawLineToSWFShape::movePenSWFShape::movePenToSWFShape::setLeftFillSWFShape::setLineSWFShape::setRightFillSWFSoundSWFSound::__constructSWFSoundInstanceSWFSoundInstance::loopCountSWFSoundInstance::loopInPointSWFSoundInstance::loopOutPointSWFSoundInstance::noMultipleSWFSpriteSWFSprite::addSWFSprite::__constructSWFSprite::labelFrameSWFSprite::nextFrameSWFSprite::removeSWFSprite::setFramesSWFSprite::startSoundSWFSprite::stopSoundSWFTextSWFText::addStringSWFText::addUTF8StringSWFText::__constructSWFText::getAscentSWFText::getDescentSWFText::getLeadingSWFText::getUTF8WidthSWFText::getWidthSWFText::moveToSWFText::setColorSWFText::setFontSWFText::setHeightSWFText::setSpacingSWFTextFieldSWFTextField::addCharsSWFTextField::addStringSWFTextField::alignSWFTextField::__constructSWFTextField::setBoundsSWFTextField::setColorSWFTextField::setFontSWFTextField::setHeightSWFTextField::setIndentationSWFTextField::setLeftMarginSWFTextField::setLineSpacingSWFTextField::setMarginsSWFTextField::setNameSWFTextField::setPaddingSWFTextField::setRightMarginSWFVideoStreamSWFVideoStream::__constructSWFVideoStream::getNumFramesSWFVideoStream::setDimensionPDF简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic Usage ExamplesPDF 函数PDF_activate_itemPDF_add_annotationPDF_add_bookmarkPDF_add_launchlinkPDF_add_locallinkPDF_add_nameddestPDF_add_notePDF_add_outlinePDF_add_pdflinkPDF_add_table_cellPDF_add_textflowPDF_add_thumbnailPDF_add_weblinkPDF_arcPDF_arcnPDF_attach_filePDF_begin_documentPDF_begin_fontPDF_begin_glyphPDF_begin_itemPDF_begin_layerPDF_begin_page_extPDF_begin_pagePDF_begin_patternPDF_begin_template_extPDF_begin_templatePDF_circlePDF_clipPDF_close_imagePDF_close_pdi_pagePDF_close_pdiPDF_closePDF_closepath_fill_strokePDF_closepath_strokePDF_closepathPDF_concatPDF_continue_textPDF_create_3dviewPDF_create_actionPDF_create_annotationPDF_create_bookmarkPDF_create_fieldPDF_create_fieldgroupPDF_create_gstatePDF_create_pvfPDF_create_textflowPDF_curvetoPDF_define_layerPDF_delete_pvfPDF_delete_tablePDF_delete_textflowPDF_deletePDF_encoding_set_charPDF_end_documentPDF_end_fontPDF_end_glyphPDF_end_itemPDF_end_layerPDF_end_page_extPDF_end_pagePDF_end_patternPDF_end_templatePDF_endpathPDF_fill_imageblockPDF_fill_pdfblockPDF_fill_strokePDF_fill_textblockPDF_fillPDF_findfontPDF_fit_imagePDF_fit_pdi_pagePDF_fit_tablePDF_fit_textflowPDF_fit_textlinePDF_get_apinamePDF_get_bufferPDF_get_errmsgPDF_get_errnumPDF_get_fontPDF_get_fontnamePDF_get_fontsizePDF_get_image_heightPDF_get_image_widthPDF_get_majorversionPDF_get_minorversionPDF_get_parameterPDF_get_pdi_parameterPDF_get_pdi_valuePDF_get_valuePDF_info_fontPDF_info_matchboxPDF_info_tablePDF_info_textflowPDF_info_textlinePDF_initgraphicsPDF_linetoPDF_load_3ddataPDF_load_fontPDF_load_iccprofilePDF_load_imagePDF_makespotcolorPDF_movetoPDF_newPDF_open_ccittPDF_open_filePDF_open_gifPDF_open_image_filePDF_open_imagePDF_open_jpegPDF_open_memory_imagePDF_open_pdi_documentPDF_open_pdi_pagePDF_open_pdiPDF_open_tiffPDF_pcos_get_numberPDF_pcos_get_streamPDF_pcos_get_stringPDF_place_imagePDF_place_pdi_pagePDF_process_pdiPDF_rectPDF_restorePDF_resume_pagePDF_rotatePDF_savePDF_scalePDF_set_border_colorPDF_set_border_dashPDF_set_border_stylePDF_set_char_spacingPDF_set_durationPDF_set_gstatePDF_set_horiz_scalingPDF_set_info_authorPDF_set_info_creatorPDF_set_info_keywordsPDF_set_info_subjectPDF_set_info_titlePDF_set_infoPDF_set_layer_dependencyPDF_set_leadingPDF_set_parameterPDF_set_text_matrixPDF_set_text_posPDF_set_text_renderingPDF_set_text_risePDF_set_valuePDF_set_word_spacingPDF_setcolorPDF_setdashPDF_setdashpatternPDF_setflatPDF_setfontPDF_setgray_fillPDF_setgray_strokePDF_setgrayPDF_setlinecapPDF_setlinejoinPDF_setlinewidthPDF_setmatrixPDF_setmiterlimitPDF_setpolydashPDF_setrgbcolor_fillPDF_setrgbcolor_strokePDF_setrgbcolorPDF_shading_patternPDF_shadingPDF_shfillPDF_show_boxedPDF_show_xyPDF_showPDF_skewPDF_stringwidthPDF_strokePDF_suspend_pagePDF_translatePDF_utf16_to_utf8PDF_utf32_to_utf16PDF_utf8_to_utf16PS简介安装/配置需求安装运行时配置资源类型预定义常量PS 函数ps_add_bookmarkps_add_launchlinkps_add_locallinkps_add_noteps_add_pdflinkps_add_weblinkps_arcps_arcnps_begin_pageps_begin_patternps_begin_templateps_circleps_clipps_close_imageps_closeps_closepath_strokeps_closepathps_continue_textps_curvetops_deleteps_end_pageps_end_patternps_end_templateps_fill_strokeps_fillps_findfontps_get_bufferps_get_parameterps_get_valueps_hyphenateps_include_fileps_linetops_makespotcolorps_movetops_newps_open_fileps_open_image_fileps_open_imageps_open_memory_imageps_place_imageps_rectps_restoreps_rotateps_saveps_scaleps_set_border_colorps_set_border_dashps_set_border_styleps_set_infops_set_parameterps_set_text_posps_set_valueps_setcolorps_setdashps_setflatps_setfontps_setgrayps_setlinecapps_setlinejoinps_setlinewidthps_setmiterlimitps_setoverprintmodeps_setpolydashps_shading_patternps_shadingps_shfillps_show_boxedps_show_xy2ps_show_xyps_show2ps_showps_string_geometryps_stringwidthps_strokeps_symbol_nameps_symbol_widthps_symbolps_translateRPM Reader简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageRPM Reader 函数rpm_closerpm_get_tagrpm_is_validrpm_openrpm_version进程控制扩展Eio简介安装/配置需求安装运行时配置资源类型预定义常量范例Eio 函数eio_busyeio_canceleio_chmodeio_chowneio_closeeio_customeio_dup2eio_event_loopeio_fallocateeio_fchmodeio_fchowneio_fdatasynceio_fstateio_fstatvfseio_fsynceio_ftruncateeio_futimeeio_get_event_streameio_get_last_erroreio_grp_addeio_grp_canceleio_grp_limiteio_grpeio_initeio_linkeio_lstateio_mkdireio_mknodeio_nopeio_npendingeio_nreadyeio_nreqseio_nthreadseio_openeio_polleio_readeio_readaheadeio_readdireio_readlinkeio_realpatheio_renameeio_rmdireio_seekeio_sendfileeio_set_max_idleeio_set_max_paralleleio_set_max_poll_reqseio_set_max_poll_timeeio_set_min_paralleleio_stateio_statvfseio_symlinkeio_sync_file_rangeeio_synceio_syncfseio_truncateeio_unlinkeio_utimeeio_writeEv简介安装/配置需求安装运行时配置资源类型预定义常量范例WatchersWatcher callbacksPeriodic watcher operation modesEvEv::backendEv::depthEv::embeddableBackendsEv::feedSignalEv::feedSignalEventEv::iterationEv::nowEv::nowUpdateEv::recommendedBackendsEv::resumeEv::runEv::sleepEv::stopEv::supportedBackendsEv::suspendEv::timeEv::verifyEvCheckEvCheck::__constructEvCheck::createStoppedEvChildEvChild::__constructEvChild::createStoppedEvChild::setEvEmbedEvEmbed::__constructEvEmbed::createStoppedEvEmbed::setEvEmbed::sweepEvForkEvFork::__constructEvFork::createStoppedEvIdleEvIdle::__constructEvIdle::createStoppedEvIoEvIo::__constructEvIo::createStoppedEvIo::setEvLoopEvLoop::backendEvLoop::checkEvLoop::childEvLoop::__constructEvLoop::defaultLoopEvLoop::embedEvLoop::forkEvLoop::idleEvLoop::invokePendingEvLoop::ioEvLoop::loopForkEvLoop::nowEvLoop::nowUpdateEvLoop::periodicEvLoop::prepareEvLoop::resumeEvLoop::runEvLoop::signalEvLoop::statEvLoop::stopEvLoop::suspendEvLoop::timerEvLoop::verifyEvPeriodicEvPeriodic::againEvPeriodic::atEvPeriodic::__constructEvPeriodic::createStoppedEvPeriodic::setEvPrepareEvPrepare::__constructEvPrepare::createStoppedEvSignalEvSignal::__constructEvSignal::createStoppedEvSignal::setEvStatEvStat::attrEvStat::__constructEvStat::createStoppedEvStat::prevEvStat::setEvStat::statEvTimerEvTimer::againEvTimer::__constructEvTimer::createStoppedEvTimer::setEvWatcherEvWatcher::clearEvWatcher::__constructEvWatcher::feedEvWatcher::getLoopEvWatcher::invokeEvWatcher::keepaliveEvWatcher::setCallbackEvWatcher::startEvWatcher::stopExpect简介安装/配置需求安装运行时配置资源类型预定义常量范例Expect Usage ExamplesExpect 函数expect_expectlexpect_popenLibevent简介安装/配置需求安装运行时配置资源类型预定义常量范例Libevent 函数event_addevent_base_freeevent_base_loopevent_base_loopbreakevent_base_loopexitevent_base_newevent_base_priority_initevent_base_reinitevent_base_setevent_buffer_base_setevent_buffer_disableevent_buffer_enableevent_buffer_fd_setevent_buffer_freeevent_buffer_newevent_buffer_priority_setevent_buffer_readevent_buffer_set_callbackevent_buffer_timeout_setevent_buffer_watermark_setevent_buffer_writeevent_delevent_freeevent_newevent_priority_setevent_setevent_timer_addevent_timer_delevent_timer_newevent_timer_setPCNTL简介安装/配置需求安装运行时配置资源类型预定义常量范例示例PCNTL 函数pcntl_alarmpcntl_errnopcntl_execpcntl_forkpcntl_get_last_errorpcntl_getprioritypcntl_setprioritypcntl_signal_dispatchpcntl_signalpcntl_sigprocmaskpcntl_sigtimedwaitpcntl_sigwaitinfopcntl_strerrorpcntl_waitpcntl_waitpidpcntl_wexitstatuspcntl_wifexitedpcntl_wifsignaledpcntl_wifstoppedpcntl_wstopsigpcntl_wtermsigPOSIX简介安装/配置需求安装运行时配置资源类型预定义常量posix_access constantsposix_mknod constantsposix_setrlimit constantsPOSIX 函数posix_accessposix_ctermidposix_errnoposix_get_last_errorposix_getcwdposix_getegidposix_geteuidposix_getgidposix_getgrgidposix_getgrnamposix_getgroupsposix_getloginposix_getpgidposix_getpgrpposix_getpidposix_getppidposix_getpwnamposix_getpwuidposix_getrlimitposix_getsidposix_getuidposix_initgroupsposix_isattyposix_killposix_mkfifoposix_mknodposix_setegidposix_seteuidposix_setgidposix_setpgidposix_setrlimitposix_setsidposix_setuidposix_strerrorposix_timesposix_ttynameposix_uname程序执行简介安装/配置需求安装运行时配置资源类型预定义常量程序执行 函数escapeshellargescapeshellcmdexecpassthruproc_closeproc_get_statusproc_niceproc_openproc_terminateshell_execsystempthreads简介安装/配置需求安装运行时配置预定义常量ThreadedThreaded::chunkThreaded::countThreaded::extendThreaded::fromThreaded::getTerminationInfoThreaded::isRunningThreaded::isTerminatedThreaded::isWaitingThreaded::lockThreaded::mergeThreaded::notifyThreaded::popThreaded::runThreaded::shiftThreaded::synchronizedThreaded::unlockThreaded::waitThreadThread::detachThread::getCreatorIdThread::getCurrentThreadThread::getCurrentThreadIdThread::getThreadIdThread::globallyThread::isJoinedThread::isStartedThread::joinThread::killThread::startWorkerWorker::getStackedWorker::isShutdownWorker::isWorkingWorker::shutdownWorker::stackWorker::unstackCollectableCollectable::isGarbageCollectable::setGarbageModifiersPoolPool::collectPool::__constructPool::resizePool::shutdownPool::submitPool::submitToMutexMutex::createMutex::destroyMutex::lockMutex::trylockMutex::unlockCondCond::broadcastCond::createCond::destroyCond::signalCond::waitSemaphore简介安装/配置需求安装运行时配置资源类型预定义常量Semaphore 函数ftokmsg_get_queuemsg_queue_existsmsg_receivemsg_remove_queuemsg_sendmsg_set_queuemsg_stat_queuesem_acquiresem_getsem_releasesem_removeshm_attachshm_detachshm_get_varshm_has_varshm_put_varshm_remove_varshm_removeShared Memory简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageShared Memory 函数shmop_closeshmop_deleteshmop_openshmop_readshmop_sizeshmop_writeSync简介安装/配置需求安装运行时配置资源类型预定义常量SyncMutexSyncMutex::__constructSyncMutex::lockSyncMutex::unlockSyncSemaphoreSyncSemaphore::__constructSyncSemaphore::lockSyncSemaphore::unlockSyncEventSyncEvent::__constructSyncEvent::fireSyncEvent::resetSyncEvent::waitSyncReaderWriterSyncReaderWriter::__constructSyncReaderWriter::readlockSyncReaderWriter::readunlockSyncReaderWriter::writelockSyncReaderWriter::writeunlock其它基本扩展GeoIP简介安装/配置需求安装运行时配置资源类型预定义常量GeoIP 函数geoip_asnum_by_namegeoip_continent_code_by_namegeoip_country_code_by_namegeoip_country_code3_by_namegeoip_country_name_by_namegeoip_database_infogeoip_db_availgeoip_db_filenamegeoip_db_get_all_infogeoip_domain_by_namegeoip_id_by_namegeoip_isp_by_namegeoip_netspeedcell_by_namegeoip_org_by_namegeoip_record_by_namegeoip_region_by_namegeoip_region_name_by_codegeoip_setup_custom_directorygeoip_time_zone_by_country_and_regionFANN简介安装/配置需求安装运行时配置资源类型预定义常量范例XOR trainingFann 函数fann_cascadetrain_on_datafann_cascadetrain_on_filefann_clear_scaling_paramsfann_copyfann_create_from_filefann_create_shortcut_arrayfann_create_shortcutfann_create_sparse_arrayfann_create_sparsefann_create_standard_arrayfann_create_standardfann_create_train_from_callbackfann_create_trainfann_descale_inputfann_descale_outputfann_descale_trainfann_destroy_trainfann_destroyfann_duplicate_train_datafann_get_activation_functionfann_get_activation_steepnessfann_get_bias_arrayfann_get_bit_fail_limitfann_get_bit_failfann_get_cascade_activation_functions_countfann_get_cascade_activation_functionsfann_get_cascade_activation_steepnesses_countfann_get_cascade_activation_steepnessesfann_get_cascade_candidate_change_fractionfann_get_cascade_candidate_limitfann_get_cascade_candidate_stagnation_epochsfann_get_cascade_max_cand_epochsfann_get_cascade_max_out_epochsfann_get_cascade_min_cand_epochsfann_get_cascade_min_out_epochsfann_get_cascade_num_candidate_groupsfann_get_cascade_num_candidatesfann_get_cascade_output_change_fractionfann_get_cascade_output_stagnation_epochsfann_get_cascade_weight_multiplierfann_get_connection_arrayfann_get_connection_ratefann_get_errnofann_get_errstrfann_get_layer_arrayfann_get_learning_momentumfann_get_learning_ratefann_get_MSEfann_get_network_typefann_get_num_inputfann_get_num_layersfann_get_num_outputfann_get_quickprop_decayfann_get_quickprop_mufann_get_rprop_decrease_factorfann_get_rprop_delta_maxfann_get_rprop_delta_minfann_get_rprop_delta_zerofann_get_rprop_increase_factorfann_get_sarprop_step_error_shiftfann_get_sarprop_step_error_threshold_factorfann_get_sarprop_temperaturefann_get_sarprop_weight_decay_shiftfann_get_total_connectionsfann_get_total_neuronsfann_get_train_error_functionfann_get_train_stop_functionfann_get_training_algorithmfann_init_weightsfann_length_train_datafann_merge_train_datafann_num_input_train_datafann_num_output_train_datafann_print_errorfann_randomize_weightsfann_read_train_from_filefann_reset_errnofann_reset_errstrfann_reset_MSEfann_runfann_save_trainfann_savefann_scale_input_train_datafann_scale_inputfann_scale_output_train_datafann_scale_outputfann_scale_train_datafann_scale_trainfann_set_activation_function_hiddenfann_set_activation_function_layerfann_set_activation_function_outputfann_set_activation_functionfann_set_activation_steepness_hiddenfann_set_activation_steepness_layerfann_set_activation_steepness_outputfann_set_activation_steepnessfann_set_bit_fail_limitfann_set_callbackfann_set_cascade_activation_functionsfann_set_cascade_activation_steepnessesfann_set_cascade_candidate_change_fractionfann_set_cascade_candidate_limitfann_set_cascade_candidate_stagnation_epochsfann_set_cascade_max_cand_epochsfann_set_cascade_max_out_epochsfann_set_cascade_min_cand_epochsfann_set_cascade_min_out_epochsfann_set_cascade_num_candidate_groupsfann_set_cascade_output_change_fractionfann_set_cascade_output_stagnation_epochsfann_set_cascade_weight_multiplierfann_set_error_logfann_set_input_scaling_paramsfann_set_learning_momentumfann_set_learning_ratefann_set_output_scaling_paramsfann_set_quickprop_decayfann_set_quickprop_mufann_set_rprop_decrease_factorfann_set_rprop_delta_maxfann_set_rprop_delta_minfann_set_rprop_delta_zerofann_set_rprop_increase_factorfann_set_sarprop_step_error_shiftfann_set_sarprop_step_error_threshold_factorfann_set_sarprop_temperaturefann_set_sarprop_weight_decay_shiftfann_set_scaling_paramsfann_set_train_error_functionfann_set_train_stop_functionfann_set_training_algorithmfann_set_weight_arrayfann_set_weightfann_shuffle_train_datafann_subset_train_datafann_test_datafann_testfann_train_epochfann_train_on_datafann_train_on_filefann_trainFANNConnectionFANNConnection::__constructFANNConnection::getFromNeuronFANNConnection::getToNeuronFANNConnection::getWeightFANNConnection::setWeightJSON简介安装/配置需求安装运行时配置资源类型预定义常量JsonSerializableJsonSerializable::jsonSerializeJSON 函数json_decodejson_encodejson_last_error_msgjson_last_errorJudy简介安装/配置需求安装运行时配置资源类型JudyJudy::byCountJudy::__constructJudy::countJudy::__destructJudy::firstJudy::firstEmptyJudy::freeJudy::getTypeJudy::lastJudy::lastEmptyJudy::memoryUsageJudy::nextJudy::nextEmptyJudy::offsetExistsJudy::offsetGetJudy::offsetSetJudy::offsetUnsetJudy::prevJudy::prevEmptyJudy::sizeJudy 函数judy_typejudy_versionLua简介安装/配置需求安装运行时配置资源类型LuaLua::assignLua::callLua::__callLua::__constructLua::evalLua::getVersionLua::includeLua::registerCallbackLuaClosureLuaClosure::__invokeMisc.简介安装/配置需求安装运行时配置资源类型预定义常量杂项 函数connection_abortedconnection_statusconstantdefinedefineddieevalexitget_browser__halt_compilerhighlight_filehighlight_stringignore_user_abortpackphp_check_syntaxphp_strip_whitespaceshow_sourcesleepsys_getloadavgtime_nanosleeptime_sleep_untiluniqidunpackusleepParsekit简介安装/配置需求安装运行时配置资源类型预定义常量Parsekit 函数parsekit_compile_fileparsekit_compile_stringparsekit_func_arginfoSPL简介安装/配置需求安装运行时配置资源类型预定义常量数据结构SplDoublyLinkedListSplDoublyLinkedList::addSplDoublyLinkedList::bottomSplDoublyLinkedList::__constructSplDoublyLinkedList::countSplDoublyLinkedList::currentSplDoublyLinkedList::getIteratorModeSplDoublyLinkedList::isEmptySplDoublyLinkedList::keySplDoublyLinkedList::nextSplDoublyLinkedList::offsetExistsSplDoublyLinkedList::offsetGetSplDoublyLinkedList::offsetSetSplDoublyLinkedList::offsetUnsetSplDoublyLinkedList::popSplDoublyLinkedList::prevSplDoublyLinkedList::pushSplDoublyLinkedList::rewindSplDoublyLinkedList::serializeSplDoublyLinkedList::setIteratorModeSplDoublyLinkedList::shiftSplDoublyLinkedList::topSplDoublyLinkedList::unserializeSplDoublyLinkedList::unshiftSplDoublyLinkedList::validSplStackSplStack::__constructSplStack::setIteratorModeSplQueueSplQueue::__constructSplQueue::dequeueSplQueue::enqueueSplQueue::setIteratorModeSplHeapSplHeap::compareSplHeap::__constructSplHeap::countSplHeap::currentSplHeap::extractSplHeap::insertSplHeap::isEmptySplHeap::keySplHeap::nextSplHeap::recoverFromCorruptionSplHeap::rewindSplHeap::topSplHeap::validSplMaxHeapSplMaxHeap::compareSplMinHeapSplMinHeap::compareSplPriorityQueueSplPriorityQueue::compareSplPriorityQueue::__constructSplPriorityQueue::countSplPriorityQueue::currentSplPriorityQueue::extractSplPriorityQueue::insertSplPriorityQueue::isEmptySplPriorityQueue::keySplPriorityQueue::nextSplPriorityQueue::recoverFromCorruptionSplPriorityQueue::rewindSplPriorityQueue::setExtractFlagsSplPriorityQueue::topSplPriorityQueue::validSplFixedArraySplFixedArray::__constructSplFixedArray::countSplFixedArray::currentSplFixedArray::fromArraySplFixedArray::getSizeSplFixedArray::keySplFixedArray::nextSplFixedArray::offsetExistsSplFixedArray::offsetGetSplFixedArray::offsetSetSplFixedArray::offsetUnsetSplFixedArray::rewindSplFixedArray::setSizeSplFixedArray::toArraySplFixedArray::validSplFixedArray::__wakeupSplObjectStorageSplObjectStorage::addAllSplObjectStorage::attachSplObjectStorage::containsSplObjectStorage::countSplObjectStorage::currentSplObjectStorage::detachSplObjectStorage::getHashSplObjectStorage::getInfoSplObjectStorage::keySplObjectStorage::nextSplObjectStorage::offsetExistsSplObjectStorage::offsetGetSplObjectStorage::offsetSetSplObjectStorage::offsetUnsetSplObjectStorage::removeAllSplObjectStorage::removeAllExceptSplObjectStorage::rewindSplObjectStorage::serializeSplObjectStorage::setInfoSplObjectStorage::unserializeSplObjectStorage::valid迭代器AppendIteratorAppendIterator::appendAppendIterator::__constructAppendIterator::currentAppendIterator::getArrayIteratorAppendIterator::getInnerIteratorAppendIterator::getIteratorIndexAppendIterator::keyAppendIterator::nextAppendIterator::rewindAppendIterator::validArrayIteratorArrayIterator::appendArrayIterator::asortArrayIterator::__constructArrayIterator::countArrayIterator::currentArrayIterator::getArrayCopyArrayIterator::getFlagsArrayIterator::keyArrayIterator::ksortArrayIterator::natcasesortArrayIterator::natsortArrayIterator::nextArrayIterator::offsetExistsArrayIterator::offsetGetArrayIterator::offsetSetArrayIterator::offsetUnsetArrayIterator::rewindArrayIterator::seekArrayIterator::serializeArrayIterator::setFlagsArrayIterator::uasortArrayIterator::uksortArrayIterator::unserializeArrayIterator::validCachingIteratorCachingIterator::__constructCachingIterator::countCachingIterator::currentCachingIterator::getCacheCachingIterator::getFlagsCachingIterator::getInnerIteratorCachingIterator::hasNextCachingIterator::keyCachingIterator::nextCachingIterator::offsetExistsCachingIterator::offsetGetCachingIterator::offsetSetCachingIterator::offsetUnsetCachingIterator::rewindCachingIterator::setFlagsCachingIterator::__toStringCachingIterator::validCallbackFilterIteratorCallbackFilterIterator::acceptCallbackFilterIterator::__constructDirectoryIteratorDirectoryIterator::__constructDirectoryIterator::currentDirectoryIterator::getATimeDirectoryIterator::getBasenameDirectoryIterator::getCTimeDirectoryIterator::getExtensionDirectoryIterator::getFilenameDirectoryIterator::getGroupDirectoryIterator::getInodeDirectoryIterator::getMTimeDirectoryIterator::getOwnerDirectoryIterator::getPathDirectoryIterator::getPathnameDirectoryIterator::getPermsDirectoryIterator::getSizeDirectoryIterator::getTypeDirectoryIterator::isDirDirectoryIterator::isDotDirectoryIterator::isExecutableDirectoryIterator::isFileDirectoryIterator::isLinkDirectoryIterator::isReadableDirectoryIterator::isWritableDirectoryIterator::keyDirectoryIterator::nextDirectoryIterator::rewindDirectoryIterator::seekDirectoryIterator::__toStringDirectoryIterator::validEmptyIteratorEmptyIterator::currentEmptyIterator::keyEmptyIterator::nextEmptyIterator::rewindEmptyIterator::validFilesystemIteratorFilesystemIterator::__constructFilesystemIterator::currentFilesystemIterator::getFlagsFilesystemIterator::keyFilesystemIterator::nextFilesystemIterator::rewindFilesystemIterator::setFlagsFilterIteratorFilterIterator::acceptFilterIterator::__constructFilterIterator::currentFilterIterator::getInnerIteratorFilterIterator::keyFilterIterator::nextFilterIterator::rewindFilterIterator::validGlobIteratorGlobIterator::__constructGlobIterator::countInfiniteIteratorInfiniteIterator::__constructInfiniteIterator::nextIteratorIteratorIteratorIterator::__constructIteratorIterator::currentIteratorIterator::getInnerIteratorIteratorIterator::keyIteratorIterator::nextIteratorIterator::rewindIteratorIterator::validLimitIteratorLimitIterator::__constructLimitIterator::currentLimitIterator::getInnerIteratorLimitIterator::getPositionLimitIterator::keyLimitIterator::nextLimitIterator::rewindLimitIterator::seekLimitIterator::validMultipleIteratorMultipleIterator::attachIteratorMultipleIterator::__constructMultipleIterator::containsIteratorMultipleIterator::countIteratorsMultipleIterator::currentMultipleIterator::detachIteratorMultipleIterator::getFlagsMultipleIterator::keyMultipleIterator::nextMultipleIterator::rewindMultipleIterator::setFlagsMultipleIterator::validNoRewindIteratorNoRewindIterator::__constructNoRewindIterator::currentNoRewindIterator::getInnerIteratorNoRewindIterator::keyNoRewindIterator::nextNoRewindIterator::rewindNoRewindIterator::validParentIteratorParentIterator::acceptParentIterator::__constructParentIterator::getChildrenParentIterator::hasChildrenParentIterator::nextParentIterator::rewindRecursiveArrayIteratorRecursiveArrayIterator::getChildrenRecursiveArrayIterator::hasChildrenRecursiveCachingIteratorRecursiveCachingIterator::__constructRecursiveCachingIterator::getChildrenRecursiveCachingIterator::hasChildrenRecursiveCallbackFilterIteratorRecursiveCallbackFilterIterator::__constructRecursiveCallbackFilterIterator::getChildrenRecursiveCallbackFilterIterator::hasChildrenRecursiveDirectoryIteratorRecursiveDirectoryIterator::__constructRecursiveDirectoryIterator::getChildrenRecursiveDirectoryIterator::getSubPathRecursiveDirectoryIterator::getSubPathnameRecursiveDirectoryIterator::hasChildrenRecursiveDirectoryIterator::keyRecursiveDirectoryIterator::nextRecursiveDirectoryIterator::rewindRecursiveFilterIteratorRecursiveFilterIterator::__constructRecursiveFilterIterator::getChildrenRecursiveFilterIterator::hasChildrenRecursiveIteratorIteratorRecursiveIteratorIterator::beginChildrenRecursiveIteratorIterator::beginIterationRecursiveIteratorIterator::callGetChildrenRecursiveIteratorIterator::callHasChildrenRecursiveIteratorIterator::__constructRecursiveIteratorIterator::currentRecursiveIteratorIterator::endChildrenRecursiveIteratorIterator::endIterationRecursiveIteratorIterator::getDepthRecursiveIteratorIterator::getInnerIteratorRecursiveIteratorIterator::getMaxDepthRecursiveIteratorIterator::getSubIteratorRecursiveIteratorIterator::keyRecursiveIteratorIterator::nextRecursiveIteratorIterator::nextElementRecursiveIteratorIterator::rewindRecursiveIteratorIterator::setMaxDepthRecursiveIteratorIterator::validRecursiveRegexIteratorRecursiveRegexIterator::__constructRecursiveRegexIterator::getChildrenRecursiveRegexIterator::hasChildrenRecursiveTreeIteratorRecursiveTreeIterator::beginChildrenRecursiveTreeIterator::beginIterationRecursiveTreeIterator::callGetChildrenRecursiveTreeIterator::callHasChildrenRecursiveTreeIterator::__constructRecursiveTreeIterator::currentRecursiveTreeIterator::endChildrenRecursiveTreeIterator::endIterationRecursiveTreeIterator::getEntryRecursiveTreeIterator::getPostfixRecursiveTreeIterator::getPrefixRecursiveTreeIterator::keyRecursiveTreeIterator::nextRecursiveTreeIterator::nextElementRecursiveTreeIterator::rewindRecursiveTreeIterator::setPrefixPartRecursiveTreeIterator::validRegexIteratorRegexIterator::acceptRegexIterator::__constructRegexIterator::getFlagsRegexIterator::getModeRegexIterator::getPregFlagsRegexIterator::getRegexRegexIterator::setFlagsRegexIterator::setModeRegexIterator::setPregFlags接口CountableCountable::countOuterIteratorOuterIterator::getInnerIteratorRecursiveIteratorRecursiveIterator::getChildrenRecursiveIterator::hasChildrenSeekableIteratorSeekableIterator::seek异常BadFunctionCallExceptionBadMethodCallExceptionDomainExceptionInvalidArgumentExceptionLengthExceptionLogicExceptionOutOfBoundsExceptionOutOfRangeExceptionOverflowExceptionRangeExceptionRuntimeExceptionUnderflowExceptionUnexpectedValueExceptionSPL 函数class_implementsclass_parentsclass_usesiterator_applyiterator_countiterator_to_arrayspl_autoload_callspl_autoload_extensionsspl_autoload_functionsspl_autoload_registerspl_autoload_unregisterspl_autoloadspl_classesspl_object_hash文件处理SplFileInfoSplFileInfo::__constructSplFileInfo::getATimeSplFileInfo::getBasenameSplFileInfo::getCTimeSplFileInfo::getExtensionSplFileInfo::getFileInfoSplFileInfo::getFilenameSplFileInfo::getGroupSplFileInfo::getInodeSplFileInfo::getLinkTargetSplFileInfo::getMTimeSplFileInfo::getOwnerSplFileInfo::getPathSplFileInfo::getPathInfoSplFileInfo::getPathnameSplFileInfo::getPermsSplFileInfo::getRealPathSplFileInfo::getSizeSplFileInfo::getTypeSplFileInfo::isDirSplFileInfo::isExecutableSplFileInfo::isFileSplFileInfo::isLinkSplFileInfo::isReadableSplFileInfo::isWritableSplFileInfo::openFileSplFileInfo::setFileClassSplFileInfo::setInfoClassSplFileInfo::__toStringSplFileObjectSplFileObject::__constructSplFileObject::currentSplFileObject::eofSplFileObject::fflushSplFileObject::fgetcSplFileObject::fgetcsvSplFileObject::fgetsSplFileObject::fgetssSplFileObject::flockSplFileObject::fpassthruSplFileObject::fputcsvSplFileObject::freadSplFileObject::fscanfSplFileObject::fseekSplFileObject::fstatSplFileObject::ftellSplFileObject::ftruncateSplFileObject::fwriteSplFileObject::getChildrenSplFileObject::getCsvControlSplFileObject::getCurrentLineSplFileObject::getFlagsSplFileObject::getMaxLineLenSplFileObject::hasChildrenSplFileObject::keySplFileObject::nextSplFileObject::rewindSplFileObject::seekSplFileObject::setCsvControlSplFileObject::setFlagsSplFileObject::setMaxLineLenSplFileObject::__toStringSplFileObject::validSplTempFileObjectSplTempFileObject::__construct各种类及接口ArrayObjectArrayObject::appendArrayObject::asortArrayObject::__constructArrayObject::countArrayObject::exchangeArrayArrayObject::getArrayCopyArrayObject::getFlagsArrayObject::getIteratorArrayObject::getIteratorClassArrayObject::ksortArrayObject::natcasesortArrayObject::natsortArrayObject::offsetExistsArrayObject::offsetGetArrayObject::offsetSetArrayObject::offsetUnsetArrayObject::serializeArrayObject::setFlagsArrayObject::setIteratorClassArrayObject::uasortArrayObject::uksortArrayObject::unserializeSplObserverSplObserver::updateSplSubjectSplSubject::attachSplSubject::detachSplSubject::notifySPL Types简介安装/配置需求安装运行时配置资源类型SplTypeSplType::__constructSplIntSplFloatSplEnumSplEnum::getConstListSplBoolSplStringStreams简介安装/配置需求安装运行时配置Stream Classes预定义常量Stream FiltersStream ContextsStream Errors范例Example class registered as stream wrapperphp_user_filterphp_user_filter::filterphp_user_filter::onClosephp_user_filter::onCreatestreamWrapperstreamWrapper::__constructstreamWrapper::__destructstreamWrapper::dir_closedirstreamWrapper::dir_opendirstreamWrapper::dir_readdirstreamWrapper::dir_rewinddirstreamWrapper::mkdirstreamWrapper::renamestreamWrapper::rmdirstreamWrapper::stream_caststreamWrapper::stream_closestreamWrapper::stream_eofstreamWrapper::stream_flushstreamWrapper::stream_lockstreamWrapper::stream_metadatastreamWrapper::stream_openstreamWrapper::stream_readstreamWrapper::stream_seekstreamWrapper::stream_set_optionstreamWrapper::stream_statstreamWrapper::stream_tellstreamWrapper::stream_truncatestreamWrapper::stream_writestreamWrapper::unlinkstreamWrapper::url_statStream 函数set_socket_blockingstream_bucket_appendstream_bucket_make_writeablestream_bucket_newstream_bucket_prependstream_context_createstream_context_get_defaultstream_context_get_optionsstream_context_get_paramsstream_context_set_defaultstream_context_set_optionstream_context_set_paramsstream_copy_to_streamstream_encodingstream_filter_appendstream_filter_prependstream_filter_registerstream_filter_removestream_get_contentsstream_get_filtersstream_get_linestream_get_meta_datastream_get_transportsstream_get_wrappersstream_is_localstream_notification_callbackstream_register_wrapperstream_resolve_include_pathstream_selectstream_set_blockingstream_set_chunk_sizestream_set_read_bufferstream_set_timeoutstream_set_write_bufferstream_socket_acceptstream_socket_clientstream_socket_enable_cryptostream_socket_get_namestream_socket_pairstream_socket_recvfromstream_socket_sendtostream_socket_serverstream_socket_shutdownstream_supports_lockstream_register_wrapperstream_wrapper_restorestream_wrapper_unregisterTidy简介安装/配置需求安装运行时配置资源类型预定义常量范例Tidy exampletidytidy::bodytidy_get_bodytidy::cleanRepairtidy_clean_repairtidy::__constructtidy::diagnosetidy_diagnosetidy::$errorBuffertidy_get_error_buffertidy::getConfigtidy_get_configtidy::getHtmlVertidy_get_html_vertidy::getOpttidy_getopttidy::getOptDoctidy_get_opt_doctidy::getReleasetidy_get_releasetidy::getStatustidy_get_statustidy::headtidy_get_headtidy::htmltidy_get_htmltidy::isXhtmltidy_is_xhtmltidy::isXmltidy_is_xmltidy::parseFiletidy_parse_filetidy::parseStringtidy_parse_stringtidy::repairFiletidy_repair_filetidy::repairStringtidy_repair_stringtidy::roottidy_get_roottidyNodetidyNode::getParenttidyNode::hasChildrentidyNode::hasSiblingstidyNode::isAsptidyNode::isCommenttidyNode::isHtmltidyNode::isJstetidyNode::isPhptidyNode::isTextTidy 函数ob_tidyhandlertidy_access_counttidy_config_counttidy_error_counttidy_get_outputtidy_load_configtidy_reset_configtidy_save_configtidy_set_encodingtidy_setopttidy_warning_countTokenizer简介安装/配置需求安装运行时配置资源类型预定义常量范例Tokenizer 函数token_get_alltoken_nameURLs简介安装/配置需求安装运行时配置资源类型预定义常量URL 函数base64_decodebase64_encodeget_headersget_meta_tagshttp_build_queryparse_urlrawurldecoderawurlencodeurldecodeurlencodeV8js简介安装/配置需求安装运行时配置资源类型范例V8JsV8Js::__constructV8Js::executeStringV8Js::getExtensionsV8Js::getPendingExceptionV8Js::registerExtensionV8JsExceptionV8JsException::getJsFileNameV8JsException::getJsLineNumberV8JsException::getJsSourceLineV8JsException::getJsTraceYaml简介安装/配置需求安装运行时配置资源类型预定义常量范例CallbacksParse callbacksEmit callbacksYaml 函数yaml_emit_fileyaml_emityaml_parse_fileyaml_parse_urlyaml_parseYaf简介安装/配置需求安装运行时配置资源类型预定义常量范例应用配置Yaf_ApplicationYaf_Application::appYaf_Application::bootstrapYaf_Application::clearLastErrorYaf_Application::__cloneYaf_Application::__constructYaf_Application::__destructYaf_Application::environYaf_Application::executeYaf_Application::getAppDirectoryYaf_Application::getConfigYaf_Application::getDispatcherYaf_Application::getLastErrorMsgYaf_Application::getLastErrorNoYaf_Application::getModulesYaf_Application::runYaf_Application::setAppDirectoryYaf_Application::__sleepYaf_Application::__wakeupYaf_Bootstrap_AbstractYaf_DispatcherYaf_Dispatcher::autoRenderYaf_Dispatcher::catchExceptionYaf_Dispatcher::__cloneYaf_Dispatcher::__constructYaf_Dispatcher::disableViewYaf_Dispatcher::dispatchYaf_Dispatcher::enableViewYaf_Dispatcher::flushInstantlyYaf_Dispatcher::getApplicationYaf_Dispatcher::getInstanceYaf_Dispatcher::getRequestYaf_Dispatcher::getRouterYaf_Dispatcher::initViewYaf_Dispatcher::registerPluginYaf_Dispatcher::returnResponseYaf_Dispatcher::setDefaultActionYaf_Dispatcher::setDefaultControllerYaf_Dispatcher::setDefaultModuleYaf_Dispatcher::setErrorHandlerYaf_Dispatcher::setRequestYaf_Dispatcher::setViewYaf_Dispatcher::__sleepYaf_Dispatcher::throwExceptionYaf_Dispatcher::__wakeupYaf_Config_AbstractYaf_Config_Abstract::getYaf_Config_Abstract::readonlyYaf_Config_Abstract::setYaf_Config_Abstract::toArrayYaf_Config_IniYaf_Config_Ini::__constructYaf_Config_Ini::countYaf_Config_Ini::currentYaf_Config_Ini::__getYaf_Config_Ini::__issetYaf_Config_Ini::keyYaf_Config_Ini::nextYaf_Config_Ini::offsetExistsYaf_Config_Ini::offsetGetYaf_Config_Ini::offsetSetYaf_Config_Ini::offsetUnsetYaf_Config_Ini::readonlyYaf_Config_Ini::rewindYaf_Config_Ini::__setYaf_Config_Ini::toArrayYaf_Config_Ini::validYaf_Config_SimpleYaf_Config_Simple::__constructYaf_Config_Simple::countYaf_Config_Simple::currentYaf_Config_Simple::__getYaf_Config_Simple::__issetYaf_Config_Simple::keyYaf_Config_Simple::nextYaf_Config_Simple::offsetExistsYaf_Config_Simple::offsetGetYaf_Config_Simple::offsetSetYaf_Config_Simple::offsetUnsetYaf_Config_Simple::readonlyYaf_Config_Simple::rewindYaf_Config_Simple::__setYaf_Config_Simple::toArrayYaf_Config_Simple::validYaf_Controller_AbstractYaf_Controller_Abstract::__cloneYaf_Controller_Abstract::__constructYaf_Controller_Abstract::displayYaf_Controller_Abstract::forwardYaf_Controller_Abstract::getInvokeArgYaf_Controller_Abstract::getInvokeArgsYaf_Controller_Abstract::getModuleNameYaf_Controller_Abstract::getRequestYaf_Controller_Abstract::getResponseYaf_Controller_Abstract::getViewYaf_Controller_Abstract::getViewpathYaf_Controller_Abstract::initYaf_Controller_Abstract::initViewYaf_Controller_Abstract::redirectYaf_Controller_Abstract::renderYaf_Controller_Abstract::setViewpathYaf_Action_AbstractYaf_Action_Abstract::executeYaf_Action_Abstract::getControllerYaf_View_InterfaceYaf_View_Interface::assignYaf_View_Interface::displayYaf_View_Interface::getScriptPathYaf_View_Interface::renderYaf_View_Interface::setScriptPathYaf_View_SimpleYaf_View_Simple::assignYaf_View_Simple::assignRefYaf_View_Simple::clearYaf_View_Simple::__constructYaf_View_Simple::displayYaf_View_Simple::evalYaf_View_Simple::__getYaf_View_Simple::getScriptPathYaf_View_Simple::__issetYaf_View_Simple::renderYaf_View_Simple::__setYaf_View_Simple::setScriptPathYaf_LoaderYaf_Loader::autoloadYaf_Loader::clearLocalNamespaceYaf_Loader::__cloneYaf_Loader::__constructYaf_Loader::getInstanceYaf_Loader::getLibraryPathYaf_Loader::getLocalNamespaceYaf_Loader::importYaf_Loader::isLocalNameYaf_Loader::registerLocalNamespaceYaf_Loader::setLibraryPathYaf_Loader::__sleepYaf_Loader::__wakeupYaf_Plugin_AbstractYaf_Plugin_Abstract::dispatchLoopShutdownYaf_Plugin_Abstract::dispatchLoopStartupYaf_Plugin_Abstract::postDispatchYaf_Plugin_Abstract::preDispatchYaf_Plugin_Abstract::preResponseYaf_Plugin_Abstract::routerShutdownYaf_Plugin_Abstract::routerStartupYaf_RegistryYaf_Registry::__cloneYaf_Registry::__constructYaf_Registry::delYaf_Registry::getYaf_Registry::hasYaf_Registry::setYaf_Request_AbstractYaf_Request_Abstract::getActionNameYaf_Request_Abstract::getBaseUriYaf_Request_Abstract::getControllerNameYaf_Request_Abstract::getEnvYaf_Request_Abstract::getExceptionYaf_Request_Abstract::getLanguageYaf_Request_Abstract::getMethodYaf_Request_Abstract::getModuleNameYaf_Request_Abstract::getParamYaf_Request_Abstract::getParamsYaf_Request_Abstract::getRequestUriYaf_Request_Abstract::getServerYaf_Request_Abstract::isCliYaf_Request_Abstract::isDispatchedYaf_Request_Abstract::isGetYaf_Request_Abstract::isHeadYaf_Request_Abstract::isOptionsYaf_Request_Abstract::isPostYaf_Request_Abstract::isPutYaf_Request_Abstract::isRoutedYaf_Request_Abstract::isXmlHttpRequestYaf_Request_Abstract::setActionNameYaf_Request_Abstract::setBaseUriYaf_Request_Abstract::setControllerNameYaf_Request_Abstract::setDispatchedYaf_Request_Abstract::setModuleNameYaf_Request_Abstract::setParamYaf_Request_Abstract::setRequestUriYaf_Request_Abstract::setRoutedYaf_Request_HttpYaf_Request_Http::__cloneYaf_Request_Http::__constructYaf_Request_Http::getYaf_Request_Http::getCookieYaf_Request_Http::getFilesYaf_Request_Http::getPostYaf_Request_Http::getQueryYaf_Request_Http::getRequestYaf_Request_Http::isXmlHttpRequestYaf_Request_SimpleYaf_Request_Simple::__cloneYaf_Request_Simple::__constructYaf_Request_Simple::getYaf_Request_Simple::getCookieYaf_Request_Simple::getFilesYaf_Request_Simple::getPostYaf_Request_Simple::getQueryYaf_Request_Simple::getRequestYaf_Request_Simple::isXmlHttpRequestYaf_Response_AbstractYaf_Response_Abstract::appendBodyYaf_Response_Abstract::clearBodyYaf_Response_Abstract::clearHeadersYaf_Response_Abstract::__cloneYaf_Response_Abstract::__constructYaf_Response_Abstract::__destructYaf_Response_Abstract::getBodyYaf_Response_Abstract::getHeaderYaf_Response_Abstract::prependBodyYaf_Response_Abstract::responseYaf_Response_Abstract::setAllHeadersYaf_Response_Abstract::setBodyYaf_Response_Abstract::setHeaderYaf_Response_Abstract::setRedirectYaf_Response_Abstract::__toStringYaf_Route_InterfaceYaf_Route_Interface::assembleYaf_Route_Interface::routeYaf_Route_MapYaf_Route_Map::assembleYaf_Route_Map::__constructYaf_Route_Map::routeYaf_Route_RegexYaf_Route_Regex::assembleYaf_Route_Regex::__constructYaf_Route_Regex::routeYaf_Route_RewriteYaf_Route_Rewrite::assembleYaf_Route_Rewrite::__constructYaf_Route_Rewrite::routeYaf_RouterYaf_Router::addConfigYaf_Router::addRouteYaf_Router::__constructYaf_Router::getCurrentRouteYaf_Router::getRouteYaf_Router::getRoutesYaf_Router::routeYaf_Route_SimpleYaf_Route_Simple::assembleYaf_Route_Simple::__constructYaf_Route_Simple::routeYaf_Route_StaticYaf_Route_Static::assembleYaf_Route_Static::matchYaf_Route_Static::routeYaf_Route_SupervarYaf_Route_Supervar::assembleYaf_Route_Supervar::__constructYaf_Route_Supervar::routeYaf_SessionYaf_Session::__cloneYaf_Session::__constructYaf_Session::countYaf_Session::currentYaf_Session::delYaf_Session::__getYaf_Session::getInstanceYaf_Session::hasYaf_Session::__issetYaf_Session::keyYaf_Session::nextYaf_Session::offsetExistsYaf_Session::offsetGetYaf_Session::offsetSetYaf_Session::offsetUnsetYaf_Session::rewindYaf_Session::__setYaf_Session::__sleepYaf_Session::startYaf_Session::__unsetYaf_Session::validYaf_Session::__wakeupYaf_ExceptionYaf_Exception::__constructYaf_Exception::getPreviousYaf_Exception_TypeErrorYaf_Exception_StartupErrorYaf_Exception_DispatchFailedYaf_Exception_RouterFailedYaf_Exception_LoadFailedYaf_Exception_LoadFailed_ModuleYaf_Exception_LoadFailed_ControllerYaf_Exception_LoadFailed_ActionYaf_Exception_LoadFailed_ViewTaint简介安装/配置需求安装运行时配置资源类型More DetailsFunctions and Statements which will spread the tainted mark of a tainted stringFunctions and statements which will check tainted stringFunctions which untaint the tainted stringTaint 函数is_taintedtaintuntaint其它服务chdb简介安装/配置需求安装运行时配置资源类型预定义常量范例chdbchdb::__constructchdb::getchdb 函数chdb_createcURL简介安装/配置需求安装运行时配置资源类型预定义常量范例curl 基础例子cURL 函数curl_closecurl_copy_handlecurl_errnocurl_errorcurl_escapecurl_execcurl_file_createcurl_getinfocurl_initcurl_multi_add_handlecurl_multi_closecurl_multi_execcurl_multi_getcontentcurl_multi_info_readcurl_multi_initcurl_multi_remove_handlecurl_multi_selectcurl_multi_setoptcurl_multi_strerrorcurl_pausecurl_resetcurl_setopt_arraycurl_setoptcurl_share_closecurl_share_initcurl_share_setoptcurl_strerrorcurl_unescapecurl_versionEvent简介安装/配置需求安装运行时配置资源类型范例Event flagsAbout event persistenceEvent callbacksConstructing signal eventsEventEvent::addEvent::addSignalEvent::addTimerEvent::__constructEvent::delEvent::delSignalEvent::delTimerEvent::freeEvent::getSupportedMethodsEvent::pendingEvent::setEvent::setPriorityEvent::setTimerEvent::signalEvent::timerEventBaseEventBase::__constructEventBase::dispatchEventBase::exitEventBase::freeEventBase::getFeaturesEventBase::getMethodEventBase::getTimeOfDayCachedEventBase::gotExitEventBase::gotStopEventBase::loopEventBase::priorityInitEventBase::reInitEventBase::stopEventBufferEventBuffer::addEventBuffer::addBufferEventBuffer::appendFromEventBuffer::__constructEventBuffer::copyoutEventBuffer::drainEventBuffer::enableLockingEventBuffer::expandEventBuffer::freezeEventBuffer::lockEventBuffer::prependEventBuffer::prependBufferEventBuffer::pullupEventBuffer::readEventBuffer::readFromEventBuffer::readLineEventBuffer::searchEventBuffer::searchEolEventBuffer::substrEventBuffer::unfreezeEventBuffer::unlockEventBuffer::writeEventBufferEventEventBufferEvent::closeEventBufferEvent::connectEventBufferEvent::connectHostEventBufferEvent::__constructEventBufferEvent::createPairEventBufferEvent::disableEventBufferEvent::enableEventBufferEvent::freeEventBufferEvent::getDnsErrorStringEventBufferEvent::getEnabledEventBufferEvent::getInputEventBufferEvent::getOutputEventBufferEvent::readEventBufferEvent::readBufferEventBufferEvent::setCallbacksEventBufferEvent::setPriorityEventBufferEvent::setTimeoutsEventBufferEvent::setWatermarkEventBufferEvent::sslErrorEventBufferEvent::sslFilterEventBufferEvent::sslGetCipherInfoEventBufferEvent::sslGetCipherNameEventBufferEvent::sslGetCipherVersionEventBufferEvent::sslGetProtocolEventBufferEvent::sslRenegotiateEventBufferEvent::sslSocketEventBufferEvent::writeEventBufferEvent::writeBufferAbout buffer event callbacksEventConfigEventConfig::avoidMethodEventConfig::__constructEventConfig::requireFeaturesEventConfig::setMaxDispatchIntervalEventDnsBaseEventDnsBase::addNameserverIpEventDnsBase::addSearchEventDnsBase::clearSearchEventDnsBase::__constructEventDnsBase::countNameserversEventDnsBase::loadHostsEventDnsBase::parseResolvConfEventDnsBase::setOptionEventDnsBase::setSearchNdotsEventHttpEventHttp::acceptEventHttp::addServerAliasEventHttp::bindEventHttp::__constructEventHttp::removeServerAliasEventHttp::setAllowedMethodsEventHttp::setCallbackEventHttp::setDefaultCallbackEventHttp::setMaxBodySizeEventHttp::setMaxHeadersSizeEventHttp::setTimeoutEventHttpConnectionEventHttpConnection::__constructEventHttpConnection::getBaseEventHttpConnection::getPeerEventHttpConnection::makeRequestEventHttpConnection::setCloseCallbackEventHttpConnection::setLocalAddressEventHttpConnection::setLocalPortEventHttpConnection::setMaxBodySizeEventHttpConnection::setMaxHeadersSizeEventHttpConnection::setRetriesEventHttpConnection::setTimeoutEventHttpRequestEventHttpRequest::addHeaderEventHttpRequest::cancelEventHttpRequest::clearHeadersEventHttpRequest::closeConnectionEventHttpRequest::__constructEventHttpRequest::findHeaderEventHttpRequest::freeEventHttpRequest::getBufferEventEventHttpRequest::getCommandEventHttpRequest::getConnectionEventHttpRequest::getHostEventHttpRequest::getInputBufferEventHttpRequest::getInputHeadersEventHttpRequest::getOutputBufferEventHttpRequest::getOutputHeadersEventHttpRequest::getResponseCodeEventHttpRequest::getUriEventHttpRequest::removeHeaderEventHttpRequest::sendErrorEventHttpRequest::sendReplyEventHttpRequest::sendReplyChunkEventHttpRequest::sendReplyEndEventHttpRequest::sendReplyStartEventListenerEventListener::__constructEventListener::disableEventListener::enableEventListener::getBaseEventListener::getSocketNameEventListener::setCallbackEventListener::setErrorCallbackEventSslContextEventSslContext::__constructEventUtilEventUtil::__constructEventUtil::getLastSocketErrnoEventUtil::getLastSocketErrorEventUtil::getSocketFdEventUtil::getSocketNameEventUtil::setSocketOptionEventUtil::sslRandPollFAM简介安装/配置需求安装运行时配置资源类型预定义常量FAM 函数fam_cancel_monitorfam_closefam_monitor_collectionfam_monitor_directoryfam_monitor_filefam_next_eventfam_openfam_pendingfam_resume_monitorfam_suspend_monitorFTP简介安装/配置需求安装运行时配置资源类型预定义常量范例基本用法FTP 函数ftp_allocftp_cdupftp_chdirftp_chmodftp_closeftp_connectftp_deleteftp_execftp_fgetftp_fputftp_get_optionftp_getftp_loginftp_mdtmftp_mkdirftp_nb_continueftp_nb_fgetftp_nb_fputftp_nb_getftp_nb_putftp_nlistftp_pasvftp_putftp_pwdftp_quitftp_rawftp_rawlistftp_renameftp_rmdirftp_set_optionftp_siteftp_sizeftp_ssl_connectftp_systypeGearman简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageBasic Gearman client and worker, backgroundBasic Gearman client and worker, submitting tasksGearmanClientGearmanClient::addOptionsGearmanClient::addServerGearmanClient::addServersGearmanClient::addTaskGearmanClient::addTaskBackgroundGearmanClient::addTaskHighGearmanClient::addTaskHighBackgroundGearmanClient::addTaskLowGearmanClient::addTaskLowBackgroundGearmanClient::addTaskStatusGearmanClient::clearCallbacksGearmanClient::cloneGearmanClient::__constructGearmanClient::contextGearmanClient::dataGearmanClient::doGearmanClient::doBackgroundGearmanClient::doHighGearmanClient::doHighBackgroundGearmanClient::doJobHandleGearmanClient::doLowGearmanClient::doLowBackgroundGearmanClient::doNormalGearmanClient::doStatusGearmanClient::echoGearmanClient::errorGearmanClient::getErrnoGearmanClient::jobStatusgearman_job_statusGearmanClient::pingGearmanClient::removeOptionsGearmanClient::returnCodeGearmanClient::runTasksGearmanClient::setClientCallbackGearmanClient::setCompleteCallbackGearmanClient::setContextGearmanClient::setCreatedCallbackGearmanClient::setDataGearmanClient::setDataCallbackGearmanClient::setExceptionCallbackGearmanClient::setFailCallbackGearmanClient::setOptionsGearmanClient::setStatusCallbackGearmanClient::setTimeoutGearmanClient::setWarningCallbackGearmanClient::setWorkloadCallbackGearmanClient::timeoutGearmanJobGearmanJob::completeGearmanJob::__constructGearmanJob::dataGearmanJob::exceptionGearmanJob::failGearmanJob::functionNameGearmanJob::handleGearmanJob::returnCodeGearmanJob::sendCompleteGearmanJob::sendDataGearmanJob::sendExceptionGearmanJob::sendFailGearmanJob::sendStatusGearmanJob::sendWarningGearmanJob::setReturnGearmanJob::statusGearmanJob::uniqueGearmanJob::warningGearmanJob::workloadGearmanJob::workloadSizeGearmanTaskGearmanTask::__constructGearmanTask::createGearmanTask::dataGearmanTask::dataSizeGearmanTask::functionGearmanTask::functionNameGearmanTask::isKnownGearmanTask::isRunningGearmanTask::jobHandlegearman_job_handleGearmanTask::recvDataGearmanTask::returnCodeGearmanTask::sendDataGearmanTask::sendWorkloadGearmanTask::taskDenominatorGearmanTask::taskNumeratorGearmanTask::uniqueGearmanTask::uuidGearmanWorkerGearmanWorker::addFunctionGearmanWorker::addOptionsGearmanWorker::addServerGearmanWorker::addServersGearmanWorker::cloneGearmanWorker::__constructGearmanWorker::echoGearmanWorker::errorGearmanWorker::getErrnoGearmanWorker::optionsGearmanWorker::registerGearmanWorker::removeOptionsGearmanWorker::returnCodeGearmanWorker::setIdGearmanWorker::setOptionsGearmanWorker::setTimeoutGearmanWorker::timeoutGearmanWorker::unregisterGearmanWorker::unregisterAllGearmanWorker::waitGearmanWorker::workGearmanExceptionGopher简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic ExampleGopher 函数gopher_parsedirGupnp简介安装/配置需求安装运行时配置资源类型预定义常量范例Browsing devices and servicesImplementing the BinaryLight deviceGupnp 函数gupnp_context_get_host_ipgupnp_context_get_portgupnp_context_get_subscription_timeoutgupnp_context_host_pathgupnp_context_newgupnp_context_set_subscription_timeoutgupnp_context_timeout_addgupnp_context_unhost_pathgupnp_control_point_browse_startgupnp_control_point_browse_stopgupnp_control_point_callback_setgupnp_control_point_newgupnp_device_action_callback_setgupnp_device_info_get_servicegupnp_device_info_getgupnp_root_device_get_availablegupnp_root_device_get_relative_locationgupnp_root_device_newgupnp_root_device_set_availablegupnp_root_device_startgupnp_root_device_stopgupnp_service_action_getgupnp_service_action_return_errorgupnp_service_action_returngupnp_service_action_setgupnp_service_freeze_notifygupnp_service_info_get_introspectiongupnp_service_info_getgupnp_service_introspection_get_state_variablegupnp_service_notifygupnp_service_proxy_action_getgupnp_service_proxy_action_setgupnp_service_proxy_add_notifygupnp_service_proxy_callback_setgupnp_service_proxy_get_subscribedgupnp_service_proxy_remove_notifygupnp_service_proxy_send_actiongupnp_service_proxy_set_subscribedgupnp_service_thaw_notifyHTTP简介安装/配置需求Installing the HTTP extension运行时配置资源类型预定义常量Request OptionsHttpDeflateStreamHttpDeflateStream::__constructHttpDeflateStream::factoryHttpDeflateStream::finishHttpDeflateStream::flushHttpDeflateStream::updateHttpInflateStreamHttpInflateStream::__constructHttpInflateStream::factoryHttpInflateStream::finishHttpInflateStream::flushHttpInflateStream::updateHttpMessageHttpMessage::addHeadersHttpMessage::__constructHttpMessage::detachHttpMessage::factoryHttpMessage::fromEnvHttpMessage::fromStringHttpMessage::getBodyHttpMessage::getHeaderHttpMessage::getHeadersHttpMessage::getHttpVersionHttpMessage::getParentMessageHttpMessage::getRequestMethodHttpMessage::getRequestUrlHttpMessage::getResponseCodeHttpMessage::getResponseStatusHttpMessage::getTypeHttpMessage::guessContentTypeHttpMessage::prependHttpMessage::reverseHttpMessage::sendHttpMessage::setBodyHttpMessage::setHeadersHttpMessage::setHttpVersionHttpMessage::setRequestMethodHttpMessage::setRequestUrlHttpMessage::setResponseCodeHttpMessage::setResponseStatusHttpMessage::setTypeHttpMessage::toMessageTypeObjectHttpMessage::toStringHttpQueryStringHttpQueryString::__constructHttpQueryString::getHttpQueryString::modHttpQueryString::setHttpQueryString::singletonHttpQueryString::toArrayHttpQueryString::toStringHttpQueryString::xlateHttpRequestHttpRequest::addCookiesHttpRequest::addHeadersHttpRequest::addPostFieldsHttpRequest::addPostFileHttpRequest::addPutDataHttpRequest::addQueryDataHttpRequest::addRawPostDataHttpRequest::addSslOptionsHttpRequest::clearHistoryHttpRequest::__constructHttpRequest::enableCookiesHttpRequest::getContentTypeHttpRequest::getCookiesHttpRequest::getHeadersHttpRequest::getHistoryHttpRequest::getMethodHttpRequest::getOptionsHttpRequest::getPostFieldsHttpRequest::getPostFilesHttpRequest::getPutDataHttpRequest::getPutFileHttpRequest::getQueryDataHttpRequest::getRawPostDataHttpRequest::getRawRequestMessageHttpRequest::getRawResponseMessageHttpRequest::getRequestMessageHttpRequest::getResponseBodyHttpRequest::getResponseCodeHttpRequest::getResponseCookiesHttpRequest::getResponseDataHttpRequest::getResponseHeaderHttpRequest::getResponseInfoHttpRequest::getResponseMessageHttpRequest::getResponseStatusHttpRequest::getSslOptionsHttpRequest::getUrlHttpRequest::resetCookiesHttpRequest::sendHttpRequest::setBodyHttpRequest::setContentTypeHttpRequest::setCookiesHttpRequest::setHeadersHttpRequest::setMethodHttpRequest::setOptionsHttpRequest::setPostFieldsHttpRequest::setPostFilesHttpRequest::setPutDataHttpRequest::setPutFileHttpRequest::setQueryDataHttpRequest::setRawPostDataHttpRequest::setSslOptionsHttpRequest::setUrlHttpRequestPoolHttpRequestPool::attachHttpRequestPool::__constructHttpRequestPool::__destructHttpRequestPool::detachHttpRequestPool::getAttachedRequestsHttpRequestPool::getFinishedRequestsHttpRequestPool::resetHttpRequestPool::sendHttpRequestPool::socketPerformHttpRequestPool::socketSelectHttpResponseHttpResponse::captureHttpResponse::getBufferSizeHttpResponse::getCacheHttpResponse::getCacheControlHttpResponse::getContentDispositionHttpResponse::getContentTypeHttpResponse::getDataHttpResponse::getETagHttpResponse::getFileHttpResponse::getGzipHttpResponse::getHeaderHttpResponse::getLastModifiedHttpResponse::getRequestBodyHttpResponse::getRequestBodyStreamHttpResponse::getRequestHeadersHttpResponse::getStreamHttpResponse::getThrottleDelayHttpResponse::guessContentTypeHttpResponse::redirectHttpResponse::sendHttpResponse::setBufferSizeHttpResponse::setCacheHttpResponse::setCacheControlHttpResponse::setContentDispositionHttpResponse::setContentTypeHttpResponse::setDataHttpResponse::setETagHttpResponse::setFileHttpResponse::setGzipHttpResponse::setHeaderHttpResponse::setLastModifiedHttpResponse::setStreamHttpResponse::setThrottleDelayHttpResponse::statusHTTP 函数http_cache_etaghttp_cache_last_modifiedhttp_chunked_decodehttp_deflatehttp_inflatehttp_build_cookiehttp_datehttp_get_request_body_streamhttp_get_request_bodyhttp_get_request_headershttp_match_etaghttp_match_modifiedhttp_match_request_headerhttp_supporthttp_negotiate_charsethttp_negotiate_content_typehttp_negotiate_languageob_deflatehandlerob_etaghandlerob_inflatehandlerhttp_parse_cookiehttp_parse_headershttp_parse_messagehttp_parse_paramshttp_persistent_handles_cleanhttp_persistent_handles_counthttp_persistent_handles_identhttp_gethttp_headhttp_post_datahttp_post_fieldshttp_put_datahttp_put_filehttp_put_streamhttp_request_body_encodehttp_request_method_existshttp_request_method_namehttp_request_method_registerhttp_request_method_unregisterhttp_requesthttp_redirecthttp_send_content_dispositionhttp_send_content_typehttp_send_datahttp_send_filehttp_send_last_modifiedhttp_send_statushttp_send_streamhttp_throttlehttp_build_strhttp_build_urlHyperwave API简介安装/配置需求安装运行时配置资源类型预定义常量Integration with ApacheHyperwave API 函数hw_api::checkinhw_api::checkouthw_api::childrenhw_api::contenthw_api::copyhw_api::dbstathw_api::dcstathw_api::dstanchorshw_api::dstofsrcanchorhw_api::findhw_api::ftstathw_api::hwstathw_api::identifyhw_api::infohw_api::inserthw_api::insertanchorhw_api::insertcollectionhw_api::insertdocumenthw_api::linkhw_api::lockhw_api::movehw_api::objecthw_api::objectbyanchorhw_api::parentshw_api::removehw_api::replacehw_api::setcommittedversionhw_api::srcanchorshw_api::srcsofdsthw_api::unlockhw_api::userhw_api::userlisthw_api_attribute::keyhw_api_attribute::langdepvaluehw_api_attribute::valuehw_api_attribute::valueshw_api_content::mimetypehw_api_content::readhw_api_error::counthw_api_error::reasonhw_api_object::assignhw_api_object::attreditablehw_api_object::counthw_api_object::inserthw_api_object::removehw_api_object::titlehw_api_object::valuehw_api_reason::descriptionhw_api_reason::typehwapi_attribute_newhwapi_content_newhwapi_hgcsphwapi_object_newLDAP简介安装/配置需求安装运行时配置资源类型预定义常量Using the PHP LDAP calls范例Basic usageLDAP 函数ldap_8859_to_t61ldap_addldap_bindldap_closeldap_compareldap_connectldap_control_paged_result_responseldap_control_paged_resultldap_count_entriesldap_deleteldap_dn2ufnldap_err2strldap_errnoldap_errorldap_escapeldap_explode_dnldap_first_attributeldap_first_entryldap_first_referenceldap_free_resultldap_get_attributesldap_get_dnldap_get_entriesldap_get_optionldap_get_values_lenldap_get_valuesldap_listldap_mod_addldap_mod_delldap_mod_replaceldap_modify_batchldap_modifyldap_next_attributeldap_next_entryldap_next_referenceldap_parse_referenceldap_parse_resultldap_readldap_renameldap_sasl_bindldap_searchldap_set_optionldap_set_rebind_procldap_sortldap_start_tlsldap_t61_to_8859ldap_unbindMemcache简介安装/配置需求安装运行时配置资源类型预定义常量范例示例MemcacheMemcache::addMemcache::addServerMemcache::closeMemcache::connectMemcache::decrementMemcache::deleteMemcache::flushMemcache::getMemcache::getExtendedStatsMemcache::getServerStatusMemcache::getStatsMemcache::getVersionMemcache::incrementMemcache::pconnectMemcache::replaceMemcache::setMemcache::setCompressThresholdMemcache::setServerParamsMemcache 函数memcache_debugMemcached简介安装/配置需求安装运行时配置资源类型预定义常量超时时间回调结果回调通读缓存回调Sessions支持MemcachedMemcached::addMemcached::addByKeyMemcached::addServerMemcached::addServersMemcached::appendMemcached::appendByKeyMemcached::casMemcached::casByKeyMemcached::__constructMemcached::decrementMemcached::decrementByKeyMemcached::deleteMemcached::deleteByKeyMemcached::deleteMultiMemcached::deleteMultiByKeyMemcached::fetchMemcached::fetchAllMemcached::flushMemcached::getMemcached::getAllKeysMemcached::getByKeyMemcached::getDelayedMemcached::getDelayedByKeyMemcached::getMultiMemcached::getMultiByKeyMemcached::getOptionMemcached::getResultCodeMemcached::getResultMessageMemcached::getServerByKeyMemcached::getServerListMemcached::getStatsMemcached::getVersionMemcached::incrementMemcached::incrementByKeyMemcached::isPersistentMemcached::isPristineMemcached::prependMemcached::prependByKeyMemcached::quitMemcached::replaceMemcached::replaceByKeyMemcached::resetServerListMemcached::setMemcached::setByKeyMemcached::setMultiMemcached::setMultiByKeyMemcached::setOptionMemcached::setOptionsMemcached::setSaslAuthDataMemcached::touchMemcached::touchByKeymqseries简介安装/配置需求安装运行时配置资源类型预定义常量mqseries 函数mqseries_backmqseries_beginmqseries_closemqseries_cmitmqseries_connmqseries_connxmqseries_discmqseries_getmqseries_inqmqseries_openmqseries_put1mqseries_putmqseries_setmqseries_strerror网络简介安装/配置需求安装运行时配置资源类型预定义常量网络 函数checkdnsrrcloselogdefine_syslog_variablesdns_check_recorddns_get_mxdns_get_recordfsockopengethostbyaddrgethostbynamegethostbynamelgethostnamegetmxrrgetprotobynamegetprotobynumbergetservbynamegetservbyportheader_register_callbackheader_removeheaderheaders_listheaders_senthttp_response_codeinet_ntopinet_ptonip2longlong2ipopenlogpfsockopensetcookiesetrawcookiesocket_get_statussocket_set_blockingsocket_set_timeoutsyslogRRD简介安装/配置需求安装运行时配置资源类型预定义常量范例Procedural PECL/rrd exampleOOP PECL/rrd exampleRRD 函数rrd_createrrd_errorrrd_fetchrrd_firstrrd_graphrrd_inforrd_lastrrd_lastupdaterrd_restorerrd_tunerrd_updaterrd_versionrrd_xportrrdc_disconnectRRDCreatorRRDCreator::addArchiveRRDCreator::addDataSourceRRDCreator::__constructRRDCreator::saveRRDGraphRRDGraph::__constructRRDGraph::saveRRDGraph::saveVerboseRRDGraph::setOptionsRRDUpdaterRRDUpdater::__constructRRDUpdater::updateSAM简介安装/配置需求安装运行时配置资源类型预定义常量范例ConnectionsMessagesMessaging operationsPublish/Subscribe and subscriptions to topicsError handlingSAM 函数SAMConnection::commitSAMConnection::connectSAMConnection::__constructSAMConnection::disconnectSAMConnection::errnoSAMConnection::errorSAMConnection::isConnectedSAMConnection::peekSAMConnection::peekAllSAMConnection::receiveSAMConnection::removeSAMConnection::rollbackSAMConnection::sendSAMConnection::setDebugSAMConnection::subscribeSAMConnection::unsubscribeSAMMessage::bodySAMMessage::__constructSAMMessage::headerSNMP简介安装/配置需求安装运行时配置资源类型预定义常量SNMP 函数snmp_get_quick_printsnmp_get_valueretrievalsnmp_read_mibsnmp_set_enum_printsnmp_set_oid_numeric_printsnmp_set_oid_output_formatsnmp_set_quick_printsnmp_set_valueretrievalsnmp2_getsnmp2_getnextsnmp2_real_walksnmp2_setsnmp2_walksnmp3_getsnmp3_getnextsnmp3_real_walksnmp3_setsnmp3_walksnmpgetsnmpgetnextsnmprealwalksnmpsetsnmpwalksnmpwalkoidSNMPSNMP::closeSNMP::__constructSNMP::getSNMP::getErrnoSNMP::getErrorSNMP::getnextSNMP::setSNMP::setSecuritySNMP::walkSNMPExceptionSockets简介安装/配置需求安装运行时配置资源类型预定义常量范例Socket ErrorsSocket 函数socket_acceptsocket_bindsocket_clear_errorsocket_closesocket_cmsg_spacesocket_connectsocket_create_listensocket_create_pairsocket_createsocket_get_optionsocket_getpeernamesocket_getsocknamesocket_import_streamsocket_last_errorsocket_listensocket_readsocket_recvsocket_recvfromsocket_recvmsgsocket_selectsocket_sendsocket_sendmsgsocket_sendtosocket_set_blocksocket_set_nonblocksocket_set_optionsocket_shutdownsocket_strerrorsocket_writeSSH2简介安装/配置需求安装运行时配置资源类型预定义常量SSH2 函数ssh2_auth_agentssh2_auth_hostbased_filessh2_auth_nonessh2_auth_passwordssh2_auth_pubkey_filessh2_connectssh2_execssh2_fetch_streamssh2_fingerprintssh2_methods_negotiatedssh2_publickey_addssh2_publickey_initssh2_publickey_listssh2_publickey_removessh2_scp_recvssh2_scp_sendssh2_sftp_chmodssh2_sftp_lstatssh2_sftp_mkdirssh2_sftp_readlinkssh2_sftp_realpathssh2_sftp_renamessh2_sftp_rmdirssh2_sftp_statssh2_sftp_symlinkssh2_sftp_unlinkssh2_sftpssh2_shellssh2_tunnelStomp简介安装/配置需求安装运行时配置资源类型范例Stomp 函数stomp_connect_errorstomp_versionStompStomp::abortstomp_abortStomp::ackstomp_ackStomp::beginstomp_beginStomp::commitstomp_commitStomp::__constructstomp_connectStomp::__destructstomp_closeStomp::errorstomp_errorStomp::getReadTimeoutstomp_get_read_timeoutStomp::getSessionIdstomp_get_session_idStomp::hasFramestomp_has_frameStomp::readFramestomp_read_frameStomp::sendstomp_sendStomp::setReadTimeoutstomp_set_read_timeoutStomp::subscribestomp_subscribeStomp::unsubscribestomp_unsubscribeStompFrameStompFrame::__constructStompExceptionStompException::getDetailsSVM简介安装/配置需求安装运行时配置资源类型范例SVMSVM::__constructSVM::crossvalidateSVM::getOptionsSVM::setOptionsSVM::trainSVMModelSVMModel::checkProbabilityModelSVMModel::__constructSVMModel::getLabelsSVMModel::getNrClassSVMModel::getSvmTypeSVMModel::getSvrProbabilitySVMModel::loadSVMModel::predict_probabilitySVMModel::predictSVMModel::saveSVN简介安装/配置需求安装运行时配置资源类型预定义常量SVN 函数svn_addsvn_auth_get_parametersvn_auth_set_parametersvn_blamesvn_catsvn_checkoutsvn_cleanupsvn_client_versionsvn_commitsvn_deletesvn_diffsvn_exportsvn_fs_abort_txnsvn_fs_apply_textsvn_fs_begin_txn2svn_fs_change_node_propsvn_fs_check_pathsvn_fs_contents_changedsvn_fs_copysvn_fs_deletesvn_fs_dir_entriessvn_fs_file_contentssvn_fs_file_lengthsvn_fs_is_dirsvn_fs_is_filesvn_fs_make_dirsvn_fs_make_filesvn_fs_node_created_revsvn_fs_node_propsvn_fs_props_changedsvn_fs_revision_propsvn_fs_revision_rootsvn_fs_txn_rootsvn_fs_youngest_revsvn_importsvn_logsvn_lssvn_mkdirsvn_repos_createsvn_repos_fs_begin_txn_for_commitsvn_repos_fs_commit_txnsvn_repos_fssvn_repos_hotcopysvn_repos_opensvn_repos_recoversvn_revertsvn_statussvn_updateTCP简介安装/配置需求安装运行时配置资源类型预定义常量TCP 函数tcpwrap_checkVarnish简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic VarnishAdmin usageBasic VarnishStat usageBasic VarnishLog usageVarnishAdminVarnishAdmin::authVarnishAdmin::banVarnishAdmin::banUrlVarnishAdmin::clearPanicVarnishAdmin::connectVarnishAdmin::__constructVarnishAdmin::disconnectVarnishAdmin::getPanicVarnishAdmin::getParamsVarnishAdmin::isRunningVarnishAdmin::setCompatVarnishAdmin::setHostVarnishAdmin::setIdentVarnishAdmin::setParamVarnishAdmin::setPortVarnishAdmin::setSecretVarnishAdmin::setTimeoutVarnishAdmin::startVarnishAdmin::stopVarnishStatVarnishStat::__constructVarnishStat::getSnapshotVarnishLogVarnishLog::__constructVarnishLog::getLineVarnishLog::getTagNameYAZ简介安装/配置需求安装运行时配置资源类型预定义常量范例YAZ 函数yaz_addinfoyaz_ccl_confyaz_ccl_parseyaz_closeyaz_connectyaz_databaseyaz_elementyaz_errnoyaz_erroryaz_es_resultyaz_esyaz_get_optionyaz_hitsyaz_itemorderyaz_presentyaz_rangeyaz_recordyaz_scan_resultyaz_scanyaz_schemayaz_searchyaz_set_optionyaz_sortyaz_syntaxyaz_waitYP/NIS简介安装/配置需求安装运行时配置资源类型预定义常量YP/NIS 函数yp_allyp_catyp_err_stringyp_errnoyp_firstyp_get_default_domainyp_masteryp_matchyp_nextyp_order0MQ消息系统简介安装/配置需求ZMQZMQ::__constructZMQContextZMQContext::__constructZMQContext::getOptZMQContext::getSocketZMQContext::isPersistentZMQContext::setOptZMQSocketZMQSocket::bindZMQSocket::connectZMQSocket::__constructZMQSocket::disconnectZMQSocket::getEndpointsZMQSocket::getPersistentIdZMQSocket::getSocketTypeZMQSocket::getSockOptZMQSocket::isPersistentZMQSocket::recvZMQSocket::recvMultiZMQSocket::sendZMQSocket::sendmultiZMQSocket::setSockOptZMQSocket::unbindZMQPollZMQPoll::addZMQPoll::clearZMQPoll::countZMQPoll::getLastErrorsZMQPoll::pollZMQPoll::removeZMQDeviceZMQDevice::__constructZMQDevice::getIdleTimeoutZMQDevice::getTimerTimeoutZMQDevice::runZMQDevice::setIdleCallbackZMQDevice::setIdleTimeoutZMQDevice::setTimerCallbackZMQDevice::setTimerTimeout搜索引擎扩展mnoGoSearch简介安装/配置需求安装运行时配置资源类型预定义常量mnoGoSearch 函数udm_add_search_limitudm_alloc_agent_arrayudm_alloc_agentudm_api_versionudm_cat_listudm_cat_pathudm_check_charsetudm_clear_search_limitsudm_crc32udm_errnoudm_errorudm_findudm_free_agentudm_free_ispell_dataudm_free_resudm_get_doc_countudm_get_res_fieldudm_get_res_paramudm_hash32udm_load_ispell_dataudm_set_agent_paramSolr简介安装/配置需求安装运行时配置资源类型预定义常量Solr 函数solr_get_version范例SolrUtilsSolrUtils::digestXmlResponseSolrUtils::escapeQueryCharsSolrUtils::getSolrVersionSolrUtils::queryPhraseSolrInputDocumentSolrInputDocument::addFieldSolrInputDocument::clearSolrInputDocument::__cloneSolrInputDocument::__constructSolrInputDocument::deleteFieldSolrInputDocument::__destructSolrInputDocument::fieldExistsSolrInputDocument::getBoostSolrInputDocument::getFieldSolrInputDocument::getFieldBoostSolrInputDocument::getFieldCountSolrInputDocument::getFieldNamesSolrInputDocument::mergeSolrInputDocument::resetSolrInputDocument::setBoostSolrInputDocument::setFieldBoostSolrInputDocument::sortSolrInputDocument::toArraySolrDocumentSolrDocument::addFieldSolrDocument::clearSolrDocument::__cloneSolrDocument::__constructSolrDocument::currentSolrDocument::deleteFieldSolrDocument::__destructSolrDocument::fieldExistsSolrDocument::__getSolrDocument::getFieldSolrDocument::getFieldCountSolrDocument::getFieldNamesSolrDocument::getInputDocumentSolrDocument::__issetSolrDocument::keySolrDocument::mergeSolrDocument::nextSolrDocument::offsetExistsSolrDocument::offsetGetSolrDocument::offsetSetSolrDocument::offsetUnsetSolrDocument::resetSolrDocument::rewindSolrDocument::serializeSolrDocument::__setSolrDocument::sortSolrDocument::toArraySolrDocument::unserializeSolrDocument::__unsetSolrDocument::validSolrDocumentFieldSolrDocumentField::__constructSolrDocumentField::__destructSolrObjectSolrObject::__constructSolrObject::__destructSolrObject::getPropertyNamesSolrObject::offsetExistsSolrObject::offsetGetSolrObject::offsetSetSolrObject::offsetUnsetSolrClientSolrClient::addDocumentSolrClient::addDocumentsSolrClient::commitSolrClient::__constructSolrClient::deleteByIdSolrClient::deleteByIdsSolrClient::deleteByQueriesSolrClient::deleteByQuerySolrClient::__destructSolrClient::getByIdSolrClient::getByIdsSolrClient::getDebugSolrClient::getOptionsSolrClient::optimizeSolrClient::pingSolrClient::querySolrClient::requestSolrClient::rollbackSolrClient::setResponseWriterSolrClient::setServletSolrClient::systemSolrClient::threadsSolrResponseSolrResponse::getDigestedResponseSolrResponse::getHttpStatusSolrResponse::getHttpStatusMessageSolrResponse::getRawRequestSolrResponse::getRawRequestHeadersSolrResponse::getRawResponseSolrResponse::getRawResponseHeadersSolrResponse::getRequestUrlSolrResponse::getResponseSolrResponse::setParseModeSolrResponse::successSolrQueryResponseSolrQueryResponse::__constructSolrQueryResponse::__destructSolrUpdateResponseSolrUpdateResponse::__constructSolrUpdateResponse::__destructSolrPingResponseSolrPingResponse::__constructSolrPingResponse::__destructSolrPingResponse::getResponseSolrGenericResponseSolrGenericResponse::__constructSolrGenericResponse::__destructSolrParamsSolrParams::addSolrParams::addParamSolrParams::getSolrParams::getParamSolrParams::getParamsSolrParams::getPreparedParamsSolrParams::serializeSolrParams::setSolrParams::setParamSolrParams::toStringSolrParams::unserializeSolrModifiableParamsSolrModifiableParams::__constructSolrModifiableParams::__destructSolrQuerySolrQuery::addExpandFilterQuerySolrQuery::addExpandSortFieldSolrQuery::addFacetDateFieldSolrQuery::addFacetDateOtherSolrQuery::addFacetFieldSolrQuery::addFacetQuerySolrQuery::addFieldSolrQuery::addFilterQuerySolrQuery::addGroupFieldSolrQuery::addGroupFunctionSolrQuery::addGroupQuerySolrQuery::addGroupSortFieldSolrQuery::addHighlightFieldSolrQuery::addMltFieldSolrQuery::addMltQueryFieldSolrQuery::addSortFieldSolrQuery::addStatsFacetSolrQuery::addStatsFieldSolrQuery::collapseSolrQuery::__constructSolrQuery::__destructSolrQuery::getExpandSolrQuery::getExpandFilterQueriesSolrQuery::getExpandQuerySolrQuery::getExpandRowsSolrQuery::getExpandSortFieldsSolrQuery::getFacetSolrQuery::getFacetDateEndSolrQuery::getFacetDateFieldsSolrQuery::getFacetDateGapSolrQuery::getFacetDateHardEndSolrQuery::getFacetDateOtherSolrQuery::getFacetDateStartSolrQuery::getFacetFieldsSolrQuery::getFacetLimitSolrQuery::getFacetMethodSolrQuery::getFacetMinCountSolrQuery::getFacetMissingSolrQuery::getFacetOffsetSolrQuery::getFacetPrefixSolrQuery::getFacetQueriesSolrQuery::getFacetSortSolrQuery::getFieldsSolrQuery::getFilterQueriesSolrQuery::getGroupSolrQuery::getGroupCachePercentSolrQuery::getGroupFacetSolrQuery::getGroupFieldsSolrQuery::getGroupFormatSolrQuery::getGroupFunctionsSolrQuery::getGroupLimitSolrQuery::getGroupMainSolrQuery::getGroupNGroupsSolrQuery::getGroupOffsetSolrQuery::getGroupQueriesSolrQuery::getGroupSortFieldsSolrQuery::getGroupTruncateSolrQuery::getHighlightSolrQuery::getHighlightAlternateFieldSolrQuery::getHighlightFieldsSolrQuery::getHighlightFormatterSolrQuery::getHighlightFragmenterSolrQuery::getHighlightFragsizeSolrQuery::getHighlightHighlightMultiTermSolrQuery::getHighlightMaxAlternateFieldLengthSolrQuery::getHighlightMaxAnalyzedCharsSolrQuery::getHighlightMergeContiguousSolrQuery::getHighlightRegexMaxAnalyzedCharsSolrQuery::getHighlightRegexPatternSolrQuery::getHighlightRegexSlopSolrQuery::getHighlightRequireFieldMatchSolrQuery::getHighlightSimplePostSolrQuery::getHighlightSimplePreSolrQuery::getHighlightSnippetsSolrQuery::getHighlightUsePhraseHighlighterSolrQuery::getMltSolrQuery::getMltBoostSolrQuery::getMltCountSolrQuery::getMltFieldsSolrQuery::getMltMaxNumQueryTermsSolrQuery::getMltMaxNumTokensSolrQuery::getMltMaxWordLengthSolrQuery::getMltMinDocFrequencySolrQuery::getMltMinTermFrequencySolrQuery::getMltMinWordLengthSolrQuery::getMltQueryFieldsSolrQuery::getQuerySolrQuery::getRowsSolrQuery::getSortFieldsSolrQuery::getStartSolrQuery::getStatsSolrQuery::getStatsFacetsSolrQuery::getStatsFieldsSolrQuery::getTermsSolrQuery::getTermsFieldSolrQuery::getTermsIncludeLowerBoundSolrQuery::getTermsIncludeUpperBoundSolrQuery::getTermsLimitSolrQuery::getTermsLowerBoundSolrQuery::getTermsMaxCountSolrQuery::getTermsMinCountSolrQuery::getTermsPrefixSolrQuery::getTermsReturnRawSolrQuery::getTermsSortSolrQuery::getTermsUpperBoundSolrQuery::getTimeAllowedSolrQuery::removeExpandFilterQuerySolrQuery::removeExpandSortFieldSolrQuery::removeFacetDateFieldSolrQuery::removeFacetDateOtherSolrQuery::removeFacetFieldSolrQuery::removeFacetQuerySolrQuery::removeFieldSolrQuery::removeFilterQuerySolrQuery::removeHighlightFieldSolrQuery::removeMltFieldSolrQuery::removeMltQueryFieldSolrQuery::removeSortFieldSolrQuery::removeStatsFacetSolrQuery::removeStatsFieldSolrQuery::setEchoHandlerSolrQuery::setEchoParamsSolrQuery::setExpandSolrQuery::setExpandQuerySolrQuery::setExpandRowsSolrQuery::setExplainOtherSolrQuery::setFacetSolrQuery::setFacetDateEndSolrQuery::setFacetDateGapSolrQuery::setFacetDateHardEndSolrQuery::setFacetDateStartSolrQuery::setFacetEnumCacheMinDefaultFrequencySolrQuery::setFacetLimitSolrQuery::setFacetMethodSolrQuery::setFacetMinCountSolrQuery::setFacetMissingSolrQuery::setFacetOffsetSolrQuery::setFacetPrefixSolrQuery::setFacetSortSolrQuery::setGroupSolrQuery::setGroupCachePercentSolrQuery::setGroupFacetSolrQuery::setGroupFormatSolrQuery::setGroupLimitSolrQuery::setGroupMainSolrQuery::setGroupNGroupsSolrQuery::setGroupOffsetSolrQuery::setGroupTruncateSolrQuery::setHighlightSolrQuery::setHighlightAlternateFieldSolrQuery::setHighlightFormatterSolrQuery::setHighlightFragmenterSolrQuery::setHighlightFragsizeSolrQuery::setHighlightHighlightMultiTermSolrQuery::setHighlightMaxAlternateFieldLengthSolrQuery::setHighlightMaxAnalyzedCharsSolrQuery::setHighlightMergeContiguousSolrQuery::setHighlightRegexMaxAnalyzedCharsSolrQuery::setHighlightRegexPatternSolrQuery::setHighlightRegexSlopSolrQuery::setHighlightRequireFieldMatchSolrQuery::setHighlightSimplePostSolrQuery::setHighlightSimplePreSolrQuery::setHighlightSnippetsSolrQuery::setHighlightUsePhraseHighlighterSolrQuery::setMltSolrQuery::setMltBoostSolrQuery::setMltCountSolrQuery::setMltMaxNumQueryTermsSolrQuery::setMltMaxNumTokensSolrQuery::setMltMaxWordLengthSolrQuery::setMltMinDocFrequencySolrQuery::setMltMinTermFrequencySolrQuery::setMltMinWordLengthSolrQuery::setOmitHeaderSolrQuery::setQuerySolrQuery::setRowsSolrQuery::setShowDebugInfoSolrQuery::setStartSolrQuery::setStatsSolrQuery::setTermsSolrQuery::setTermsFieldSolrQuery::setTermsIncludeLowerBoundSolrQuery::setTermsIncludeUpperBoundSolrQuery::setTermsLimitSolrQuery::setTermsLowerBoundSolrQuery::setTermsMaxCountSolrQuery::setTermsMinCountSolrQuery::setTermsPrefixSolrQuery::setTermsReturnRawSolrQuery::setTermsSortSolrQuery::setTermsUpperBoundSolrQuery::setTimeAllowedSolrDisMaxQuerySolrDisMaxQuery::addBigramPhraseFieldSolrDisMaxQuery::addBoostQuerySolrDisMaxQuery::addPhraseFieldSolrDisMaxQuery::addQueryFieldSolrDisMaxQuery::addTrigramPhraseFieldSolrDisMaxQuery::addUserFieldSolrDisMaxQuery::__constructSolrDisMaxQuery::removeBigramPhraseFieldSolrDisMaxQuery::removeBoostQuerySolrDisMaxQuery::removePhraseFieldSolrDisMaxQuery::removeQueryFieldSolrDisMaxQuery::removeTrigramPhraseFieldSolrDisMaxQuery::removeUserFieldSolrDisMaxQuery::setBigramPhraseFieldsSolrDisMaxQuery::setBigramPhraseSlopSolrDisMaxQuery::setBoostFunctionSolrDisMaxQuery::setBoostQuerySolrDisMaxQuery::setMinimumMatchSolrDisMaxQuery::setPhraseFieldsSolrDisMaxQuery::setPhraseSlopSolrDisMaxQuery::setQueryAltSolrDisMaxQuery::setQueryPhraseSlopSolrDisMaxQuery::setTieBreakerSolrDisMaxQuery::setTrigramPhraseFieldsSolrDisMaxQuery::setTrigramPhraseSlopSolrDisMaxQuery::setUserFieldsSolrDisMaxQuery::useDisMaxQueryParserSolrDisMaxQuery::useEDisMaxQueryParserSolrCollapseFunctionSolrCollapseFunction::__constructSolrCollapseFunction::getFieldSolrCollapseFunction::getHintSolrCollapseFunction::getMaxSolrCollapseFunction::getMinSolrCollapseFunction::getNullPolicySolrCollapseFunction::getSizeSolrCollapseFunction::setFieldSolrCollapseFunction::setHintSolrCollapseFunction::setMaxSolrCollapseFunction::setMinSolrCollapseFunction::setNullPolicySolrCollapseFunction::setSizeSolrCollapseFunction::__toStringSolrExceptionSolrException::getInternalInfoSolrClientExceptionSolrClientException::getInternalInfoSolrServerExceptionSolrServerException::getInternalInfoSolrIllegalArgumentExceptionSolrIllegalArgumentException::getInternalInfoSolrIllegalOperationExceptionSolrIllegalOperationException::getInternalInfoSolrMissingMandatoryParameterExceptionSphinx简介安装/配置需求安装运行时配置资源类型预定义常量范例SphinxClientSphinxClient::addQuerySphinxClient::buildExcerptsSphinxClient::buildKeywordsSphinxClient::closeSphinxClient::__constructSphinxClient::escapeStringSphinxClient::getLastErrorSphinxClient::getLastWarningSphinxClient::openSphinxClient::querySphinxClient::resetFiltersSphinxClient::resetGroupBySphinxClient::runQueriesSphinxClient::setArrayResultSphinxClient::setConnectTimeoutSphinxClient::setFieldWeightsSphinxClient::setFilterSphinxClient::setFilterFloatRangeSphinxClient::setFilterRangeSphinxClient::setGeoAnchorSphinxClient::setGroupBySphinxClient::setGroupDistinctSphinxClient::setIDRangeSphinxClient::setIndexWeightsSphinxClient::setLimitsSphinxClient::setMatchModeSphinxClient::setMaxQueryTimeSphinxClient::setOverrideSphinxClient::setRankingModeSphinxClient::setRetriesSphinxClient::setSelectSphinxClient::setServerSphinxClient::setSortModeSphinxClient::statusSphinxClient::updateAttributesSwish简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic usageSwish 函数Swish::__constructSwish::getMetaListSwish::getPropertyListSwish::prepareSwish::querySwishResult::getMetaListSwishResult::stemSwishResults::getParsedWordsSwishResults::getRemovedStopwordsSwishResults::nextResultSwishResults::seekResultSwishSearch::executeSwishSearch::resetLimitSwishSearch::setLimitSwishSearch::setPhraseDelimiterSwishSearch::setSortSwishSearch::setStructure针对服务器的扩展Apache简介安装/配置需求安装运行时配置资源类型预定义常量Apache 函数apache_child_terminateapache_get_modulesapache_get_versionapache_getenvapache_lookup_uriapache_noteapache_request_headersapache_reset_timeoutapache_response_headersapache_setenvgetallheadersvirtualFastCGI 进程管理器简介安装/配置FPM 函数fastcgi_finish_requestIIS简介安装/配置需求安装运行时配置资源类型预定义常量IIS 函数iis_add_serveriis_get_dir_securityiis_get_script_mapiis_get_server_by_commentiis_get_server_by_pathiis_get_server_rightsiis_get_service_stateiis_remove_serveriis_set_app_settingsiis_set_dir_securityiis_set_script_mapiis_set_server_rightsiis_start_serveriis_start_serviceiis_stop_serveriis_stop_serviceNSAPI简介安装/配置需求安装运行时配置资源类型预定义常量NSAPI 函数nsapi_request_headersnsapi_response_headersnsapi_virtualSession 扩展Msession简介安装/配置需求安装运行时配置资源类型预定义常量Msession 函数msession_connectmsession_countmsession_createmsession_destroymsession_disconnectmsession_findmsession_get_arraymsession_get_datamsession_getmsession_incmsession_listmsession_listvarmsession_lockmsession_pluginmsession_randstrmsession_set_arraymsession_set_datamsession_setmsession_timeoutmsession_uniqmsession_unlockSessions简介安装/配置需求安装运行时配置资源类型预定义常量范例基本用法传送会话ID自定义会话管理器Session 上传进度会话和安全Session 函数session_abortsession_cache_expiresession_cache_limitersession_commitsession_decodesession_destroysession_encodesession_get_cookie_paramssession_idsession_is_registeredsession_module_namesession_namesession_regenerate_idsession_register_shutdownsession_registersession_resetsession_save_pathsession_set_cookie_paramssession_set_save_handlersession_startsession_statussession_unregistersession_unsetsession_write_closeSessionHandlerSessionHandler::closeSessionHandler::create_sidSessionHandler::destroySessionHandler::gcSessionHandler::openSessionHandler::readSessionHandler::writeSessionHandlerInterfaceSessionHandlerInterface::closeSessionHandlerInterface::destroySessionHandlerInterface::gcSessionHandlerInterface::openSessionHandlerInterface::readSessionHandlerInterface::writeSession PgSQL简介安装/配置需求安装运行时配置资源类型Table definitions预定义常量Session PgSQL 函数session_pgsql_add_errorsession_pgsql_get_errorsession_pgsql_get_fieldsession_pgsql_resetsession_pgsql_set_fieldsession_pgsql_status文本处理BBCode简介安装/配置需求安装运行时配置资源类型预定义常量BBCode 函数bbcode_add_elementbbcode_add_smileybbcode_createbbcode_destroybbcode_parsebbcode_set_arg_parserbbcode_set_flagsPCRE简介安装/配置需求安装运行时配置资源类型预定义常量范例PCRE模式PCRE 正则语法简介分隔符元字符转义序列(反斜线)Unicode字符属性句点字符类(方括号)可选路径(|)内部选项设置子组(子模式)重复/量词后向引用断言一次性子组条件子组注释递归模式性能正则表达式模式中可用的模式修饰符与 perl 的不同之处与POSIX正则表达式的不同PCRE 函数preg_filterpreg_greppreg_last_errorpreg_match_allpreg_matchpreg_quotepreg_replace_callback_arraypreg_replace_callbackpreg_replacepreg_splitPOSIX Regex简介安装/配置需求安装运行时配置资源类型预定义常量范例POSIX Regex 函数ereg_replaceeregeregi_replaceeregisplitsplitisql_regcasessdeep简介安装/配置需求安装运行时配置资源类型预定义常量ssdeep 函数ssdeep_fuzzy_comparessdeep_fuzzy_hash_filenamessdeep_fuzzy_hash字符串简介安装/配置需求安装运行时配置资源类型预定义常量字符串 函数addcslashesaddslashesbin2hexchopchrchunk_splitconvert_cyr_stringconvert_uudecodeconvert_uuencodecount_charscrc32cryptechoexplodefprintfget_html_translation_tablehebrevhebrevchex2binhtml_entity_decodehtmlentitieshtmlspecialchars_decodehtmlspecialcharsimplodejoinlcfirstlevenshteinlocaleconvltrimmd5_filemd5metaphonemoney_formatnl_langinfonl2brnumber_formatordparse_strprintprintfquoted_printable_decodequoted_printable_encodequotemetartrimsetlocalesha1_filesha1similar_textsoundexsprintfsscanfstr_getcsvstr_ireplacestr_padstr_repeatstr_replacestr_rot13str_shufflestr_splitstr_word_countstrcasecmpstrchrstrcmpstrcollstrcspnstrip_tagsstripcslashesstriposstripslashesstristrstrlenstrnatcasecmpstrnatcmpstrncasecmpstrncmpstrpbrkstrposstrrchrstrrevstrriposstrrposstrspnstrstrstrtokstrtolowerstrtoupperstrtrsubstr_comparesubstr_countsubstr_replacesubstrtrimucfirstucwordsvfprintfvprintfvsprintfwordwrap更新日志变量与类型相关扩展数组简介安装/配置需求安装运行时配置资源类型预定义常量对数组进行排序数组 函数array_change_key_casearray_chunkarray_columnarray_combinearray_count_valuesarray_diff_assocarray_diff_keyarray_diff_uassocarray_diff_ukeyarray_diffarray_fill_keysarray_fillarray_filterarray_fliparray_intersect_assocarray_intersect_keyarray_intersect_uassocarray_intersect_ukeyarray_intersectarray_key_existsarray_keysarray_maparray_merge_recursivearray_mergearray_multisortarray_padarray_poparray_productarray_pusharray_randarray_reducearray_replace_recursivearray_replacearray_reversearray_searcharray_shiftarray_slicearray_splicearray_sumarray_udiff_assocarray_udiff_uassocarray_udiffarray_uintersect_assocarray_uintersect_uassocarray_uintersectarray_uniquearray_unshiftarray_valuesarray_walk_recursivearray_walkarrayarsortasortcompactcountcurrenteachendextractin_arraykey_existskeykrsortksortlistnatcasesortnatsortnextposprevrangeresetrsortshufflesizeofsortuasortuksortusort类/对象简介安装/配置需求安装运行时配置资源类型预定义常量范例类/对象 函数__autoloadcall_user_method_arraycall_user_methodclass_aliasclass_existsget_called_classget_class_methodsget_class_varsget_classget_declared_classesget_declared_interfacesget_declared_traitsget_object_varsget_parent_classinterface_existsis_ais_subclass_ofmethod_existsproperty_existstrait_existsClasskit简介安装/配置需求安装运行时配置资源类型预定义常量Classkit 函数classkit_importclasskit_method_addclasskit_method_copyclasskit_method_redefineclasskit_method_removeclasskit_method_renameCtype简介安装/配置需求安装运行时配置资源类型预定义常量Ctype 函数ctype_alnumctype_alphactype_cntrlctype_digitctype_graphctype_lowerctype_printctype_punctctype_spacectype_upperctype_xdigitFilter简介安装/配置需求安装运行时配置资源类型Types of filtersValidate filtersSanitize filtersOther filtersFilter flags预定义常量范例ValidationSanitizationFilter 函数filter_has_varfilter_idfilter_input_arrayfilter_inputfilter_listfilter_var_arrayfilter_varFunction Handling简介安装/配置需求安装运行时配置资源类型预定义常量Function handling 函数call_user_func_arraycall_user_funccreate_functionforward_static_call_arrayforward_static_callfunc_get_argfunc_get_argsfunc_num_argsfunction_existsget_defined_functionsregister_shutdown_functionregister_tick_functionunregister_tick_functionQuickhash简介安装/配置需求安装运行时配置预定义常量范例QuickHashIntSetQuickHashIntSet::addQuickHashIntSet::__constructQuickHashIntSet::deleteQuickHashIntSet::existsQuickHashIntSet::getSizeQuickHashIntSet::loadFromFileQuickHashIntSet::loadFromStringQuickHashIntSet::saveToFileQuickHashIntSet::saveToStringQuickHashIntHashQuickHashIntHash::addQuickHashIntHash::__constructQuickHashIntHash::deleteQuickHashIntHash::existsQuickHashIntHash::getQuickHashIntHash::getSizeQuickHashIntHash::loadFromFileQuickHashIntHash::loadFromStringQuickHashIntHash::saveToFileQuickHashIntHash::saveToStringQuickHashIntHash::setQuickHashIntHash::updateQuickHashStringIntHashQuickHashStringIntHash::addQuickHashStringIntHash::__constructQuickHashStringIntHash::deleteQuickHashStringIntHash::existsQuickHashStringIntHash::getQuickHashStringIntHash::getSizeQuickHashStringIntHash::loadFromFileQuickHashStringIntHash::loadFromStringQuickHashStringIntHash::saveToFileQuickHashStringIntHash::saveToStringQuickHashStringIntHash::setQuickHashStringIntHash::updateQuickHashIntStringHashQuickHashIntStringHash::addQuickHashIntStringHash::__constructQuickHashIntStringHash::deleteQuickHashIntStringHash::existsQuickHashIntStringHash::getQuickHashIntStringHash::getSizeQuickHashIntStringHash::loadFromFileQuickHashIntStringHash::loadFromStringQuickHashIntStringHash::saveToFileQuickHashIntStringHash::saveToStringQuickHashIntStringHash::setQuickHashIntStringHash::update反射简介安装/配置需求安装运行时配置资源类型预定义常量范例扩展ReflectionReflection::exportReflection::getModifierNamesReflectionClassReflectionClass::__constructReflectionClass::exportReflectionClass::getConstantReflectionClass::getConstantsReflectionClass::getConstructorReflectionClass::getDefaultPropertiesReflectionClass::getDocCommentReflectionClass::getEndLineReflectionClass::getExtensionReflectionClass::getExtensionNameReflectionClass::getFileNameReflectionClass::getInterfaceNamesReflectionClass::getInterfacesReflectionClass::getMethodReflectionClass::getMethodsReflectionClass::getModifiersReflectionClass::getNameReflectionClass::getNamespaceNameReflectionClass::getParentClassReflectionClass::getPropertiesReflectionClass::getPropertyReflectionClass::getShortNameReflectionClass::getStartLineReflectionClass::getStaticPropertiesReflectionClass::getStaticPropertyValueReflectionClass::getTraitAliasesReflectionClass::getTraitNamesReflectionClass::getTraitsReflectionClass::hasConstantReflectionClass::hasMethodReflectionClass::hasPropertyReflectionClass::implementsInterfaceReflectionClass::inNamespaceReflectionClass::isAbstractReflectionClass::isCloneableReflectionClass::isFinalReflectionClass::isInstanceReflectionClass::isInstantiableReflectionClass::isInterfaceReflectionClass::isInternalReflectionClass::isIterateableReflectionClass::isSubclassOfReflectionClass::isTraitReflectionClass::isUserDefinedReflectionClass::newInstanceReflectionClass::newInstanceArgsReflectionClass::newInstanceWithoutConstructorReflectionClass::setStaticPropertyValueReflectionClass::__toStringReflectionZendExtensionReflectionZendExtension::__cloneReflectionZendExtension::__constructReflectionZendExtension::exportReflectionZendExtension::getAuthorReflectionZendExtension::getCopyrightReflectionZendExtension::getNameReflectionZendExtension::getURLReflectionZendExtension::getVersionReflectionZendExtension::__toStringReflectionExtensionReflectionExtension::__cloneReflectionExtension::__constructReflectionExtension::exportReflectionExtension::getClassesReflectionExtension::getClassNamesReflectionExtension::getConstantsReflectionExtension::getDependenciesReflectionExtension::getFunctionsReflectionExtension::getINIEntriesReflectionExtension::getNameReflectionExtension::getVersionReflectionExtension::infoReflectionExtension::isPersistentReflectionExtension::isTemporaryReflectionExtension::__toStringReflectionFunctionReflectionFunction::__constructReflectionFunction::exportReflectionFunction::getClosureReflectionFunction::invokeReflectionFunction::invokeArgsReflectionFunction::isDisabledReflectionFunction::__toStringReflectionFunctionAbstractReflectionFunctionAbstract::__cloneReflectionFunctionAbstract::getClosureScopeClassReflectionFunctionAbstract::getClosureThisReflectionFunctionAbstract::getDocCommentReflectionFunctionAbstract::getEndLineReflectionFunctionAbstract::getExtensionReflectionFunctionAbstract::getExtensionNameReflectionFunctionAbstract::getFileNameReflectionFunctionAbstract::getNameReflectionFunctionAbstract::getNamespaceNameReflectionFunctionAbstract::getNumberOfParametersReflectionFunctionAbstract::getNumberOfRequiredParametersReflectionFunctionAbstract::getParametersReflectionFunctionAbstract::getReturnTypeReflectionFunctionAbstract::getShortNameReflectionFunctionAbstract::getStartLineReflectionFunctionAbstract::getStaticVariablesReflectionFunctionAbstract::hasReturnTypeReflectionFunctionAbstract::inNamespaceReflectionFunctionAbstract::isClosureReflectionFunctionAbstract::isDeprecatedReflectionFunctionAbstract::isGeneratorReflectionFunctionAbstract::isInternalReflectionFunctionAbstract::isUserDefinedReflectionFunctionAbstract::isVariadicReflectionFunctionAbstract::returnsReferenceReflectionFunctionAbstract::__toStringReflectionMethodReflectionMethod::__constructReflectionMethod::exportReflectionMethod::getClosureReflectionMethod::getDeclaringClassReflectionMethod::getModifiersReflectionMethod::getPrototypeReflectionMethod::invokeReflectionMethod::invokeArgsReflectionMethod::isAbstractReflectionMethod::isConstructorReflectionMethod::isDestructorReflectionMethod::isFinalReflectionMethod::isPrivateReflectionMethod::isProtectedReflectionMethod::isPublicReflectionMethod::isStaticReflectionMethod::setAccessibleReflectionMethod::__toStringReflectionObjectReflectionObject::__constructReflectionObject::exportReflectionParameterReflectionParameter::allowsNullReflectionParameter::canBePassedByValueReflectionParameter::__cloneReflectionParameter::__constructReflectionParameter::exportReflectionParameter::getClassReflectionParameter::getDeclaringClassReflectionParameter::getDeclaringFunctionReflectionParameter::getDefaultValueReflectionParameter::getDefaultValueConstantNameReflectionParameter::getNameReflectionParameter::getPositionReflectionParameter::getTypeReflectionParameter::hasTypeReflectionParameter::isArrayReflectionParameter::isCallableReflectionParameter::isDefaultValueAvailableReflectionParameter::isDefaultValueConstantReflectionParameter::isOptionalReflectionParameter::isPassedByReferenceReflectionParameter::isVariadicReflectionParameter::__toStringReflectionPropertyReflectionProperty::__cloneReflectionProperty::__constructReflectionProperty::exportReflectionProperty::getDeclaringClassReflectionProperty::getDocCommentReflectionProperty::getModifiersReflectionProperty::getNameReflectionProperty::getValueReflectionProperty::isDefaultReflectionProperty::isPrivateReflectionProperty::isProtectedReflectionProperty::isPublicReflectionProperty::isStaticReflectionProperty::setAccessibleReflectionProperty::setValueReflectionProperty::__toStringReflectorReflector::exportReflector::__toStringReflectionExceptionVariable handling简介安装/配置需求安装运行时配置资源类型预定义常量Variable handling 函数boolvaldebug_zval_dumpdoublevalemptyfloatvalget_defined_varsget_resource_typegettypeimport_request_variablesintvalis_arrayis_boolis_callableis_doubleis_floatis_intis_integeris_longis_nullis_numericis_objectis_realis_resourceis_scalaris_stringissetprint_rserializesettypestrvalunserializeunsetvar_dumpvar_exportWeb 服务OAuth简介安装/配置需求安装运行时配置资源类型预定义常量范例FireEagleOAuth 函数oauth_get_sbsoauth_urlencodeOAuthOAuth::__constructOAuth::__destructOAuth::disableDebugOAuth::disableRedirectsOAuth::disableSSLChecksOAuth::enableDebugOAuth::enableRedirectsOAuth::enableSSLChecksOAuth::fetchOAuth::generateSignatureOAuth::getAccessTokenOAuth::getCAPathOAuth::getLastResponseOAuth::getLastResponseHeadersOAuth::getLastResponseInfoOAuth::getRequestHeaderOAuth::getRequestTokenOAuth::setAuthTypeOAuth::setCAPathOAuth::setNonceOAuth::setRequestEngineOAuth::setRSACertificateOAuth::setSSLChecksOAuth::setTimestampOAuth::setTokenOAuth::setVersionOAuthProviderOAuthProvider::addRequiredParameterOAuthProvider::callconsumerHandlerOAuthProvider::callTimestampNonceHandlerOAuthProvider::calltokenHandlerOAuthProvider::checkOAuthRequestOAuthProvider::__constructOAuthProvider::consumerHandlerOAuthProvider::generateTokenOAuthProvider::is2LeggedEndpointOAuthProvider::isRequestTokenEndpointOAuthProvider::removeRequiredParameterOAuthProvider::reportProblemOAuthProvider::setParamOAuthProvider::setRequestTokenPathOAuthProvider::timestampNonceHandlerOAuthProvider::tokenHandlerOAuthExceptionSCA简介安装/配置需求安装运行时配置资源类型预定义常量范例The structure of a Service ComponentObtaining a proxy for another Service ComponentCalling another Service ComponentLocating and calling services from a script which is not an SCA ComponentExposing a Service Component as a Web serviceDeploying an SCA componentObtaining the WSDL for an SCA component offering a Service as a Web serviceUnderstanding how the WSDL is generatedWorking with Data StructuresError handlingSCA 函数SCA::createDataObjectSCA::getServiceSCA_LocalProxy::createDataObjectSCA_SoapProxy::createDataObjectSOAP简介安装/配置需求安装运行时配置资源类型预定义常量SOAP 函数is_soap_faultuse_soap_error_handlerSoapClientSoapClient::__callSoapClient::__constructSoapClient::__doRequestSoapClient::__getFunctionsSoapClient::__getLastRequestSoapClient::__getLastRequestHeadersSoapClient::__getLastResponseSoapClient::__getLastResponseHeadersSoapClient::__getTypesSoapClient::__setCookieSoapClient::__setLocationSoapClient::__setSoapHeadersSoapClient::__soapCallSoapClient::SoapClientSoapServerSoapServer::addFunctionSoapServer::addSoapHeaderSoapServer::__constructSoapServer::faultSoapServer::getFunctionsSoapServer::handleSoapServer::setClassSoapServer::setObjectSoapServer::setPersistenceSoapServer::SoapServerSoapFaultSoapFault::__constructSoapFault::SoapFaultSoapFault::__toStringSoapHeaderSoapHeader::__constructSoapHeader::SoapHeaderSoapParamSoapParam::__constructSoapParam::SoapParamSoapVarSoapVar::__constructSoapVar::SoapVarYar简介安装/配置需求安装运行时配置资源类型预定义常量范例Yar_ServerYar_Server::__constructYar_Server::handleYar_ClientYar_Client::__callYar_Client::__constructYar_Client::setOptYar_Concurrent_ClientYar_Concurrent_Client::callYar_Concurrent_Client::loopYar_Concurrent_Client::resetYar_Server_ExceptionYar_Server_Exception::getTypeYar_Client_ExceptionYar_Client_Exception::getTypeXML-RPC简介安装/配置需求安装运行时配置资源类型预定义常量XML-RPC 函数xmlrpc_decode_requestxmlrpc_decodexmlrpc_encode_requestxmlrpc_encodexmlrpc_get_typexmlrpc_is_faultxmlrpc_parse_method_descriptionsxmlrpc_server_add_introspection_dataxmlrpc_server_call_methodxmlrpc_server_createxmlrpc_server_destroyxmlrpc_server_register_introspection_callbackxmlrpc_server_register_methodxmlrpc_set_typeWindows 专用扩展COM简介安装/配置需求安装运行时配置资源类型预定义常量Errors and error handling范例For EachArrays and Array-style COM propertiesCOMDOTNETVARIANTCOM 函数com_create_guidcom_event_sinkcom_get_active_objectcom_load_typelibcom_message_pumpcom_print_typeinfovariant_absvariant_addvariant_andvariant_castvariant_catvariant_cmpvariant_date_from_timestampvariant_date_to_timestampvariant_divvariant_eqvvariant_fixvariant_get_typevariant_idivvariant_impvariant_intvariant_modvariant_mulvariant_negvariant_notvariant_orvariant_powvariant_roundvariant_set_typevariant_setvariant_subvariant_xorwin32ps简介安装/配置需求安装运行时配置资源类型预定义常量范例Win32ps exampleswin32ps 函数win32_ps_list_procswin32_ps_stat_memwin32_ps_stat_procwin32service简介安装/配置需求安装运行时配置资源类型预定义常量Win32Service Service Type BitmasksWin32Service Service Status ConstantsWin32Service Service Control Message ConstantsWin32Service Service Control Message Accepted BitmasksWin32Service Service Start Type ConstantsWin32Service Service Error Control ConstantsWin32Service Service Flag ConstantsWin32 Error CodesWin32 Base Priority Classes范例win32service 函数win32_continue_servicewin32_create_servicewin32_delete_servicewin32_get_last_control_messagewin32_pause_servicewin32_query_service_statuswin32_set_service_statuswin32_start_service_ctrl_dispatcherwin32_start_servicewin32_stop_serviceXML 操作DOM简介安装/配置需求安装运行时配置资源类型预定义常量范例DOMAttrDOMAttr::__constructDOMAttr::isIdDOMCdataSectionDOMCdataSection::__constructDOMCharacterDataDOMCharacterData::appendDataDOMCharacterData::deleteDataDOMCharacterData::insertDataDOMCharacterData::replaceDataDOMCharacterData::substringDataDOMCommentDOMComment::__constructDOMDocumentDOMDocument::__constructDOMDocument::createAttributeDOMDocument::createAttributeNSDOMDocument::createCDATASectionDOMDocument::createCommentDOMDocument::createDocumentFragmentDOMDocument::createElementDOMDocument::createElementNSDOMDocument::createEntityReferenceDOMDocument::createProcessingInstructionDOMDocument::createTextNodeDOMDocument::getElementByIdDOMDocument::getElementsByTagNameDOMDocument::getElementsByTagNameNSDOMDocument::importNodeDOMDocument::loadDOMDocument::loadHTMLDOMDocument::loadHTMLFileDOMDocument::loadXMLDOMDocument::normalizeDocumentDOMDocument::registerNodeClassDOMDocument::relaxNGValidateDOMDocument::relaxNGValidateSourceDOMDocument::saveDOMDocument::saveHTMLDOMDocument::saveHTMLFileDOMDocument::saveXMLDOMDocument::schemaValidateDOMDocument::schemaValidateSourceDOMDocument::validateDOMDocument::xincludeDOMDocumentFragmentDOMDocumentFragment::appendXMLDOMDocumentTypeDOMElementDOMElement::__constructDOMElement::getAttributeDOMElement::getAttributeNodeDOMElement::getAttributeNodeNSDOMElement::getAttributeNSDOMElement::getElementsByTagNameDOMElement::getElementsByTagNameNSDOMElement::hasAttributeDOMElement::hasAttributeNSDOMElement::removeAttributeDOMElement::removeAttributeNodeDOMElement::removeAttributeNSDOMElement::setAttributeDOMElement::setAttributeNodeDOMElement::setAttributeNodeNSDOMElement::setAttributeNSDOMElement::setIdAttributeDOMElement::setIdAttributeNodeDOMElement::setIdAttributeNSDOMEntityDOMEntityReferenceDOMEntityReference::__constructDOMExceptionDOMImplementationDOMImplementation::__constructDOMImplementation::createDocumentDOMImplementation::createDocumentTypeDOMImplementation::hasFeatureDOMNamedNodeMapDOMNamedNodeMap::getNamedItemDOMNamedNodeMap::getNamedItemNSDOMNamedNodeMap::itemDOMNodeDOMNode::appendChildDOMNode::C14NDOMNode::C14NFileDOMNode::cloneNodeDOMNode::getLineNoDOMNode::getNodePathDOMNode::hasAttributesDOMNode::hasChildNodesDOMNode::insertBeforeDOMNode::isDefaultNamespaceDOMNode::isSameNodeDOMNode::isSupportedDOMNode::lookupNamespaceURIDOMNode::lookupPrefixDOMNode::normalizeDOMNode::removeChildDOMNode::replaceChildDOMNodeListDOMNodelist::itemDOMNotationDOMProcessingInstructionDOMProcessingInstruction::__constructDOMTextDOMText::__constructDOMText::isWhitespaceInElementContentDOMText::splitTextDOMXPathDOMXPath::__constructDOMXPath::evaluateDOMXPath::queryDOMXPath::registerNamespaceDOMXPath::registerPhpFunctionsDOM 函数dom_import_simplexmllibxml简介安装/配置需求安装运行时配置资源类型预定义常量libXMLErrorlibxml 函数libxml_clear_errorslibxml_disable_entity_loaderlibxml_get_errorslibxml_get_last_errorlibxml_set_external_entity_loaderlibxml_set_streams_contextlibxml_use_internal_errorsSDO简介安装/配置需求安装运行时配置资源类型预定义常量Limitations范例Basic usageSetting and Getting Property ValuesWorking with Sequenced Data ObjectsReflecting on Service Data ObjectsSDO 函数SDO_DAS_ChangeSummary::beginLoggingSDO_DAS_ChangeSummary::endLoggingSDO_DAS_ChangeSummary::getChangeTypeSDO_DAS_ChangeSummary::getChangedDataObjectsSDO_DAS_ChangeSummary::getOldContainerSDO_DAS_ChangeSummary::getOldValuesSDO_DAS_ChangeSummary::isLoggingSDO_DAS_DataFactory::addPropertyToTypeSDO_DAS_DataFactory::addTypeSDO_DAS_DataFactory::getDataFactorySDO_DAS_DataObject::getChangeSummarySDO_DAS_Setting::getListIndexSDO_DAS_Setting::getPropertyIndexSDO_DAS_Setting::getPropertyNameSDO_DAS_Setting::getValueSDO_DAS_Setting::isSetSDO_DataFactory::createSDO_DataObject::clearSDO_DataObject::createDataObjectSDO_DataObject::getContainerSDO_DataObject::getSequenceSDO_DataObject::getTypeNameSDO_DataObject::getTypeNamespaceURISDO_Exception::getCauseSDO_List::insertSDO_Model_Property::getContainingTypeSDO_Model_Property::getDefaultSDO_Model_Property::getNameSDO_Model_Property::getTypeSDO_Model_Property::isContainmentSDO_Model_Property::isManySDO_Model_ReflectionDataObject::__constructSDO_Model_ReflectionDataObject::exportSDO_Model_ReflectionDataObject::getContainmentPropertySDO_Model_ReflectionDataObject::getInstancePropertiesSDO_Model_ReflectionDataObject::getTypeSDO_Model_Type::getBaseTypeSDO_Model_Type::getNameSDO_Model_Type::getNamespaceURISDO_Model_Type::getPropertiesSDO_Model_Type::getPropertySDO_Model_Type::isAbstractTypeSDO_Model_Type::isDataTypeSDO_Model_Type::isInstanceSDO_Model_Type::isOpenTypeSDO_Model_Type::isSequencedTypeSDO_Sequence::getPropertySDO_Sequence::insertSDO_Sequence::moveSDO-DAS-Relational简介安装/配置需求安装运行时配置资源类型预定义常量范例Creating, retrieving, updating and deleting dataSpecifying the metadataOne-table examplesTwo-table examplesThree-table exampleLimitationsSDO-DAS-Relational 函数SDO_DAS_Relational::applyChangesSDO_DAS_Relational::__constructSDO_DAS_Relational::createRootDataObjectSDO_DAS_Relational::executePreparedQuerySDO_DAS_Relational::executeQuerySDO DAS XML简介安装/配置需求安装运行时配置资源类型预定义常量范例SDO DAS XML 函数SDO_DAS_XML::addTypesSDO_DAS_XML::createSDO_DAS_XML::createDataObjectSDO_DAS_XML::createDocumentSDO_DAS_XML::loadFileSDO_DAS_XML::loadStringSDO_DAS_XML::saveFileSDO_DAS_XML::saveStringSDO_DAS_XML_Document::getRootDataObjectSDO_DAS_XML_Document::getRootElementNameSDO_DAS_XML_Document::getRootElementURISDO_DAS_XML_Document::setEncodingSDO_DAS_XML_Document::setXMLDeclarationSDO_DAS_XML_Document::setXMLVersionSimpleXML简介安装/配置需求安装运行时配置资源类型预定义常量范例Basic SimpleXML usageDealing with XML errorsSimpleXMLElementSimpleXMLElement::addAttributeSimpleXMLElement::addChildSimpleXMLElement::asXMLSimpleXMLElement::attributesSimpleXMLElement::childrenSimpleXMLElement::__constructSimpleXMLElement::countSimpleXMLElement::getDocNamespacesSimpleXMLElement::getNameSimpleXMLElement::getNamespacesSimpleXMLElement::registerXPathNamespaceSimpleXMLElement::saveXMLSimpleXMLElement::__toStringSimpleXMLElement::xpathSimpleXMLIteratorSimpleXMLIterator::currentSimpleXMLIterator::getChildrenSimpleXMLIterator::hasChildrenSimpleXMLIterator::keySimpleXMLIterator::nextSimpleXMLIterator::rewindSimpleXMLIterator::validSimpleXML 函数simplexml_import_domsimplexml_load_filesimplexml_load_stringWDDX简介安装/配置需求安装运行时配置资源类型预定义常量范例wddx examplesWDDX 函数wddx_add_varswddx_deserializewddx_packet_endwddx_packet_startwddx_serialize_valuewddx_serialize_varsXMLDiff简介安装/配置需求安装XMLDiff\BaseXMLDiff\Base::__constructXMLDiff\Base::diffXMLDiff\Base::mergeXMLDiff\DOMXMLDiff\DOM::diffXMLDiff\DOM::mergeXMLDiff\MemoryXMLDiff\Memory::diffXMLDiff\Memory::mergeXMLDiff\FileXMLDiff\File::diffXMLDiff\File::mergeXML 解析器简介安装/配置需求安装运行时配置资源类型预定义常量事件处理器Case Folding(大写转换)错误代码字符编码范例XML 元素结构例程XML 标签映射例程XML 外部实体例程XML 解析器函数utf8_decodeutf8_encodexml_error_stringxml_get_current_byte_indexxml_get_current_column_numberxml_get_current_line_numberxml_get_error_codexml_parse_into_structxml_parsexml_parser_create_nsxml_parser_createxml_parser_freexml_parser_get_optionxml_parser_set_optionxml_set_character_data_handlerxml_set_default_handlerxml_set_element_handlerxml_set_end_namespace_decl_handlerxml_set_external_entity_ref_handlerxml_set_notation_decl_handlerxml_set_objectxml_set_processing_instruction_handlerxml_set_start_namespace_decl_handlerxml_set_unparsed_entity_decl_handlerXMLReader简介安装/配置需求安装运行时配置资源类型XMLReaderXMLReader::closeXMLReader::expandXMLReader::getAttributeXMLReader::getAttributeNoXMLReader::getAttributeNsXMLReader::getParserPropertyXMLReader::isValidXMLReader::lookupNamespaceXMLReader::moveToAttributeXMLReader::moveToAttributeNoXMLReader::moveToAttributeNsXMLReader::moveToElementXMLReader::moveToFirstAttributeXMLReader::moveToNextAttributeXMLReader::nextXMLReader::openXMLReader::readXMLReader::readInnerXMLXMLReader::readOuterXMLXMLReader::readStringXMLReader::setParserPropertyXMLReader::setRelaxNGSchemaXMLReader::setRelaxNGSchemaSourceXMLReader::setSchemaXMLReader::XMLXMLWriter简介安装/配置需求安装运行时配置资源类型预定义常量XMLWriter 函数XMLWriter::endAttributexmlwriter_end_attributeXMLWriter::endCDataxmlwriter_end_cdataXMLWriter::endCommentxmlwriter_end_commentXMLWriter::endDocumentxmlwriter_end_documentXMLWriter::endDTDAttlistxmlwriter_end_dtd_attlistXMLWriter::endDTDElementxmlwriter_end_dtd_elementXMLWriter::endDTDEntityxmlwriter_end_dtd_entityXMLWriter::endDTDxmlwriter_end_dtdXMLWriter::endElementxmlwriter_end_elementXMLWriter::endPIxmlwriter_end_piXMLWriter::flushxmlwriter_flushXMLWriter::fullEndElementxmlwriter_full_end_elementXMLWriter::openMemoryxmlwriter_open_memoryXMLWriter::openURIxmlwriter_open_uriXMLWriter::outputMemoryxmlwriter_output_memoryXMLWriter::setIndentStringxmlwriter_set_indent_stringXMLWriter::setIndentxmlwriter_set_indentXMLWriter::startAttributeNSxmlwriter_start_attribute_nsXMLWriter::startAttributexmlwriter_start_attributeXMLWriter::startCDataxmlwriter_start_cdataXMLWriter::startCommentxmlwriter_start_commentXMLWriter::startDocumentxmlwriter_start_documentXMLWriter::startDTDAttlistxmlwriter_start_dtd_attlistXMLWriter::startDTDElementxmlwriter_start_dtd_elementXMLWriter::startDTDEntityxmlwriter_start_dtd_entityXMLWriter::startDTDxmlwriter_start_dtdXMLWriter::startElementNSxmlwriter_start_element_nsXMLWriter::startElementxmlwriter_start_elementXMLWriter::startPIxmlwriter_start_piXMLWriter::textxmlwriter_textXMLWriter::writeAttributeNSxmlwriter_write_attribute_nsXMLWriter::writeAttributexmlwriter_write_attributeXMLWriter::writeCDataxmlwriter_write_cdataXMLWriter::writeCommentxmlwriter_write_commentXMLWriter::writeDTDAttlistxmlwriter_write_dtd_attlistXMLWriter::writeDTDElementxmlwriter_write_dtd_elementXMLWriter::writeDTDEntityxmlwriter_write_dtd_entityXMLWriter::writeDTDxmlwriter_write_dtdXMLWriter::writeElementNSxmlwriter_write_element_nsXMLWriter::writeElementxmlwriter_write_elementXMLWriter::writePIxmlwriter_write_piXMLWriter::writeRawxmlwriter_write_rawXSL简介安装/配置需求安装运行时配置资源类型预定义常量范例Example collection.xml and collection.xsl filesError handling with libxml error handling functionsXSLTProcessorXSLTProcessor::__constructXSLTProcessor::getParameterXsltProcessor::getSecurityPrefsXSLTProcessor::hasExsltSupportXSLTProcessor::importStylesheetXSLTProcessor::registerPHPFunctionsXSLTProcessor::removeParameterXSLTProcessor::setParameterXSLTProcessor::setProfilingXsltProcessor::setSecurityPrefsXSLTProcessor::transformToDocXSLTProcessor::transformToUriXSLTProcessor::transformToXMLPHP 核心:骇客指南序言内存管理内存管理基础数据持久化线程安全的资源管理器变量的使用介绍创建变量并设置值函数的编写类和对象的使用资源的使用INI 设置的使用流的使用"counter" 扩展 - 一个连续的实例安装/配置简介运行时配置资源类型预定义常量范例简单接口扩展接口对象化接口CounterCounter::__constructCounter::getValueCounter::bumpValueCounter::resetValueCounter::getMetaCounter::getNamedCounter::setCounterClassBasiccounter_getcounter_bumpcounter_resetExtendedcounter_createcounter_get_valuecounter_bump_valuecounter_reset_valuecounter_get_metacounter_get_namedPHP 5 构建系统PHP 扩展开发构建ext_skel 脚本与 UNIX 构建系统交互: config.m4使用 Windows 构建系统:config.w32扩展的结构组成扩展的文件Basic constructsThe zend_module structureExtension globalsLife cycle of an extensionTesting an extensionPDO 驱动前提条件配置与管理Fleshing out your skeletonBuildingTestingPackaging and distributionpdo_dbh_t definitionpdo_stmt_t definitionConstantsError handling扩展相关 FAQZend Engine 2 API 参考Zend Engine 2 操作码列表Opcode Descriptions and ExamplesADDADD_ARRAY_ELEMENTADD_CHARADD_INTERFACEADD_STRINGADD_VARASSIGNASSIGN_ADDASSIGN_BW_ANDASSIGN_BW_ORASSIGN_BW_XORASSIGN_CONCATASSIGN_DIMASSIGN_DIVASSIGN_MODASSIGN_MULASSIGN_OBJASSIGN_REFASSIGN_SLASSIGN_SRASSIGN_SUBBEGIN_SILENCEBOOLBOOL_NOTBOOL_XORBRKBW_ANDBW_NOTBW_ORBW_XORCASECASTCATCHCLONECONCATCONTDECLARE_CLASSDECLARE_CONSTDECLARE_FUNCTIONDECLARE_INHERITED_CLASSDECLARE_INHERITED_CLASS_DELAYEDDIVDO_FCALLDO_FCALL_BY_NAMEECHOEND_SILENCEEXITEXT_FCALL_BEGINEXT_FCALL_ENDEXT_NOPEXT_STMTFE_FETCHFE_RESETFETCH_CLASSFETCH_CONSTANTFETCH_DIM_FUNC_ARGFETCH_DIM_ISFETCH_DIM_RFETCH_DIM_RWFETCH_DIM_TMP_VARFETCH_DIM_UNSETFETCH_DIM_WFETCH_FUNC_ARGFETCH_ISFETCH_OBJ_FUNC_ARGFETCH_OBJ_ISFETCH_OBJ_RFETCH_OBJ_RWFETCH_OBJ_UNSETFETCH_OBJ_WFETCH_RFETCH_RWFETCH_UNSETFETCH_WFREEGOTOHANDLE_EXCEPTIONINCLUDE_OR_EVALINIT_ARRAYINIT_FCALL_BY_NAMEINIT_METHOD_CALLINIT_NS_FCALL_BY_NAMEINIT_STATIC_METHOD_CALLINIT_STRINGINSTANCEOFIS_EQUALIS_IDENTICALIS_NOT_EQUALIS_NOT_IDENTICALIS_SMALLERIS_SMALLER_OR_EQUALISSET_ISEMPTY_DIM_OBJISSET_ISEMPTY_PROP_OBJISSET_ISEMPTY_VARJMPJMPNZJMPNZ_EXJMPZJMPZ_EXJMPZNZMODMULNEWNOPPOST_DECPOST_DEC_OBJPOST_INCPOST_INC_OBJPRE_DECPRE_DEC_OBJPRE_INCPRE_INC_OBJPRINTQM_ASSIGNRAISE_ABSTRACT_ERRORRECVRECV_INITRETURNRETURN_BY_REFSEND_REFSEND_VALSEND_VARSEND_VAR_NO_REFSLSRSUBSWITCH_FREETHROWTICKSUNSET_DIMUNSET_OBJUNSET_VARUSER_OPCODEVERIFY_ABSTRACT_CLASSZEND_DECLARE_LAMBDA_FUNCTIONZEND_JMP_SETZend Engine 1旧的介绍Streams API for PHP Extension AuthorsZend API:深入 PHP 内核TSRM APIFAQ一般信息PHP 是什么?PHP 这个缩写指的是什么?PHP 版本之间有什么联系?可以同时运行几个不同版本的 PHP 吗?PHP4 和 PHP5 有什么不同?我觉得自己发现了一个 bug!应该告诉谁?邮件列表有没有 PHP 的邮件列表?还有其它的团体吗?我可以建立我自己的PHP邮件列表吗?救命!我看来不能订阅/取消任何一个邮件列表!在哪里有个邮件列表的归档吗?我可以在邮件列表中问什么?向邮件列表发帖子时我需要包括些什么信息?获取 PHPPHP 可以从哪里得到?有预先编译好的可执行版本吗?编译一些可选的 PHP 扩展库所需的库文件可以从哪里得到?怎样使这些库起作用?我在 Windows 机器中从 SVN 里得到了最新版的 PHP 源代码,需要什么去编译它?哪里可以找到 browscap.ini 文件?数据库问题听说 PHP 有可能访问 Microsoft SQL Server,怎样访问?能访问 Microsoft Access 数据库吗?我升级到了 PHP 4,结果 MySQL 不断报告'Warning: MySQL: Unable to save result set in ..',这是怎么回事?Why is the MySQL extension (ext/mysql) that I've been using for over10 years discouraged from use? Is it deprecated? What do I use instead?How can I migrate?PHP 5 不再绑定 MySQL 客户端库,这对我意味着什么?我还能在 PHP 中使用 MySQL 吗?我试着使用 MySQL 结果得到'function undefined'错误,怎么办?在安装共享 MySQL 支持之后,只要一加载 libphp4.so,Apache就会 core dump。这个问题能解决吗?为什么我得到类似如下的错误:'Warning: 0 is not a MySQL result index in <file> on line <x>'或者'Warning: Supplied argument is not a valid MySQL result resource in <file> on line <x>'?安装为什么不应该在实际运作环境中的 Apache2 中使用线程化的 MPM?Unix/Windows:应该上哪儿去找我的 php.ini 文件?Unix:我安装了 PHP,但每次我打开一个页面时,只得到一条'Document Contains No Data'消息!这是怎么回事?Unix:我从 RPMS 安装了 PHP,但是 Apache 不处理 PHP 页面!这是怎么回事?Unix:我从 RPMS 安装了 PHP 3,但它没有把我需要的数据库支持编译进去!这是怎么回事?Unix:我给 Apache 加上了 FrontPage extensions 补丁,结果 PHP 突然不工作了。PHP 和 Apache FrontPage extensions 兼容吗?Unix/Windows:我已经安装了 PHP,但当我试着通过浏览器访问 PHP 脚本时,得到了一个空白页面。Unix/Windows:我已经安装了 PHP,但当我试着通过浏览器访问 PHP 脚本时,得到了一个服务器的 500 错误。某些操作系统:我已经在不出错的情况下安装了 PHP,但当我试着启动 Apache 时得到了一个未定义符号错误: [mybox:user /src/php4] root# apachectl configtest apachectl: /usr/local/apache/bin/httpd Undefined symbols: _compress _uncompressWindows:我已经安装了 PHP,但当我试着通过浏览器访问 PHP 脚本时,得到如下错误: cgi error: The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:Windows:我已经照着所有的说明做了,但还是不能让 PHP 和 IIS 一起工作!当在 IIS,PWS,OmniHTTPD 或者 Xitami 中以 CGI 方式运行 PHP 时,出现如下错误:Security Alert! PHP CGI cannot be accessed directly..怎样得知我的 php.ini 是否被找到和应用了?似乎我做的修改都没有生效。怎样将 PHP 目录加入到 Windows 路径 PATH中去?怎样使 php.ini 文件在 Windows 下被 PHP 所用?有可能使 PHP 运作于 Apache 的 content negotiation(MultiViews 选项)吗?PHP 是否仅限于处理 GET 和 POST 请求方法?编译问题我用匿名 GIT 服务得到了最新版的 PHP,但是里面没有 configure 脚本!我在配置 PHP 和 Apache 一起工作时遇到了问题。说没找到 httpd.h,但这个文件明明就在那里!当运行 PHP 配置时( ./configure),遇到类似如下的问题: checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up当试图启动 Apache 时,得到类似如下错误信息: fatal: relocation error: file /path/to/libphp4.so: symbol ap_block_alarms: referenced symbol not found当运行 configure 时,报告说找不到头文件或 GD 库或 gdbm,或其它的什么包!当编译 language-parser.tab.c文件时,报错说 yytname undeclared。当我运行 make时,看上去一切正常,可当连接最后的程序时报告说找不到某些文件而失败了。当连接 PHP 时,报告说有一些未定义的引用。我不知道怎样把 PHP 和 Apache 1.3 一起编译。我按照所有的步骤在 UNIX 下安装了PHP 的 Apache 模块版本,但我的 PHP 脚本被显示在浏览器中或者提示保存此文件。说要用:--activate-module=src/modules/php4/libphp4.a,但是此文件根本不存在,于是我改成了 --activate-module=src/modules/php4/libmodphp4.a,结果不行。怎么回事?当我用 --activate-module=src/modules/php4/libphp4.a试着把 PHP 编译成 Apache 的静态模块时,报告说我的编译器不服从 ANSI 标准。当我用 --with-apxs编译 PHP 时得到奇怪的错误信息。在 make的过程中,在 microtime 中出错,还有很多 RUSAGE_之类的东西。当带 MySQL 编译 PHP 时,可以正确地运行configure,但是在make的过程中出现了类似以下的错误信息: ext/mysql/ libmysqlclient /my_tempnam.o(.text+0x46): In function my_tempnam': /php4/ext/mysql/ libmysqlclient /my_tempnam.c:103: the 我想升级我的 PHP。上哪里找到我用来配置目前的 PHP 的 ./configure的参数呢?和 GD 库一起编译 PHP 时,要么给出一个奇怪的编译错误,要么在运行时出现 segfaults。当编译 PHP 时我看到一些随机的错误,好像死了。我用的是 Solaris,不知道有没有关系。使用 PHP我忘了PHP函数的参数顺序,它们是随机的吗?我想写一个可以处理任何表单来的数据的通用 PHP 脚本。我怎么知道哪个 POST 方法变量可用呢?我需要在所有的单引号(')前加一个反斜线(),使它们变成(\'),我如何能够通过正则表达式来实现?我同样希望能够将(")转换成("),将(\)转换成(\)。我所有的(")和(')都被变成了(")和('),我如何才能去掉这些不必要的反斜线?它们为什么及如何出现?PHP 选项 register_globals 对我有什么影响?当我这样做时,输出显示的次序是错的: <?phpfunction myfunc($argument){echo $argument + 10;}$variable = 10;echo "myfunc($variable) = " . myfunc($variable);?>这是怎么回事?下面代码怎么没有分成两行显示? <pre><?php echo "This should be the first line."; ?><?php echo "This should show up after the new line above."; ?></pre>我得到消息'Warning: Cannot send session cookie - headers already sent...'或者'Cannot add header information - headers already sent...'。我需要直接访问请求报头中的信息,怎么能办到?当我用 IIS 进行 HTTP 认证时得到'No Input file specified'消息。Windows:不能访问另一台电脑上用 IIS 共享的文件。我怎样混合使用 XML 和 PHP?它不认我的 <?xml 标记!怎样用 FrontPage 或者其它非要把我的代码移来移去的 HTML 编辑器来编辑 PHP?哪里可以找到所有可用的 PHP 预定义变量的完整列表?怎样才能不用非免费的商业库(例如 PDFLib) 来生成 PDF 文档?我想要个免费的并且不需要再连接别的 PDF 库。我试着在用户自定义函数中访问一个标准的 CGI 变量(例如 $DOCUMENT_ROOT 或 $HTTP_REFERER),但是找不到,哪里出了错?有些 PHP 选项可以接受缩写的字节值,与仅能接受 integer字节值相反。都有哪些缩写字节值?可以将其用于 php.ini 之外吗?Windows: I keep getting connection timeouts when using localhost, whereas "127.0.0.1"works?密码散列为什么需要把应用程序中用户的密码进行散列化?为何诸如 md5 和sha1 这样的常见散列函数不适合用在密码保护场景?如果不建议使用常用散列函数保护密码, 那么我应该如何对密码进行散列处理?'盐'是什么?我应该如何保存'盐'?PHP 和 HTML当我通过表单/URL 传值时需要用什么编码/解码方法?我在试用 <input type="image"> 标记,但是没有 $foo.x和 $foo.y变量,它们哪去了?怎样在 HTML 的 <form> 中建立数组?怎样从可多选的 HTML 的 select multiple 标记中得到所有结果?怎样从 Javascript 传递一个变量到 PHP?PHP 和 COM我建立了一个 DLL 来做某种计算。有办法在 PHP 中运行这个 DLL 吗?'Unsupported variant type: xxxx (0xxxxx)'是什么意思?在 PHP 中有可能操纵可视对象吗?可以将一个 COM 对象保存在 session 中吗?怎样可以捕获 COM 的错误?我能像在 Perl 中一样从 PHP 脚本生成 DLL 文件吗?'Unable to obtain IDispatch interface for CLSID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}'是什么意思?怎样从远端服务器运行 COM 对象?我得到一个'DCOM is disabled in C:\path...\scriptname.php on line 6'信息,应该怎么办?有可能在 PHP 页面中加载/操纵 ActiveX 对象吗?有可能得到一个组件在运行中的实例吗?有办法处理 COM 对象中发送的事件吗?我在尝试调用一个打开了多于一个接口的 COM 对象中的方法时碰到问题,应该怎么办?这么说 PHP 可以和 COM 一起工作,那么 COM+ 呢?如果 PHP 可以操纵 COM 对象,那么可以设想结合 PHP 用 MTS 来管理组件资源吗?从 PHP 4 移植到 PHP 5从 PHP 4 向 PHP 5 移植PHP 5 中还能用 MySQL 吗?好像找不到了。听说 PHP 有个全新的 OOP 模型,那现有的 OOP 代码还能运行吗?上哪去找这些新的 OOP 特性的信息?除了 OOP 模型,PHP 5 还有哪些改动?此外,有没有专门针对 PHP 5 的手册?杂类问题在 Windows 中怎样处理 bz2 压缩的文档?在函数定义中,参数旁边的 & 是什么意思?例如 asort。怎么处理 register_globals?附录PHP 及其相关工程的历史PHP 的历史PHP 相关工程的历史PHP 相关书籍PHP 相关文章Migrating from PHP 5.6.x to PHP 7.0.x不向后兼容的变更新特性Changes in SAPI ModulesDeprecated features in PHP 7.0.xChanged functionsNew functionsNew Classes and InterfacesNew Global ConstantsRemoved Extensions and SAPIsOther Changes从PHP 5.5.x 移植到 PHP 5.6.x向后不兼容新特性PHP 5.6.x 中已废止的特性Changed functions新加函数OpenSSL changes in PHP 5.6.x扩展中的变动新加的全局常量从 PHP 5.4.x 迁移到 PHP 5.5.xPHP 5.5.x 中的变更不向后兼容的变更新的特性PHP 5.5.x 中废弃的特性变更的函数新的函数新的类和接口新的方法扩展中的其他变更新的全局常量INI 文件处理的变化PHP 内部的变化从 PHP 5.3.X 迁移到 PHP 5.4.XPHP 5.4.x 中的变更不向后兼容的变更新特性SAPI 模块中的变化在 PHP 5.4.x 中过时的特性变更的函数新的函数新的类和接口新的方法移除的扩展扩展中的其他变化新的全局常量INI 文件处理的变化其他变化从 PHP 5.2.x 移植到 PHP 5.3.xPHP 5.3.x 的变化不向下兼容的变化新特性Windows 支持改变SAPI 模块的改变PHP 5.3.x 中弃用的功能PHP 5.3.x 保留的功能新参数新函数新的流包装器新的流过滤器新增的类常量新增的方法新的扩展被移除的扩展Other changes to extensions新类新的全局常量INI 文件处理改变其他改变Migrating from PHP 5.1.x to PHP 5.2.xWhat has changed in PHP 5.2.xBackward Incompatible ChangesNew Error MessagesChanges in PHP datetime supportNew ParametersNew FunctionsNew MethodsRemoved ExtensionsNew ExtensionsNew ClassesNew Global ConstantsNew Class ConstantsNew INI Configuration DirectivesError ReportingOther EnhancementsMigrating from PHP 5.0.x to PHP 5.1.xKey PHP 5.1.x featuresChanges in reference handlingReading []Integer values in function parametersClass and object changesExtensionsDate/time supportChanges in database supportChecking for E_STRICT从 PHP 4 移植到 PHP 5PHP 5 中有哪些改变未向下兼容的改变CLI 和 CGI移植配置文件新函数新指令数据库新对象模型错误报告类与对象(PHP 4)继承构造函数范围解析操作符(::)parent序列化对象 - 会话中的对象魔术函数 __sleep 和 __wakeup构造函数中的引用对象的比较PHP 的调试关于调试器配置选项核心配置选项列表php.ini 配置php.ini 配置选项列表php.ini 配置段列表php.ini 核心配置选项说明扩展库列表/归类按字母顺序按归属分按状态分函数别名列表保留字列表关键词列表预定义类预定义常量资源类型列表可用过滤器列表字符串过滤器转换过滤器压缩过滤器加密过滤器所支持的套接字传输器(Socket Transports)列表Internet 领域:TCP,UDP,SSL 和 TLSUnix 领域:Unix 和 UDGPHP 类型比较表解析器代号列表用户空间命名指南全局命名空间规则提示关于本手册手册的格式关于用户注释如何阅读函数的定义(函数原型)本手册中所涉及的 PHP 版本如何得到关于 PHP 更多的信息如何帮助改进本文档如何生成手册的各种格式手册译文Creative Commons Attribution 3.0索引
文字

Zend API:深入 PHP 内核

Introduction

知者不言。

言者不知。

有时,看起来简单的PHP并不够用。尽管不够用的情况对普通的程序员很少见,而专业的程序员很快就能将PHP带到它的边界(瓶颈),从性能或功能方面看。新的功能不是生来就能被实现,是因为程序语言固有的限制和复杂,当不得不附添加巨大的默认代码库到每个简单脚本上时,就会出现这些限制和麻烦,于是需要寻找另一种方式来克服PHP这些终极缺陷。

基于上述说法,是时候接触PHP的心脏并看看它的核心了,即让PHP运行的C代码。

Warning

这些信息现在已经过时,且其中一部分仅适用于在PHP 4早期版本中用到的ZendEngine 1.0 API。

更多新的信息能在PHP源码的各种README文件和Zend网站中的» Internals章节找到。

概述

”扩展PHP“说起来容易做起来难。PHP已经进化成一个日趋成熟的源码包几十兆大小的工具。要骇客如此复杂的一个系统,不得不学习和思考。构建本章内容时,我们最终选择了“在实战中学习”的方式。这不是最科学也不是最专业的方式,但是此方式最有趣,也得出了最好的最终结果。下面的部分,你将先快速的学习到,如何获得最基本的扩展,且这些扩展立即就可运行。然后你将学习到 Zend 的高级 API 功能,这种方式将不得不试图说明(ZEND API相关的)功能,设计,建议,技巧等等。以一言蔽之,在任何实战之前这样提供一个大框架的通览。尽管这是“较好”的方法,且没有垃圾hacks生成,但是这种学习方式很难并且费力又费时,这就是我们决定采用“在实战中学习”方式的原因。

注意到尽管本章内容试图尽可能多的说明PHP内部工作机制的知识,但是不可能真正给出任何情况任何时候都可用的PHP扩展的完全指导。因为PHP包是如此庞大复杂,以致你通过实战来使自己学习时,对它的内部工作机制仅仅可达到理解的程度。所以我们鼓励你跟着源码一起学习。

什么是 Zend ? 什么是 PHP ?

Zend是语言引擎,PHP内核。PHP是从外层展现的完整系统。咋一听似乎有点模糊不清,但是其实并不复杂( 看下面).为了实现一个 web 脚本解释器,你需要三个部分:

  1. 第一:解释器部分分析输入代码,翻译代码,然后执行代码。

  2. 第二:功能部分 完成语言的功能(函数,等等)。

  3. 第三:接口部分与web通信,等等。

Zend完全参与第一部分,部分参与第二部分;PHP参与第二部分和三部分.他们一起构成完整的PHP包。实际上Zend自己仅仅构成语言核心,用预定义函数实现 PHP 非常基础部分。而 PHP 包含所有的实际形成语言突出能力的所有模块。
PHP内部结构.

以下部分将讨论PHP能在哪里扩展并如何扩展。

Extension Possibilities

As shown above, PHP can be extended primarily at three points: external modules, built-in modules, and the Zend engine. The following sections discuss these options.

External Modules

External modules can be loaded at script runtime using the function dl() . This function loads a shared object from disk and makes its functionality available to the script to which it's being bound. After the script is terminated, the external module is discarded from memory. This method has both advantages and disadvantages, as described in the following table:

Advantages Disadvantages
External modules don't require recompiling of PHP. The shared objects need to be loaded every time a script is being executed (every hit), which is very slow.
The size of PHP remains small by "outsourcing" certain functionality. External additional files clutter up the disk.
    Every script that wants to use an external module's functionality has to specifically include a call to dl() , or the extension tag in php.ini needs to be modified (which is not always a suitable solution).
To sum up, external modules are great for third-party products, small additions to PHP that are rarely used, or just for testing purposes. To develop additional functionality quickly, external modules provide the best results. For frequent usage, larger implementations, and complex code, the disadvantages outweigh the advantages.

Third parties might consider using the extension tag in php.ini to create additional external modules to PHP. These external modules are completely detached from the main package, which is a very handy feature in commercial environments. Commercial distributors can simply ship disks or archives containing only their additional modules, without the need to create fixed and solid PHP binaries that don't allow other modules to be bound to them.

Built-in Modules

Built-in modules are compiled directly into PHP and carried around with every PHP process; their functionality is instantly available to every script that's being run. Like external modules, built-in modules have advantages and disadvantages, as described in the following table:

Advantages Disadvantages
No need to load the module specifically; the functionality is instantly available. Changes to built-in modules require recompiling of PHP.
No external files clutter up the disk; everything resides in the PHP binary. The PHP binary grows and consumes more memory.
Built-in modules are best when you have a solid library of functions that remains relatively unchanged, requires better than poor-to-average performance, or is used frequently by many scripts on your site. The need to recompile PHP is quickly compensated by the benefit in speed and ease of use. However, built-in modules are not ideal when rapid development of small additions is required.

The Zend Engine

Of course, extensions can also be implemented directly in the Zend engine. This strategy is good if you need a change in the language behavior or require special functions to be built directly into the language core. In general, however, modifications to the Zend engine should be avoided. Changes here result in incompatibilities with the rest of the world, and hardly anyone will ever adapt to specially patched Zend engines. Modifications can't be detached from the main PHP sources and are overridden with the next update using the "official" source repositories. Therefore, this method is generally considered bad practice and, due to its rarity, is not covered in this book.

Source Layout

Note:

Prior to working through the rest of this chapter, you should retrieve clean, unmodified source trees of your favorite Web server. We're working with Apache (available at » http://httpd.apache.org/) and, of course, with PHP (available at » http://www.php.net/ - does it need to be said?).

Make sure that you can compile a working PHP environment by yourself! We won't go into this issue here, however, as you should already have this most basic ability when studying this chapter.

Before we start discussing code issues, you should familiarize yourself with the source tree to be able to quickly navigate through PHP's files. This is a must-have ability to implement and debug extensions.

The following table describes the contents of the major directories.

Directory Contents
php-src Main PHP source files and main header files; here you'll find all of PHP's API definitions, macros, etc. (important). Everything else is below this directory.
php-src/ext Repository for dynamic and built-in modules; by default, these are the "official" PHP modules that have been integrated into the main source tree. From PHP 4.0, it's possible to compile these standard extensions as dynamic loadable modules (at least, those that support it).
php-src/main This directory contains the main php macros and definitions. (important)
php-src/pear Directory for the PHP Extension and Application Repository. This directory contains core PEAR files.
php-src/sapi Contains the code for the different server abstraction layers.
TSRM Location of the "Thread Safe Resource Manager" (TSRM) for Zend and PHP.
ZendEngine2 Location of the Zend Engine files; here you'll find all of Zend's API definitions, macros, etc. (important).

Discussing all the files included in the PHP package is beyond the scope of this chapter. However, you should take a close look at the following files:

  • php-src/main/php.h, located in the main PHP directory. This file contains most of PHP's macro and API definitions.

  • php-src/Zend/zend.h, located in the main Zend directory. This file contains most of Zend's macros and definitions.

  • php-src/Zend/zend_API.h, also located in the Zend directory, which defines Zend's API.

You should also follow some sub-inclusions from these files; for example, the ones relating to the Zend executor, the PHP initialization file support, and such. After reading these files, take the time to navigate around the package a little to see the interdependencies of all files and modules - how they relate to each other and especially how they make use of each other. This also helps you to adapt to the coding style in which PHP is authored. To extend PHP, you should quickly adapt to this style.

Extension Conventions

Zend is built using certain conventions; to avoid breaking its standards, you should follow the rules described in the following sections.

Macros

For almost every important task, Zend ships predefined macros that are extremely handy. The tables and figures in the following sections describe most of the basic functions, structures, and macros. The macro definitions can be found mainly in zend.h and zend_API.h. We suggest that you take a close look at these files after having studied this chapter. (Although you can go ahead and read them now, not everything will make sense to you yet.)

Memory Management

Resource management is a crucial issue, especially in server software. One of the most valuable resources is memory, and memory management should be handled with extreme care. Memory management has been partially abstracted in Zend, and you should stick to this abstraction for obvious reasons: Due to the abstraction, Zend gets full control over all memory allocations. Zend is able to determine whether a block is in use, automatically freeing unused blocks and blocks with lost references, and thus prevent memory leaks. The functions to be used are described in the following table:

Function Description
emalloc() Serves as replacement for malloc() .
efree() Serves as replacement for free() .
estrdup() Serves as replacement for strdup() .
estrndup() Serves as replacement for strndup() . Faster than estrdup() and binary-safe. This is the recommended function to use if you know the string length prior to duplicating it.
ecalloc() Serves as replacement for calloc() .
erealloc() Serves as replacement for realloc() .
emalloc() , estrdup() , estrndup() , ecalloc() , and erealloc() allocate internal memory; efree() frees these previously allocated blocks. Memory handled by the e*() functions is considered local to the current process and is discarded as soon as the script executed by this process is terminated.
Warning

To allocate resident memory that survives termination of the current script, you can use malloc() and free() . This should only be done with extreme care, however, and only in conjunction with demands of the Zend API; otherwise, you risk memory leaks.

Zend also features a thread-safe resource manager to provide better native support for multithreaded Web servers. This requires you to allocate local structures for all of your global variables to allow concurrent threads to be run. Because the thread-safe mode of Zend was not finished back when this was written, it is not yet extensively covered here.

Directory and File Functions

The following directory and file functions should be used in Zend modules. They behave exactly like their C counterparts, but provide virtual working directory support on the thread level.

Zend Function Regular C Function
V_GETCWD() getcwd()
V_FOPEN() fopen()
V_OPEN() open()
V_CHDIR() chdir()
V_GETWD() getwd()
V_CHDIR_FILE() Takes a file path as an argument and changes the current working directory to that file's directory.
V_STAT() stat()
V_LSTAT() lstat()

String Handling

Strings are handled a bit differently by the Zend engine than other values such as integers, Booleans, etc., which don't require additional memory allocation for storing their values. If you want to return a string from a function, introduce a new string variable to the symbol table, or do something similar, you have to make sure that the memory the string will be occupying has previously been allocated, using the aforementioned e*() functions for allocation. (This might not make much sense to you yet; just keep it somewhere in your head for now - we'll get back to it shortly.)

Complex Types

Complex types such as arrays and objects require different treatment. Zend features a single API for these types - they're stored using hash tables.

Note:

To reduce complexity in the following source examples, we're only working with simple types such as integers at first. A discussion about creating more advanced types follows later in this chapter.

PHP's Automatic Build System

PHP 4 features an automatic build system that's very flexible. All modules reside in a subdirectory of the ext directory. In addition to its own sources, each module consists of a config.m4 file, for extension configuration. (for example, see » http://www.gnu.org/software/m4/)

All these stub files are generated automatically, along with .cvsignore, by a little shell script named ext_skel that resides in the ext directory. As argument it takes the name of the module that you want to create. The shell script then creates a directory of the same name, along with the appropriate stub files.

Step by step, the process looks like this:

:~/cvs/php4/ext:> ./ext_skel --extname=my_module
Creating directory my_module
Creating basic files: config.m4 .cvsignore my_module.c php_my_module.h CREDITS EXPERIMENTAL tests/001.phpt my_module.php [done].To use your new extension, you will have to execute the following steps:1.  $ cd ..
2.  $ vi ext/my_module/config.m4
3.  $ ./buildconf
4.  $ ./configure --[with|enable]-my_module
5.  $ make
6.  $ ./php -f ext/my_module/my_module.php
7.  $ vi ext/my_module/my_module.c
8.  $ makeRepeat steps 3-6 until you are satisfied with ext/my_module/config.m4 and
step 6 confirms that your module is compiled into PHP. Then, start writing
code and repeat the last two steps as often as necessary.
This instruction creates the aforementioned files. To include the new module in the automatic configuration and build process, you have to run buildconf, which regenerates the configure script by searching through the ext directory and including all found config.m4 files.

The default config.m4 shown in The default config.m4. is a bit more complex:

Example #1 The default config.m4.

dnl $Id: build.xml 297078 2010-03-29 16:25:51Z degeberg $
dnl config.m4 for extension my_modulednl Comments in this file start with the string 'dnl'.
dnl Remove where necessary. This file will not work
dnl without editing.dnl If your extension references something external, use with:dnl PHP_ARG_WITH(my_module, for my_module support,
dnl Make sure that the comment is aligned:
dnl [  --with-my_module             Include my_module support])dnl Otherwise use enable:dnl PHP_ARG_ENABLE(my_module, whether to enable my_module support,
dnl Make sure that the comment is aligned:
dnl [  --enable-my_module           Enable my_module support])if test "$PHP_MY_MODULE" != "no"; then
  dnl Write more examples of tests here...  dnl # --with-my_module -> check with-path
  dnl SEARCH_PATH="/usr/local /usr"     # you might want to change this
  dnl SEARCH_FOR="/include/my_module.h"  # you most likely want to change this
  dnl if test -r $PHP_MY_MODULE/; then # path given as parameter
  dnl   MY_MODULE_DIR=$PHP_MY_MODULE
  dnl else # search default path list
  dnl   AC_MSG_CHECKING([for my_module files in default path])
  dnl   for i in $SEARCH_PATH ; do
  dnl     if test -r $i/$SEARCH_FOR; then
  dnl       MY_MODULE_DIR=$i
  dnl       AC_MSG_RESULT(found in $i)
  dnl     fi
  dnl   done
  dnl fi
  dnl
  dnl if test -z "$MY_MODULE_DIR"; then
  dnl   AC_MSG_RESULT([not found])
  dnl   AC_MSG_ERROR([Please reinstall the my_module distribution])
  dnl fi  dnl # --with-my_module -> add include path
  dnl PHP_ADD_INCLUDE($MY_MODULE_DIR/include)  dnl # --with-my_module -> chech for lib and symbol presence
  dnl LIBNAME=my_module # you may want to change this
  dnl LIBSYMBOL=my_module # you most likely want to change this   dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
  dnl [
  dnl   PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $MY_MODULE_DIR/lib, MY_MODULE_SHARED_LIBADD)
  dnl   AC_DEFINE(HAVE_MY_MODULELIB,1,[ ])
  dnl ],[
  dnl   AC_MSG_ERROR([wrong my_module lib version or lib not found])
  dnl ],[
  dnl   -L$MY_MODULE_DIR/lib -lm -ldl
  dnl ])
  dnl
  dnl PHP_SUBST(MY_MODULE_SHARED_LIBADD)  PHP_NEW_EXTENSION(my_module, my_module.c, $ext_shared)
fi

If you're unfamiliar with M4 files (now is certainly a good time to get familiar), this might be a bit confusing at first; but it's actually quite easy.

Note: Everything prefixed with dnl is treated as a comment and is not parsed.

The config.m4 file is responsible for parsing the command-line options passed to configure at configuration time. This means that it has to check for required external files and do similar configuration and setup tasks.

The default file creates two configuration directives in the configure script: --with-my_module and --enable-my_module. Use the first option when referring external files (such as the --with-apache directive that refers to the Apache directory). Use the second option when the user simply has to decide whether to enable your extension. Regardless of which option you use, you should uncomment the other, unnecessary one; that is, if you're using --enable-my_module, you should remove support for --with-my_module, and vice versa.

By default, the config.m4 file created by ext_skel accepts both directives and automatically enables your extension. Enabling the extension is done by using the PHP_EXTENSION macro. To change the default behavior to include your module into the PHP binary when desired by the user (by explicitly specifying --enable-my_module or --with-my_module), change the test for $PHP_MY_MODULE to == "yes":

if test "$PHP_MY_MODULE" == "yes"; then dnl
    Action.. PHP_EXTENSION(my_module, $ext_shared)
    fi
This would require you to use --enable-my_module each time when reconfiguring and recompiling PHP.

Note: Be sure to run buildconf every time you change config.m4!

We'll go into more details on the M4 macros available to your configuration scripts later in this chapter. For now, we'll simply use the default files.

Creating Extensions

We'll start with the creation of a very simple extension at first, which basically does nothing more than implement a function that returns the integer it receives as parameter. A simple extension. shows the source.

Example #2 A simple extension.

#include "php.h"
ZEND_FUNCTION(first_module);
zend_function_entry firstmod_functions[] =
{
    ZEND_FE(first_module, NULL)
    {NULL, NULL, NULL}
};
zend_module_entry firstmod_module_entry =
{
    STANDARD_MODULE_HEADER,
    "First Module",
    firstmod_functions,
    NULL, 
    NULL, 
    NULL, 
    NULL, 
    NULL,
    NO_VERSION_YET,
    STANDARD_MODULE_PROPERTIES
};
#if COMPILE_DL_FIRST_MODULE
ZEND_GET_MODULE(firstmod)
#endif
ZEND_FUNCTION(first_module)
{
    long parameter;    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &parameter) == FAILURE) {
        return;
    }    RETURN_LONG(parameter);
}

This code contains a complete PHP module. We'll explain the source code in detail shortly, but first we'd like to discuss the build process. (This will allow the impatient to experiment before we dive into API discussions.)

Note:

The example source makes use of some features introduced with the Zend version used in PHP 4.1.0 and above, it won't compile with older PHP 4.0.x versions.

Compiling Modules

There are basically two ways to compile modules:

  • Use the provided "make" mechanism in the ext directory, which also allows building of dynamic loadable modules.

  • Compile the sources manually.

The first method should definitely be favored, since, as of PHP 4.0, this has been standardized into a sophisticated build process. The fact that it is so sophisticated is also its drawback, unfortunately - it's hard to understand at first. We'll provide a more detailed introduction to this later in the chapter, but first let's work with the default files.

The second method is good for those who (for some reason) don't have the full PHP source tree available, don't have access to all files, or just like to juggle with their keyboard. These cases should be extremely rare, but for the sake of completeness we'll also describe this method.

Compiling Using Make

To compile the sample sources using the standard mechanism, copy all their subdirectories to the ext directory of your PHP source tree. Then run buildconf, which will create an updated configure script containing appropriate options for the new extension. By default, all the sample sources are disabled, so you don't have to fear breaking your build process.

After you run buildconf, configure --help shows the following additional modules:

--enable-array_experiments   BOOK: Enables array experiments
  --enable-call_userland       BOOK: Enables userland module
  --enable-cross_conversion    BOOK: Enables cross-conversion module
  --enable-first_module        BOOK: Enables first module
  --enable-infoprint           BOOK: Enables infoprint module
  --enable-reference_test      BOOK: Enables reference test module
  --enable-resource_test       BOOK: Enables resource test module
  --enable-variable_creation   BOOK: Enables variable-creation module

The module shown earlier in A simple extension. can be enabled with --enable-first_module or --enable-first_module=yes.

Compiling Manually

To compile your modules manually, you need the following commands:

Action Command
Compiling cc -fpic -DCOMPILE_DL_FIRST_MODULE=1 -I/usr/local/include -I. -I.. -I../Zend -c -o <your_object_file> <your_c_file>
Linking cc -shared -L/usr/local/lib -rdynamic -o <your_module_file> <your_object_file(s)>
The command to compile the module simply instructs the compiler to generate position-independent code (-fpic shouldn't be omitted) and additionally defines the constant COMPILE_DL_FIRST_MODULE to tell the module code that it's compiled as a dynamically loadable module (the test module above checks for this; we'll discuss it shortly). After these options, it specifies a number of standard include paths that should be used as the minimal set to compile the source files.

Note: All include paths in the example are relative to the directory ext. If you're compiling from another directory, change the pathnames accordingly. Required items are the PHP directory, the Zend directory, and (if necessary), the directory in which your module resides.

The link command is also a plain vanilla command instructing linkage as a dynamic module.

You can include optimization options in the compilation command, although these have been omitted in this example (but some are included in the makefile template described in an earlier section).

Note: Compiling and linking manually as a static module into the PHP binary involves very long instructions and thus is not discussed here. (It's not very efficient to type all those commands.)

Using Extensions

Depending on the build process you selected, you should either end up with a new PHP binary to be linked into your Web server (or run as CGI), or with an .so (shared object) file. If you compiled the example file first_module.c as a shared object, your result file should be first_module.so. To use it, you first have to copy it to a place from which it's accessible to PHP. For a simple test procedure, you can copy it to your htdocs directory and try it with the source in A test file for first_module.so.. If you compiled it into the PHP binary, omit the call to dl() , as the module's functionality is instantly available to your scripts.

Warning

For security reasons, you should not put your dynamic modules into publicly accessible directories. Even though it can be done and it simplifies testing, you should put them into a separate directory in production environments.

Example #3 A test file for first_module.so.

<?php
    
// remove next comment if necessary
// dl("first_module.so"); 

$param  2 ;
$return  first_module ( $param );

print(
"We sent ' $param ' and got ' $return '" );

?>

Calling this PHP file should output the following:

We sent '2' and got '2'

If required, the dynamic loadable module is loaded by calling the dl() function. This function looks for the specified shared object, loads it, and makes its functions available to PHP. The module exports the function first_module() , which accepts a single parameter, converts it to an integer, and returns the result of the conversion.

If you've gotten this far, congratulations! You just built your first extension to PHP.

Troubleshooting

Actually, not much troubleshooting can be done when compiling static or dynamic modules. The only problem that could arise is that the compiler will complain about missing definitions or something similar. In this case, make sure that all header files are available and that you specified their path correctly in the compilation command. To be sure that everything is located correctly, extract a clean PHP source tree and use the automatic build in the ext directory with the fresh files; this will guarantee a safe compilation environment. If this fails, try manual compilation.

PHP might also complain about missing functions in your module. (This shouldn't happen with the sample sources if you didn't modify them.) If the names of external functions you're trying to access from your module are misspelled, they'll remain as "unlinked symbols" in the symbol table. During dynamic loading and linkage by PHP, they won't resolve because of the typing errors - there are no corresponding symbols in the main binary. Look for incorrect declarations in your module file or incorrectly written external references. Note that this problem is specific to dynamic loadable modules; it doesn't occur with static modules. Errors in static modules show up at compile time.

Source Discussion

Now that you've got a safe build environment and you're able to include the modules into PHP files, it's time to discuss how everything works.

Module Structure

All PHP modules follow a common structure:

  • Header file inclusions (to include all required macros, API definitions, etc.)

  • C declaration of exported functions (required to declare the Zend function block)

  • Declaration of the Zend function block

  • Declaration of the Zend module block

  • Implementation of get_module()

  • Implementation of all exported functions

Header File Inclusions

The only header file you really have to include for your modules is php.h, located in the PHP directory. This file makes all macros and API definitions required to build new modules available to your code.

Tip: It's good practice to create a separate header file for your module that contains module-specific definitions. This header file should contain all the forward definitions for exported functions and include php.h. If you created your module using ext_skel you already have such a header file prepared.

Declaring Exported Functions

To declare functions that are to be exported (i.e., made available to PHP as new native functions), Zend provides a set of macros. A sample declaration looks like this:

ZEND_FUNCTION ( my_function );

ZEND_FUNCTION declares a new C function that complies with Zend's internal API. This means that the function is of type void and accepts INTERNAL_FUNCTION_PARAMETERS (another macro) as parameters. Additionally, it prefixes the function name with zif. The immediately expanded version of the above definitions would look like this:

void zif_my_function ( INTERNAL_FUNCTION_PARAMETERS );
Expanding INTERNAL_FUNCTION_PARAMETERS results in the following:
void zif_my_function( int ht
                    , zval * return_value
                    , zval * this_ptr
                    , int return_value_used
                    , zend_executor_globals * executor_globals
                    );

Since the interpreter and executor core have been separated from the main PHP package, a second API defining macros and function sets has evolved: the Zend API. As the Zend API now handles quite a few of the responsibilities that previously belonged to PHP, a lot of PHP functions have been reduced to macros aliasing to calls into the Zend API. The recommended practice is to use the Zend API wherever possible, as the old API is only preserved for compatibility reasons. For example, the types zval and pval are identical. zval is Zend's definition; pval is PHP's definition (actually, pval is an alias for zval now). As the macro INTERNAL_FUNCTION_PARAMETERS is a Zend macro, the above declaration contains zval. When writing code, you should always use zval to conform to the new Zend API.

The parameter list of this declaration is very important; you should keep these parameters in mind (see Zend's Parameters to Functions Called from PHP for descriptions).

Zend's Parameters to Functions Called from PHP
Parameter Description
ht The number of arguments passed to the Zend function. You should not touch this directly, but instead use ZEND_NUM_ARGS() to obtain the value.
return_value This variable is used to pass any return values of your function back to PHP. Access to this variable is best done using the predefined macros. For a description of these see below.
this_ptr Using this variable, you can gain access to the object in which your function is contained, if it's used within an object. Use the function getThis() to obtain this pointer.
return_value_used This flag indicates whether an eventual return value from this function will actually be used by the calling script. 0 indicates that the return value is not used; 1 indicates that the caller expects a return value. Evaluation of this flag can be done to verify correct usage of the function as well as speed optimizations in case returning a value requires expensive operations (for an example, see how array.c makes use of this).
executor_globals This variable points to global settings of the Zend engine. You'll find this useful when creating new variables, for example (more about this later). The executor globals can also be introduced to your function by using the macro TSRMLS_FETCH().

Declaration of the Zend Function Block

Now that you have declared the functions to be exported, you also have to introduce them to Zend. Introducing the list of functions is done by using an array of zend_function_entry. This array consecutively contains all functions that are to be made available externally, with the function's name as it should appear in PHP and its name as defined in the C source. Internally, zend_function_entry is defined as shown in Internal declaration of zend_function_entry..

Example #4 Internal declaration of zend_function_entry.

typedef struct _zend_function_entry {
    char *fname;
    void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
    unsigned char *func_arg_types;
} zend_function_entry;
Entry Description
fname Denotes the function name as seen in PHP (for example, fopen, mysql_connect, or, in our example, first_module).
handler Pointer to the C function responsible for handling calls to this function. For example, see the standard macro INTERNAL_FUNCTION_PARAMETERS discussed earlier.
func_arg_types Allows you to mark certain parameters so that they're forced to be passed by reference. You usually should set this to NULL.
In the example above, the declaration looks like this:
zend_function_entry firstmod_functions[] =
{
    ZEND_FE(first_module, NULL)
    {NULL, NULL, NULL}
};
You can see that the last entry in the list always has to be {NULL, NULL, NULL}. This marker has to be set for Zend to know when the end of the list of exported functions is reached.

Note:

You cannot use the predefined macros for the end marker, as these would try to refer to a function named "NULL"!

The macro ZEND_FE (short for 'Zend Function Entry') simply expands to a structure entry in zend_function_entry. Note that these macros introduce a special naming scheme to your functions - your C functions will be prefixed with zif_, meaning that ZEND_FE(first_module) will refer to a C function zif_first_module() . If you want to mix macro usage with hand-coded entries (not a good practice), keep this in mind.

Tip: Compilation errors that refer to functions named zif_*() relate to functions defined with ZEND_FE.

Macros for Defining Functions shows a list of all the macros that you can use to define functions.

Macros for Defining Functions
Macro Name Description
ZEND_FE(name, arg_types) Defines a function entry of the name name in zend_function_entry. Requires a corresponding C function. arg_types needs to be set to NULL. This function uses automatic C function name generation by prefixing the PHP function name with zif_. For example, ZEND_FE("first_module", NULL) introduces a function first_module() to PHP and links it to the C function zif_first_module() . Use in conjunction with ZEND_FUNCTION.
ZEND_NAMED_FE(php_name, name, arg_types) Defines a function that will be available to PHP by the name php_name and links it to the corresponding C function name. arg_types needs to be set to NULL. Use this function if you don't want the automatic name prefixing introduced by ZEND_FE. Use in conjunction with ZEND_NAMED_FUNCTION.
ZEND_FALIAS(name, alias, arg_types) Defines an alias named alias for name. arg_types needs to be set to NULL. Doesn't require a corresponding C function; refers to the alias target instead.
PHP_FE(name, arg_types) Old PHP API equivalent of ZEND_FE.
PHP_NAMED_FE(runtime_name, name, arg_types) Old PHP API equivalent of ZEND_NAMED_FE.

Note: You can't use ZEND_FE in conjunction with PHP_FUNCTION, or PHP_FE in conjunction with ZEND_FUNCTION. However, it's perfectly legal to mix ZEND_FE and ZEND_FUNCTION with PHP_FE and PHP_FUNCTION when staying with the same macro set for each function to be declared. But mixing is not recommended; instead, you're advised to use the ZEND_* macros only.

Declaration of the Zend Module Block

This block is stored in the structure zend_module_entry and contains all necessary information to describe the contents of this module to Zend. You can see the internal definition of this module in Internal declaration of zend_module_entry..

Example #5 Internal declaration of zend_module_entry.

typedef struct _zend_module_entry zend_module_entry;
     
    struct _zend_module_entry {
    unsigned short size;
    unsigned int zend_api;
    unsigned char zend_debug;
    unsigned char zts;
    char *name;
    zend_function_entry *functions;
    int (*module_startup_func)(INIT_FUNC_ARGS);
    int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
    int (*request_startup_func)(INIT_FUNC_ARGS);
    int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
    void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
    char *version;[ Rest of the structure is not interesting here ]};
Entry Description
size, zend_api, zend_debug and zts Usually filled with the "STANDARD_MODULE_HEADER", which fills these four members with the size of the whole zend_module_entry, the ZEND_MODULE_API_NO, whether it is a debug build or normal build (ZEND_DEBUG) and if ZTS is enabled (USING_ZTS).
name Contains the module name (for example, "File functions", "Socket functions", "Crypt", etc.). This name will show up in phpinfo() , in the section "Additional Modules."
functions Points to the Zend function block, discussed in the preceding section.
module_startup_func This function is called once upon module initialization and can be used to do one-time initialization steps (such as initial memory allocation, etc.). To indicate a failure during initialization, return FAILURE; otherwise, SUCCESS. To mark this field as unused, use NULL. To declare a function, use the macro ZEND_MINIT.
module_shutdown_func This function is called once upon module shutdown and can be used to do one-time deinitialization steps (such as memory deallocation). This is the counterpart to module_startup_func() . To indicate a failure during deinitialization, return FAILURE; otherwise, SUCCESS. To mark this field as unused, use NULL. To declare a function, use the macro ZEND_MSHUTDOWN.
request_startup_func This function is called once upon every page request and can be used to do one-time initialization steps that are required to process a request. To indicate a failure here, return FAILURE; otherwise, SUCCESS. Note: As dynamic loadable modules are loaded only on page requests, the request startup function is called right after the module startup function (both initialization events happen at the same time). To mark this field as unused, use NULL. To declare a function, use the macro ZEND_RINIT.
request_shutdown_func This function is called once after every page request and works as counterpart to request_startup_func() . To indicate a failure here, return FAILURE; otherwise, SUCCESS. Note: As dynamic loadable modules are loaded only on page requests, the request shutdown function is immediately followed by a call to the module shutdown handler (both deinitialization events happen at the same time). To mark this field as unused, use NULL. To declare a function, use the macro ZEND_RSHUTDOWN.
info_func When phpinfo() is called in a script, Zend cycles through all loaded modules and calls this function. Every module then has the chance to print its own "footprint" into the output page. Generally this is used to dump environmental or statistical information. To mark this field as unused, use NULL. To declare a function, use the macro ZEND_MINFO.
version The version of the module. You can use NO_VERSION_YET if you don't want to give the module a version number yet, but we really recommend that you add a version string here. Such a version string can look like this (in chronological order): "2.5-dev", "2.5RC1", "2.5" or "2.5pl3".
Remaining structure elements These are used internally and can be prefilled by using the macro STANDARD_MODULE_PROPERTIES_EX. You should not assign any values to them. Use STANDARD_MODULE_PROPERTIES_EX only if you use global startup and shutdown functions; otherwise, use STANDARD_MODULE_PROPERTIES directly.

In our example, this structure is implemented as follows:

zend_module_entry firstmod_module_entry =
{
    STANDARD_MODULE_HEADER,
    "First Module",
    firstmod_functions,
    NULL, NULL, NULL, NULL, NULL,
    NO_VERSION_YET,
    STANDARD_MODULE_PROPERTIES,
};
This is basically the easiest and most minimal set of values you could ever use. The module name is set to First Module, then the function list is referenced, after which all startup and shutdown functions are marked as being unused.

For reference purposes, you can find a list of the macros involved in declared startup and shutdown functions in Macros to Declare Startup and Shutdown Functions. These are not used in our basic example yet, but will be demonstrated later on. You should make use of these macros to declare your startup and shutdown functions, as these require special arguments to be passed (INIT_FUNC_ARGS and SHUTDOWN_FUNC_ARGS), which are automatically included into the function declaration when using the predefined macros. If you declare your functions manually and the PHP developers decide that a change in the argument list is necessary, you'll have to change your module sources to remain compatible.

Macros to Declare Startup and Shutdown Functions
Macro Description
ZEND_MINIT(module) Declares a function for module startup. The generated name will be zend_minit_<module> (for example, zend_minit_first_module). Use in conjunction with ZEND_MINIT_FUNCTION.
ZEND_MSHUTDOWN(module) Declares a function for module shutdown. The generated name will be zend_mshutdown_<module> (for example, zend_mshutdown_first_module). Use in conjunction with ZEND_MSHUTDOWN_FUNCTION.
ZEND_RINIT(module) Declares a function for request startup. The generated name will be zend_rinit_<module> (for example, zend_rinit_first_module). Use in conjunction with ZEND_RINIT_FUNCTION.
ZEND_RSHUTDOWN(module) Declares a function for request shutdown. The generated name will be zend_rshutdown_<module> (for example, zend_rshutdown_first_module). Use in conjunction with ZEND_RSHUTDOWN_FUNCTION.
ZEND_MINFO(module) Declares a function for printing module information, used when phpinfo() is called. The generated name will be zend_info_<module> (for example, zend_info_first_module). Use in conjunction with ZEND_MINFO_FUNCTION.

Creation of get_module()

This function is special to all dynamic loadable modules. Take a look at the creation via the ZEND_GET_MODULE macro first:

#if COMPILE_DL_FIRSTMOD
     ZEND_GET_MODULE(firstmod) 
#endif

The function implementation is surrounded by a conditional compilation statement. This is needed since the function get_module() is only required if your module is built as a dynamic extension. By specifying a definition of COMPILE_DL_FIRSTMOD in the compiler command (see above for a discussion of the compilation instructions required to build a dynamic extension), you can instruct your module whether you intend to build it as a dynamic extension or as a built-in module. If you want a built-in module, the implementation of get_module() is simply left out.

get_module() is called by Zend at load time of the module. You can think of it as being invoked by the dl() call in your script. Its purpose is to pass the module information block back to Zend in order to inform the engine about the module contents.

If you don't implement a get_module() function in your dynamic loadable module, Zend will compliment you with an error message when trying to access it.

Implementation of All Exported Functions

Implementing the exported functions is the final step. The example function in first_module looks like this:

ZEND_FUNCTION(first_module)
{
    long parameter;    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &parameter) == FAILURE) {
        return;
    }    RETURN_LONG(parameter);
}
The function declaration is done using ZEND_FUNCTION, which corresponds to ZEND_FE in the function entry table (discussed earlier).

After the declaration, code for checking and retrieving the function's arguments, argument conversion, and return value generation follows (more on this later).

Summary

That's it, basically - there's nothing more to implementing PHP modules. Built-in modules are structured similarly to dynamic modules, so, equipped with the information presented in the previous sections, you'll be able to fight the odds when encountering PHP module source files.

Now, in the following sections, read on about how to make use of PHP's internals to build powerful extensions.

Accepting Arguments

One of the most important issues for language extensions is accepting and dealing with data passed via arguments. Most extensions are built to deal with specific input data (or require parameters to perform their specific actions), and function arguments are the only real way to exchange data between the PHP level and the C level. Of course, there's also the possibility of exchanging data using predefined global values (which is also discussed later), but this should be avoided by all means, as it's extremely bad practice.

PHP doesn't make use of any formal function declarations; this is why call syntax is always completely dynamic and never checked for errors. Checking for correct call syntax is left to the user code. For example, it's possible to call a function using only one argument at one time and four arguments the next time - both invocations are syntactically absolutely correct.

Determining the Number of Arguments

Since PHP doesn't have formal function definitions with support for call syntax checking, and since PHP features variable arguments, sometimes you need to find out with how many arguments your function has been called. You can use the ZEND_NUM_ARGS macro in this case. In previous versions of PHP, this macro retrieved the number of arguments with which the function has been called based on the function's hash table entry, ht, which is passed in the INTERNAL_FUNCTION_PARAMETERS list. As ht itself now contains the number of arguments that have been passed to the function, ZEND_NUM_ARGS has been stripped down to a dummy macro (see its definition in zend_API.h). But it's still good practice to use it, to remain compatible with future changes in the call interface. Note: The old PHP equivalent of this macro is ARG_COUNT.

The following code checks for the correct number of arguments:

if(ZEND_NUM_ARGS() != 2) WRONG_PARAM_COUNT;
If the function is not called with two arguments, it exits with an error message. The code snippet above makes use of the tool macro WRONG_PARAM_COUNT, which can be used to generate a standard error message like:
"Warning: Wrong parameter count for firstmodule() in /home/www/htdocs/firstmod.php on line 5"

This macro prints a default error message and then returns to the caller. Its definition can also be found in zend_API.h and looks like this:

ZEND_API void wrong_param_count(void);#define WRONG_PARAM_COUNT { wrong_param_count(); return; }
As you can see, it calls an internal function named wrong_param_count() that's responsible for printing the warning. For details on generating customized error messages, see the later section "Printing Information."

Retrieving Arguments

Note: New parameter parsing API

This chapter documents the new Zend parameter parsing API introduced by Andrei Zmievski. It was introduced in the development stage between PHP 4.0.6 and 4.1.0.

Parsing parameters is a very common operation and it may get a bit tedious. It would also be nice to have standardized error checking and error messages. Since PHP 4.1.0, there is a way to do just that by using the new parameter parsing API. It greatly simplifies the process of receiving parameters, but it has a drawback in that it can't be used for functions that expect variable number of parameters. But since the vast majority of functions do not fall into those categories, this parsing API is recommended as the new standard way.

The prototype for parameter parsing function looks like this:

int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...);
The first argument to this function is supposed to be the number of actual parameters passed to your function, so ZEND_NUM_ARGS() can be used for that. The second parameter should always be TSRMLS_CC macro. The third argument is a string that specifies the number and types of arguments your function is expecting, similar to how printf format string specifies the number and format of the output values it should operate on. And finally the rest of the arguments are pointers to variables which should receive the values from the parameters.

zend_parse_parameters() also performs type conversions whenever possible, so that you always receive the data in the format you asked for. Any type of scalar can be converted to another one, but conversions between complex types (arrays, objects, and resources) and scalar types are not allowed.

If the parameters could be obtained successfully and there were no errors during type conversion, the function will return SUCCESS, otherwise it will return FAILURE. The function will output informative error messages, if the number of received parameters does not match the requested number, or if type conversion could not be performed.

Here are some sample error messages:


Warning - ini_get_all() requires at most 1 parameter, 2 given
Warning - wddx_deserialize() expects parameter 1 to be string, array given
Of course each error message is accompanied by the filename and line number on which it occurs.

Here is the full list of type specifiers:

  • l - long

  • d - double

  • s - string (with possible null bytes) and its length

  • b - boolean

  • r - resource, stored in zval*

  • a - array, stored in zval*

  • o - object (of any class), stored in zval*

  • O - object (of class specified by class entry), stored in zval*

  • z - the actual zval*

The following characters also have a meaning in the specifier string:
  • | - indicates that the remaining parameters are optional. The storage variables corresponding to these parameters should be initialized to default values by the extension, since they will not be touched by the parsing function if the parameters are not passed.

  • / - the parsing function will call SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows, to provide a copy of the parameter, unless it's a reference.

  • ! - the parameter it follows can be of specified type or NULL (only applies to a, o, O, r, and z). If NULL value is passed by the user, the storage pointer will be set to NULL.

The best way to illustrate the usage of this function is through examples:

long l;
char *s;
int s_len;
zval *param;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
                          "lsz", &l, &s, &s_len, &param) == FAILURE) {
    return;
}
zval *obj;
double d = 0.5;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
                          "O|d", &obj, my_ce, &d) == FAILURE) {
    return;
}
zval *obj;
zval *arr;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O!a", &obj, &arr) == FAILURE) {
    return;
}
zval *arr;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &arr) == FAILURE) {
    return;
}
zval *z;
zend_bool b;
zval *r;
if (zend_parse_parameters(3, "zbr!", &z, &b, &r) == FAILURE) {
    return;
}

Note that in the last example we pass 3 for the number of received parameters, instead of ZEND_NUM_ARGS() . What this lets us do is receive the least number of parameters if our function expects a variable number of them. Of course, if you want to operate on the rest of the parameters, you will have to use zend_get_parameters_array_ex() to obtain them.

The parsing function has an extended version that allows for an additional flags argument that controls its actions.

int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...);

The only flag you can pass currently is ZEND_PARSE_PARAMS_QUIET, which instructs the function to not output any error messages during its operation. This is useful for functions that expect several sets of completely different arguments, but you will have to output your own error messages.

For example, here is how you would get either a set of three longs or a string:

long l1, l2, l3;
char *s;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
                             ZEND_NUM_ARGS() TSRMLS_CC,
                             "lll", &l1, &l2, &l3) == SUCCESS) {
    
} else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
                                    ZEND_NUM_ARGS(), "s", &s, &s_len) == SUCCESS) {
    
} else {
    php_error(E_WARNING, "%s() takes either three long values or a string as argument",
              get_active_function_name(TSRMLS_C));
    return;
}

With all the abovementioned ways of receiving function parameters you should have a good handle on this process. For even more example, look through the source code for extensions that are shipped with PHP - they illustrate every conceivable situation.

Old way of retrieving arguments (deprecated)

Note: Deprecated parameter parsing API

This API is deprecated and superseded by the new ZEND parameter parsing API.

After having checked the number of arguments, you need to get access to the arguments themselves. This is done with the help of zend_get_parameters_ex() :

zval **parameter;if(zend_get_parameters_ex(1, &parameter) != SUCCESS)
  WRONG_PARAM_COUNT;
All arguments are stored in a zval container, which needs to be pointed to twice. The snippet above tries to retrieve one argument and make it available to us via the parameter pointer.

zend_get_parameters_ex() accepts at least two arguments. The first argument is the number of arguments to retrieve (which should match the number of arguments with which the function has been called; this is why it's important to check for correct call syntax). The second argument (and all following arguments) are pointers to pointers to pointers to zvals. (Confusing, isn't it?) All these pointers are required because Zend works internally with **zval; to adjust a local **zval in our function, zend_get_parameters_ex() requires a pointer to it.

The return value of zend_get_parameters_ex() can either be SUCCESS or FAILURE, indicating (unsurprisingly) success or failure of the argument processing. A failure is most likely related to an incorrect number of arguments being specified, in which case you should exit with WRONG_PARAM_COUNT.

To retrieve more than one argument, you can use a similar snippet:

zval **param1, **param2, **param3, **param4;
     
if(zend_get_parameters_ex(4, &param1, &param2, &param3, &param4) != SUCCESS)
    WRONG_PARAM_COUNT;

zend_get_parameters_ex() only checks whether you're trying to retrieve too many parameters. If the function is called with five arguments, but you're only retrieving three of them with zend_get_parameters_ex() , you won't get an error but will get the first three parameters instead. Subsequent calls of zend_get_parameters_ex() won't retrieve the remaining arguments, but will get the same arguments again.

Dealing with a Variable Number of Arguments/Optional Parameters

If your function is meant to accept a variable number of arguments, the snippets just described are sometimes suboptimal solutions. You have to create a line calling zend_get_parameters_ex() for every possible number of arguments, which is often unsatisfying.

For this case, you can use the function zend_get_parameters_array_ex() , which accepts the number of parameters to retrieve and an array in which to store them:

zval **parameter_array[4];
argument_count = ZEND_NUM_ARGS();

if(argument_count < 2 || argument_count > 4)
    WRONG_PARAM_COUNT;
if(zend_get_parameters_array_ex(argument_count, parameter_array) != SUCCESS)
    WRONG_PARAM_COUNT;
First, the number of arguments is checked to make sure that it's in the accepted range. After that, zend_get_parameters_array_ex() is used to fill parameter_array with valid pointers to the argument values.

A very clever implementation of this can be found in the code handling PHP's fsockopen() located in ext/standard/fsock.c, as shown in PHP's implementation of variable arguments in fsockopen().. Don't worry if you don't know all the functions used in this source yet; we'll get to them shortly.

Example #6 PHP's implementation of variable arguments in fsockopen().

pval **args[5];
int *sock=emalloc(sizeof(int));
int *sockp;
int arg_count=ARG_COUNT(ht);
int socketd = -1;
unsigned char udp = 0;
struct timeval timeout = { 60, 0 };
unsigned short portno;
unsigned long conv;
char *key = NULL;
FLS_FETCH();if (arg_count > 5 || arg_count < 2 || zend_get_parameters_array_ex(arg_count,args)==FAILURE) {
    CLOSE_SOCK(1);
    WRONG_PARAM_COUNT;
}switch(arg_count) {
    case 5:
        convert_to_double_ex(args[4]);
        conv = (unsigned long) (Z_DVAL_PP(args[4]) * 1000000.0);
        timeout.tv_sec = conv / 1000000;
        timeout.tv_usec = conv % 1000000;
        
    case 4:
        if (!PZVAL_IS_REF(*args[3])) {
            php_error(E_WARNING,"error string argument to fsockopen not passed by reference");
        }
        pval_copy_constructor(*args[3]);
        ZVAL_EMPTY_STRING(*args[3]);
        
    case 3:
        if (!PZVAL_IS_REF(*args[2])) {
            php_error(E_WARNING,"error argument to fsockopen not passed by reference");
            return;
        }
        ZVAL_LONG(*args[2], 0);
        break;
}convert_to_string_ex(args[0]);
convert_to_long_ex(args[1]);
portno = (unsigned short) Z_LVAL_P(args[1]);key = emalloc(Z_STRLEN_P(args[0]) + 10);

fsockopen() accepts two, three, four, or five parameters. After the obligatory variable declarations, the function checks for the correct range of arguments. Then it uses a fall-through mechanism in a switch() statement to deal with all arguments. The switch() statement starts with the maximum number of arguments being passed (five). After that, it automatically processes the case of four arguments being passed, then three, by omitting the otherwise obligatory break keyword in all stages. After having processed the last case, it exits the switch() statement and does the minimal argument processing needed if the function is invoked with only two arguments.

This multiple-stage type of processing, similar to a stairway, allows convenient processing of a variable number of arguments.

Accessing Arguments

To access arguments, it's necessary for each argument to have a clearly defined type. Again, PHP's extremely dynamic nature introduces some quirks. Because PHP never does any kind of type checking, it's possible for a caller to pass any kind of data to your functions, whether you want it or not. If you expect an integer, for example, the caller might pass an array, and vice versa - PHP simply won't notice.

To work around this, you have to use a set of API functions to force a type conversion on every argument that's being passed (see Argument Conversion Functions).

Note: All conversion functions expect a **zval as parameter.

Argument Conversion Functions
Function Description
convert_to_boolean_ex() Forces conversion to a Boolean type. Boolean values remain untouched. Longs, doubles, and strings containing 0 as well as NULL values will result in Boolean 0 (FALSE). Arrays and objects are converted based on the number of entries or properties, respectively, that they have. Empty arrays and objects are converted to FALSE; otherwise, to TRUE. All other values result in a Boolean 1 (TRUE).
convert_to_long_ex() Forces conversion to a long, the default integer type. NULL values, Booleans, resources, and of course longs remain untouched. Doubles are truncated. Strings containing an integer are converted to their corresponding numeric representation, otherwise resulting in 0. Arrays and objects are converted to 0 if empty, 1 otherwise.
convert_to_double_ex() Forces conversion to a double, the default floating-point type. NULL values, Booleans, resources, longs, and of course doubles remain untouched. Strings containing a number are converted to their corresponding numeric representation, otherwise resulting in 0.0. Arrays and objects are converted to 0.0 if empty, 1.0 otherwise.
convert_to_string_ex() Forces conversion to a string. Strings remain untouched. NULL values are converted to an empty string. Booleans containing TRUE are converted to "1", otherwise resulting in an empty string. Longs and doubles are converted to their corresponding string representation. Arrays are converted to the string "Array" and objects to the string "Object".
convert_to_array_ex(value) Forces conversion to an array. Arrays remain untouched. Objects are converted to an array by assigning all their properties to the array table. All property names are used as keys, property contents as values. NULL values are converted to an empty array. All other values are converted to an array that contains the specific source value in the element with the key 0.
convert_to_object_ex(value) Forces conversion to an object. Objects remain untouched. NULL values are converted to an empty object. Arrays are converted to objects by introducing their keys as properties into the objects and their values as corresponding property contents in the object. All other types result in an object with the property scalar , having the corresponding source value as content.
convert_to_null_ex(value) Forces the type to become a NULL value, meaning empty.

Note:

You can find a demonstration of the behavior in cross_conversion.php on the accompanying CD-ROM.

Cross-conversion behavior of PHP.

Using these functions on your arguments will ensure type safety for all data that's passed to you. If the supplied type doesn't match the required type, PHP forces dummy contents on the resulting value (empty strings, arrays, or objects, 0 for numeric values, FALSE for Booleans) to ensure a defined state.

Following is a quote from the sample module discussed previously, which makes use of the conversion functions:

zval **parameter;if((ZEND_NUM_ARGS() != 1) || (zend_get_parameters_ex(1, &parameter) != SUCCESS))
{
    WRONG_PARAM_COUNT;
}convert_to_long_ex(parameter);RETURN_LONG(Z_LVAL_P(parameter));
After retrieving the parameter pointer, the parameter value is converted to a long (an integer), which also forms the return value of this function. Understanding access to the contents of the value requires a short discussion of the zval type, whose definition is shown in PHP/Zend zval type definition..

Example #7 PHP/Zend zval type definition.

typedef pval zval;
     
typedef struct _zval_struct zval;typedef union _zvalue_value {
    long lval;                 
    double dval;               
    struct {
        char *val;
        int len;
    } str;
    HashTable *ht;             
    struct {
        zend_class_entry *ce;
        HashTable *properties;
    } obj;
} zvalue_value;struct _zval_struct {
    
    zvalue_value value;        
    unsigned char type;        
    unsigned char is_ref;
    short refcount;
};

Actually, pval (defined in php.h) is only an alias of zval (defined in zend.h), which in turn refers to _zval_struct. This is a most interesting structure. _zval_struct is the "master" structure, containing the value structure, type, and reference information. The substructure zvalue_value is a union that contains the variable's contents. Depending on the variable's type, you'll have to access different members of this union. For a description of both structures, see Zend zval Structure, Zend zvalue_value Structure and Zend Variable Type Constants.

Zend zval Structure
Entry Description
value Union containing this variable's contents. See Zend zvalue_value Structure for a description.
type Contains this variable's type. For a list of available types, see Zend Variable Type Constants.
is_ref 0 means that this variable is not a reference; 1 means that this variable is a reference to another variable.
refcount The number of references that exist for this variable. For every new reference to the value stored in this variable, this counter is increased by 1. For every lost reference, this counter is decreased by 1. When the reference counter reaches 0, no references exist to this value anymore, which causes automatic freeing of the value.
Zend zvalue_value Structure
Entry Description
lval Use this property if the variable is of the type IS_LONG, IS_BOOLEAN, or IS_RESOURCE.
dval Use this property if the variable is of the type IS_DOUBLE.
str This structure can be used to access variables of the type IS_STRING. The member len contains the string length; the member val points to the string itself. Zend uses C strings; thus, the string length contains a trailing 0x00.
ht This entry points to the variable's hash table entry if the variable is an array.
obj Use this property if the variable is of the type IS_OBJECT.
Zend Variable Type Constants
Constant Description
IS_NULL Denotes a NULL (empty) value.
IS_LONG A long (integer) value.
IS_DOUBLE A double (floating point) value.
IS_STRING A string.
IS_ARRAY Denotes an array.
IS_OBJECT An object.
IS_BOOL A Boolean value.
IS_RESOURCE A resource (for a discussion of resources, see the appropriate section below).
IS_CONSTANT A constant (defined) value.

To access a long you access zval.value.lval, to access a double you use zval.value.dval, and so on. Because all values are stored in a union, trying to access data with incorrect union members results in meaningless output.

Accessing arrays and objects is a bit more complicated and is discussed later.

Dealing with Arguments Passed by Reference

If your function accepts arguments passed by reference that you intend to modify, you need to take some precautions.

What we didn't say yet is that under the circumstances presented so far, you don't have write access to any zval containers designating function parameters that have been passed to you. Of course, you can change any zval containers that you created within your function, but you mustn't change any zvals that refer to Zend-internal data!

We've only discussed the so-called *_ex() API so far. You may have noticed that the API functions we've used are called zend_get_parameters_ex() instead of zend_get_parameters() , convert_to_long_ex() instead of convert_to_long() , etc. The *_ex() functions form the so-called new "extended" Zend API. They give a minor speed increase over the old API, but as a tradeoff are only meant for providing read-only access.

Because Zend works internally with references, different variables may reference the same value. Write access to a zval container requires this container to contain an isolated value, meaning a value that's not referenced by any other containers. If a zval container were referenced by other containers and you changed the referenced zval, you would automatically change the contents of the other containers referencing this zval (because they'd simply point to the changed value and thus change their own value as well).

zend_get_parameters_ex() doesn't care about this situation, but simply returns a pointer to the desired zval containers, whether they consist of references or not. Its corresponding function in the traditional API, zend_get_parameters() , immediately checks for referenced values. If it finds a reference, it creates a new, isolated zval container; copies the referenced data into this newly allocated space; and then returns a pointer to the new, isolated value.

This action is called zval separation (or pval separation). Because the *_ex() API doesn't perform zval separation, it's considerably faster, while at the same time disabling write access.

To change parameters, however, write access is required. Zend deals with this situation in a special way: Whenever a parameter to a function is passed by reference, it performs automatic zval separation. This means that whenever you're calling a function like this in PHP, Zend will automatically ensure that $parameter is being passed as an isolated value, rendering it to a write-safe state:

my_function(&$parameter);

But this is not the case with regular parameters! All other parameters that are not passed by reference are in a read-only state.

This requires you to make sure that you're really working with a reference - otherwise you might produce unwanted results. To check for a parameter being passed by reference, you can use the macro PZVAL_IS_REF. This macro accepts a zval* to check if it is a reference or not. Examples are given in in Testing for referenced parameter passing..

Example #8 Testing for referenced parameter passing.

zval *parameter;if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &parameter) == FAILURE)
    return;
if (!PZVAL_IS_REF(parameter)) {
{
    zend_error(E_WARNING, "Parameter wasn't passed by reference");
    RETURN_NULL();
}
ZVAL_LONG(parameter, 10);
Testing for referenced parameter passing

Assuring Write Safety for Other Parameters

You might run into a situation in which you need write access to a parameter that's retrieved with zend_get_parameters_ex() but not passed by reference. For this case, you can use the macro SEPARATE_ZVAL, which does a zval separation on the provided container. The newly generated zval is detached from internal data and has only a local scope, meaning that it can be changed or destroyed without implying global changes in the script context:

zval **parameter;
     

zend_get_parameters_ex(1, &parameter);

SEPARATE_ZVAL(parameter);
SEPARATE_ZVAL uses emalloc() to allocate the new zval container, which means that even if you don't deallocate this memory yourself, it will be destroyed automatically upon script termination. However, doing a lot of calls to this macro without freeing the resulting containers will clutter up your RAM.

Note: As you can easily work around the lack of write access in the "traditional" API (with zend_get_parameters() and so on), this API seems to be obsolete, and is not discussed further in this chapter.

Creating Variables

When exchanging data from your own extensions with PHP scripts, one of the most important issues is the creation of variables. This section shows you how to deal with the variable types that PHP supports.

Overview

To create new variables that can be seen "from the outside" by the executing script, you need to allocate a new zval container, fill this container with meaningful values, and then introduce it to Zend's internal symbol table. This basic process is common to all variable creations:

zval *new_variable; 
MAKE_STD_ZVAL(new_variable);  
ZEND_SET_SYMBOL(EG(active_symbol_table), "new_variable_name", new_variable); 

The macro MAKE_STD_ZVAL allocates a new zval container using ALLOC_ZVAL and initializes it using INIT_ZVAL. As implemented in Zend at the time of this writing, initializing means setting the reference count to 1 and clearing the is_ref flag, but this process could be extended later - this is why it's a good idea to keep using MAKE_STD_ZVAL instead of only using ALLOC_ZVAL. If you want to optimize for speed (and you don't have to explicitly initialize the zval container here), you can use ALLOC_ZVAL, but this isn't recommended because it doesn't ensure data integrity.

ZEND_SET_SYMBOL takes care of introducing the new variable to Zend's symbol table. This macro checks whether the value already exists in the symbol table and converts the new symbol to a reference if so (with automatic deallocation of the old zval container). This is the preferred method if speed is not a crucial issue and you'd like to keep memory usage low.

Note that ZEND_SET_SYMBOL makes use of the Zend executor globals via the macro EG. By specifying EG(active_symbol_table), you get access to the currently active symbol table, dealing with the active, local scope. The local scope may differ depending on whether the function was invoked from within a function.

If you need to optimize for speed and don't care about optimal memory usage, you can omit the check for an existing variable with the same value and instead force insertion into the symbol table by using zend_hash_update() :

zval *new_variable;
MAKE_STD_ZVAL(new_variable);
zend_hash_update(
    EG(active_symbol_table),
    "new_variable_name",
    strlen("new_variable_name") + 1,
    &new_variable,
    sizeof(zval *),
    NULL
);
This is actually the standard method used in most modules.

The variables generated with the snippet above will always be of local scope, so they reside in the context in which the function has been called. To create new variables in the global scope, use the same method but refer to another symbol table:

zval *new_variable;
     
// allocate and initialize new container
MAKE_STD_ZVAL(new_variable);//
// set type and variable contents here
//// introduce this variable by the name "new_variable_name" into the global symbol table
ZEND_SET_SYMBOL(&EG(symbol_table), "new_variable_name", new_variable);
The macro ZEND_SET_SYMBOL is now being called with a reference to the main, global symbol table by referring EG(symbol_table).

Note: The active_symbol_table variable is a pointer, but symbol_table is not. This is why you have to use EG(active_symbol_table) and &EG(symbol_table) as parameters to ZEND_SET_SYMBOL - it requires a pointer.

Similarly, to get a more efficient version, you can hardcode the symbol table update:

zval *new_variable;// allocate and initialize new container
MAKE_STD_ZVAL(new_variable);//
// set type and variable contents here
//// introduce this variable by the name "new_variable_name" into the global symbol table
zend_hash_update(
    &EG(symbol_table),
    "new_variable_name",
    strlen("new_variable_name") + 1,
    &new_variable,
    sizeof(zval *),
    NULL
);
Creating variables with different scopes. shows a sample source that creates two variables - local_variable with a local scope and global_variable with a global scope (see Figure 9.7). The full example can be found on the CD-ROM.

Note: You can see that the global variable is actually not accessible from within the function. This is because it's not imported into the local scope using global $global_variable; in the PHP source.

Example #9 Creating variables with different scopes.

ZEND_FUNCTION(variable_creation)
{
    zval *new_var1, *new_var2;    MAKE_STD_ZVAL(new_var1);
    MAKE_STD_ZVAL(new_var2);    ZVAL_LONG(new_var1, 10);
    ZVAL_LONG(new_var2, 5);    ZEND_SET_SYMBOL(EG(active_symbol_table), "local_variable", new_var1);
    ZEND_SET_SYMBOL(&EG(symbol_table), "global_variable", new_var2);    RETURN_NULL();}
Creating variables with different scopes

Longs (Integers)

Now let's get to the assignment of data to variables, starting with longs. Longs are PHP's integers and are very simple to store. Looking at the zval.value container structure discussed earlier in this chapter, you can see that the long data type is directly contained in the union, namely in the lval field. The corresponding type value for longs is IS_LONG (see Creation of a long.).

Example #10 Creation of a long.

zval *new_long;MAKE_STD_ZVAL(new_long);new_long-&gt;type = IS_LONG;
new_long-&gt;value.lval = 10;
Alternatively, you can use the macro ZVAL_LONG:
zval *new_long;MAKE_STD_ZVAL(new_long);
ZVAL_LONG(new_long, 10);

Doubles (Floats)

Doubles are PHP's floats and are as easy to assign as longs, because their value is also contained directly in the union. The member in the zval.value container is dval; the corresponding type is IS_DOUBLE.

zval *new_double;MAKE_STD_ZVAL(new_double);new_double-&gt;type = IS_DOUBLE;
new_double-&gt;value.dval = 3.45;
Alternatively, you can use the macro ZVAL_DOUBLE:
zval *new_double;MAKE_STD_ZVAL(new_double);
ZVAL_DOUBLE(new_double, 3.45);

Strings

Strings need slightly more effort. As mentioned earlier, all strings that will be associated with Zend's internal data structures need to be allocated using Zend's own memory-management functions. Referencing of static strings or strings allocated with standard routines is not allowed. To assign strings, you have to access the structure str in the zval.value container. The corresponding type is IS_STRING:

zval *new_string;
char *string_contents = "This is a new string variable";MAKE_STD_ZVAL(new_string);new_string-&gt;type = IS_STRING;
new_string-&gt;value.str.len = strlen(string_contents);
new_string-&gt;value.str.val = estrdup(string_contents);
Note the usage of Zend's estrdup() here. Of course, you can also use the predefined macro ZVAL_STRING:
zval *new_string;
char *string_contents = "This is a new string variable";MAKE_STD_ZVAL(new_string);
ZVAL_STRING(new_string, string_contents, 1);
ZVAL_STRING accepts a third parameter that indicates whether the supplied string contents should be duplicated (using estrdup() ). Setting this parameter to 1 causes the string to be duplicated; 0 simply uses the supplied pointer for the variable contents. This is most useful if you want to create a new variable referring to a string that's already allocated in Zend internal memory.

If you want to truncate the string at a certain position or you already know its length, you can use ZVAL_STRINGL(zval, string, length, duplicate), which accepts an explicit string length to be set for the new string. This macro is faster than ZVAL_STRING and also binary-safe.

To create empty strings, set the string length to 0 and use empty_string as contents:

new_string-&gt;type = IS_STRING;
new_string-&gt;value.str.len = 0;
new_string-&gt;value.str.val = empty_string;
Of course, there's a macro for this as well (ZVAL_EMPTY_STRING):
MAKE_STD_ZVAL(new_string);
ZVAL_EMPTY_STRING(new_string);

Booleans

Booleans are created just like longs, but have the type IS_BOOL. Allowed values in lval are 0 and 1:

zval *new_bool;MAKE_STD_ZVAL(new_bool);new_bool-&gt;type = IS_BOOL;
new_bool-&gt;value.lval = 1;
The corresponding macros for this type are ZVAL_BOOL (allowing specification of the value) as well as ZVAL_TRUE and ZVAL_FALSE (which explicitly set the value to TRUE and FALSE, respectively).

Arrays

Arrays are stored using Zend's internal hash tables, which can be accessed using the zend_hash_*() API. For every array that you want to create, you need a new hash table handle, which will be stored in the ht member of the zval.value container.

There's a whole API solely for the creation of arrays, which is extremely handy. To start a new array, you call array_init() .

zval *new_array;MAKE_STD_ZVAL(new_array);array_init(new_array);
array_init() always returns SUCCESS.

To add new elements to the array, you can use numerous functions, depending on what you want to do. Zend's API for Associative Arrays, Zend's API for Indexed Arrays, Part 1 and Zend's API for Indexed Arrays, Part 2 describe these functions. All functions return FAILURE on failure and SUCCESS on success.

Zend's API for Associative Arrays
Function Description
add_assoc_long(zval *array, char *key, long n);() Adds an element of type long.
add_assoc_unset(zval *array, char *key);() Adds an unset element.
add_assoc_bool(zval *array, char *key, int b);() Adds a Boolean element.
add_assoc_resource(zval *array, char *key, int r);() Adds a resource to the array.
add_assoc_double(zval *array, char *key, double d);() Adds a floating-point value.
add_assoc_string(zval *array, char *key, char *str, int duplicate);() Adds a string to the array. The flag duplicate specifies whether the string contents have to be copied to Zend internal memory.
add_assoc_stringl(zval *array, char *key, char *str, uint length, int duplicate); () Adds a string with the desired length length to the array. Otherwise, behaves like add_assoc_string() .
add_assoc_zval(zval *array, char *key, zval *value);() Adds a zval to the array. Useful for adding other arrays, objects, streams, etc...
Zend's API for Indexed Arrays, Part 1
Function Description
add_index_long(zval *array, uint idx, long n);() Adds an element of type long.
add_index_unset(zval *array, uint idx);() Adds an unset element.
add_index_bool(zval *array, uint idx, int b);() Adds a Boolean element.
add_index_resource(zval *array, uint idx, int r);() Adds a resource to the array.
add_index_double(zval *array, uint idx, double d);() Adds a floating-point value.
add_index_string(zval *array, uint idx, char *str, int duplicate);() Adds a string to the array. The flag duplicate specifies whether the string contents have to be copied to Zend internal memory.
add_index_stringl(zval *array, uint idx, char *str, uint length, int duplicate);() Adds a string with the desired length length to the array. This function is faster and binary-safe. Otherwise, behaves like add_index_string() .
add_index_zval(zval *array, uint idx, zval *value);() Adds a zval to the array. Useful for adding other arrays, objects, streams, etc...
Zend's API for Indexed Arrays, Part 2
Function Description
add_next_index_long(zval *array, long n);() Adds an element of type long.
add_next_index_unset(zval *array);() Adds an unset element.
add_next_index_bool(zval *array, int b);() Adds a Boolean element.
add_next_index_resource(zval *array, int r);() Adds a resource to the array.
add_next_index_double(zval *array, double d);() Adds a floating-point value.
add_next_index_string(zval *array, char *str, int duplicate);() Adds a string to the array. The flag duplicate specifies whether the string contents have to be copied to Zend internal memory.
add_next_index_stringl(zval *array, char *str, uint length, int duplicate);() Adds a string with the desired length length to the array. This function is faster and binary-safe. Otherwise, behaves like add_index_string() .
add_next_index_zval(zval *array, zval *value);() Adds a zval to the array. Useful for adding other arrays, objects, streams, etc...

All these functions provide a handy abstraction to Zend's internal hash API. Of course, you can also use the hash functions directly - for example, if you already have a zval container allocated that you want to insert into an array. This is done using zend_hash_update() for associative arrays (see Adding an element to an associative array.) and zend_hash_index_update() for indexed arrays (see Adding an element to an indexed array.):

Example #11 Adding an element to an associative array.

zval *new_array, *new_element;
char *key = "element_key";
      
MAKE_STD_ZVAL(new_array);
MAKE_STD_ZVAL(new_element);array_init(new_array);ZVAL_LONG(new_element, 10);if(zend_hash_update(new_array-&gt;value.ht, key, strlen(key) + 1, (void *)&new_element, sizeof(zval *), NULL) == FAILURE)
{
    // do error handling here
}

Example #12 Adding an element to an indexed array.

zval *new_array, *new_element;
int key = 2;MAKE_STD_ZVAL(new_array);
MAKE_STD_ZVAL(new_element);array_init(new_array);ZVAL_LONG(new_element, 10);if(zend_hash_index_update(new_array-&gt;value.ht, key, (void *)&new_element, sizeof(zval *), NULL) == FAILURE)
{
    // do error handling here
}

To emulate the functionality of add_next_index_*() , you can use this:

zend_hash_next_index_insert(ht, zval **new_element, sizeof(zval *), NULL)

Note: To return arrays from a function, use array_init() and all following actions on the predefined variable return_value (given as argument to your exported function; see the earlier discussion of the call interface). You do not have to use MAKE_STD_ZVAL on this.

Tip: To avoid having to write new_array->value.ht every time, you can use HASH_OF(new_array), which is also recommended for compatibility and style reasons.

Objects

Since objects can be converted to arrays (and vice versa), you might have already guessed that they have a lot of similarities to arrays in PHP. Objects are maintained with the same hash functions, but there's a different API for creating them.

To initialize an object, you use the function object_init() :

zval *new_object;MAKE_STD_ZVAL(new_object);if(object_init(new_object) != SUCCESS)
{
    // do error handling here
}
You can use the functions described in Zend's API for Object Creation to add members to your object.
Zend's API for Object Creation
Function Description
add_property_long(zval *object, char *key, long l);() Adds a long to the object.
add_property_unset(zval *object, char *key);() Adds an unset property to the object.
add_property_bool(zval *object, char *key, int b);() Adds a Boolean to the object.
add_property_resource(zval *object, char *key, long r);() Adds a resource to the object.
add_property_double(zval *object, char *key, double d);() Adds a double to the object.
add_property_string(zval *object, char *key, char *str, int duplicate);() Adds a string to the object.
add_property_stringl(zval *object, char *key, char *str, uint length, int duplicate);() Adds a string of the specified length to the object. This function is faster than add_property_string() and also binary-safe.
add_property_zval(zval *obect, char *key, zval *container):() Adds a zval container to the object. This is useful if you have to add properties which aren't simple types like integers or strings but arrays or other objects.

Resources

Resources are a special kind of data type in PHP. The term resources doesn't really refer to any special kind of data, but to an abstraction method for maintaining any kind of information. Resources are kept in a special resource list within Zend. Each entry in the list has a correspondending type definition that denotes the kind of resource to which it refers. Zend then internally manages all references to this resource. Access to a resource is never possible directly - only via a provided API. As soon as all references to a specific resource are lost, a corresponding shutdown function is called.

For example, resources are used to store database links and file descriptors. The de facto standard implementation can be found in the MySQL module, but other modules such as the Oracle module also make use of resources.

Note:

In fact, a resource can be a pointer to anything you need to handle in your functions (e.g. pointer to a structure) and the user only has to pass a single resource variable to your function.

To create a new resource you need to register a resource destruction handler for it. Since you can store any kind of data as a resource, Zend needs to know how to free this resource if its not longer needed. This works by registering your own resource destruction handler to Zend which in turn gets called by Zend whenever your resource can be freed (whether manually or automatically). Registering your resource handler within Zend returns you the resource type handle for that resource. This handle is needed whenever you want to access a resource of this type later and is most of time stored in a global static variable within your extension. There is no need to worry about thread safety here because you only register your resource handler once during module initialization.

The Zend function to register your resource handler is defined as:

ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number);

There are two different kinds of resource destruction handlers you can pass to this function: a handler for normal resources and a handler for persistent resources. Persistent resources are for example used for database connection. When registering a resource, either of these handlers must be given. For the other handler just pass NULL.

zend_register_list_destructors_ex() accepts the following parameters:

ld Normal resource destruction handler callback
pld Pesistent resource destruction handler callback
type_name A string specifying the name of your resource. It's always a good thing to specify a unique name within PHP for the resource type so when the user for example calls var_dump($resource); he also gets the name of the resource.
module_number The module_number is automatically available in your PHP_MINIT_FUNCTION function and therefore you just pass it over.
The return value is a unique integer ID for your resource type.

The resource destruction handler (either normal or persistent resources) has the following prototype:

void resource_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC);
The passed rsrc is a pointer to the following structure:
typedef struct _zend_rsrc_list_entry {
     
    void *ptr;
    int type;
    int refcount;} zend_rsrc_list_entry;
The member void *ptr is the actual pointer to your resource.

Now we know how to start things, we define our own resource we want register within Zend. It is only a simple structure with two integer members:

typedef struct {
     
    int resource_link;
    int resource_type;} my_resource;
Our resource destruction handler is probably going to look something like this:
void my_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC) {    // You most likely cast the void pointer to your structure type    my_resource *my_rsrc = (my_resource *) rsrc->ptr;    // Now do whatever needs to be done with you resource. Closing
    // Files, Sockets, freeing additional memory, etc.
    // Also, don't forget to actually free the memory for your resource too!    do_whatever_needs_to_be_done_with_the_resource(my_rsrc);
}

Note:

One important thing to mention: If your resource is a rather complex structure which also contains pointers to memory you allocated during runtime you have to free them before freeing the resource itself!

Now that we have defined

  1. what our resource is and

  2. our resource destruction handler

we can go on and do the rest of the steps:
  1. create a global variable within the extension holding the resource ID so it can be accessed from every function which needs it

  2. define the resource name

  3. write the resource destruction handler

  4. and finally register the handler

// Somewhere in your extension, define the variable for your registered resources.
    // If you wondered what 'le' stands for: it simply means 'list entry'.
    static int le_myresource;    // It's nice to define your resource name somewhere
    #define le_myresource_name  "My type of resource"    [...]    // Now actually define our resource destruction handler
    void my_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC) {        my_resource *my_rsrc = (my_resource *) rsrc->ptr;
        do_whatever_needs_to_be_done_with_the_resource(my_rsrc);
    }    [...]    PHP_MINIT_FUNCTION(my_extension) {        // Note that 'module_number' is already provided through the
        // PHP_MINIT_FUNCTION() function definition.        le_myresource = zend_register_list_destructors_ex(my_destruction_handler, NULL, le_myresource_name, module_number);        // You can register additional resources, initialize
        // your global vars, constants, whatever.
    }

To actually register a new resource you use can either use the zend_register_resource() function or the ZEND_REGISTER_RESOURE() macro, both defined in zend_list.h. Although the arguments for both map 1:1 it's a good idea to always use macros to be upwards compatible:

int ZEND_REGISTER_RESOURCE(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
rsrc_result This is an already initialized zval * container.
rsrc_pointer Your resource pointer you want to store.
rsrc_type The type which you received when you registered the resource destruction handler. If you followed the naming scheme this would be le_myresource.
The return value is a unique integer identifier for that resource.

What is really going on when you register a new resource is it gets inserted in an internal list in Zend and the result is just stored in the given zval * container:

rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);
     
    if (rsrc_result) {
        rsrc_result->value.lval = rsrc_id;
        rsrc_result->type = IS_RESOURCE;
    }    return rsrc_id;
The returned rsrc_id uniquely identifies the newly registered resource. You can use the macro RETURN_RESOURE to return it to the user:
RETURN_RESOURCE(rsrc_id)

Note:

It is common practice that if you want to return the resource immediately to the user you specify the return_value as the zval * container.

Zend now keeps track of all references to this resource. As soon as all references to the resource are lost, the destructor that you previously registered for this resource is called. The nice thing about this setup is that you don't have to worry about memory leakages introduced by allocations in your module - just register all memory allocations that your calling script will refer to as resources. As soon as the script decides it doesn't need them anymore, Zend will find out and tell you.

Now that the user got his resource, at some point he is passing it back to one of your functions. The value.lval inside the zval * container contains the key to your resource and thus can be used to fetch the resource with the following macro: ZEND_FETCH_RESOURCE:

ZEND_FETCH_RESOURCE(rsrc, rsrc_type, rsrc_id, default_rsrc_id, resource_type_name, resource_type)
rsrc This is your pointer which will point to your previously registered resource.
rsrc_type This is the typecast argument for your pointer, e.g. myresource *.
rsrc_id This is the address of the zval *container the user passed to your function, e.g. &z_resource if zval *z_resource is given.
default_rsrc_id This integer specifies the default resource ID if no resource could be fetched or -1.
resource_type_name This is the name of the requested resource. It's a string and is used when the resource can't be found or is invalid to form a meaningful error message.
resource_type The resource_type you got back when registering the resource destruction handler. In our example this was le_myresource.
This macro has no return value. It is for the developers convenience and takes care of TSRMLS arguments passing and also does check if the resource could be fetched. It throws a warning message and returns the current PHP function with NULL if there was a problem retrieving the resource.

To force removal of a resource from the list, use the function zend_list_delete() . You can also force the reference count to increase if you know that you're creating another reference for a previously allocated value (for example, if you're automatically reusing a default database link). For this case, use the function zend_list_addref() . To search for previously allocated resource entries, use zend_list_find() . The complete API can be found in zend_list.h.

Macros for Automatic Global Variable Creation

In addition to the macros discussed earlier, a few macros allow easy creation of simple global variables. These are nice to know in case you want to introduce global flags, for example. This is somewhat bad practice, but Table Macros for Global Variable Creation describes macros that do exactly this task. They don't need any zval allocation; you simply have to supply a variable name and value.

Macros for Global Variable Creation
Macro Description
SET_VAR_STRING(name, value) Creates a new string.
SET_VAR_STRINGL(name, value, length) Creates a new string of the specified length. This macro is faster than SET_VAR_STRING and also binary-safe.
SET_VAR_LONG(name, value) Creates a new long.
SET_VAR_DOUBLE(name, value) Creates a new double.

Creating Constants

Zend supports the creation of true constants (as opposed to regular variables). Constants are accessed without the typical dollar sign ($) prefix and are available in all scopes. Examples include TRUE and FALSE, to name just two.

To create your own constants, you can use the macros in Macros for Creating Constants. All the macros create a constant with the specified name and value.

You can also specify flags for each constant:

  • CONST_CS - This constant's name is to be treated as case sensitive.

  • CONST_PERSISTENT - This constant is persistent and won't be "forgotten" when the current process carrying this constant shuts down.

To use the flags, combine them using a inary OR:
// register a new constant of type "long"
     REGISTER_LONG_CONSTANT("NEW_MEANINGFUL_CONSTANT", 324, CONST_CS |
     CONST_PERSISTENT); 
There are two types of macros - REGISTER_*_CONSTANT andREGISTER_MAIN_*_CONSTANT. The first type creates constants bound to the current module. These constants are dumped from the symbol table as soon as the module that registered the constant is unloaded from memory. The second type creates constants that remain in the symbol table independently of the module.
Macros for Creating Constants
Macro Description
REGISTER_LONG_CONSTANT(name, value, flags) REGISTER_MAIN_LONG_CONSTANT(name, value, flags) Registers a new constant of type long.
REGISTER_DOUBLE_CONSTANT(name, value, flags) REGISTER_MAIN_DOUBLE_CONSTANT(name, value, flags) Registers a new constant of type double.
REGISTER_STRING_CONSTANT(name, value, flags) REGISTER_MAIN_STRING_CONSTANT(name, value, flags) Registers a new constant of type string. The specified string must reside in Zend's internal memory.
REGISTER_STRINGL_CONSTANT(name, value, length, flags) REGISTER_MAIN_STRINGL_CONSTANT(name, value, length, flags) Registers a new constant of type string. The string length is explicitly set to length. The specified string must reside in Zend's internal memory.

Duplicating Variable Contents: The Copy Constructor

Sooner or later, you may need to assign the contents of one zval container to another. This is easier said than done, since the zval container doesn't contain only type information, but also references to places in Zend's internal data. For example, depending on their size, arrays and objects may be nested with lots of hash table entries. By assigning one zval to another, you avoid duplicating the hash table entries, using only a reference to them (at most).

To copy this complex kind of data, use the copy constructor. Copy constructors are typically defined in languages that support operator overloading, with the express purpose of copying complex types. If you define an object in such a language, you have the possibility of overloading the "=" operator, which is usually responsible for assigning the contents of the rvalue (result of the evaluation of the right side of the operator) to the lvalue (same for the left side).

Overloading means assigning a different meaning to this operator, and is usually used to assign a function call to an operator. Whenever this operator would be used on such an object in a program, this function would be called with the lvalue and rvalue as parameters. Equipped with that information, it can perform the operation it intends the "=" operator to have (usually an extended form of copying).

This same form of "extended copying" is also necessary for PHP's zval containers. Again, in the case of an array, this extended copying would imply re-creation of all hash table entries relating to this array. For strings, proper memory allocation would have to be assured, and so on.

Zend ships with such a function, called zend_copy_ctor() (the previous PHP equivalent was pval_copy_constructor() ).

A most useful demonstration is a function that accepts a complex type as argument, modifies it, and then returns the argument:

zval *parameter;
   
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &parameter) == FAILURE)
   return;
}
   
// do modifications to the parameter here// now we want to return the modified container:
*return_value = *parameter;
zval_copy_ctor(return_value);

The first part of the function is plain-vanilla argument retrieval. After the (left out) modifications, however, it gets interesting: The container of parameter is assigned to the (predefined) return_value container. Now, in order to effectively duplicate its contents, the copy constructor is called. The copy constructor works directly with the supplied argument, and the standard return values are FAILURE on failure and SUCCESS on success.

If you omit the call to the copy constructor in this example, both parameter and return_value would point to the same internal data, meaning that return_value would be an illegal additional reference to the same data structures. Whenever changes occurred in the data that parameter points to, return_value might be affected. Thus, in order to create separate copies, the copy constructor must be used.

The copy constructor's counterpart in the Zend API, the destructor zval_dtor() , does the opposite of the constructor.

Returning Values

Returning values from your functions to PHP was described briefly in an earlier section; this section gives the details. Return values are passed via the return_value variable, which is passed to your functions as argument. The return_value argument consists of a zval container (see the earlier discussion of the call interface) that you can freely modify. The container itself is already allocated, so you don't have to run MAKE_STD_ZVAL on it. Instead, you can access its members directly.

To make returning values from functions easier and to prevent hassles with accessing the internal structures of the zval container, a set of predefined macros is available (as usual). These macros automatically set the correspondent type and value, as described in Predefined Macros for Returning Values from a Function and Predefined Macros for Setting the Return Value of a Function.

Note:

The macros in Predefined Macros for Returning Values from a Function automatically return from your function, those in Predefined Macros for Setting the Return Value of a Function only set the return value; they don't return from your function.

Predefined Macros for Returning Values from a Function
Macro Description
RETURN_RESOURCE(resource) Returns a resource.
RETURN_BOOL(bool) Returns a Boolean.
RETURN_NULL() Returns nothing (a NULL value).
RETURN_LONG(long) Returns a long.
RETURN_DOUBLE(double) Returns a double.
RETURN_STRING(string, duplicate) Returns a string. The duplicate flag indicates whether the string should be duplicated using estrdup() .
RETURN_STRINGL(string, length, duplicate) Returns a string of the specified length; otherwise, behaves like RETURN_STRING. This macro is faster and binary-safe, however.
RETURN_EMPTY_STRING() Returns an empty string.
RETURN_FALSE Returns Boolean false.
RETURN_TRUE Returns Boolean true.
Predefined Macros for Setting the Return Value of a Function
Macro Description
RETVAL_RESOURCE(resource) Sets the return value to the specified resource.
RETVAL_BOOL(bool) Sets the return value to the specified Boolean value.
RETVAL_NULL Sets the return value to NULL.
RETVAL_LONG(long) Sets the return value to the specified long.
RETVAL_DOUBLE(double) Sets the return value to the specified double.
RETVAL_STRING(string, duplicate) Sets the return value to the specified string and duplicates it to Zend internal memory if desired (see also RETURN_STRING).
RETVAL_STRINGL(string, length, duplicate) Sets the return value to the specified string and forces the length to become length (see also RETVAL_STRING). This macro is faster and binary-safe, and should be used whenever the string length is known.
RETVAL_EMPTY_STRING Sets the return value to an empty string.
RETVAL_FALSE Sets the return value to Boolean false.
RETVAL_TRUE Sets the return value to Boolean true.

Complex types such as arrays and objects can be returned by using array_init() and object_init() , as well as the corresponding hash functions on return_value. Since these types cannot be constructed of trivial information, there are no predefined macros for them.

Printing Information

Often it's necessary to print messages to the output stream from your module, just as print would be used within a script. PHP offers functions for most generic tasks, such as printing warning messages, generating output for phpinfo() , and so on. The following sections provide more details. Examples of these functions can be found on the CD-ROM.

zend_printf()

zend_printf() works like the standard printf() , except that it prints to Zend's output stream.

zend_error()

zend_error() can be used to generate error messages. This function accepts two arguments; the first is the error type (see zend_errors.h), and the second is the error message.

zend_error(E_WARNING, "This function has been called with empty arguments");
Zend's Predefined Error Messages. shows a list of possible values (see below). These values are also referred to in php.ini. Depending on which error type you choose, your messages will be logged.
Zend's Predefined Error Messages.
Error Description
E_ERROR Signals an error and terminates execution of the script immediately.
E_WARNING Signals a generic warning. Execution continues.
E_PARSE Signals a parser error. Execution continues.
E_NOTICE Signals a notice. Execution continues. Note that by default the display of this type of error messages is turned off in php.ini.
E_CORE_ERROR Internal error by the core; shouldn't be used by user-written modules.
E_COMPILE_ERROR Internal error by the compiler; shouldn't be used by user-written modules.
E_COMPILE_WARNING Internal warning by the compiler; shouldn't be used by user-written modules.
Display of warning messages in the browser.

Including Output in phpinfo()

After creating a real module, you'll want to show information about the module in phpinfo() (in addition to the module name, which appears in the module list by default). PHP allows you to create your own section in the phpinfo() output with the ZEND_MINFO() function. This function should be placed in the module descriptor block (discussed earlier) and is always called whenever a script calls phpinfo() .

PHP automatically prints a section in phpinfo() for you if you specify the ZEND_MINFO function, including the module name in the heading. Everything else must be formatted and printed by you.

Typically, you can print an HTML table header using php_info_print_table_start() and then use the standard functions php_info_print_table_header() and php_info_print_table_row() . As arguments, both take the number of columns (as integers) and the column contents (as strings). Source code and screenshot for output in phpinfo. shows a source example and its output. To print the table footer, use php_info_print_table_end() .

Example #13 Source code and screenshot for output in phpinfo() .

php_info_print_table_start();
php_info_print_table_header(2, "First column", "Second column");
php_info_print_table_row(2, "Entry in first row", "Another entry");
php_info_print_table_row(2, "Just to fill", "another row here");
php_info_print_table_end();
Output of phpinfo()

Execution Information

You can also print execution information, such as the current file being executed. The name of the function currently being executed can be retrieved using the function get_active_function_name() . This function returns a pointer to the function name and doesn't accept any arguments. To retrieve the name of the file currently being executed, use zend_get_executed_filename() . This function accesses the executor globals, which are passed to it using the TSRMLS_C macro. The executor globals are automatically available to every function that's called directly by Zend (they're part of the INTERNAL_FUNCTION_PARAMETERS described earlier in this chapter). If you want to access the executor globals in another function that doesn't have them available automatically, call the macro TSRMLS_FETCH() once in that function; this will introduce them to your local scope.

Finally, the line number currently being executed can be retrieved using the function zend_get_executed_lineno() . This function also requires the executor globals as arguments. For examples of these functions, see Printing execution information..

Example #14 Printing execution information.

zend_printf("The name of the current function is %s&lt;br&gt;", get_active_function_name(TSRMLS_C));
zend_printf("The file currently executed is %s&lt;br&gt;", zend_get_executed_filename(TSRMLS_C));
zend_printf("The current line being executed is %i&lt;br&gt;", zend_get_executed_lineno(TSRMLS_C));
Printing execution information

Startup and Shutdown Functions

Startup and shutdown functions can be used for one-time initialization and deinitialization of your modules. As discussed earlier in this chapter (see the description of the Zend module descriptor block), there are module, and request startup and shutdown events.

The module startup and shutdown functions are called whenever a module is loaded and needs initialization; the request startup and shutdown functions are called every time a request is processed (meaning that a file is being executed).

For dynamic extensions, module and request startup/shutdown events happen at the same time.

Declaration and implementation of these functions can be done with macros; see the earlier section "Declaration of the Zend Module Block" for details.

Calling User Functions

You can call user functions from your own modules, which is very handy when implementing callbacks; for example, for array walking, searching, or simply for event-based programs.

User functions can be called with the function call_user_function_ex() . It requires a hash value for the function table you want to access, a pointer to an object (if you want to call a method), the function name, return value, number of arguments, argument array, and a flag indicating whether you want to perform zval separation.

ZEND_API int call_user_function_ex(HashTable *function_table, zval *object,
zval *function_name, zval **retval_ptr_ptr,
int param_count, zval **params[],
int no_separation);

Note that you don't have to specify both function_table and object; either will do. If you want to call a method, you have to supply the object that contains this method, in which case call_user_function() automatically sets the function table to this object's function table. Otherwise, you only need to specify function_table and can set object to NULL.

Usually, the default function table is the "root" function table containing all function entries. This function table is part of the compiler globals and can be accessed using the macro CG. To introduce the compiler globals to your function, call the macro TSRMLS_FETCH once.

The function name is specified in a zval container. This might be a bit surprising at first, but is quite a logical step, since most of the time you'll accept function names as parameters from calling functions within your script, which in turn are contained in zval containers again. Thus, you only have to pass your arguments through to this function. This zval must be of type IS_STRING.

The next argument consists of a pointer to the return value. You don't have to allocate memory for this container; the function will do so by itself. However, you have to destroy this container (using zval_dtor() ) afterward!

Next is the parameter count as integer and an array containing all necessary parameters. The last argument specifies whether the function should perform zval separation - this should always be set to 0. If set to 1, the function consumes less memory but fails if any of the parameters need separation.

Calling user functions. shows a small demonstration of calling a user function. The code calls a function that's supplied to it as argument and directly passes this function's return value through as its own return value. Note the use of the constructor and destructor calls at the end - it might not be necessary to do it this way here (since they should be separate values, the assignment might be safe), but this is bulletproof.

Example #15 Calling user functions.

zval **function_name;
zval *retval;if((ZEND_NUM_ARGS() != 1) || (zend_get_parameters_ex(1, &function_name) != SUCCESS))
{
    WRONG_PARAM_COUNT;
}if((*function_name)->type != IS_STRING)
{
    zend_error(E_ERROR, "Function requires string argument");
}TSRMSLS_FETCH();if(call_user_function_ex(CG(function_table), NULL, *function_name, &retval, 0, NULL, 0) != SUCCESS)
{
    zend_error(E_ERROR, "Function call failed");
}zend_printf("We have %i as type\n", retval->type);*return_value = *retval;
zval_copy_ctor(return_value);
zval_ptr_dtor(&retval);

<?phpdl("call_userland.so");function test_function()
{
    echo "We are in the test function!\n";
    return 'hello';
}$return_value = call_userland("test_function");echo "Return value: '$return_value'";
?>

以上例程会输出:

We are in the test function!
We have 3 as type
Return value: 'hello'

Initialization File Support

PHP 4 features a redesigned initialization file support. It's now possible to specify default initialization entries directly in your code, read and change these values at runtime, and create message handlers for change notifications.

To create an .ini section in your own module, use the macros PHP_INI_BEGIN() to mark the beginning of such a section and PHP_INI_END() to mark its end. In between you can use PHP_INI_ENTRY() to create entries.

PHP_INI_BEGIN()
PHP_INI_ENTRY("first_ini_entry",  "has_string_value", PHP_INI_ALL, NULL)
PHP_INI_ENTRY("second_ini_entry", "2",                PHP_INI_SYSTEM, OnChangeSecond)
PHP_INI_ENTRY("third_ini_entry",  "xyz",              PHP_INI_USER, NULL)
PHP_INI_END()
The PHP_INI_ENTRY() macro accepts four parameters: the entry name, the entry value, its change permissions, and a pointer to a change-notification handler. Both entry name and value must be specified as strings, regardless of whether they really are strings or integers.

The permissions are grouped into three sections:PHP_INI_SYSTEM allows a change only directly in the php.ini file; PHP_INI_USER allows a change to be overridden by a user at runtime using additional configuration files, such as .htaccess; and PHP_INI_ALL allows changes to be made without restrictions. There's also a fourth level, PHP_INI_PERDIR, for which we couldn't verify its behavior yet.

The fourth parameter consists of a pointer to a change-notification handler. Whenever one of these initialization entries is changed, this handler is called. Such a handler can be declared using the PHP_INI_MH macro:

PHP_INI_MH(OnChangeSecond);             // handler for ini-entry "second_ini_entry"// specify ini-entries herePHP_INI_MH(OnChangeSecond)
{    zend_printf("Message caught, our ini entry has been changed to %s&lt;br&gt;", new_value);    return(SUCCESS);}
The new value is given to the change handler as string in the variable new_value. When looking at the definition of PHP_INI_MH, you actually have a few parameters to use:
#define PHP_INI_MH(name) int name(php_ini_entry *entry, char *new_value,
                                  uint new_value_length, void *mh_arg1,
                                  void *mh_arg2, void *mh_arg3)
All these definitions can be found in php_ini.h. Your message handler will have access to a structure that contains the full entry, the new value, its length, and three optional arguments. These optional arguments can be specified with the additional macros PHP_INI_ENTRY1 (allowing one additional argument), PHP_INI_ENTRY2 (allowing two additional arguments), and PHP_INI_ENTRY3 (allowing three additional arguments).

The change-notification handlers should be used to cache initialization entries locally for faster access or to perform certain tasks that are required if a value changes. For example, if a constant connection to a certain host is required by a module and someone changes the hostname, automatically terminate the old connection and attempt a new one.

Access to initialization entries can also be handled with the macros shown in Macros to Access Initialization Entries in PHP.

Macros to Access Initialization Entries in PHP
Macro Description
INI_INT(name) Returns the current value of entry name as integer (long).
INI_FLT(name) Returns the current value of entry name as float (double).
INI_STR(name) Returns the current value of entry name as string. Note: This string is not duplicated, but instead points to internal data. Further access requires duplication to local memory.
INI_BOOL(name) Returns the current value of entry name as Boolean (defined as zend_bool, which currently means unsigned char).
INI_ORIG_INT(name) Returns the original value of entry name as integer (long).
INI_ORIG_FLT(name) Returns the original value of entry name as float (double).
INI_ORIG_STR(name) Returns the original value of entry name as string. Note: This string is not duplicated, but instead points to internal data. Further access requires duplication to local memory.
INI_ORIG_BOOL(name) Returns the original value of entry name as Boolean (defined as zend_bool, which currently means unsigned char).

Finally, you have to introduce your initialization entries to PHP. This can be done in the module startup and shutdown functions, using the macros REGISTER_INI_ENTRIES() and UNREGISTER_INI_ENTRIES():

ZEND_MINIT_FUNCTION(mymodule)
{    REGISTER_INI_ENTRIES();}ZEND_MSHUTDOWN_FUNCTION(mymodule)
{    UNREGISTER_INI_ENTRIES();}

Where to Go from Here

You've learned a lot about PHP. You now know how to create dynamic loadable modules and statically linked extensions. You've learned how PHP and Zend deal with internal storage of variables and how you can create and access these variables. You know quite a set of tool functions that do a lot of routine tasks such as printing informational texts, automatically introducing variables to the symbol table, and so on.

Even though this chapter often had a mostly "referential" character, we hope that it gave you insight on how to start writing your own extensions. For the sake of space, we had to leave out a lot; we suggest that you take the time to study the header files and some modules (especially the ones in the ext/standard directory and the MySQL module, as these implement commonly known functionality). This will give you an idea of how other people have used the API functions - particularly those that didn't make it into this chapter.

Reference: Some Configuration Macros

config.m4

The file config.m4 is processed by buildconf and must contain all the instructions to be executed during configuration. For example, these can include tests for required external files, such as header files, libraries, and so on. PHP defines a set of macros that can be used in this process, the most useful of which are described in M4 Macros for config.m4.

M4 Macros for config.m4
Macro Description
AC_MSG_CHECKING(message) Prints a "checking <message>" text during configure.
AC_MSG_RESULT(value) Gives the result to AC_MSG_CHECKING; should specify either yes or no as value.
AC_MSG_ERROR(message) Prints message as error message during configure and aborts the script.
AC_DEFINE(name,value,description) Adds #define to php_config.h with the value of value and a comment that says description (this is useful for conditional compilation of your module).
AC_ADD_INCLUDE(path) Adds a compiler include path; for example, used if the module needs to add search paths for header files.
AC_ADD_LIBRARY_WITH_PATH(libraryname,librarypath) Specifies an additional library to link.
AC_ARG_WITH(modulename,description,unconditionaltest,conditionaltest) Quite a powerful macro, adding the module with description to the configure --help output. PHP checks whether the option --with-<modulename> is given to the configure script. If so, it runs the script unconditionaltest (for example, --with-myext=yes), in which case the value of the option is contained in the variable $withval. Otherwise, it executes conditionaltest.
PHP_EXTENSION(modulename, [shared]) This macro is a must to call for PHP to configure your extension. You can supply a second argument in addition to your module name, indicating whether you intend compilation as a shared module. This will result in a definition at compile time for your source as COMPILE_DL_<modulename>.

API Macros

A set of macros was introduced into Zend's API that simplify access to zval containers (see API Macros for Accessing zval Containers).

API Macros for Accessing zval Containers
Macro Refers to
Z_LVAL(zval) (zval).value.lval
Z_DVAL(zval) (zval).value.dval
Z_STRVAL(zval) (zval).value.str.val
Z_STRLEN(zval) (zval).value.str.len
Z_ARRVAL(zval) (zval).value.ht
Z_LVAL_P(zval) (*zval).value.lval
Z_DVAL_P(zval) (*zval).value.dval
Z_STRVAL_P(zval_p) (*zval).value.str.val
Z_STRLEN_P(zval_p) (*zval).value.str.len
Z_ARRVAL_P(zval_p) (*zval).value.ht
Z_LVAL_PP(zval_pp) (**zval).value.lval
Z_DVAL_PP(zval_pp) (**zval).value.dval
Z_STRVAL_PP(zval_pp) (**zval).value.str.val
Z_STRLEN_PP(zval_pp) (**zval).value.str.len
Z_ARRVAL_PP(zval_pp) (**zval).value.ht

用户评论:

[#1] bhavacakra at gmail dot com [2007-03-10 01:41:02]

A very nice resource http://devzone.zend.com/public/view/tag/Extension

[#2] vijay at planetbazaar dot com [2005-09-17 00:53:33]

Notes for Windows PHP5 extension developers:

First, two great articles at http://www.zend.com/php/internals/index.php are in the must read category. Unfortunately an article on building extensions on Windows is yet to arrive at this time. So one gets stuck at section 'Building Your Extension' in the first article - because there is no 'phpize' for Windows to the best of my knowledge.

First point of curiosity is how the extensions that are available for Windows appear in the output of "cscript /nologo configure.js --help". Turns out the magic happens by executing "buildconf.bat". To cut a long story short, it turns out that for Windows, the build system looks for config.w32 in each extension directory instead of config.m4; config.w32 is actually a javascript (from what I gather reading the "vim:ft=javascript" comment at the top of the files).

To get going with the "hello world" sample in the article mentioned above here is the config.w32 to replace config.m4;

--- begin file: config.w32 ---
// hello world module configuration
// vim:ft=javascript
ARG_ENABLE("hello", "hello Enable Hello World support", "no");

if (PHP_HELLO == "yes") {
  EXTENSION("hello", "hello.c", null, "-Iext/hello");
  AC_DEFINE('HAVE_HELLO', 1, 'Whether you ave Hello World');
}

--- end file: config.w32 ---

And just to compare, here is the config.m4

--- begin file: config.m4 ---
dnl vim:ft=m4
dnl hello world module configuration
PHP_ARG_ENABLE(hello, whether to enable Hellow World support,
[ --enable-hello  Enable Hello World support])

if test "$PHP_HELLO" = "yes"; then
  AC_DEFINE(HAVE_HELLO, 1 [Whether you have Hello World])
  PHP_NEW_EXTENSION(hello, hello.c, $ext_shared)
fi

--- end file: config.m4 ---

And finally the key step is to execute 'buildconf.bat'; after this step:

  cscript /nologo configure.js | find "hello"

should show something like:
"--enable-hello     hello Enable Hello World support"

[#3] tony dot dodd at btinternet dot com [2005-08-20 08:15:48]

These macros are defined in a separate header file called php_ini.h.

[#4] josephmdaly at gmail dot com [2005-07-29 01:58:57]

[#5] josephmdaly at gmail dot com [2005-07-01 03:26:22]

Here is a quick example of how to read arrays passed as parameters:

int i;

zval **data = NULL;

char **data_array = NULL;



data_array = emalloc(sizeof(char *) * array_length);

for (i = 0; i < array_length; i++) {
  
  zend_hash_index_find(Z_ARRVAL_P(data_arg), i, (void **)&data);

  
  convert_to_string(*data);

  
  data_array[i] = Z_STRVAL_PP(data);
}

[#6] seymour_levine at hotmail dot com [2005-06-14 05:18:06]

A small amount of administration is needed to make this work.

Mainly the dl command does not pick up the module created.

To remedy, use a full path for the extension_dir parameter in php.ini. Then create that subdirectory mod 755 vis:

        extension_dir=/usr/lib/php411

And create php411. The name is arbitrary.

In the php dl command, specify dl('firstmod.so'); do not use any slashes.

[#7] Sy Levine [2005-06-13 05:29:50]

I installed and run 4.1.1 on RH 7.1  It runs on a separate Apache Server than the one furnished by Red Hat.

A few adminisrative changes were necessary to get  the function going.

The main one was finding and modifying php.ini.

The command: find . -print | grep php.ini should do that.
Mine was in /usr/local/lib 

Look for extension_dir in php.ini then type the directive as

extension_dir=/usr/lib/php4  

Use no trailing / in the directive. This is where the dl('firstmod.so') php statement accesses your module. 

Tip: I do not use a leading / like dl('/firstmod.so') which will be misparsed.  {Note by Ed a PHP ...}

The source module is named firstmod.c.

I compiled and created the firstmod.so with a script based on the various notes about the compile parameters. See
markjolesen, ywarnier, 17-Apr, wish I .

[#8] davide dot chiodi at poste dot it [2005-04-06 22:34:04]

to build with lcc-win32 compiler:

change #include "php.h" to #include "php-lcc.h"
this is php-lcc.h (copied from excellent windbinder project by Rubem Pechansky)

//ZEND constants
#if defined(_MSC_VER) // Rick
# if defined(ZEND_EXPORTS)
# undef ZEND_EXPORTS
# endif
# undef ZEND_DEBUG
#else
# define PHP_WIN32
# define ZEND_WIN32
#endif

#define ZEND_DEBUG FALSE // Must be FALSE
#define ZTS // Must define ZTS (Zend Thread Safety)
#define PHP_REGEX_H // Skip php_regex.h: '_off_t' not defined anywhere
#define COMPILE_DL_FIRST_MODULE 1
//----------------------------------------------------------------- DEPENDENCIES

#include <?php.h>

//---------------------------------------------------------- AUXILIARY FUNCTIONS

int parse_array(zval *array, const char *fmt, ...);

//------------------------------------------------------------------ END OF FILE

you must also used tweaked headers file from winbinder author at this link: http://hypervisual.com/winbinder/files/archived/php4_tweaked_headers.zip
(php 4).
I used php 4.3.10 and all worked fine

[#9] ywarnier at beeznest dot org [2004-10-25 04:19:50]

Quick note to save time to beginners

To make the example above work, I had to add -I../TSRM because the file tsrm_virtual_cwd.h couldn't be found otherwise (it's located in the TSRM directory which is not included above)

In my case (pure Debian Woody install), php libraries were located in /usr/include/php4 (and php.h was in the 'main' subdirectory) so I had to use this path instead of /usr/local/include

[#10] ppmm at wuxinan dot net [2004-07-19 17:40:05]

In fact, empty string is not writeable, even when we add an slash after the type decl. Say the implementation of my_test() is like this:

char *s;
int s_len;
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s/", &s, &s_len) 

and you pass an empty string my_test("") from the PHP script, then s[0] is not writeable. You will get a seg fault. The reason is that Zend doesn't emalloc a new copy of the empty string dynamically, instead it just assigns the empty_string (which is defined at compile time and located in unwriteable data seg) pointer to s.

[#11] someone at apple [2004-05-01 22:55:02]

When following the directions for compiling via make, it may be necessary to delete the configure script before running buildconf.  Otherwise you may get a complaint about buggy cache code and the configure script won't actually be updated.

[#12] [2004-04-25 22:13:08]

If you want to free zval, you can do this:

{
zval *new_var;


MAKE_STD_ZVAL(new_var);



ZVAL_STRING(new_var, "123456", 1);


zend_hash_update(
    EG(active_symbol_table),
    "new_var",
    strlen("new_var") + 1,
    &new_var,
    sizeof(zval *),
    NULL
);

zend_hash_del(
    EG(active_symbol_table),
    "new_var",
    strlen("new_var") + 1);

FREE_ZVAL(new_var);
}

[#13] php-lists at nomeaning dot net [2004-04-24 00:36:28]

phpmanual at oderwat dot de is incorrect:

TSRMLS_DC and TSRMLS_CC are both correct as listed in the original text.  

TSRMLS_DC is used for Zend internal function declarations and TSRMLS_CC must be used when calling such functions.

[#14] Julien CROUZET jucrouzet_at_cpan.org [2004-04-07 14:51:25]

Remember that even if RETURN_* macros sets the return_value to return variable to user, they also RETURN FROM YOU CODE by a "return ;", any code after these macro will be ignored.

If you want to place code after a return of variable (which is not a good idea for code readability), you'll have to use RETVAL_* macro instead.

[#15] Julien CROUZET jucrouzet_at_cpan.org [2004-04-07 14:44:31]

Just an example of the way of the way of returning array :


ZEND_FUNCTION("make_42_array")
{
  zval *my_long;

  // Declaring and allocating return_value to be an array
  array_init(return_value);

  //Creates and assign the long element at (long)42
  MAKE_STD_ZVAL(my_long);
  ZVAL_LONG(new_element, 42);

  //Make this our $array[0] I do not use add_index_long to
  //to show a "by-hand" assignation
  zend_hash_index_update(HASH_OF(return_value), 0, (void *)&my_long, sizeof(zval *), NULL);

  //Returns nothing to satisfy the void prototype
  return ;

}

[#16] Julien CROUZET jucrouzet_at_cpan.org [2004-04-05 15:28:16]

All associate array functions (add_assoc_long for example) are now just aliases of their extended version (add_assoc_long_ex). 

The key lenght is calculated with strlen(key) + 1, but remember that this is NOT binary safe (strlen stops on the first null byte).

Users may want to use binary keys, so always prefer extended versions with a secure length !

[#17] jason dot lambert at uk dot clara dot net [2004-03-31 05:18:35]

Just a note of caution, when using a string value within zend_parse_parameters() you MUST specify the length parameter also, or php may segfault on some machines.

Example possible segfault code:

char *s;
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &s)

Correct code:

char *s;
int s_len;
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &s, &s_len)

[#18] Julien CROUZET jucrouzet_at_cpan.org [2004-03-24 14:44:09]

As a completion to k at ailis dot de :

According to ARG_SHOULD_BE_SENT_BY_REF macro in zend_compile.h, BYREF_FORCE_REST force the rest of the arguments to be passed as ref.

The first byte have to be the index of BYREF_FORCE_REST in the array.

Means, if you have, 5 args, the first two ones are NOT passed as ref, and the 3 others are, you can do :

static unsigned char rest_arguments_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE_REST };

We can see a few things in this example :

  * As k at ailis dot de said, the first byte is _NOT_ the number of args passed to the function.
  * The argument corresponding to BYREF_FORCE_REST MUST be passed as a reference
  * The others arguments MUST be passed as a reference

[#19] glamm at a-s-i dot com [2003-08-06 23:14:51]

Regarding the note written by jo-shi at web dot de:

I do not think that the line
  ce = emalloc(sizeof(zend_class_entry));
is required, as the line
  ce = zend_register_internal_class(&class_entry TSRMLS_CC);
actually appears to go through the process of performing the memory allocation and reference counting of the object.

[#20] wilf at bigpond dot net dot au [2003-06-15 00:26:32]

Another caching problem:

If you seen a message saying that 'may contain buggy cache code', ensure that you delete the 'autom4k...cache' directory before running buildconf.  

A good test the see if your new module has been picked up by buildconf is:

$ grep -c my_module configure
(if that returns 0 then buildconf did not work).

Unfortunately this means that you have to completely rebuild your configure script each time you change an M4 file but it doesnt take too long.

[#21] wendywds at hotmail dot com [2003-05-11 15:39:18]

Using php-4.3.1 on Redhat Linux 8, step 6 did not work as written.  There is no php executable in /usr/php-4.3.1.  Instead, with help from the pear-general mailing list, I discovered that the newly built php executable is in /usr/php-4.3.1/sapi/cli.  (The very end of the output of 'make' shows -o sapi/cli/php.  According to Johannes on pear-general, it might be in sapi/cgi instead.)

So I had to change step 6 to:
6.  $ sapi/cli/php -f ext/my_module/my_module.php

[#22] Ed a PHP enthusiast from NYC [2003-04-27 22:55:10]

Thank you very much for the comments above!

Here is a distillation of how to compile your module as a dynamic library, placing it in your web server and loading it in your test .php file being served (PHP 4.3.1).

*** Compiling a module as a .so

$ cd ext/mystuff

$ cc -fpic -DCOMPILE_DL_MYSTUFF=1 -I/usr/local/include -I../../TSRM -I../.. -I../../main -I../../Zend -I../../ext/bcmath/libbcmath/src -c -o mystuff.o mystuff.c

$ cc -shared -L/usr/local/lib -rdynamic -o mystuff.so mystuff.o

*** Move it to the web server (doc root is /www)

$ cp mystuff.so /www/.

$ chmod 644 /www/mystuff.so

*** load the module in the .php file for testing purposes

<?php
dl
('/mystuff.so');


?>


The other thing that threw me off my tracks is that when dealing with strings you can allocate memory with emalloc and return the result with the RETURN_STRING macro (duplicate set to 0) and presumably PHP will take care of the efree -- or else I got it wrong and have plenty of leaks  ;-)

[#23] [2003-04-16 23:08:43]

Compiling Manually NOTE:
remenber add -DHAVE_CONFIG_H flag
otherwise you .so can't be ld. then you cp it to php modules directory.
i.e
Compiling cc -fpic -DHAVE_CONFIG_H  -I/usr/local/include -I. -I.. -I../Zend -c -o <your_object_file> <your_c_file>

[#24] Mac M?hleisen [2003-03-19 11:55:40]

To built the modules shipped with the source just cd into the ext dir for example 

cd ext/oci8 

and type

export SHLIB_SUFFIX_NAME=so
phpize && aclocal && ./configure && make

now you have a subdir called "modules" with the .so file. Copy it to your extension dir and set everything up in php.ini.

This way you can add extensions to binary distributions like RPMS.

[#25] staffan dot palmroos at surfbuy dot se [2003-03-07 10:30:01]

The specified_type_or_NULL operator ! in the type specifier string of zend_parse_parameters seems to work for strings too, in addition to (a, o, O, r, and z) as noted.

[#26] jo-shi at web dot de [2002-12-03 10:54:24]

add_property_[*](*) overwrites existing values in your object:

ex:
 var_dump($myobj);
 object(objectname)(1){
   ["_myvalue"]=>int(23);
 }
 so in func1 i "add" a property again:
 PHP_FUNCTION(func1){
   add_property_long(getThis(),"_myvalue",32);
 }
 should (as expected) result
 object(objectname)(1){
   ["_myvalue"]=>int(32);
 }

[#27] jo-shi at web dot de [2002-12-03 10:47:59]

you can add functions to your object:
you may declare global
  static zend_function_entry 
    php_my_class_functions[] = {
      ZEND_FE (func1, NULL)
      ZEND_FE (func2, NULL)
      {NULL, NULL, NULL}
    };

you may declare local
  zend_class_entry my_class_entry;
  zend_class_entry *ce;

you should do something like this
  INIT_CLASS_ENTRY(
    func_class_entry, 
    "CLASSNAME",
    php_my_class_functions);
  ce = emalloc(sizeof(zend_class_entry));
  ce = zend_register_internal_class (
  &my_class_entry TSRMLS_CC);
  object_init_ex(return_value, ce);
this should produce a returned object in your php_code:
$myobj = yourfunc();
$myobj->func1();
$myobj->func2();

[#28] k at ailis dot de [2002-04-06 03:56:05]

If you are using one of the above macros you definitely want to use one of those convert-functions if you are not sure what data type is stored in the zval:

  convert_to_string(zval_p)
  convert_to_long(zval_p)
  convert_to_double(zval_p)
  convert_to_boolean(zval_p)
  convert_to_array(zval_p)
  convert_to_object(zval_p)

Otherwise you may get undefined results, because Z_STRVAL_P(zval_p) returns nonsense if the zval contains not a string. If you use convert_to_string() before, the value is converted to a string and you can safely access it via the Z_STRVAL* macros.

There are more useful convert-functions:

Resets the zval to NULL:
  convert_to_null(zval_p)

Converts to a long by using a special base:
  convert_to_long_base(zval_p, base)

There are some more functions which may be useful, but I don't know exactly what they are doing. Just take a look at Zend/zend_operaters.h.

[#29] k at ailis dot de [2002-04-06 03:41:14]

To complete the macro list:

Access an object:
  Z_OBJ(zval)
  Z_OBJ_P(zval)
  Z_OBJ_PP(zval)

Access object property hash table:
  Z_OBJPROP(zval)
  Z_OBJPROP_P(zval)
  Z_OBJPROP_PP(zval)

Access object class entry:
  Z_OBJCE(zval)
  Z_OBJCE_P(zval)
  Z_OBJCE_PP(zval)

Access a ressource (which is fairly the same as Z_LVAL*):
  Z_RESVAL(zval)
  Z_RESVAL_P(zval)
  Z_RESVAL_PP(zval)

[#30] k at ailis dot de [2002-04-06 03:33:54]

These macros can be used to access the boolean value of a zval. Yes, you can use Z_LVAL* for booleans, too, but these macros also do a type cast to zend_bool:

Z_BVAL(zval)
Z_BVAL_P(zval)
Z_BVAL_PP(zval)

[#31] k at ailis dot de [2002-03-28 05:57:21]

Because it is not explained how the arg_types parameter works, I'll try to explain it myself: The arg_types parameter is an array of bytes. The first byte marks how many arg_type-specifiers follows. There are the following macros which can be used to regulate the reference forcing and I interprete them like this (No guarentee):

BYREF_NONE = Force passing by value
BYREF_FORCE = Force passing by reference
BYREF_ALLOW = Allow passing by reference
BYREF_FORCE_REST = ???

Commonly the arg_types parameter is used like this:

static unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
ZEND_FE(foobar, third_argument_force_ref)

Note that the first element in the array does NOT specify how many arguments the function is expecting, only how many arg_type-Specifiers follows. Checking of the number of arguments has to be done in the function body itself (i.E. by using the zend_parse_parameters() function)

[#32] k at ailis dot de [2002-03-28 05:43:23]

An information that is missing here: The function name parameter can be an array with two elements. The first element is an object reference or a class name and the second element is the method name. Zend recognizes if the parameter is a string (which results in a normal function call or a normal method call if the object parameter is used) or if it is an array.

[#33] john dot gallet at wanadoo dot fr [2002-03-26 11:58:09]

Concerning all add_*_stringl() functions : 
they do not behave like snprintf() for instance, i.e. the length of the string is not a *maximum length* but an *exact* length, and you end up with null '\000' or '\@'  caracters in your PHP string if the length parameter is greater than the actual length of the string to be associated with return_value.

Yes, it is clearly written but still a trick if you are used to strncpy() or snprintf().
HTH

[#34] k at ailis dot de [2002-03-18 08:32:29]

object_init() and object_init_ex() are not calling the constructor of a class. You have to do this by yourself after creating the object.

[#35] k at ailis dot de [2002-03-17 06:48:47]

There are also the following functions to add zvals to an array or hash:

ZEND_API int add_index_zval(zval *arg, uint index, zval *value);
ZEND_API int add_next_index_zval(zval *arg, zval *value);
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value)
add_assoc_zval(__arg, __key, __value)

[#36] john dot gallet at wanadoo dot fr [2002-01-04 16:39:30]

Distinction between --with and --enable : the "something external" means for exemple a shared object. If you are writing a C wrapper for an existing .so library, you should use --with

Do not forget the "cache" effect to modifyng M4 files. When you are testing and getting erros, be sure to delete config.cache before re-running buildconf and ./configure (I spent an hour looking for an error that was not there any more because of that).

HTH and happy developpment.

上一篇:下一篇: