リソース型の一覧

以下にPHPのリソースを生成、使用、破棄するための関数の一覧を示します。 is_resourceによりある変数がリソースであるかど うかを調べることが可能です。また、 get_resource_typeは変数のリソース型を返します。

Resource Types
リソース型の名前 生成する関数 使用する関数 破棄する関数 説明
AddressInfo socket_addrinfo_lookup socket_addrinfo_bind, socket_addrinfo_connect, socket_addrinfo_explain, None AddressInfo (ソケット)
bzip2 bzopen bzerrno, bzerror, bzerrstr, bzflush, bzread, bzwrite bzclose Bzip2 ファイル
cubrid 接続 cubrid_connect cubrid_connect_with_url cubrid_col_get cubrid_col_size cubrid_commit cubrid_drop cubrid_execute cubrid_get_autocommit cubrid_get_charset cubrid_get_class_name cubrid_get_db_parameter cubrid_get_server_info cubrid_get cubrid_insert_id cubrid_is_instance cubrid_lob_export cubrid_lob_get cubrid_lob_send cubrid_lock_read cubrid_lock_write cubrid_prepare cubrid_put cubrid_rollback cubrid_schema cubrid_seq_drop cubrid_seq_insert cubrid_seq_put cubrid_set_add cubrid_set_autocommit cubrid_set_db_parameter cubrid_set_drop cubrid_affected_rows cubrid_client_encoding cubrid_errno cubrid_error cubrid_list_dbs cubrid_ping cubrid_query cubrid_real_escape_string cubrid_close cubrid_disconnect CUBRID データベースへの接続
持続的な cubrid 接続 cubrid_pconnect cubrid_pconnect_with_url cubrid_col_get cubrid_col_size cubrid_commit cubrid_drop cubrid_execute cubrid_get_autocommit cubrid_get_charset cubrid_get_class_name cubrid_get_db_parameter cubrid_get_server_info cubrid_get cubrid_insert_id cubrid_is_instance cubrid_lob_export cubrid_lob_get cubrid_lob_send cubrid_lock_read cubrid_lock_write cubrid_prepare cubrid_put cubrid_rollback cubrid_schema cubrid_seq_drop cubrid_seq_insert cubrid_seq_put cubrid_set_add cubrid_set_autocommit cubrid_set_db_parameter cubrid_set_drop cubrid_affected_rows cubrid_client_encoding cubrid_errno cubrid_error cubrid_list_dbs cubrid_ping cubrid_query cubrid_real_escape_string cubrid_lob2_new CUBRID データベースへの持続的な接続
cubrid request cubrid_prepare cubrid_execute cubrid_query cubrid_unbuffered_query cubrid_bind cubrid_column_names cubrid_column_types cubrid_current_oid cubrid_execute cubrid_free_result cubrid_get_query_timeout cubrid_move_cursor cubrid_next_result cubrid_num_cols cubrid_num_rows cubrid_set_query_timeout cubrid_data_seek cubrid_fetch_array cubrid_fetch_assoc cubrid_fetch_field cubrid_fetch_lengths cubrid_fetch_object cubrid_fetch_row cubrid_field_flags cubrid_field_len cubrid_field_name cubrid_field_seek cubrid_field_table cubrid_field_type cubrid_num_fields cubrid_result cubrid_lob2_bind cubrid_close_prepare cubrid_close_request CUBRID request
cubrid lob cubrid_lob_get cubrid_lob_export cubrid_lob_send cubrid_lob_size cubrid_lob_close None
cubrid lob2 cubrid_lob2_new cubrid_fetch cubrid_fetch_row cubrid_fetch_array cubrid_fetch_assoc cubrid_fetch_object cubrid_lob2_export cubrid_lob2_import cubrid_lob2_read cubrid_lob2_write cubrid_lob2_tell cubrid_lob2_tell64 cubrid_lob2_seek cubrid_lob2_seek64 cubrid_lob2_size cubrid_lob2_size64 cubrid_lob2_close None
curl curl_copy_handle, curl_init curl_copy_handle, curl_errno, curl_error, curl_exec, curl_getinfo, curl_setopt curl_close cURL ハンドル
curl_multi curl_multi_init curl_multi_errno, curl_multi_exec, curl_multi_info_read, curl_multi_remove_handle, curl_multi_select, curl_multi_setopt curl_multi_close cURL マルチハンドル
curl_share curl_share_init curl_share_errno, curl_share_setopt curl_share_close cURL 共有ハンドル
dba dba_open dba_delete, dba_exists, dba_fetch, dba_firstkey, dba_insert, dba_nextkey, dba_optimize, dba_replace, dba_sync dba_close DBAデータベースへのリンク
dba persistent dba_popen dba_delete, dba_exists, dba_fetch, dba_firstkey, dba_insert, dba_nextkey, dba_optimize, dba_replace, dba_sync None DBAデータベースへの持続的なリンク
dbase dbase_open dbase_pack, dbase_add_record, dbase_replace_record, dbase_delete_record, dbase_get_record, dbase_get_record_with_names, dbase_numfields, dbase_numrecords dbase_close Dbaseデータベースへのリンク
enchant_broker enchant_broker_init enchant_broker_describe, enchant_broker_dict_exists, enchant_broker_get_dict_path, enchant_broker_get_error, enchant_broker_list_dicts, enchant_broker_set_dict_path, enchant_broker_set_ordering enchant_broker_free Enchant ブローカー (PHP 8.0.0 より前)
enchant_dict enchant_broker_request_dict enchant_broker_request_pwl_dict enchant_dict_add_to_personal, enchant_dict_add_to_session, enchant_dict_check, enchant_dict_describe, enchant_dict_get_error, enchant_dict_is_in_session, enchant_dict_store_replacement, enchant_dict_suggest enchant_broker_free_dict Enchant 辞書 (PHP 8.0.0 より前)
fdf fdf_open fdf_create, fdf_save, fdf_get_value, fdf_set_value, fdf_next_field_name, fdf_set_ap, fdf_set_status, fdf_get_status, fdf_set_file, fdf_get_file, fdf_set_flags, fdf_set_opt, fdf_set_submit_form_action, fdf_set_javascript_action fdf_close FDF File
ftp ftp_connect, ftp_ssl_connect ftp_login, ftp_pwd, ftp_cdup, ftp_chdir, ftp_mkdir, ftp_rmdir, ftp_nlist, ftp_rawlist, ftp_systype, ftp_pasv, ftp_get, ftp_fget, ftp_put, ftp_fput, ftp_size, ftp_mdtm, ftp_rename, ftp_delete, ftp_site, ftp_alloc, ftp_chmod, ftp_exec, ftp_get_option, ftp_nb_continue, ftp_nb_fget, ftp_nb_fput, ftp_nb_get, ftp_nb_put, ftp_raw, ftp_set_option ftp_close FTP 接続 (PHP 8.1.0 より前)
gd imagecreate, imagecreatefromgd, imagecreatefromgd2, imagecreatefromgd2part, imagecreatefromgif, imagecreatefromjpeg, imagecreatefrompng, imagecreatefromwbmp, imagecreatefromstring, imagecreatefromxbm, imagecreatefromxpm, imagecreatetruecolor, imagerotate imagearc, imagechar, imagecharup, imagecolorallocate, imagecolorat, imagecolorclosest, imagecolorexact, imagecolorresolve, imagegammacorrect, imagegammacorrect, imagecolorset, imagecolorsforindex, imagecolorstotal, imagecolortransparent, imagecopy, imagecopyresized, imagedashedline, imagefill, imagefilledpolygon, imagefilledrectangle, imagefilltoborder, imagegif, imagepng, imagejpeg, imagewbmp, imageinterlace, imageline, imagepolygon, imagerectangle, imagerotate, imagesetpixel, imagestring, imagestringup, imagesx, imagesy, imagettftext, imagefilledarc, imageellipse, imagefilledellipse, imagecolorclosestalpha, imagecolorexactalpha, imagecolorresolvealpha, imagecopymerge, imagecopymergegray, imagecopyresampled, imagetruecolortopalette, imagesetbrush, imagesettile, imagesetthickness, image2wbmp, imagealphablending, imageantialias, imagecolorallocatealpha, imagecolorclosesthwb, imagecolordeallocate, imagecolormatch, imagefilter, imagefttext, imagegd, imagegd2, imageistruecolor, imagelayereffect, imagepalettecopy, imagesavealpha, imagesetstyle, imagexbm imagedestroy GD Image (PHP 8.0.0 より前)
gd font imageloadfont imagechar, imagecharup, imagefontheight None GD用のフォント (PHP 8.1.0 より前)
imap imap_open imap_append, imap_body, imap_check, imap_createmailbox, imap_delete, imap_deletemailbox, imap_expunge, imap_fetchbody, imap_fetchstructure, imap_headerinfo, imap_header, imap_headers, imap_listmailbox, imap_getmailboxes, imap_get_quota, imap_status, imap_listsubscribed, imap_set_quota, imap_set_quota, imap_getsubscribed, imap_mail_copy, imap_mail_move, imap_num_msg, imap_num_recent, imap_ping, imap_renamemailbox, imap_reopen, imap_subscribe, imap_undelete, imap_unsubscribe, imap_scanmailbox, imap_mailboxmsginfo, imap_fetchheader, imap_uid, imap_msgno, imap_search, imap_fetch_overview imap_close IMAP, POP3 server への接続リンク(PHP 8.1.0 より前)
interbase blob ibase_blob_create, ibase_blob_import, ibase_blob_open ibase_blob_add, ibase_blob_cancel, ibase_blob_echo, ibase_blob_get, ibase_blob_info ibase_blob_close
interbase link ibase_connect ibase_query, ibase_prepare, ibase_trans ibase_close Interbase データベースへのリンク
interbase link persistent ibase_pconnect ibase_query, ibase_prepare, ibase_trans None Interbase データベースへの持続的なリンク
interbase query ibase_prepare ibase_execute ibase_free_query Interbase query
interbase 結果 ibase_query ibase_fetch_row, ibase_fetch_object, ibase_field_info, ibase_num_fields ibase_free_result Interbase 結果
interbase transaction ibase_trans ibase_commit ibase_rollback Interbase transaction
ldap link ldap_connect, ldap_search ldap_count_entries, ldap_first_attribute, ldap_first_entry, ldap_get_attributes, ldap_get_dn, ldap_get_entries, ldap_get_values, ldap_get_values_len, ldap_next_attribute, ldap_next_entry ldap_close ldap connection (PHP 8.1.0 より前)
ldap result ldap_read ldap_add, ldap_compare, ldap_bind, ldap_count_entries, ldap_delete, ldap_errno, ldap_error, ldap_first_attribute, ldap_first_entry, ldap_get_attributes, ldap_get_dn, ldap_get_entries, ldap_get_values, ldap_get_values_len, ldap_get_option, ldap_list, ldap_modify, ldap_mod_add, ldap_mod_replace, ldap_next_attribute, ldap_next_entry, ldap_mod_del, ldap_set_option, ldap_unbind ldap_free_result ldap search result (PHP 8.1.0 より前)
ldap result entry (PHP 8.1.0 より前)
mailparse_mail_structure mailparse_msg_create mailparse_msg_parse_file mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_extract_whole_part_file mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse mailparse_msg_free  
mysql link mysql_connect mysql_affected_rows, mysql_create_db, mysql_data_seek, mysql_db_name, mysql_db_query, mysql_drop_db, mysql_errno, mysql_error, mysql_insert_id, mysql_list_dbs, mysql_list_fields, mysql_list_tables, mysql_query, mysql_result, mysql_select_db, mysql_tablename, mysql_get_host_info, mysql_get_proto_info, mysql_get_server_info mysql_close MySQL データベースへのリンク
mysql link persistent mysql_pconnect mysql_affected_rows, mysql_create_db, mysql_data_seek, mysql_db_name, mysql_db_query, mysql_drop_db, mysql_errno, mysql_error, mysql_insert_id, mysql_list_dbs, mysql_list_fields, mysql_list_tables, mysql_query, mysql_result, mysql_select_db, mysql_tablename, mysql_get_host_info, mysql_get_proto_info, mysql_get_server_info None MySQL データベースへの持続的なリンク
mysql 結果 mysql_db_query, mysql_list_dbs, mysql_list_fields, mysql_list_processes, mysql_list_tables, mysql_query, mysql_unbuffered_query mysql_data_seek, mysql_db_name, mysql_fetch_array, mysql_fetch_assoc, mysql_fetch_field, mysql_fetch_lengths, mysql_fetch_object, mysql_fetch_row, mysql_fetch_row, mysql_field_flags, mysql_field_name, mysql_field_len, mysql_field_seek, mysql_field_table, mysql_field_type, mysql_num_fields, mysql_num_rows, mysql_result, mysql_tablename mysql_free_result MySQL 結果
oci8 collection oci_new_collection OCI-Collection::append, OCI-Collection::assign, OCI-Collection::assignElem, OCI-Collection::getElem, OCI-Collection::max, OCI-Collection::size, OCI-Collection::trim OCI-Collection::free Oracle Collection
oci8 接続 oci_connect, oci_pconnect, oci_new_connect oci_commit, oci_error, oci_new_cursor, oci_parse, oci_password_change, oci_rollback, oci_server_version, oci_set_action, oci_set_client_identifier, oci_set_client_info, oci_set_module_name oci_close Oracle データベースへの接続
oci8 lob oci_new_descriptor OCI-Lob::append, OCI-Lob::close, OCI-Lob::eof, OCI-Lob::erase, OCI-Lob::export, OCI-Lob::flush, OCI-Lob::getBuffering, OCI-Lob::import, OCI-Lob::load, OCI-Lob::read, OCI-Lob::rewind, OCI-Lob::save, OCI-Lob::saveFile, OCI-Lob::seek, OCI-Lob::setBuffering, OCI-Lob::size, OCI-Lob::tell, OCI-Lob::truncate, OCI-Lob::write, OCI-Lob::writeTemporary, OCI-Lob::writeToFile, oci_lob_copy, oci_lob_is_equal OCI-Lob::free Oracle large objects
oci8 statement oci_parse, oci_new_cursor oci_bind_array_by_name, oci_bind_by_name, oci_cancel, oci_define_by_name, oci_error oci_execute, oci_fetch_all, oci_fetch_array, oci_fetch_assoc, oci_fetch_object, oci_fetch_row, oci_fetch, oci_field_is_null, oci_field_name, oci_field_precision, oci_field_scale, oci_field_size, oci_field_type_raw, oci_field_type, oci_num_fields, oci_num_rows, oci_result, oci_set_prefetch, oci_statement_type oci_free_statement Oracle カーソル
odbc link odbc_connect odbc_autocommit, odbc_commit, odbc_error, odbc_errormsg, odbc_exec, odbc_tables, odbc_tableprivileges, odbc_do, odbc_prepare, odbc_columns, odbc_columnprivileges, odbc_procedurecolumns, odbc_specialcolumns, odbc_rollback, odbc_setoption, odbc_gettypeinfo, odbc_primarykeys, odbc_foreignkeys, odbc_procedures, odbc_statistics odbc_close ODBC データベースへのリンク
odbc link persistent odbc_pconnect odbc_autocommit, odbc_commit, odbc_error, odbc_errormsg, odbc_exec, odbc_tables, odbc_tableprivileges, odbc_do, odbc_prepare, odbc_columns, odbc_columnprivileges, odbc_procedurecolumns, odbc_specialcolumns, odbc_rollback, odbc_setoption, odbc_gettypeinfo, odbc_primarykeys, odbc_foreignkeys, odbc_procedures, odbc_statistics None ODBC データベースへの持続的なリンク
odbc 結果 odbc_prepare odbc_binmode, odbc_cursor, odbc_execute, odbc_fetch_into, odbc_fetch_row, odbc_field_name, odbc_field_num, odbc_field_type, odbc_field_len, odbc_field_precision, odbc_field_scale, odbc_longreadlen, odbc_num_fields, odbc_num_rows, odbc_result, odbc_result_all, odbc_setoption odbc_free_result ODBC 結果
birdstep link(PHP 7.3.0より前)
birdstep 結果(PHP 7.3.0より前)
OpenSSL key openssl_get_privatekey, openssl_get_publickey openssl_sign, openssl_seal, openssl_open, openssl_verify openssl_free_key OpenSSL key
OpenSSL X.509 openssl_x509_read openssl_x509_parse, openssl_x509_checkpurpose openssl_x509_free Public Key
pgsql large object pg_lo_open pg_lo_open, pg_lo_create, pg_lo_read, pg_lo_read_all, pg_lo_seek, pg_lo_tell, pg_lo_unlink, pg_lo_write pg_lo_close PostgreSQL ラージオブジェクト (PHP 8.1.0 より前)
pgsql link pg_connect pg_affected_rows, pg_query, pg_send_query, pg_get_result, pg_connection_busy, pg_connection_reset, pg_connection_status, pg_last_error, pg_last_notice, pg_lo_create, pg_lo_export, pg_lo_import, pg_lo_open, pg_lo_unlink, pg_host, pg_port, pg_dbname, pg_options, pg_copy_from, pg_copy_to, pg_end_copy, pg_put_line, pg_tty, pg_trace, pg_untrace, pg_set_client_encoding, pg_client_encoding, pg_meta_data, pg_convert, pg_insert, pg_select, pg_delete, pg_update pg_close PostgreSQL データベースへのリンク (PHP 8.1.0 より前)
pgsql link persistent pg_pconnect pg_affected_rows, pg_query, pg_send_query, pg_get_result, pg_connection_busy, pg_connection_reset, pg_connection_status, pg_last_error, pg_last_notice, pg_lo_create, pg_lo_export, pg_lo_import, pg_lo_open, pg_lo_unlink, pg_host, pg_port, pg_dbname, pg_options, pg_copy_from, pg_copy_to, pg_end_copy, pg_put_line, pg_tty, pg_trace, pg_untrace, pg_set_client_encoding, pg_client_encoding, pg_meta_data, pg_convert, pg_insert, pg_select, pg_delete, pg_update None PostgreSQL データベースへの持続的なリンク
pgsql 結果 pg_execute, pg_query, pg_query_params, pg_get_result pg_fetch_array, pg_fetch_object, pg_fetch_result, pg_fetch_row, pg_field_is_null, pg_field_name, pg_field_num, pg_field_prtlen, pg_field_size, pg_field_type, pg_last_oid, pg_num_fields, pg_num_rows, pg_result_error, pg_result_status pg_free_result PostgreSQL 結果 (PHP 8.1.0 より前)
pgsql string
process proc_open proc_get_status proc_terminate proc_close Process
pspell pspell_new, pspell_new_config, pspell_new_personal pspell_add_to_personal, pspell_add_to_session, pspell_check, pspell_clear_session, pspell_config_ignore, pspell_config_mode, pspell_config_personal, pspell_config_repl, pspell_config_runtogether, pspell_config_save_repl, pspell_save_wordlist, pspell_store_replacement, pspell_suggest None pspell 辞書 (PHP 8.1.0 より前)
pspell config pspell_config_create pspell_new_config None pspell 設定 (PHP 8.1.0 より前)
shmop shmop_open shmop_read, shmop_write, shmop_size, shmop_delete shmop_close 共有メモリブロックハンドル (PHP 8.0.0 より前)
ソケット socket_accept, socket_addrinfo_bind, socket_addrinfo_connect, socket_create, socket_create_listen, socket_import_stream, socket_wsaprotocol_info_import socket_accept, socket_bind, socket_clear_error, socket_connect, socket_get_option, socket_getpeername, socket_getsockname, socket_last_error, socket_listen, socket_read, socket_recv, socket_recvfrom, socket_recvmsg, socket_select, socket_send, socket_sendmsg, socket_sendto, socket_set_block, socket_set_nonblock, socket_set_option, socket_shutdown, socket_write, socket_wsaprotocol_info_export, socket_wsaprotocol_info_release socket_close Socket (ソケット拡張モジュール)
stream opendir readdir, rewinddir closedir ディレクトリハンドル
stream fopen, tmpfile feof, fflush, fgetc, fgetcsv, fgets, fgetss, flock, fpassthru, fputs, fwrite, fread, fseek, ftell, fstat, ftruncate, set_file_buffer, rewind fclose ファイルハンドル
stream popen, fsockopen, pfsockopen feof, fflush, fgetc, fgetcsv, fgets, fgetss, fpassthru, fputs, fwrite, fread pclose Process handle
socket fflush, fgetc, fgetcsv, fgets, fgetss, fpassthru, fputs, fwrite, fread fclose ソケットハンドル
SSH2 セッション ssh2_connect ssh2_disconnect  
SSH2 リスナー ssh2_forward_listen  
SSH2 SFTP ssh2_sftp  
SSH2 公開鍵サブシステム ssh2_publickey_init  
sysvmsg queue msg_get_queue msg_queue_exists, msg_receive, msg_send, msg_set_queue, msg_stat_queue msg_remove_queue System V メッセージキュー(PHP 8.0.0 より前)
sysvsem sem_get sem_acquire sem_release System V セマフォ(PHP 8.0.0 より前)
sysvshm shm_attach shm_remove, shm_put_var, shm_get_var, shm_remove_var shm_detach System V 共有メモリ(PHP 8.0.0 より前)
wddx wddx_packet_start wddx_add_vars wddx_packet_end WDDX packet
xml xml_parser_create, xml_parser_create_ns xml_set_object, xml_set_element_handler, xml_set_character_data_handler, xml_set_processing_instruction_handler, xml_set_default_handler, xml_set_unparsed_entity_decl_handler, xml_set_notation_decl_handler, xml_set_external_entity_ref_handler, xml_parse, xml_get_error_code, xml_error_string, xml_get_current_line_number, xml_get_current_column_number, xml_get_current_byte_index, xml_parse_into_struct, xml_parser_set_option, xml_parser_get_option xml_parser_free XML パーサ(PHP 8.0.0 より前)
zlib gzopen gzeof, gzgetc, gzgets, gzgetss, gzpassthru, gzputs, gzread, gzrewind, gzseek, gztell, gzwrite gzclose gz で圧縮したファイル
zlib.deflate deflate_init deflate_add なし インクリメンタル圧縮コンテキスト(PHP 8.0.0 より前)
zlib.inflate inflate_init inflate_add inflate_add, inflate_get_read_len, inflate_get_status なし インクリメンタル伸長コンテキスト(PHP 8.0.0 より前)