Skip to content

Commit bf645d6

Browse files
committed
Remove unnecessary F0 type information from OPCache
Closes GH-5024
1 parent 297b1f8 commit bf645d6

File tree

1 file changed

+1
-78
lines changed

1 file changed

+1
-78
lines changed

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,7 @@ static const func_info_t func_infos[] = {
197197
FN("str_pad", MAY_BE_STRING),
198198
F1("strchr", MAY_BE_FALSE | MAY_BE_STRING),
199199
F1("sprintf", MAY_BE_FALSE | MAY_BE_STRING),
200-
F0("printf", MAY_BE_FALSE | MAY_BE_LONG),
201-
F0("vprintf", MAY_BE_FALSE | MAY_BE_LONG),
202200
F1("vsprintf", MAY_BE_FALSE | MAY_BE_STRING),
203-
F0("fprintf", MAY_BE_FALSE | MAY_BE_LONG),
204-
F0("vfprintf", MAY_BE_FALSE | MAY_BE_LONG),
205201
F1("sscanf", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
206202
F1("fscanf", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
207203
F1("parse_url", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_LONG),
@@ -213,7 +209,6 @@ static const func_info_t func_infos[] = {
213209
#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
214210
F1("readlink", MAY_BE_FALSE | MAY_BE_STRING),
215211
#endif
216-
F0("unlink", MAY_BE_FALSE | MAY_BE_TRUE),
217212
F1("exec", MAY_BE_FALSE | MAY_BE_STRING),
218213
F1("system", MAY_BE_FALSE | MAY_BE_STRING),
219214
F1("escapeshellcmd", MAY_BE_STRING),
@@ -223,9 +218,6 @@ static const func_info_t func_infos[] = {
223218
#ifdef PHP_CAN_SUPPORT_PROC_OPEN
224219
F1("proc_open", MAY_BE_FALSE | MAY_BE_RESOURCE),
225220
F1("proc_get_status", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
226-
#endif
227-
#ifdef HAVE_NICE
228-
F0("proc_nice", MAY_BE_FALSE | MAY_BE_TRUE),
229221
#endif
230222
F1("random_bytes", MAY_BE_STRING),
231223
#if HAVE_GETSERVBYPORT
@@ -283,12 +275,8 @@ static const func_info_t func_infos[] = {
283275
FN("forward_static_call_array", UNKNOWN_INFO),
284276
F1("serialize", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
285277
FN("unserialize", UNKNOWN_INFO),
286-
F0("var_dump", MAY_BE_NULL),
287278
F1("var_export", MAY_BE_NULL | MAY_BE_STRING),
288-
F0("debug_zval_dump", MAY_BE_NULL),
289279
F1("print_r", MAY_BE_TRUE | MAY_BE_STRING),
290-
F0("memory_get_usage", MAY_BE_FALSE | MAY_BE_LONG),
291-
F0("memory_get_peak_usage", MAY_BE_FALSE | MAY_BE_LONG),
292280
F0("register_shutdown_function", MAY_BE_NULL | MAY_BE_FALSE),
293281
F1("highlight_file", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
294282
F1("show_source", MAY_BE_FALSE | MAY_BE_STRING),
@@ -301,7 +289,6 @@ static const func_info_t func_infos[] = {
301289
F1("get_include_path", MAY_BE_FALSE | MAY_BE_STRING),
302290
F1("set_include_path", MAY_BE_FALSE | MAY_BE_STRING),
303291
F1("headers_list", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
304-
F0("http_response_code", MAY_BE_FALSE | MAY_BE_LONG),
305292
F1("parse_ini_file", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
306293
F1("parse_ini_string", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
307294
#if ZEND_DEBUG
@@ -318,95 +305,46 @@ static const func_info_t func_infos[] = {
318305
F1("dns_get_record", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY),
319306
# endif
320307
#endif
321-
F0("intval", MAY_BE_LONG),
322-
F0("floatval", MAY_BE_DOUBLE),
323-
F0("doubleval", MAY_BE_DOUBLE),
324308
FN("strval", MAY_BE_STRING),
325-
F0("boolval", MAY_BE_FALSE | MAY_BE_TRUE),
326309
FN("gettype", MAY_BE_STRING),
327-
F0("settype", MAY_BE_FALSE | MAY_BE_TRUE),
328-
F0("pclose", MAY_BE_FALSE | MAY_BE_LONG),
329310
F1("popen", MAY_BE_FALSE | MAY_BE_RESOURCE),
330-
F0("readfile", MAY_BE_FALSE | MAY_BE_LONG),
331-
F0("rewind", MAY_BE_FALSE | MAY_BE_TRUE),
332-
F0("rmdir", MAY_BE_FALSE | MAY_BE_TRUE),
333-
F0("umask", MAY_BE_FALSE | MAY_BE_LONG),
334-
F0("fclose", MAY_BE_FALSE | MAY_BE_TRUE),
335-
F0("feof", MAY_BE_FALSE | MAY_BE_TRUE),
336311
F1("fgetc", MAY_BE_FALSE | MAY_BE_STRING),
337312
F1("fgets", MAY_BE_FALSE | MAY_BE_STRING),
338313
F1("fread", MAY_BE_FALSE | MAY_BE_STRING),
339314
F1("fopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
340-
F0("fpassthru", MAY_BE_LONG),
341-
F0("ftruncate", MAY_BE_FALSE | MAY_BE_TRUE),
342315
F1("fstat", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG),
343-
F0("fseek", MAY_BE_LONG),
344-
F0("ftell", MAY_BE_FALSE | MAY_BE_LONG),
345-
F0("fflush", MAY_BE_FALSE | MAY_BE_TRUE),
346-
F0("fwrite", MAY_BE_FALSE | MAY_BE_LONG),
347-
F0("fputs", MAY_BE_FALSE | MAY_BE_LONG),
348-
F0("mkdir", MAY_BE_FALSE | MAY_BE_TRUE),
349-
F0("rename", MAY_BE_FALSE | MAY_BE_TRUE),
350-
F0("copy", MAY_BE_FALSE | MAY_BE_TRUE),
351316
F1("tempnam", MAY_BE_FALSE | MAY_BE_STRING),
352317
F1("tmpfile", MAY_BE_FALSE | MAY_BE_RESOURCE),
353318
F1("file", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
354319
F1("file_get_contents", MAY_BE_FALSE | MAY_BE_STRING),
355-
F0("file_put_contents", MAY_BE_FALSE | MAY_BE_LONG),
356-
F0("stream_select", MAY_BE_FALSE | MAY_BE_LONG),
357320
F1("stream_context_create", MAY_BE_FALSE | MAY_BE_RESOURCE),
358321
F0("stream_context_set_params", MAY_BE_FALSE | MAY_BE_TRUE),
359322
F1("stream_context_get_params", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
360-
F0("stream_context_set_option", MAY_BE_FALSE | MAY_BE_TRUE),
361323
FN("stream_context_get_options", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
362324
FN("stream_context_get_default", MAY_BE_FALSE | MAY_BE_RESOURCE),
363325
FN("stream_context_set_default", MAY_BE_FALSE | MAY_BE_RESOURCE),
364326
FN("stream_filter_prepend", MAY_BE_FALSE | MAY_BE_RESOURCE),
365327
FN("stream_filter_append", MAY_BE_FALSE | MAY_BE_RESOURCE),
366-
F0("stream_filter_remove", MAY_BE_FALSE | MAY_BE_TRUE),
367328
F1("stream_socket_client", MAY_BE_FALSE | MAY_BE_RESOURCE),
368329
F1("stream_socket_server", MAY_BE_FALSE | MAY_BE_RESOURCE),
369330
F1("stream_socket_accept", MAY_BE_FALSE | MAY_BE_RESOURCE),
370331
F1("stream_socket_get_name", MAY_BE_FALSE | MAY_BE_STRING),
371332
F1("stream_socket_recvfrom", MAY_BE_FALSE | MAY_BE_STRING),
372-
F0("stream_socket_sendto", MAY_BE_FALSE | MAY_BE_LONG),
373-
F0("stream_socket_enable_crypto", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG),
374-
#ifdef HAVE_SHUTDOWN
375-
F0("stream_socket_shutdown", MAY_BE_FALSE | MAY_BE_TRUE),
376-
#endif
377333
#if HAVE_SOCKETPAIR
378334
F1("stream_socket_pair", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_RESOURCE),
379335
#endif
380-
F0("stream_copy_to_stream", MAY_BE_FALSE | MAY_BE_LONG),
381336
F1("stream_get_contents", MAY_BE_FALSE | MAY_BE_STRING),
382-
F0("stream_supports_lock", MAY_BE_FALSE | MAY_BE_TRUE),
383337
F1("fgetcsv", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
384-
F0("fputcsv", MAY_BE_FALSE | MAY_BE_LONG),
385-
F0("flock", MAY_BE_FALSE | MAY_BE_TRUE),
386338
F1("get_meta_tags", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
387-
F0("stream_set_read_buffer", MAY_BE_FALSE | MAY_BE_LONG),
388-
F0("stream_set_write_buffer", MAY_BE_FALSE | MAY_BE_LONG),
389-
F0("set_file_buffer", MAY_BE_FALSE | MAY_BE_LONG),
390-
F0("stream_set_chunk_size", MAY_BE_FALSE | MAY_BE_LONG),
391-
F0("stream_set_blocking", MAY_BE_FALSE | MAY_BE_TRUE),
392-
F0("socket_set_blocking", MAY_BE_FALSE | MAY_BE_TRUE),
393339
F1("stream_get_meta_data", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
394340
F1("stream_get_line", MAY_BE_FALSE | MAY_BE_STRING),
395341
F1("stream_get_wrappers", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
396342
F1("stream_get_transports", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
397343
F1("stream_resolve_include_path", MAY_BE_FALSE | MAY_BE_STRING),
398-
F0("stream_is_local", MAY_BE_FALSE | MAY_BE_TRUE),
399344
F1("get_headers", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
400-
#if HAVE_SYS_TIME_H || defined(PHP_WIN32)
401-
F0("stream_set_timeout", MAY_BE_FALSE | MAY_BE_TRUE),
402-
F0("socket_set_timeout", MAY_BE_FALSE | MAY_BE_TRUE),
403-
#endif
404345
F1("socket_get_status", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
405346
#if HAVE_REALPATH || defined(ZTS)
406347
F1("realpath", MAY_BE_FALSE | MAY_BE_STRING),
407-
#endif
408-
#ifdef HAVE_FNMATCH
409-
F0("fnmatch", MAY_BE_FALSE | MAY_BE_TRUE),
410348
#endif
411349
F1("fsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
412350
FN("pfsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
@@ -503,15 +441,12 @@ static const func_info_t func_infos[] = {
503441
FN("array_key_last", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING),
504442
F1("pos", UNKNOWN_INFO),
505443
F1("assert_options", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_OBJECT | MAY_BE_OBJECT),
506-
F0("version_compare", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG),
507444
F1("str_rot13", MAY_BE_STRING),
508445
F1("stream_get_filters", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
509-
F0("stream_filter_register", MAY_BE_FALSE | MAY_BE_TRUE),
510446
F1("stream_bucket_make_writeable", MAY_BE_NULL | MAY_BE_OBJECT),
511447
F1("stream_bucket_prepend", MAY_BE_FALSE | MAY_BE_OBJECT),
512448
F1("stream_bucket_append", MAY_BE_FALSE | MAY_BE_OBJECT),
513449
F1("stream_bucket_new", MAY_BE_FALSE | MAY_BE_OBJECT),
514-
F0("output_reset_rewrite_vars", MAY_BE_FALSE),
515450
F1("sys_get_temp_dir", MAY_BE_STRING),
516451

517452
/* ext/date */
@@ -772,22 +707,16 @@ static const func_info_t func_infos[] = {
772707
F1("hash_algos", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
773708
F1("hash_pbkdf2", MAY_BE_STRING),
774709
F1("mhash_keygen_s2k", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
775-
F0("mhash_get_block_size", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
776710
F1("mhash_get_hash_name", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
777-
F0("mhash_count", MAY_BE_LONG),
778711
F1("mhash", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
779712

780713
/* ext/sodium */
781-
F0("sodium_memzero", MAY_BE_NULL),
782-
F0("sodium_increment", MAY_BE_NULL),
783-
F0("sodium_add", MAY_BE_NULL),
784-
F0("sodium_memcmp", MAY_BE_NULL | MAY_BE_LONG),
785714
F1("sodium_crypto_shorthash", MAY_BE_NULL | MAY_BE_STRING),
786715
F1("sodium_crypto_secretbox", MAY_BE_NULL | MAY_BE_STRING),
787716
F1("sodium_crypto_secretbox_open", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
788717
F1("sodium_crypto_generichash", MAY_BE_NULL | MAY_BE_STRING),
789718
F1("sodium_crypto_generichash_init", MAY_BE_NULL | MAY_BE_STRING),
790-
F0("sodium_crypto_generichash_update", MAY_BE_NULL | MAY_BE_TRUE),
719+
F0("sodium_crypto_generichash_update", MAY_BE_TRUE),
791720
F1("sodium_crypto_generichash_final", MAY_BE_NULL | MAY_BE_STRING),
792721
F1("sodium_crypto_box_keypair", MAY_BE_STRING),
793722
F1("sodium_crypto_box_seed_keypair", MAY_BE_NULL | MAY_BE_STRING),
@@ -804,12 +733,10 @@ static const func_info_t func_infos[] = {
804733
F1("sodium_crypto_sign", MAY_BE_NULL | MAY_BE_STRING),
805734
F1("sodium_crypto_sign_open", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
806735
F1("sodium_crypto_sign_detached", MAY_BE_NULL | MAY_BE_STRING),
807-
F0("sodium_crypto_sign_verify_detached", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
808736
F1("sodium_crypto_stream", MAY_BE_NULL | MAY_BE_STRING),
809737
F1("sodium_crypto_stream_xor", MAY_BE_NULL | MAY_BE_STRING),
810738
F1("sodium_crypto_pwhash", MAY_BE_NULL | MAY_BE_STRING),
811739
F1("sodium_crypto_pwhash_str", MAY_BE_NULL | MAY_BE_STRING),
812-
F0("sodium_crypto_pwhash_str_verify", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
813740
F1("sodium_crypto_aead_aes256gcm_encrypt", MAY_BE_NULL | MAY_BE_STRING),
814741
F1("sodium_crypto_aead_aes256gcm_decrypt", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
815742
F1("sodium_bin2hex", MAY_BE_NULL | MAY_BE_STRING),
@@ -822,8 +749,6 @@ static const func_info_t func_infos[] = {
822749
F1("sodium_crypto_kx_client_session_keys", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
823750
F1("sodium_crypto_kx_server_session_keys", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
824751
F1("sodium_crypto_auth", MAY_BE_NULL | MAY_BE_STRING),
825-
F0("sodium_crypto_auth_verify", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
826-
F0("sodium_compare", MAY_BE_NULL | MAY_BE_LONG),
827752
F1("sodium_crypto_aead_aes256gcm_keygen", MAY_BE_STRING),
828753
F1("sodium_crypto_auth_keygen", MAY_BE_STRING),
829754
F1("sodium_crypto_generichash_keygen", MAY_BE_STRING),
@@ -841,8 +766,6 @@ static const func_info_t func_infos[] = {
841766
F1("sodium_crypto_sign_publickey_from_secretkey", MAY_BE_NULL | MAY_BE_STRING),
842767
F1("sodium_crypto_pwhash_scryptsalsa208sha256", MAY_BE_NULL | MAY_BE_STRING),
843768
F1("sodium_crypto_pwhash_scryptsalsa208sha256_str", MAY_BE_NULL | MAY_BE_STRING),
844-
F0("sodium_crypto_pwhash_scryptsalsa208sha256_str_verify", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
845-
F0("sodium_crypto_aead_aes256gcm_is_available", MAY_BE_FALSE | MAY_BE_TRUE),
846769
F1("sodium_crypto_sign_ed25519_sk_to_curve25519", MAY_BE_NULL | MAY_BE_STRING),
847770
F1("sodium_crypto_sign_ed25519_pk_to_curve25519", MAY_BE_NULL | MAY_BE_STRING),
848771
F1("sodium_crypto_aead_chacha20poly1305_encrypt", MAY_BE_NULL | MAY_BE_STRING),

0 commit comments

Comments
 (0)