Skip to content

Commit 45e529d

Browse files
TysonAndrenikic
authored andcommitted
Fix opcache zend_func_info for microtime/gettimeofday
microtime() doesn't return an array, and gettimeofday() doesn't return a string. See _php_gettimeofday in microtime.c (mode is non-zero for gettimeofday)
1 parent 974e77b commit 45e529d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ static const func_info_t func_infos[] = {
500500
F1("sys_getloadavg", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_DOUBLE),
501501
#endif
502502
#ifdef HAVE_GETTIMEOFDAY
503-
F1("microtime", MAY_BE_NULL | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_STRING),
504-
F1("gettimeofday", MAY_BE_NULL | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_STRING),
503+
F1("microtime", MAY_BE_NULL | MAY_BE_DOUBLE | MAY_BE_STRING),
504+
F1("gettimeofday", MAY_BE_NULL | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
505505
#endif
506506
#ifdef HAVE_GETRUSAGE
507507
F1("getrusage", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),

0 commit comments

Comments
 (0)