1--TEST--
2ReflectionExtension basics to check API
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6?>
7--FILE--
8<?php
9	$r = new ReflectionExtension("mysql");
10
11	printf("Name: %s\n", $r->name);
12	printf("Version: %s\n", $r->getVersion());
13	$classes = $r->getClasses();
14	if (!empty($classes)) {
15		printf("[002] Expecting no class\n");
16		asort($classes);
17		var_dump($classes);
18	}
19
20	$ignore = array();
21
22	$functions = $r->getFunctions();
23	asort($functions);
24	printf("Functions:\n");
25	foreach ($functions as $func) {
26		if (isset($ignore[$func->name])) {
27			unset($ignore[$func->name]);
28		} else {
29			printf("  %s\n", $func->name);
30		}
31	}
32	if (!empty($ignore)) {
33		printf("Dumping version dependent and missing functions\n");
34		var_dump($ignore);
35	}
36
37
38	print "done!";
39?>
40--EXPECTF--
41Name: mysql
42Version: 1.0
43Functions:
44  mysql
45  mysql_affected_rows
46  mysql_client_encoding
47  mysql_close
48  mysql_connect
49  mysql_data_seek
50  mysql_db_name
51  mysql_db_query
52  mysql_dbname
53  mysql_errno
54  mysql_error
55  mysql_escape_string
56  mysql_fetch_array
57  mysql_fetch_assoc
58  mysql_fetch_field
59  mysql_fetch_lengths
60  mysql_fetch_object
61  mysql_fetch_row
62  mysql_field_flags
63  mysql_field_len
64  mysql_field_name
65  mysql_field_seek
66  mysql_field_table
67  mysql_field_type
68  mysql_fieldflags
69  mysql_fieldlen
70  mysql_fieldname
71  mysql_fieldtable
72  mysql_fieldtype
73  mysql_free_result
74  mysql_freeresult
75  mysql_get_client_info
76  mysql_get_host_info
77  mysql_get_proto_info
78  mysql_get_server_info
79  mysql_info
80  mysql_insert_id
81  mysql_list_dbs
82  mysql_list_fields
83  mysql_list_processes
84  mysql_list_tables
85  mysql_listdbs
86  mysql_listfields
87  mysql_listtables
88  mysql_num_fields
89  mysql_num_rows
90  mysql_numfields
91  mysql_numrows
92  mysql_pconnect
93  mysql_ping
94  mysql_query
95  mysql_real_escape_string
96  mysql_result
97  mysql_select_db
98  mysql_selectdb
99  mysql_set_charset
100  mysql_stat
101  mysql_table_name
102  mysql_tablename
103  mysql_thread_id
104  mysql_unbuffered_query
105done!