From e950ca13ea2e8f012ded007ac1251eea01269542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sun, 20 Sep 2020 10:41:10 +0200 Subject: [PATCH 001/209] Consolidate the usage of "either" and "one of" in error messages Closes GH-6173 --- ext/ftp/php_ftp.c | 4 ++-- ext/ftp/tests/ftp_get_option.phpt | 2 +- ext/ftp/tests/ftp_set_option_errors.phpt | 2 +- ext/gd/gd.c | 2 +- ext/intl/grapheme/grapheme_string.c | 2 +- ext/intl/tests/bug62083.phpt | 2 +- ext/ldap/ldap.c | 2 +- ext/mbstring/mbstring.c | 5 ++-- .../tests/mb_convert_case_various_mode.phpt | 2 +- ext/mbstring/tests/mb_http_input.phpt | 2 +- ext/mysqli/mysqli_api.c | 3 +-- ext/mysqli/mysqli_nonapi.c | 2 +- ext/mysqli/tests/mysqli_query.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_attr_set.phpt | 2 +- ext/pdo_odbc/pdo_odbc.c | 2 +- ext/reflection/php_reflection.c | 2 +- ...nParameter_invalidMethodInConstructor.phpt | 2 +- ext/snmp/snmp.c | 6 ++--- .../tests/snmp-object-setSecurity_error.phpt | 6 ++--- ext/snmp/tests/snmp3-error.phpt | 4 ++-- ext/soap/soap.c | 2 +- ext/sockets/sockets.c | 24 +++++++++---------- .../socket_create_pair-wrongparams-win32.phpt | 4 ++-- .../tests/socket_create_pair-wrongparams.phpt | 4 ++-- ext/standard/file.c | 2 +- ext/standard/tests/file/flock.phpt | 2 +- ext/standard/tests/file/flock_error.phpt | 8 +++---- ext/zlib/tests/007.phpt | 4 ++-- ext/zlib/tests/deflate_init_error.phpt | 2 +- ext/zlib/tests/gzcompress_error1.phpt | 2 +- ext/zlib/tests/gzdeflate_error1.phpt | 2 +- ext/zlib/tests/gzencode_error1.phpt | 2 +- ext/zlib/zlib.c | 6 ++--- sapi/phpdbg/phpdbg.c | 2 +- 34 files changed, 60 insertions(+), 62 deletions(-) diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 0a185ef27294f..a6dca8c874bf7 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -1284,7 +1284,7 @@ PHP_FUNCTION(ftp_set_option) RETURN_TRUE; break; default: - zend_argument_value_error(2, "must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS"); + zend_argument_value_error(2, "must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS"); RETURN_THROWS(); break; } @@ -1317,7 +1317,7 @@ PHP_FUNCTION(ftp_get_option) RETURN_BOOL(ftp->usepasvaddress); break; default: - zend_argument_value_error(2, "must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS"); + zend_argument_value_error(2, "must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS"); RETURN_THROWS(); } } diff --git a/ext/ftp/tests/ftp_get_option.phpt b/ext/ftp/tests/ftp_get_option.phpt index 336243d64ba75..13ed76fff15f3 100644 --- a/ext/ftp/tests/ftp_get_option.phpt +++ b/ext/ftp/tests/ftp_get_option.phpt @@ -28,4 +28,4 @@ try { int(%d) bool(true) bool(true) -ftp_get_option(): Argument #2 ($option) must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS +ftp_get_option(): Argument #2 ($option) must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS diff --git a/ext/ftp/tests/ftp_set_option_errors.phpt b/ext/ftp/tests/ftp_set_option_errors.phpt index 03c387975e0b9..3f5476f6c32f0 100644 --- a/ext/ftp/tests/ftp_set_option_errors.phpt +++ b/ext/ftp/tests/ftp_set_option_errors.phpt @@ -49,4 +49,4 @@ ftp_set_option(): Argument #3 ($value) must be greater than 0 for the FTP_TIMEOU ftp_set_option(): Argument #3 ($value) must be of type int for the FTP_TIMEOUT_SEC option, string given ftp_set_option(): Argument #3 ($value) must be of type bool for the FTP_USEPASVADDRESS option, array given ftp_set_option(): Argument #3 ($value) must be of type bool for the FTP_AUTOSEEK option, string given -ftp_set_option(): Argument #2 ($option) must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS +ftp_set_option(): Argument #2 ($option) must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS diff --git a/ext/gd/gd.c b/ext/gd/gd.c index d425b83109a11..6f1ab3cf42b11 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3521,7 +3521,7 @@ PHP_FUNCTION(imageflip) break; default: - zend_argument_value_error(2, "must be either IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH"); + zend_argument_value_error(2, "must be one of IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH"); RETURN_THROWS(); } diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index 8706381e58825..e987c176e1a79 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -778,7 +778,7 @@ PHP_FUNCTION(grapheme_extract) } if ( extract_type < GRAPHEME_EXTRACT_TYPE_MIN || extract_type > GRAPHEME_EXTRACT_TYPE_MAX ) { - zend_argument_value_error(3, "must be either GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS"); + zend_argument_value_error(3, "must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS"); RETURN_THROWS(); } diff --git a/ext/intl/tests/bug62083.phpt b/ext/intl/tests/bug62083.phpt index 5b0f36e4f0872..9896cea79fd84 100644 --- a/ext/intl/tests/bug62083.phpt +++ b/ext/intl/tests/bug62083.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -grapheme_extract(): Argument #3 ($extract_type) must be either GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS +grapheme_extract(): Argument #3 ($extract_type) must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 03926e5a0794f..a50882486ad0b 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -2655,7 +2655,7 @@ PHP_FUNCTION(ldap_modify_batch) modtype != LDAP_MODIFY_BATCH_REPLACE && modtype != LDAP_MODIFY_BATCH_REMOVE_ALL ) { - zend_value_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be one of LDAP_MODIFY_BATCH_ADD, LDAP_MODIFY_BATCH_REMOVE, LDAP_MODIFY_BATCH_REPLACE, or LDAP_MODIFY_BATCH_REMOVE_ALL", get_active_function_name()); + zend_value_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be one of the LDAP_MODIFY_BATCH_* constants", get_active_function_name()); RETURN_THROWS(); } diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 274feec35ef5b..ba992af930be6 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1307,7 +1307,7 @@ PHP_FUNCTION(mb_http_input) return; default: zend_argument_value_error(1, - "must be one of \"G\", \"P\", \"C\", \"S\", \"I\" or \"L\""); + "must be one of \"G\", \"P\", \"C\", \"S\", \"I\", or \"L\""); RETURN_THROWS(); } } @@ -2596,8 +2596,7 @@ PHP_FUNCTION(mb_convert_case) } if (case_mode < 0 || case_mode > PHP_UNICODE_CASE_MODE_MAX) { - zend_argument_value_error(2, "must be one of MB_CASE_UPPER, MB_CASE_LOWER, MB_CASE_TITLE, MB_CASE_FOLD," - " MB_CASE_UPPER_SIMPLE, MB_CASE_LOWER_SIMPLE, MB_CASE_TITLE_SIMPLE, or MB_CASE_FOLD_SIMPLE"); + zend_argument_value_error(2, "must be one of the MB_CASE_* constants"); RETURN_THROWS(); } diff --git a/ext/mbstring/tests/mb_convert_case_various_mode.phpt b/ext/mbstring/tests/mb_convert_case_various_mode.phpt index cd278ae52fff8..50653687aacd7 100644 --- a/ext/mbstring/tests/mb_convert_case_various_mode.phpt +++ b/ext/mbstring/tests/mb_convert_case_various_mode.phpt @@ -31,4 +31,4 @@ string(13) "FOO BAR SPAß" string(13) "foo bar spaß" string(13) "Foo Bar Spaß" string(13) "foo bar spaß" -mb_convert_case(): Argument #2 ($mode) must be one of MB_CASE_UPPER, MB_CASE_LOWER, MB_CASE_TITLE, MB_CASE_FOLD, MB_CASE_UPPER_SIMPLE, MB_CASE_LOWER_SIMPLE, MB_CASE_TITLE_SIMPLE, or MB_CASE_FOLD_SIMPLE +mb_convert_case(): Argument #2 ($mode) must be one of the MB_CASE_* constants diff --git a/ext/mbstring/tests/mb_http_input.phpt b/ext/mbstring/tests/mb_http_input.phpt index e6bb0528ec428..d1fba60f3ff49 100644 --- a/ext/mbstring/tests/mb_http_input.phpt +++ b/ext/mbstring/tests/mb_http_input.phpt @@ -43,4 +43,4 @@ array(1) { string(10) "ISO-8859-1" } string(10) "ISO-8859-1" -mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I" or "L" +mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L" diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 2263c75434e34..928031f82e78d 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -2270,8 +2270,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set) case CURSOR_TYPE_SCROLLABLE: break; default: - zend_argument_value_error(ERROR_ARG_POS(3), "must be one of MYSQLI_CURSOR_TYPE_NO_CURSOR, " - "MYSQLI_CURSOR_TYPE_READ_ONLY, MYSQLI_CURSOR_TYPE_FOR_UPDATE, or MYSQLI_CURSOR_TYPE_SCROLLABLE " + zend_argument_value_error(ERROR_ARG_POS(3), "must be one of the MYSQLI_CURSOR_TYPE_* constants " "for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE"); RETURN_THROWS(); } diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 85c08c5b2f7da..5bbb1d38888cd 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -639,7 +639,7 @@ PHP_FUNCTION(mysqli_query) if ((resultmode & ~MYSQLI_ASYNC) != MYSQLI_USE_RESULT && MYSQLI_STORE_RESULT != (resultmode & ~(MYSQLI_ASYNC | MYSQLI_STORE_RESULT_COPY_DATA)) ) { - zend_argument_value_error(ERROR_ARG_POS(3), "must be either MYSQLI_USE_RESULT, or MYSQLI_STORE_RESULT" + zend_argument_value_error(ERROR_ARG_POS(3), "must be either MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT" #ifdef MYSQLI_USE_MYSQLND " with MYSQLI_ASYNC as an optional bitmask flag" #endif diff --git a/ext/mysqli/tests/mysqli_query.phpt b/ext/mysqli/tests/mysqli_query.phpt index 90fc24cf9c852..e2f6de3995dfe 100644 --- a/ext/mysqli/tests/mysqli_query.phpt +++ b/ext/mysqli/tests/mysqli_query.phpt @@ -125,6 +125,6 @@ array(1) { string(1) "a" } string(1) "a" -mysqli_query(): Argument #3 ($result_mode) must be either MYSQLI_USE_RESULT, or MYSQLI_STORE_RESULT%S +mysqli_query(): Argument #3 ($result_mode) must be either MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT%S mysqli object is already closed done! diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt index 16d789f37f7fd..40018305caafd 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt @@ -245,6 +245,6 @@ Error: mysqli_stmt object is not fully initialized mysqli_stmt_attr_set(): Argument #2 ($attr) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH bool(true) -mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of MYSQLI_CURSOR_TYPE_NO_CURSOR, MYSQLI_CURSOR_TYPE_READ_ONLY, MYSQLI_CURSOR_TYPE_FOR_UPDATE, or MYSQLI_CURSOR_TYPE_SCROLLABLE for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE +mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS done! diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c index d0c2f913ff9aa..21654d4062782 100644 --- a/ext/pdo_odbc/pdo_odbc.c +++ b/ext/pdo_odbc/pdo_odbc.c @@ -87,7 +87,7 @@ PHP_MINIT_FUNCTION(pdo_odbc) } else if (*pooling_val == '\0' || strcasecmp(pooling_val, "off") == 0) { pdo_odbc_pool_on = SQL_CP_OFF; } else { - php_error_docref(NULL, E_CORE_ERROR, "Error in pdo_odbc.connection_pooling configuration. Value MUST be one of 'strict', 'relaxed' or 'off'"); + php_error_docref(NULL, E_CORE_ERROR, "Error in pdo_odbc.connection_pooling configuration. Value must be one of \"strict\", \"relaxed\", or \"off\""); return FAILURE; } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 292e1901e4da9..470b52e6c7b5b 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2320,7 +2320,7 @@ ZEND_METHOD(ReflectionParameter, __construct) break; default: - zend_argument_error(reflection_exception_ptr, 1, "must be either a string, an array(class, method) or a callable object, %s given", zend_zval_type_name(reference)); + zend_argument_error(reflection_exception_ptr, 1, "must be a string, an array(class, method), or a callable object, %s given", zend_zval_type_name(reference)); RETURN_THROWS(); } diff --git a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt index 917f079fd9049..aa88c45449e75 100644 --- a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt +++ b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt @@ -44,5 +44,5 @@ Class "A" does not exist Method C::b() does not exist Method C::b() does not exist Ok - ReflectionParameter::__construct() expects exactly 2 arguments, 1 given -Ok - ReflectionParameter::__construct(): Argument #1 ($function) must be either a string, an array(class, method) or a callable object, int given +Ok - ReflectionParameter::__construct(): Argument #1 ($function) must be a string, an array(class, method), or a callable object, int given Done. diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 5eb8d0b33870d..0ca49fc208cd2 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -941,7 +941,7 @@ static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot) s->securityAuthProto = usmHMACSHA1AuthProtocol; s->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN; } else { - zend_value_error("Authentication protocol must be either MD5 or SHA"); + zend_value_error("Authentication protocol must be either \"MD5\" or \"SHA\""); return (-1); } return (0); @@ -962,9 +962,9 @@ static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot) #endif } else { #ifdef HAVE_AES - zend_value_error("Security protocol must be one of DES, AES128, or AES"); + zend_value_error("Security protocol must be one of \"DES\", \"AES128\", or \"AES\""); #else - zend_value_error("Security protocol must be DES"); + zend_value_error("Security protocol must be \"DES\""); #endif return (-1); } diff --git a/ext/snmp/tests/snmp-object-setSecurity_error.phpt b/ext/snmp/tests/snmp-object-setSecurity_error.phpt index b0bf03bd3d5e2..7d5f1912daee5 100644 --- a/ext/snmp/tests/snmp-object-setSecurity_error.phpt +++ b/ext/snmp/tests/snmp-object-setSecurity_error.phpt @@ -59,15 +59,15 @@ var_dump($session->close()); --EXPECTF-- Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv" Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv" -Authentication protocol must be either MD5 or SHA +Authentication protocol must be either "MD5" or "SHA" Warning: SNMP::setSecurity(): Error generating a key for authentication pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d bool(false) Warning: SNMP::setSecurity(): Error generating a key for authentication pass phrase 'te': Generic error (The supplied password length is too short.) in %s on line %d bool(false) -Security protocol must be one of DES, AES128, or AES -Security protocol must be one of DES, AES128, or AES +Security protocol must be one of "DES", "AES128", or "AES" +Security protocol must be one of "DES", "AES128", or "AES" Warning: SNMP::setSecurity(): Error generating a key for privacy pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d bool(false) diff --git a/ext/snmp/tests/snmp3-error.phpt b/ext/snmp/tests/snmp3-error.phpt index 7c07d13fa957f..20b4ede70e50d 100644 --- a/ext/snmp/tests/snmp3-error.phpt +++ b/ext/snmp/tests/snmp3-error.phpt @@ -58,14 +58,14 @@ try { Checking error handling Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv" Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv" -Authentication protocol must be either MD5 or SHA +Authentication protocol must be either "MD5" or "SHA" Warning: snmp3_get(): Error generating a key for authentication pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d bool(false) Warning: snmp3_get(): Error generating a key for authentication pass phrase 'te': Generic error (The supplied password length is too short.) in %s on line %d bool(false) -Security protocol must be one of DES, AES128, or AES +Security protocol must be one of "DES", "AES128", or "AES" Warning: snmp3_get(): Error generating a key for privacy pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d bool(false) diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 446436db5f87c..b79a6f531cdb9 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -587,7 +587,7 @@ PHP_METHOD(SoapHeader, __construct) if ((actor_long == SOAP_ACTOR_NEXT || actor_long == SOAP_ACTOR_NONE || actor_long == SOAP_ACTOR_UNLIMATERECEIVER)) { add_property_long(this_ptr, "actor", actor_long); } else { - zend_argument_value_error(5, "must be either SOAP_ACTOR_NEXT, SOAP_ACTOR_NONE or SOAP_ACTOR_UNLIMATERECEIVER"); + zend_argument_value_error(5, "must be one of SOAP_ACTOR_NEXT, SOAP_ACTOR_NONE, or SOAP_ACTOR_UNLIMATERECEIVER"); RETURN_THROWS(); } } diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 21c107adecfc7..729477ab59f3e 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -1137,7 +1137,7 @@ PHP_FUNCTION(socket_getsockname) break; default: - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6"); RETURN_THROWS(); } } @@ -1212,7 +1212,7 @@ PHP_FUNCTION(socket_getpeername) break; default: - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6"); RETURN_THROWS(); } } @@ -1233,12 +1233,12 @@ PHP_FUNCTION(socket_create) && domain != AF_INET6 #endif && domain != AF_INET) { - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET6, or AF_INET"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET6, or AF_INET"); RETURN_THROWS(); } if (type > 10) { - zend_argument_value_error(2, "must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET," + zend_argument_value_error(2, "must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET," " SOCK_RAW, or SOCK_RDM"); RETURN_THROWS(); } @@ -1337,7 +1337,7 @@ PHP_FUNCTION(socket_connect) } default: - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6"); RETURN_THROWS(); } @@ -1431,7 +1431,7 @@ PHP_FUNCTION(socket_bind) } #endif default: - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6"); RETURN_THROWS(); } @@ -1625,7 +1625,7 @@ PHP_FUNCTION(socket_recvfrom) break; #endif default: - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6"); RETURN_THROWS(); } @@ -1705,7 +1705,7 @@ PHP_FUNCTION(socket_sendto) break; #endif default: - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6"); RETURN_THROWS(); } @@ -1987,12 +1987,12 @@ PHP_FUNCTION(socket_create_pair) && domain != AF_INET6 #endif && domain != AF_UNIX) { - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET6 or AF_INET"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET6, or AF_INET"); RETURN_THROWS(); } if (type > 10) { - zend_argument_value_error(2, "must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET," + zend_argument_value_error(2, "must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET," " SOCK_RAW, or SOCK_RDM"); RETURN_THROWS(); } @@ -2402,7 +2402,7 @@ PHP_FUNCTION(socket_addrinfo_bind) default: close(php_sock->bsd_socket); zval_ptr_dtor(return_value); - zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6"); + zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6"); RETURN_THROWS(); } @@ -2463,7 +2463,7 @@ PHP_FUNCTION(socket_addrinfo_connect) break; } default: - zend_argument_value_error(1, "socket type must be either AF_UNIX, AF_INET, or AF_INET6"); + zend_argument_value_error(1, "socket type must be one of AF_UNIX, AF_INET, or AF_INET6"); close(php_sock->bsd_socket); zval_ptr_dtor(return_value); RETURN_THROWS(); diff --git a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt index 1abab2a1e775c..ff4dd5de064ea 100644 --- a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt +++ b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt @@ -27,8 +27,8 @@ try { ?> --EXPECT-- bool(true) -socket_create_pair(): Argument #1 ($domain) must be either AF_UNIX, AF_INET6 or AF_INET -socket_create_pair(): Argument #2 ($type) must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM +socket_create_pair(): Argument #1 ($domain) must be one of AF_UNIX, AF_INET6, or AF_INET +socket_create_pair(): Argument #2 ($type) must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM --CREDITS-- Till Klampaeckel, till@php.net Berlin TestFest 2009 diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt b/ext/sockets/tests/socket_create_pair-wrongparams.phpt index 8dc56d1e366ad..57111c83f1901 100644 --- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt +++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt @@ -29,8 +29,8 @@ try { --EXPECTF-- Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported in %s on line %d bool(false) -socket_create_pair(): Argument #1 ($domain) must be either AF_UNIX, AF_INET6 or AF_INET -socket_create_pair(): Argument #2 ($type) must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM +socket_create_pair(): Argument #1 ($domain) must be one of AF_UNIX, AF_INET6, or AF_INET +socket_create_pair(): Argument #2 ($type) must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM --CREDITS-- Till Klampaeckel, till@php.net Berlin TestFest 2009 diff --git a/ext/standard/file.c b/ext/standard/file.c index 224e69ffdd553..458b66432b9fe 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -333,7 +333,7 @@ PHPAPI void php_flock_common(php_stream *stream, zend_long operation, act = operation & PHP_LOCK_UN; if (act < 1 || act > 3) { - zend_argument_value_error(operation_arg_num, "must be either LOCK_SH, LOCK_EX, or LOCK_UN"); + zend_argument_value_error(operation_arg_num, "must be one of LOCK_SH, LOCK_EX, or LOCK_UN"); RETURN_THROWS(); } diff --git a/ext/standard/tests/file/flock.phpt b/ext/standard/tests/file/flock.phpt index 68e0f3fd309b8..346029c7cab27 100644 --- a/ext/standard/tests/file/flock.phpt +++ b/ext/standard/tests/file/flock.phpt @@ -60,4 +60,4 @@ int(0) bool(true) int(0) bool(true) -flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN +flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt index 52dd5179bede8..add22959816dc 100644 --- a/ext/standard/tests/file/flock_error.phpt +++ b/ext/standard/tests/file/flock_error.phpt @@ -56,13 +56,13 @@ unlink($file); --EXPECT-- *** Testing error conditions *** --- Iteration 0 --- -flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN +flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN --- Iteration 1 --- -flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN +flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN --- Iteration 2 --- -flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN +flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN --- Iteration 3 --- -flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN +flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN --- Iteration 4 --- flock(): Argument #2 ($operation) must be of type int, array given --- Iteration 5 --- diff --git a/ext/zlib/tests/007.phpt b/ext/zlib/tests/007.phpt index b9255557ff08e..6783b44f4d922 100644 --- a/ext/zlib/tests/007.phpt +++ b/ext/zlib/tests/007.phpt @@ -42,9 +42,9 @@ var_dump(gzencode($string, 9, ZLIB_ENCODING_DEFLATE)); --EXPECTF-- gzencode(): Argument #2 ($level) must be between -1 and 9 gzencode(): Argument #2 ($level) must be between -1 and 9 -gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE +gzencode(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE string(%d) "%a" string(%d) "%a" -gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE +gzencode(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE string(%d) "%a" string(%d) "%a" diff --git a/ext/zlib/tests/deflate_init_error.phpt b/ext/zlib/tests/deflate_init_error.phpt index b31a16be9accf..104d8552e3cfb 100644 --- a/ext/zlib/tests/deflate_init_error.phpt +++ b/ext/zlib/tests/deflate_init_error.phpt @@ -41,7 +41,7 @@ try { ?> --EXPECT-- -deflate_init(): Argument #1 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE +deflate_init(): Argument #1 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE deflate_init(): "level" option must be between -1 and 9 deflate_init(): "level" option must be between -1 and 9 deflate_init(): "memory" option must be between 1 and 9 diff --git a/ext/zlib/tests/gzcompress_error1.phpt b/ext/zlib/tests/gzcompress_error1.phpt index ff09d6568affc..e740de6d0c870 100644 --- a/ext/zlib/tests/gzcompress_error1.phpt +++ b/ext/zlib/tests/gzcompress_error1.phpt @@ -41,4 +41,4 @@ try { gzcompress(): Argument #2 ($level) must be between -1 and 9 -- Testing with invalid encoding -- -gzcompress(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE +gzcompress(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE diff --git a/ext/zlib/tests/gzdeflate_error1.phpt b/ext/zlib/tests/gzdeflate_error1.phpt index fea4dfec002a7..5081f66dc4d17 100644 --- a/ext/zlib/tests/gzdeflate_error1.phpt +++ b/ext/zlib/tests/gzdeflate_error1.phpt @@ -41,4 +41,4 @@ try { gzdeflate(): Argument #2 ($level) must be between -1 and 9 -- Testing with incorrect encoding -- -gzdeflate(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE +gzdeflate(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE diff --git a/ext/zlib/tests/gzencode_error1.phpt b/ext/zlib/tests/gzencode_error1.phpt index 951437b98a085..00d70f93982b8 100644 --- a/ext/zlib/tests/gzencode_error1.phpt +++ b/ext/zlib/tests/gzencode_error1.phpt @@ -42,4 +42,4 @@ try { gzencode(): Argument #2 ($level) must be between -1 and 9 -- Testing with incorrect encoding_mode -- -gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE +gzencode(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 6ddda3d7a2649..eab3b02ca575b 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -725,7 +725,7 @@ PHP_FUNCTION(name) \ case PHP_ZLIB_ENCODING_DEFLATE: \ break; \ default: \ - zend_argument_value_error(default_encoding ? 3 : 2, "must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE"); \ + zend_argument_value_error(default_encoding ? 3 : 2, "must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE"); \ RETURN_THROWS(); \ } \ if ((out = php_zlib_encode(ZSTR_VAL(in), ZSTR_LEN(in), encoding, level)) == NULL) { \ @@ -1129,7 +1129,7 @@ PHP_FUNCTION(deflate_init) case Z_DEFAULT_STRATEGY: break; default: - zend_value_error("deflate_init(): \"strategy\" option must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY"); + zend_value_error("deflate_init(): \"strategy\" option must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED, or ZLIB_DEFAULT_STRATEGY"); RETURN_THROWS(); } @@ -1143,7 +1143,7 @@ PHP_FUNCTION(deflate_init) case PHP_ZLIB_ENCODING_DEFLATE: break; default: - zend_argument_value_error(1, "must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE"); + zend_argument_value_error(1, "must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE"); RETURN_THROWS(); } diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 54d06a84c7703..efd2270601ef8 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -438,7 +438,7 @@ PHP_FUNCTION(phpdbg_color) break; default: - zend_argument_value_error(1, "must be either PHPDBG_COLOR_PROMPT, PHPDBG_COLOR_NOTICE, or PHPDBG_COLOR_ERROR"); + zend_argument_value_error(1, "must be one of PHPDBG_COLOR_PROMPT, PHPDBG_COLOR_NOTICE, or PHPDBG_COLOR_ERROR"); } } /* }}} */ From 3b67f183b1ce34e3ebb450d9b342e1718a09cfa7 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 20 Sep 2020 22:20:28 +0100 Subject: [PATCH 002/209] Update README for how to setup IMAP tests This details which packages needs to be installed on Ubuntun 18.04, which configure flags are necessary and what the setup.sh shell script does. --- ext/imap/tests/README.md | 46 ++++++++++------------------------------ 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/ext/imap/tests/README.md b/ext/imap/tests/README.md index 381cdc2e8eb08..6324ab7f9e60b 100644 --- a/ext/imap/tests/README.md +++ b/ext/imap/tests/README.md @@ -9,40 +9,16 @@ files will need to be changed to match the local mailserver configuration. The tests have been checked using dovecot (on Linux 32 and 64 bit systems) and hMailServer on Windows. The tests are intended to be mailserver agnostic. -The tests can be run without modification with a fairly minimal dovecot -installation. For information, the dovecot.conf file used in running the tests -is given below. The dovecot password file (dovecotpass) requires a password for -one user, `webmaster@something.com`. It's also necessary to set up one -additional user ID (vmail) to own the mail directory. +## Set-up tests on Ubuntu (checked on Ubuntu 18.04 (Bionic)) +The necessary packages can be installed using the following command; +`apt-get install libc-client-dev libkrb5-dev dovecot-core dovecot-pop3d dovecot-imapd` -```txt -protocols = imap imaps - -listen = * - -ssl_disable = yes - -disable_plaintext_auth=yes - -## Mailbox locations and namespaces - -mail_location = maildir:/home/vmail/mail/%d/%n/Maildir - -auth_verbose = yes - -auth_debug = yes - -auth default { - mechanisms = login - - passdb passwd-file { - args = /etc/dovecot/dovecotpass - } - - userdb static { - args = uid=11459 gid=1002 home=/home/vmail/dovecot/mail/%d/%n - } - - user = root -} +The build of PHP will need to be compiled with the following flags: +``` +--with-imap --with-kerberos --with-imap-ssl ``` + +Then run the set-up script `ext/imap/tests/setup.sh` which will add the `vmail` +group and user which is used by Dovecot for the mailbox. It will also copy the +`ext/imap/tests/dovecot.conf` and `ext/imap/tests/dovecotpass` to the correct +location for Dovecot and restarts it for the new configuration to be enabled. From 64af12d13bc228dfacd953b93f83a009ed28e0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 19 Sep 2020 20:13:08 +0200 Subject: [PATCH 003/209] Add support for `@implementation-alias` in stubs Closes GH-6170 --- Zend/zend_exceptions.stub.php | 22 ++--- Zend/zend_exceptions_arginfo.h | 2 +- build/gen_stub.php | 9 +- ext/phar/phar_object.stub.php | 112 ++++++++++++------------ ext/phar/phar_object_arginfo.h | 2 +- ext/reflection/php_reflection.stub.php | 16 ++-- ext/reflection/php_reflection_arginfo.h | 2 +- ext/spl/spl_array.stub.php | 40 ++++----- ext/spl/spl_array_arginfo.h | 2 +- ext/spl/spl_directory.stub.php | 6 +- ext/spl/spl_directory_arginfo.h | 2 +- ext/spl/spl_dllist.stub.php | 4 +- ext/spl/spl_dllist_arginfo.h | 2 +- ext/spl/spl_heap.stub.php | 16 ++-- ext/spl/spl_heap_arginfo.h | 2 +- ext/spl/spl_iterators.stub.php | 6 +- ext/spl/spl_iterators_arginfo.h | 2 +- ext/spl/spl_observer.stub.php | 8 +- ext/spl/spl_observer_arginfo.h | 2 +- ext/sqlite3/sqlite3.stub.php | 2 +- ext/sqlite3/sqlite3_arginfo.h | 2 +- ext/standard/basic_functions.stub.php | 3 +- ext/standard/basic_functions_arginfo.h | 2 +- ext/standard/dir.stub.php | 6 +- ext/standard/dir_arginfo.h | 2 +- 25 files changed, 141 insertions(+), 133 deletions(-) diff --git a/Zend/zend_exceptions.stub.php b/Zend/zend_exceptions.stub.php index 9cf55fd38404e..bc90b6f1b5e0c 100644 --- a/Zend/zend_exceptions.stub.php +++ b/Zend/zend_exceptions.stub.php @@ -55,40 +55,40 @@ final public function getSeverity(): int {} class Error implements Throwable { - /** @alias Exception::__clone */ + /** @implementation-alias Exception::__clone */ final private function __clone() {} - /** @alias Exception::__construct */ + /** @implementation-alias Exception::__construct */ public function __construct(string $message = UNKNOWN, int $code = 0, ?Throwable $previous = null) {} - /** @alias Exception::__wakeup */ + /** @implementation-alias Exception::__wakeup */ public function __wakeup() {} - /** @alias Exception::getMessage */ + /** @implementation-alias Exception::getMessage */ final public function getMessage(): string {} /** * @return int - * @alias Exception::getCode + * @implementation-alias Exception::getCode */ final public function getCode() {} - /** @alias Exception::getFile */ + /** @implementation-alias Exception::getFile */ final public function getFile(): string {} - /** @alias Exception::getLine */ + /** @implementation-alias Exception::getLine */ final public function getLine(): int {} - /** @alias Exception::getTrace */ + /** @implementation-alias Exception::getTrace */ final public function getTrace(): array {} - /** @alias Exception::getPrevious */ + /** @implementation-alias Exception::getPrevious */ final public function getPrevious(): ?Throwable {} - /** @alias Exception::getTraceAsString */ + /** @implementation-alias Exception::getTraceAsString */ final public function getTraceAsString(): string {} - /** @alias Exception::__toString */ + /** @implementation-alias Exception::__toString */ public function __toString(): string {} } diff --git a/Zend/zend_exceptions_arginfo.h b/Zend/zend_exceptions_arginfo.h index 6a226954a0c8c..fbab0aa90ea4d 100644 --- a/Zend/zend_exceptions_arginfo.h +++ b/Zend/zend_exceptions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7eb20393f4ca314324d9813983124f724189ce8a */ + * Stub hash: d0679a3c11f089dcb31cfdfe56f0336ceba301a9 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Throwable_getMessage, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/build/gen_stub.php b/build/gen_stub.php index de2d3b144b06d..6cbfb06b276b4 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -362,6 +362,8 @@ class FuncInfo { public $name; /** @var int */ public $flags; + /** @var string|null */ + public $aliasType; /** @var FunctionName|null */ public $alias; /** @var bool */ @@ -378,6 +380,7 @@ class FuncInfo { public function __construct( FunctionName $name, int $flags, + ?string $aliasType, ?FunctionName $alias, bool $isDeprecated, array $args, @@ -387,6 +390,7 @@ public function __construct( ) { $this->name = $name; $this->flags = $flags; + $this->aliasType = $aliasType; $this->alias = $alias; $this->isDeprecated = $isDeprecated; $this->args = $args; @@ -617,6 +621,7 @@ function parseFunctionLike( ): FuncInfo { $comment = $func->getDocComment(); $paramMeta = []; + $aliasType = null; $alias = null; $isDeprecated = false; $haveDocReturnType = false; @@ -631,7 +636,8 @@ function parseFunctionLike( $paramMeta[$varName] = []; } $paramMeta[$varName]['preferRef'] = true; - } else if ($tag->name === 'alias') { + } else if ($tag->name === 'alias' || $tag->name === 'implementation-alias') { + $aliasType = $tag->name; $aliasParts = explode("::", $tag->getValue()); if (count($aliasParts) === 1) { $alias = new FunctionName(null, $aliasParts[0]); @@ -721,6 +727,7 @@ function parseFunctionLike( return new FuncInfo( $name, $flags, + $aliasType, $alias, $isDeprecated, $args, diff --git a/ext/phar/phar_object.stub.php b/ext/phar/phar_object.stub.php index e62a95c0383f6..5fda00d4d7192 100644 --- a/ext/phar/phar_object.stub.php +++ b/ext/phar/phar_object.stub.php @@ -181,191 +181,191 @@ final public static function webPhar( class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAccess { - /** @alias Phar::__construct */ + /** @implementation-alias Phar::__construct */ public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, ?string $alias = null, int $fileformat = 0) {} - /** @alias Phar::__destruct */ + /** @implementation-alias Phar::__destruct */ public function __destruct() {} /** * @return void - * @alias Phar::addEmptyDir + * @implementation-alias Phar::addEmptyDir */ public function addEmptyDir(string $dirname) {} /** * @return void - * @alias Phar::addFile + * @implementation-alias Phar::addFile */ public function addFile(string $filename, ?string $localname = null) {} /** * @return void - * @alias Phar::addFromString + * @implementation-alias Phar::addFromString */ public function addFromString(string $localname, string $contents) {} /** * @return array|false - * @alias Phar::buildFromDirectory + * @implementation-alias Phar::buildFromDirectory */ public function buildFromDirectory(string $base_dir, string $regex = "") {} /** * @return array|false - * @alias Phar::buildFromIterator + * @implementation-alias Phar::buildFromIterator */ public function buildFromIterator(Traversable $iterator, ?string $base_directory = null) {} /** * @return void - * @alias Phar::compressFiles + * @implementation-alias Phar::compressFiles */ public function compressFiles(int $compression_type) {} /** * @return bool - * @alias Phar::decompressFiles + * @implementation-alias Phar::decompressFiles */ public function decompressFiles() {} /** * @return Phar|null - * @alias Phar::compress + * @implementation-alias Phar::compress */ public function compress(int $compression_type, ?string $file_ext = null) {} /** * @return Phar|null - * @alias Phar::decompress + * @implementation-alias Phar::decompress */ public function decompress(?string $file_ext = null) {} /** * @return Phar|null - * @alias Phar::convertToExecutable + * @implementation-alias Phar::convertToExecutable */ public function convertToExecutable(int $format = 9021976, int $compression_type = 9021976, ?string $file_ext = null) {} /** * @return Phar|null - * @alias Phar::convertToData + * @implementation-alias Phar::convertToData */ public function convertToData(int $format = 9021976, int $compression_type = 9021976, ?string $file_ext = null) {} /** * @return bool - * @alias Phar::copy + * @implementation-alias Phar::copy */ public function copy(string $newfile, string $oldfile) {} /** * @return int - * @alias Phar::count + * @implementation-alias Phar::count */ public function count(int $mode = COUNT_NORMAL) {} /** * @return bool - * @alias Phar::delete + * @implementation-alias Phar::delete */ public function delete(string $entry) {} /** * @return bool - * @alias Phar::delMetadata + * @implementation-alias Phar::delMetadata */ public function delMetadata() {} /** * @return bool - * @alias Phar::extractTo + * @implementation-alias Phar::extractTo */ public function extractTo(string $pathto, array|string|null $files = null, bool $overwrite = false) {} /** * @return string|null - * @alias Phar::getAlias + * @implementation-alias Phar::getAlias */ public function getAlias() {} /** * @return string - * @alias Phar::getPath + * @implementation-alias Phar::getPath */ public function getPath() {} /** * @return mixed - * @alias Phar::getMetadata + * @implementation-alias Phar::getMetadata */ public function getMetadata(array $unserialize_options = []) {} /** * @return bool - * @alias Phar::getModified + * @implementation-alias Phar::getModified */ public function getModified() {} /** * @return array|false - * @alias Phar::getSignature + * @implementation-alias Phar::getSignature */ public function getSignature() {} /** * @return string - * @alias Phar::getStub + * @implementation-alias Phar::getStub */ public function getStub() {} /** * @return string - * @alias Phar::getVersion + * @implementation-alias Phar::getVersion */ public function getVersion() {} /** * @return bool - * @alias Phar::hasMetadata + * @implementation-alias Phar::hasMetadata */ public function hasMetadata() {} /** * @return bool - * @alias Phar::isBuffering + * @implementation-alias Phar::isBuffering */ public function isBuffering() {} /** * @return int|false - * @alias Phar::isCompressed + * @implementation-alias Phar::isCompressed */ public function isCompressed() {} /** * @return bool - * @alias Phar::isFileFormat + * @implementation-alias Phar::isFileFormat */ public function isFileFormat(int $fileformat) {} /** * @return bool - * @alias Phar::isWritable + * @implementation-alias Phar::isWritable */ public function isWritable() {} /** * @param string $entry * @return bool - * @alias Phar::offsetExists + * @implementation-alias Phar::offsetExists */ public function offsetExists($entry) {} /** * @param string $entry * @return PharFileInfo - * @alias Phar::offsetGet + * @implementation-alias Phar::offsetGet */ public function offsetGet($entry) {} @@ -373,104 +373,104 @@ public function offsetGet($entry) {} * @param string $entry * @param resource|string $value * @return void - * @alias Phar::offsetSet + * @implementation-alias Phar::offsetSet */ public function offsetSet($entry, $value) {} /** * @param string $entry * @return bool - * @alias Phar::offsetUnset + * @implementation-alias Phar::offsetUnset */ public function offsetUnset($entry) {} /** * @return bool - * @alias Phar::setAlias + * @implementation-alias Phar::setAlias */ public function setAlias(string $alias) {} /** * @return bool - * @alias Phar::setDefaultStub + * @implementation-alias Phar::setDefaultStub */ public function setDefaultStub(?string $index = null, ?string $webindex = null) {} /** * @return void - * @alias Phar::setMetadata + * @implementation-alias Phar::setMetadata */ public function setMetadata(mixed $metadata) {} /** * @return void - * @alias Phar::setSignatureAlgorithm + * @implementation-alias Phar::setSignatureAlgorithm */ public function setSignatureAlgorithm(int $algorithm, ?string $privatekey = null) {} /** * @param resource $newstub * @return bool - * @alias Phar::setStub + * @implementation-alias Phar::setStub */ public function setStub($newstub, int $maxlen = -1) {} /** * @return void - * @alias Phar::startBuffering + * @implementation-alias Phar::startBuffering */ public function startBuffering() {} /** * @return void - * @alias Phar::stopBuffering + * @implementation-alias Phar::stopBuffering */ public function stopBuffering() {} - /** @alias Phar::apiVersion */ + /** @implementation-alias Phar::apiVersion */ final public static function apiVersion(): string {} - /** @alias Phar::canCompress */ + /** @implementation-alias Phar::canCompress */ final public static function canCompress(int $method = 0): bool {} - /** @alias Phar::canWrite */ + /** @implementation-alias Phar::canWrite */ final public static function canWrite(): bool {} - /** @alias Phar::createDefaultStub */ + /** @implementation-alias Phar::createDefaultStub */ final public static function createDefaultStub(?string $index = null, ?string $webindex = null): string {} - /** @alias Phar::getSupportedCompression */ + /** @implementation-alias Phar::getSupportedCompression */ final public static function getSupportedCompression(): array {} - /** @alias Phar::getSupportedSignatures */ + /** @implementation-alias Phar::getSupportedSignatures */ final public static function getSupportedSignatures(): array {} - /** @alias Phar::interceptFileFuncs */ + /** @implementation-alias Phar::interceptFileFuncs */ final public static function interceptFileFuncs(): void {} - /** @alias Phar::isValidPharFilename */ + /** @implementation-alias Phar::isValidPharFilename */ final public static function isValidPharFilename( string $filename, bool $executable = true): bool {} - /** @alias Phar::loadPhar */ + /** @implementation-alias Phar::loadPhar */ final public static function loadPhar(string $filename, ?string $alias = null): bool {} - /** @alias Phar::mapPhar */ + /** @implementation-alias Phar::mapPhar */ final public static function mapPhar(?string $alias = null, int $offset = 0): bool {} - /** @alias Phar::running */ + /** @implementation-alias Phar::running */ final public static function running(bool $retphar = true): string {} - /** @alias Phar::mount */ + /** @implementation-alias Phar::mount */ final public static function mount(string $inphar, string $externalfile): void {} - /** @alias Phar::mungServer */ + /** @implementation-alias Phar::mungServer */ final public static function mungServer(array $munglist): void {} - /** @alias Phar::unlinkArchive */ + /** @implementation-alias Phar::unlinkArchive */ final public static function unlinkArchive(string $archive): bool {} - /** @alias Phar::webPhar */ + /** @implementation-alias Phar::webPhar */ final public static function webPhar( ?string $alias = null, ?string $index = null, string $f404 = "", array $mimetypes = [], ?callable $rewrites = null): void {} diff --git a/ext/phar/phar_object_arginfo.h b/ext/phar/phar_object_arginfo.h index d6c6d5690ed48..916312dba6b4b 100644 --- a/ext/phar/phar_object_arginfo.h +++ b/ext/phar/phar_object_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8f92d8a7b1266cdec193336b36b2319235fbc40c */ + * Stub hash: e67cd4d59555843688a1bdd90ecd7d3924f1ee29 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 1f4bbb5e8608d..b150d1831ded5 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -18,7 +18,7 @@ interface Reflector extends Stringable abstract class ReflectionFunctionAbstract implements Reflector { - /** @alias ReflectionClass::__clone */ + /** @implementation-alias ReflectionClass::__clone */ final private function __clone() {} /** @return bool */ @@ -369,7 +369,7 @@ public function __construct(object $argument) {} class ReflectionProperty implements Reflector { - /** @alias ReflectionClass::__clone */ + /** @implementation-alias ReflectionClass::__clone */ final private function __clone() {} public function __construct(object|string $class, string $property) {} @@ -434,7 +434,7 @@ public function getAttributes(?string $name = null, int $flags = 0): array {} class ReflectionClassConstant implements Reflector { - /** @alias ReflectionClass::__clone */ + /** @implementation-alias ReflectionClass::__clone */ final private function __clone() {} public function __construct(object|string $class, string $constant) {} @@ -471,7 +471,7 @@ public function getAttributes(?string $name = null, int $flags = 0): array {} class ReflectionParameter implements Reflector { - /** @alias ReflectionClass::__clone */ + /** @implementation-alias ReflectionClass::__clone */ final private function __clone() {} /** @param string|array|object $function */ @@ -550,7 +550,7 @@ public function getAttributes(?string $name = null, int $flags = 0): array {} abstract class ReflectionType implements Stringable { - /** @alias ReflectionClass::__clone */ + /** @implementation-alias ReflectionClass::__clone */ final private function __clone() {} /** @return bool */ @@ -575,7 +575,7 @@ public function getTypes(): array {} class ReflectionExtension implements Reflector { - /** @alias ReflectionClass::__clone */ + /** @implementation-alias ReflectionClass::__clone */ final private function __clone() {} public function __construct(string $name) {} @@ -618,7 +618,7 @@ public function isTemporary() {} class ReflectionZendExtension implements Reflector { - /** @alias ReflectionClass::__clone */ + /** @implementation-alias ReflectionClass::__clone */ final private function __clone() {} public function __construct(string $name) {} @@ -647,7 +647,7 @@ public static function fromArrayElement(array $array, int|string $key): ?Reflect public function getId(): string {} - /** @alias ReflectionClass::__clone */ + /** @implementation-alias ReflectionClass::__clone */ private function __clone() {} private function __construct() {} diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index d28770ccaa3ca..5457b14d47003 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c2bd96bf9b5ca866860f8f3c04937c9fff5c3afa */ + * Stub hash: 35e17de0cdf6c11a315f6d10fd711492d1da567c */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) diff --git a/ext/spl/spl_array.stub.php b/ext/spl/spl_array.stub.php index 114f1b6e321ed..b3a058806c88a 100755 --- a/ext/spl/spl_array.stub.php +++ b/ext/spl/spl_array.stub.php @@ -98,118 +98,118 @@ public function __construct(array|object $array = [], int $flags = 0) {} /** * @param string|int $index * @return bool - * @alias ArrayObject::offsetExists + * @implementation-alias ArrayObject::offsetExists */ public function offsetExists($index) {} /** * @param string|int $index * @return mixed - * @alias ArrayObject::offsetGet + * @implementation-alias ArrayObject::offsetGet */ public function offsetGet($index) {} /** * @param string|int $index * @return void - * @alias ArrayObject::offsetSet + * @implementation-alias ArrayObject::offsetSet */ public function offsetSet($index, mixed $value) {} /** * @param string|int $index * @return void - * @alias ArrayObject::offsetUnset + * @implementation-alias ArrayObject::offsetUnset */ public function offsetUnset($index) {} /** * @return void - * @alias ArrayObject::append + * @implementation-alias ArrayObject::append */ public function append(mixed $value) {} /** * @return array - * @alias ArrayObject::getArrayCopy + * @implementation-alias ArrayObject::getArrayCopy */ public function getArrayCopy() {} /** * @return int - * @alias ArrayObject::count + * @implementation-alias ArrayObject::count */ public function count() {} /** * @return int - * @alias ArrayObject::getFlags + * @implementation-alias ArrayObject::getFlags */ public function getFlags() {} /** * @return void - * @alias ArrayObject::setFlags + * @implementation-alias ArrayObject::setFlags */ public function setFlags(int $flags) {} /** * @return bool - * @alias ArrayObject::asort + * @implementation-alias ArrayObject::asort */ public function asort(int $sort_flags = SORT_REGULAR) {} /** * @return bool - * @alias ArrayObject::ksort + * @implementation-alias ArrayObject::ksort */ public function ksort(int $sort_flags = SORT_REGULAR) {} /** * @return bool - * @alias ArrayObject::uasort + * @implementation-alias ArrayObject::uasort */ public function uasort(callable $cmp_function) {} /** * @return bool - * @alias ArrayObject::uksort + * @implementation-alias ArrayObject::uksort */ public function uksort(callable $cmp_function) {} /** * @return bool - * @alias ArrayObject::natsort + * @implementation-alias ArrayObject::natsort */ public function natsort() {} /** * @return bool - * @alias ArrayObject::natcasesort + * @implementation-alias ArrayObject::natcasesort */ public function natcasesort() {} /** * @return void - * @alias ArrayObject::unserialize + * @implementation-alias ArrayObject::unserialize */ public function unserialize(string $serialized) {} /** * @return string - * @alias ArrayObject::serialize + * @implementation-alias ArrayObject::serialize */ public function serialize() {} /** * @return array - * @alias ArrayObject::__serialize + * @implementation-alias ArrayObject::__serialize */ public function __serialize() {} /** * @return void - * @alias ArrayObject::__unserialize + * @implementation-alias ArrayObject::__unserialize */ public function __unserialize(array $data) {} @@ -233,7 +233,7 @@ public function seek(int $position) {} /** * @return array - * @alias ArrayObject::__debugInfo + * @implementation-alias ArrayObject::__debugInfo */ public function __debugInfo() {} } diff --git a/ext/spl/spl_array_arginfo.h b/ext/spl/spl_array_arginfo.h index 1f5fdcc0614ad..75bc3576133c3 100644 --- a/ext/spl/spl_array_arginfo.h +++ b/ext/spl/spl_array_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: bedd13338707177e28a021722df64be2f74a7945 */ + * Stub hash: 1b93d102c6dfa12f65a95a50bbc78c03802e261c */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject___construct, 0, 0, 0) ZEND_ARG_TYPE_MASK(0, input, MAY_BE_ARRAY|MAY_BE_OBJECT, "[]") diff --git a/ext/spl/spl_directory.stub.php b/ext/spl/spl_directory.stub.php index 92c9f8813a2c1..e72a4e5f415c3 100755 --- a/ext/spl/spl_directory.stub.php +++ b/ext/spl/spl_directory.stub.php @@ -90,7 +90,7 @@ public function setFileClass(string $class_name = SplFileObject::class) {} /** @return void */ public function setInfoClass(string $class_name = SplFileInfo::class) {} - /** @alias SplFileInfo::getPathname */ + /** @implementation-alias SplFileInfo::getPathname */ public function __toString(): string {} /** @return array */ @@ -134,7 +134,7 @@ public function next() {} /** @return void */ public function seek(int $position) {} - /** @alias DirectoryIterator::getFilename */ + /** @implementation-alias DirectoryIterator::getFilename */ public function __toString(): string {} } @@ -286,7 +286,7 @@ public function seek(int $line_pos) {} */ public function getCurrentLine() {} - /** @alias SplFileObject::fgets */ + /** @implementation-alias SplFileObject::fgets */ public function __toString(): string {} } diff --git a/ext/spl/spl_directory_arginfo.h b/ext/spl/spl_directory_arginfo.h index 4f1961345fd4f..3f961d2691ebf 100644 --- a/ext/spl/spl_directory_arginfo.h +++ b/ext/spl/spl_directory_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4bf9a6a3687e5d14883d35b26c13b05216c86ac3 */ + * Stub hash: 071a92d8e5998c518e377b5620dfdda6fb189a1d */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0) diff --git a/ext/spl/spl_dllist.stub.php b/ext/spl/spl_dllist.stub.php index 176aa15848581..d3f679a7fbe7e 100755 --- a/ext/spl/spl_dllist.stub.php +++ b/ext/spl/spl_dllist.stub.php @@ -99,13 +99,13 @@ class SplQueue extends SplDoublyLinkedList { /** * @return void - * @alias SplDoublyLinkedList::push + * @implementation-alias SplDoublyLinkedList::push */ public function enqueue(mixed $value) {} /** * @return mixed - * @alias SplDoublyLinkedList::shift + * @implementation-alias SplDoublyLinkedList::shift */ public function dequeue() {} } diff --git a/ext/spl/spl_dllist_arginfo.h b/ext/spl/spl_dllist_arginfo.h index 4ad6e4db5574a..afd1278d58adf 100644 --- a/ext/spl/spl_dllist_arginfo.h +++ b/ext/spl/spl_dllist_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 26a454261393ea3bdb6252b2d8140434664b5771 */ + * Stub hash: 9d17266fba7a05a5fddca0ddf6b64b1c2f683cae */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplDoublyLinkedList_add, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) diff --git a/ext/spl/spl_heap.stub.php b/ext/spl/spl_heap.stub.php index 49f67af85dc4b..8c01068eae54a 100644 --- a/ext/spl/spl_heap.stub.php +++ b/ext/spl/spl_heap.stub.php @@ -21,19 +21,19 @@ public function extract() {} /** * @return int - * @alias SplHeap::count + * @implementation-alias SplHeap::count */ public function count() {} /** * @return bool - * @alias SplHeap::isEmpty + * @implementation-alias SplHeap::isEmpty */ public function isEmpty() {} /** * @return void - * @alias SplHeap::rewind + * @implementation-alias SplHeap::rewind */ public function rewind() {} @@ -42,31 +42,31 @@ public function current() {} /** * @return int - * @alias SplHeap::key + * @implementation-alias SplHeap::key */ public function key() {} /** * @return void - * @alias SplHeap::next + * @implementation-alias SplHeap::next */ public function next() {} /** * @return bool - * @alias SplHeap::valid + * @implementation-alias SplHeap::valid */ public function valid() {} /** * @return bool - * @alias SplHeap::recoverFromCorruption + * @implementation-alias SplHeap::recoverFromCorruption */ public function recoverFromCorruption() {} /** * @return bool - * @alias SplHeap::isCorrupted + * @implementation-alias SplHeap::isCorrupted */ public function isCorrupted() {} diff --git a/ext/spl/spl_heap_arginfo.h b/ext/spl/spl_heap_arginfo.h index f68961ffbb260..aede7a3daf54c 100644 --- a/ext/spl/spl_heap_arginfo.h +++ b/ext/spl/spl_heap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e57b1d7e9139aa2759f548cf800857cccf1d1f25 */ + * Stub hash: 510a58000a5473c4cbb33886f43b9f3050b3a36d */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplPriorityQueue_compare, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, priority1, IS_MIXED, 0) diff --git a/ext/spl/spl_iterators.stub.php b/ext/spl/spl_iterators.stub.php index cda92886687ce..ef2615d2ac8c4 100644 --- a/ext/spl/spl_iterators.stub.php +++ b/ext/spl/spl_iterators.stub.php @@ -34,7 +34,7 @@ public function __construct(RecursiveIterator $iterator, callable $callback) {} /** * @return bool - * @alias RecursiveFilterIterator::hasChildren + * @implementation-alias RecursiveFilterIterator::hasChildren */ public function hasChildren() {} @@ -168,7 +168,7 @@ public function __construct(RecursiveIterator $iterator) {} /** * @return bool - * @alias RecursiveFilterIterator::hasChildren + * @implementation-alias RecursiveFilterIterator::hasChildren */ public function accept() {} } @@ -357,7 +357,7 @@ public function accept() {} /** * @return bool - * @alias RecursiveFilterIterator::hasChildren + * @implementation-alias RecursiveFilterIterator::hasChildren */ public function hasChildren() {} diff --git a/ext/spl/spl_iterators_arginfo.h b/ext/spl/spl_iterators_arginfo.h index 58f414a16c307..f8d000e279aa1 100644 --- a/ext/spl/spl_iterators_arginfo.h +++ b/ext/spl/spl_iterators_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3d98c82203230f2636c7fedb5717da5f7ab973f2 */ + * Stub hash: 38fb46070ea48e774343e59de53797969acf4b06 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_EmptyIterator_current, 0, 0, 0) ZEND_END_ARG_INFO() diff --git a/ext/spl/spl_observer.stub.php b/ext/spl/spl_observer.stub.php index 475f3b8dc7210..ba880a30903a2 100644 --- a/ext/spl/spl_observer.stub.php +++ b/ext/spl/spl_observer.stub.php @@ -73,7 +73,7 @@ public function serialize() {} /** * @param object $object * @return bool - * @alias SplObjectStorage::contains + * @implementation-alias SplObjectStorage::contains */ public function offsetExists($object) {} @@ -86,14 +86,14 @@ public function offsetGet($object) {} /** * @param object $object * @return void - * @alias SplObjectStorage::attach + * @implementation-alias SplObjectStorage::attach */ public function offsetSet($object, mixed $info = null) {} /** * @param object $object * @return void - * @alias SplObjectStorage::detach + * @implementation-alias SplObjectStorage::detach */ public function offsetUnset($object) {} @@ -149,7 +149,7 @@ public function next() {} /** * @return array - * @alias SplObjectStorage::__debugInfo + * @implementation-alias SplObjectStorage::__debugInfo */ public function __debugInfo() {} } diff --git a/ext/spl/spl_observer_arginfo.h b/ext/spl/spl_observer_arginfo.h index eed972b2830e4..5956aedd0a628 100644 --- a/ext/spl/spl_observer_arginfo.h +++ b/ext/spl/spl_observer_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: aab6134fb2223ffe4d686f3a601e66da17c99511 */ + * Stub hash: c526488c83b1de019f4257e2ddaaa8fb8f1bb323 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplObserver_update, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, subject, SplSubject, 0) diff --git a/ext/sqlite3/sqlite3.stub.php b/ext/sqlite3/sqlite3.stub.php index 132bd44cbb8e7..e07286fd2d650 100644 --- a/ext/sqlite3/sqlite3.stub.php +++ b/ext/sqlite3/sqlite3.stub.php @@ -4,7 +4,7 @@ class SQLite3 { - /** @alias SQLite3::open */ + /** @implementation-alias SQLite3::open */ public function __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryption_key = "") {} /** @return void */ diff --git a/ext/sqlite3/sqlite3_arginfo.h b/ext/sqlite3/sqlite3_arginfo.h index ea462fb57ecf8..3f151f9ad1ecd 100644 --- a/ext/sqlite3/sqlite3_arginfo.h +++ b/ext/sqlite3/sqlite3_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 749f2c1a6b0bf3b889a294ad621995ba74e8ab39 */ + * Stub hash: 293f1041949989de457a4091b751674bf301c2bd */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SQLite3___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index aae651df0240a..33357352e8f61 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1309,7 +1309,8 @@ function stream_set_write_buffer($stream, int $buffer): int {} /** * @param resource $stream - * @alias stream_set_write_buffer */ + * @alias stream_set_write_buffer + */ function set_file_buffer($stream, int $buffer): int {} /** @param resource $stream */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 37f6d8c159c67..5919da6b8ea52 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: df6d5ebb0449274b94f1e8707ab54978fd4b7d2f */ + * Stub hash: 3dc6fc3e3cd4bb5442bfd50c34463b3834bba289 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) diff --git a/ext/standard/dir.stub.php b/ext/standard/dir.stub.php index 86d08c1e1de3e..fb129acaef21c 100755 --- a/ext/standard/dir.stub.php +++ b/ext/standard/dir.stub.php @@ -7,21 +7,21 @@ class Directory /** * @param resource|null $dir_handle * @return void - * @alias closedir + * @implementation-alias closedir */ public function close($dir_handle = null) {} /** * @param resource|null $dir_handle * @return void - * @alias rewinddir + * @implementation-alias rewinddir */ public function rewind($dir_handle = null) {} /** * @param resource|null $dir_handle * @return string|false - * @alias readdir + * @implementation-alias readdir */ public function read($dir_handle = null) {} } diff --git a/ext/standard/dir_arginfo.h b/ext/standard/dir_arginfo.h index 67a22b7249319..a9f836d53a5d5 100644 --- a/ext/standard/dir_arginfo.h +++ b/ext/standard/dir_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 2670287ef059725cceda0a8f9ac6515cdcedb521 */ + * Stub hash: d8d8c93a1659e1790b25a65d7e1d0d7430724e9d */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Directory_close, 0, 0, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, dir_handle, "null") From d27dc5c028637edaf4d1511613cc33e7e164bd6e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 19 Sep 2020 12:37:57 +0200 Subject: [PATCH 004/209] Fix #80118: Erroneous whitespace match with JIT only We backport r1273[1] from PCRE2. [1] Closes GH-6165. --- NEWS | 1 + ext/pcre/pcre2lib/pcre2_jit_compile.c | 36 +++++++++++++++++++++------ ext/pcre/tests/bug80118.phpt | 10 ++++++++ 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 ext/pcre/tests/bug80118.phpt diff --git a/NEWS b/NEWS index 2fbdad1d80aba..7ad5262506d9e 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ PHP NEWS - PCRE: . Updated to PCRE 10.35. (cmb) + . Fixed bug #80118 (Erroneous whitespace match with JIT only). (cmb) - Standard: . Fixed bug #80114 (parse_url does not accept URLs with port 0). (cmb, twosee) diff --git a/ext/pcre/pcre2lib/pcre2_jit_compile.c b/ext/pcre/pcre2lib/pcre2_jit_compile.c index 8e51576ac68de..61aa019d10124 100644 --- a/ext/pcre/pcre2lib/pcre2_jit_compile.c +++ b/ext/pcre/pcre2lib/pcre2_jit_compile.c @@ -7594,25 +7594,43 @@ if (needstype || needsscript) } cc = ccbegin; - } - if (needschar) - OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); + if (needstype) + { + /* TMP2 has already been shifted by 2 */ + if (!needschar) + { + OP2(SLJIT_ADD, TMP1, 0, TMP2, 0, TMP2, 0); + OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); + + OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); + } + else + { + OP2(SLJIT_ADD, TMP1, 0, TMP2, 0, TMP2, 0); + OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); - if (needstype) + OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); + OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); + typereg = RETURN_ADDR; + } + } + else if (needschar) + OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); + } + else if (needstype) { + OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3); + OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2); + if (!needschar) { - OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3); - OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); } else { - OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2); - OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3); OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); @@ -7620,6 +7638,8 @@ if (needstype || needsscript) typereg = RETURN_ADDR; } } + else if (needschar) + OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); } #endif /* SUPPORT_UNICODE */ diff --git a/ext/pcre/tests/bug80118.phpt b/ext/pcre/tests/bug80118.phpt new file mode 100644 index 0000000000000..5de66076e0437 --- /dev/null +++ b/ext/pcre/tests/bug80118.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #80118 (Erroneous whitespace match with JIT only) +--FILE-- + +--EXPECT-- +array(0) { +} From 2bf2cede8933586bb5be2fd77af650a23fcc936e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 10:50:29 +0200 Subject: [PATCH 005/209] Initialize attributes for internal functions Fixes a crash in Symfony SecurityBundle tests. --- .../029_reflect_internal_symbols.phpt | 32 +++++++++++++++++++ Zend/zend_API.c | 1 + 2 files changed, 33 insertions(+) create mode 100644 Zend/tests/attributes/029_reflect_internal_symbols.phpt diff --git a/Zend/tests/attributes/029_reflect_internal_symbols.phpt b/Zend/tests/attributes/029_reflect_internal_symbols.phpt new file mode 100644 index 0000000000000..d4dc29a0bb997 --- /dev/null +++ b/Zend/tests/attributes/029_reflect_internal_symbols.phpt @@ -0,0 +1,32 @@ +--TEST-- +Reflect attributes on different kinds of internal symbols +--FILE-- +getAttributes()); + +$rc = new ReflectionClass('DateTime'); +var_dump($rc->getAttributes()); + +$rm = $rc->getMethod('__construct'); +var_dump($rm->getAttributes()); + +$rcc = $rc->getReflectionConstant('ATOM'); +var_dump($rcc->getAttributes()); + +$rp = new ReflectionProperty('Exception', 'message'); +var_dump($rp->getAttributes()); + +?> +--EXPECT-- +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ee0e361ed9966..6e89da89bbd7d 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2325,6 +2325,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend internal_function->function_name = zend_string_init_interned(ptr->fname, fname_len, 1); internal_function->scope = scope; internal_function->prototype = NULL; + internal_function->attributes = NULL; if (ptr->flags) { if (!(ptr->flags & ZEND_ACC_PPP_MASK)) { if (ptr->flags != ZEND_ACC_DEPRECATED && scope) { From 730fdc77a74ce4816cfb10181357e3eee92e2d3b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 21 Sep 2020 11:21:46 +0200 Subject: [PATCH 006/209] Fix memory leak in php_imap_mutf7() We have to free the string which has been allocated by libc-client. --- ext/imap/php_imap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 01d1a5f80c491..5511b2c1c41f2 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3074,7 +3074,8 @@ static void php_imap_mutf7(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ if (out == NIL) { RETURN_FALSE; } else { - RETURN_STRING((char *)out); + RETVAL_STRING((char *)out); + fs_give((void**) &out); } } /* }}} */ From 7300f6fc17effef09b1254c1b060f4f7279e3af3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 11:32:00 +0200 Subject: [PATCH 007/209] Deprecate pgsql function aliases These have been documentation-deprecated for a very long time, make it official. --- UPGRADING | 1 + ext/pgsql/pgsql.stub.php | 24 ++++++++++++++++ ext/pgsql/pgsql_arginfo.h | 50 +++++++++++++++++----------------- ext/pgsql/tests/98old_api.phpt | 25 ++++++++++++++++- ext/pgsql/tests/lcmess.inc | 2 +- 5 files changed, 75 insertions(+), 27 deletions(-) diff --git a/UPGRADING b/UPGRADING index 58a29ec81ccc1..062b82d59c4c4 100644 --- a/UPGRADING +++ b/UPGRADING @@ -844,6 +844,7 @@ PHP 8.0 UPGRADE NOTES - PGSQL / PDO PGSQL: . The constant PG_VERSION_STR has now the same value as PG_VERSION, and thus is deprecated. + . Function aliases in the pgsql extension have been deprecated. - Zip: . Using empty file as ZipArchive is deprecated. Libzip 1.6.0 diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index 0995e0463ff9e..e5e5300056158 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -23,6 +23,7 @@ function pg_last_error($connection = null): string {} /** * @param resource|null $connection * @alias pg_last_error + * @deprecated */ function pg_errormessage($connection = null): string {} @@ -86,6 +87,7 @@ function pg_num_rows($result): int {} /** * @param resource $result * @alias pg_num_rows + * @deprecated */ function pg_numrows($result): int {} @@ -95,6 +97,7 @@ function pg_num_fields($result): int {} /** * @param resource $result * @alias pg_num_fields + * @deprecated */ function pg_numfields($result): int {} @@ -104,6 +107,7 @@ function pg_affected_rows($result): int {} /** * @param resource $result * @alias pg_affected_rows + * @deprecated */ function pg_cmdtuples($result): int {} @@ -119,6 +123,7 @@ function pg_field_name($result, int $field_number): string|false {} /** * @param resource $result * @alias pg_field_name + * @deprecated */ function pg_fieldname($result, int $field_number): string|false {} @@ -128,6 +133,7 @@ function pg_field_size($result, int $field_number): int|false {} /** * @param resource $result * @alias pg_field_size + * @deprecated */ function pg_fieldsize($result, int $field_number): int|false {} @@ -137,6 +143,7 @@ function pg_field_type($result, int $field_number): string|false {} /** * @param resource $result * @alias pg_field_type + * @deprecated */ function pg_fieldtype($result, int $field_number): string|false {} @@ -149,6 +156,7 @@ function pg_field_num($result, string $field_name): int {} /** * @param resource $result * @alias pg_field_num + * @deprecated */ function pg_fieldnum($result, string $field_name): int {} @@ -162,6 +170,7 @@ function pg_fetch_result($result, $row_number, string|int $field = UNKNOWN): str * @param resource $result * @param string|int $row_number * @alias pg_fetch_result + * @deprecated */ function pg_result($result, $row_number, string|int $field = UNKNOWN): string|false|null {} @@ -202,6 +211,7 @@ function pg_field_prtlen($result, $row_number, string|int $field = UNKNOWN): int * @param resource $result * @param string|int $row_number * @alias pg_field_prtlen + * @deprecated */ function pg_fieldprtlen($result, $row_number, string|int $field = UNKNOWN): int|false {} @@ -215,6 +225,7 @@ function pg_field_is_null($result, $row_number, string|int $field = UNKNOWN): in * @param resource $result * @param string|int $row_number * @alias pg_field_is_null + * @deprecated */ function pg_fieldisnull($result, $row_number, string|int $field = UNKNOWN): int|false {} @@ -224,6 +235,7 @@ function pg_free_result($result): bool {} /** * @param resource $result * @alias pg_free_result + * @deprecated */ function pg_freeresult($result): bool {} @@ -233,6 +245,7 @@ function pg_last_oid($result): string|int|false {} /** * @param resource $result * @alias pg_last_oid + * @deprecated */ function pg_getlastoid($result): string|int|false {} @@ -252,6 +265,7 @@ function pg_lo_create($connection = UNKNOWN, $large_object_id = UNKNOWN): string * @param resource $connection * @param string|int $large_object_id * @alias pg_lo_create + * @deprecated */ function pg_locreate($connection = UNKNOWN, $large_object_id = UNKNOWN): string|int|false {} @@ -265,6 +279,7 @@ function pg_lo_unlink($connection, $large_object_id = UNKNOWN): bool {} * @param resource $connection * @param string|int $large_object_id * @alias pg_lo_unlink + * @deprecated */ function pg_lounlink($connection, $large_object_id = UNKNOWN): bool {} @@ -280,6 +295,7 @@ function pg_lo_open($connection, $large_object_id = UNKNOWN, string $mode = UNKN * @param string|int $large_object_id * @return resource|false * @alias pg_lo_open + * @deprecated */ function pg_loopen($connection, $large_object_id = UNKNOWN, string $mode = UNKNOWN) {} @@ -289,6 +305,7 @@ function pg_lo_close($large_object): bool {} /** * @param resource $large_object * @alias pg_lo_close + * @deprecated */ function pg_loclose($large_object): bool {} @@ -298,6 +315,7 @@ function pg_lo_read($large_object, int $len = 8192): string|false {} /** * @param resource $large_object * @alias pg_lo_read + * @deprecated */ function pg_loread($large_object, int $len = 8192): string|false {} @@ -307,6 +325,7 @@ function pg_lo_write($large_object, string $buf, ?int $len = null): int|false {} /** * @param resource $large_object * @alias pg_lo_write + * @deprecated */ function pg_lowrite($large_object, string $buf, ?int $len = null): int|false {} @@ -316,6 +335,7 @@ function pg_lo_read_all($large_object): int {} /** * @param resource $large_object * @alias pg_lo_read_all + * @deprecated */ function pg_loreadall($large_object): int {} @@ -333,6 +353,7 @@ function pg_lo_import($connection, $filename = UNKNOWN, $large_object_id = UNKNO * @param string|int $large_object_id * @return resource|false * @alias pg_lo_import + * @deprecated */ function pg_loimport($connection, $filename = UNKNOWN, $large_object_id = UNKNOWN): string|int|false {} @@ -350,6 +371,7 @@ function pg_lo_export($connection, $large_object_id = UNKNOWN, $filename = UNKNO * @param string|int $filename * @return resource|false * @alias pg_lo_export + * @deprecated */ function pg_loexport($connection, $large_object_id = UNKNOWN, $filename = UNKNOWN): bool {} @@ -371,6 +393,7 @@ function pg_set_client_encoding($connection, string $encoding = UNKNOWN): int {} /** * @param resource|string $connection * @alias pg_set_client_encoding + * @deprecated */ function pg_setclientencoding($connection, string $encoding = UNKNOWN): int {} @@ -380,6 +403,7 @@ function pg_client_encoding($connection = null): string {} /** * @param resource|null $connection * @alias pg_client_encoding + * @deprecated */ function pg_clientencoding($connection = null): string {} diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index 544e0ad4a6a2e..a6adbb7582d38 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 907a616e7138369e6e3ccbbb10e6c0f2a380fe93 */ + * Stub hash: e5f2c8b3b23876a05a48500f626e81549e5d2ab1 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connect, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -539,7 +539,7 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(pg_close, arginfo_pg_close) ZEND_FE(pg_dbname, arginfo_pg_dbname) ZEND_FE(pg_last_error, arginfo_pg_last_error) - ZEND_FALIAS(pg_errormessage, pg_last_error, arginfo_pg_errormessage) + ZEND_DEP_FALIAS(pg_errormessage, pg_last_error, arginfo_pg_errormessage) ZEND_FE(pg_options, arginfo_pg_options) ZEND_FE(pg_port, arginfo_pg_port) ZEND_FE(pg_tty, arginfo_pg_tty) @@ -553,24 +553,24 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(pg_prepare, arginfo_pg_prepare) ZEND_FE(pg_execute, arginfo_pg_execute) ZEND_FE(pg_num_rows, arginfo_pg_num_rows) - ZEND_FALIAS(pg_numrows, pg_num_rows, arginfo_pg_numrows) + ZEND_DEP_FALIAS(pg_numrows, pg_num_rows, arginfo_pg_numrows) ZEND_FE(pg_num_fields, arginfo_pg_num_fields) - ZEND_FALIAS(pg_numfields, pg_num_fields, arginfo_pg_numfields) + ZEND_DEP_FALIAS(pg_numfields, pg_num_fields, arginfo_pg_numfields) ZEND_FE(pg_affected_rows, arginfo_pg_affected_rows) - ZEND_FALIAS(pg_cmdtuples, pg_affected_rows, arginfo_pg_cmdtuples) + ZEND_DEP_FALIAS(pg_cmdtuples, pg_affected_rows, arginfo_pg_cmdtuples) ZEND_FE(pg_last_notice, arginfo_pg_last_notice) ZEND_FE(pg_field_table, arginfo_pg_field_table) ZEND_FE(pg_field_name, arginfo_pg_field_name) - ZEND_FALIAS(pg_fieldname, pg_field_name, arginfo_pg_fieldname) + ZEND_DEP_FALIAS(pg_fieldname, pg_field_name, arginfo_pg_fieldname) ZEND_FE(pg_field_size, arginfo_pg_field_size) - ZEND_FALIAS(pg_fieldsize, pg_field_size, arginfo_pg_fieldsize) + ZEND_DEP_FALIAS(pg_fieldsize, pg_field_size, arginfo_pg_fieldsize) ZEND_FE(pg_field_type, arginfo_pg_field_type) - ZEND_FALIAS(pg_fieldtype, pg_field_type, arginfo_pg_fieldtype) + ZEND_DEP_FALIAS(pg_fieldtype, pg_field_type, arginfo_pg_fieldtype) ZEND_FE(pg_field_type_oid, arginfo_pg_field_type_oid) ZEND_FE(pg_field_num, arginfo_pg_field_num) - ZEND_FALIAS(pg_fieldnum, pg_field_num, arginfo_pg_fieldnum) + ZEND_DEP_FALIAS(pg_fieldnum, pg_field_num, arginfo_pg_fieldnum) ZEND_FE(pg_fetch_result, arginfo_pg_fetch_result) - ZEND_FALIAS(pg_result, pg_fetch_result, arginfo_pg_result) + ZEND_DEP_FALIAS(pg_result, pg_fetch_result, arginfo_pg_result) ZEND_FE(pg_fetch_row, arginfo_pg_fetch_row) ZEND_FE(pg_fetch_assoc, arginfo_pg_fetch_assoc) ZEND_FE(pg_fetch_array, arginfo_pg_fetch_array) @@ -579,41 +579,41 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(pg_fetch_all_columns, arginfo_pg_fetch_all_columns) ZEND_FE(pg_result_seek, arginfo_pg_result_seek) ZEND_FE(pg_field_prtlen, arginfo_pg_field_prtlen) - ZEND_FALIAS(pg_fieldprtlen, pg_field_prtlen, arginfo_pg_fieldprtlen) + ZEND_DEP_FALIAS(pg_fieldprtlen, pg_field_prtlen, arginfo_pg_fieldprtlen) ZEND_FE(pg_field_is_null, arginfo_pg_field_is_null) - ZEND_FALIAS(pg_fieldisnull, pg_field_is_null, arginfo_pg_fieldisnull) + ZEND_DEP_FALIAS(pg_fieldisnull, pg_field_is_null, arginfo_pg_fieldisnull) ZEND_FE(pg_free_result, arginfo_pg_free_result) - ZEND_FALIAS(pg_freeresult, pg_free_result, arginfo_pg_freeresult) + ZEND_DEP_FALIAS(pg_freeresult, pg_free_result, arginfo_pg_freeresult) ZEND_FE(pg_last_oid, arginfo_pg_last_oid) - ZEND_FALIAS(pg_getlastoid, pg_last_oid, arginfo_pg_getlastoid) + ZEND_DEP_FALIAS(pg_getlastoid, pg_last_oid, arginfo_pg_getlastoid) ZEND_FE(pg_trace, arginfo_pg_trace) ZEND_FE(pg_untrace, arginfo_pg_untrace) ZEND_FE(pg_lo_create, arginfo_pg_lo_create) - ZEND_FALIAS(pg_locreate, pg_lo_create, arginfo_pg_locreate) + ZEND_DEP_FALIAS(pg_locreate, pg_lo_create, arginfo_pg_locreate) ZEND_FE(pg_lo_unlink, arginfo_pg_lo_unlink) - ZEND_FALIAS(pg_lounlink, pg_lo_unlink, arginfo_pg_lounlink) + ZEND_DEP_FALIAS(pg_lounlink, pg_lo_unlink, arginfo_pg_lounlink) ZEND_FE(pg_lo_open, arginfo_pg_lo_open) - ZEND_FALIAS(pg_loopen, pg_lo_open, arginfo_pg_loopen) + ZEND_DEP_FALIAS(pg_loopen, pg_lo_open, arginfo_pg_loopen) ZEND_FE(pg_lo_close, arginfo_pg_lo_close) - ZEND_FALIAS(pg_loclose, pg_lo_close, arginfo_pg_loclose) + ZEND_DEP_FALIAS(pg_loclose, pg_lo_close, arginfo_pg_loclose) ZEND_FE(pg_lo_read, arginfo_pg_lo_read) - ZEND_FALIAS(pg_loread, pg_lo_read, arginfo_pg_loread) + ZEND_DEP_FALIAS(pg_loread, pg_lo_read, arginfo_pg_loread) ZEND_FE(pg_lo_write, arginfo_pg_lo_write) - ZEND_FALIAS(pg_lowrite, pg_lo_write, arginfo_pg_lowrite) + ZEND_DEP_FALIAS(pg_lowrite, pg_lo_write, arginfo_pg_lowrite) ZEND_FE(pg_lo_read_all, arginfo_pg_lo_read_all) - ZEND_FALIAS(pg_loreadall, pg_lo_read_all, arginfo_pg_loreadall) + ZEND_DEP_FALIAS(pg_loreadall, pg_lo_read_all, arginfo_pg_loreadall) ZEND_FE(pg_lo_import, arginfo_pg_lo_import) - ZEND_FALIAS(pg_loimport, pg_lo_import, arginfo_pg_loimport) + ZEND_DEP_FALIAS(pg_loimport, pg_lo_import, arginfo_pg_loimport) ZEND_FE(pg_lo_export, arginfo_pg_lo_export) - ZEND_FALIAS(pg_loexport, pg_lo_export, arginfo_pg_loexport) + ZEND_DEP_FALIAS(pg_loexport, pg_lo_export, arginfo_pg_loexport) ZEND_FE(pg_lo_seek, arginfo_pg_lo_seek) ZEND_FE(pg_lo_tell, arginfo_pg_lo_tell) ZEND_FE(pg_lo_truncate, arginfo_pg_lo_truncate) ZEND_FE(pg_set_error_verbosity, arginfo_pg_set_error_verbosity) ZEND_FE(pg_set_client_encoding, arginfo_pg_set_client_encoding) - ZEND_FALIAS(pg_setclientencoding, pg_set_client_encoding, arginfo_pg_setclientencoding) + ZEND_DEP_FALIAS(pg_setclientencoding, pg_set_client_encoding, arginfo_pg_setclientencoding) ZEND_FE(pg_client_encoding, arginfo_pg_client_encoding) - ZEND_FALIAS(pg_clientencoding, pg_client_encoding, arginfo_pg_clientencoding) + ZEND_DEP_FALIAS(pg_clientencoding, pg_client_encoding, arginfo_pg_clientencoding) ZEND_FE(pg_end_copy, arginfo_pg_end_copy) ZEND_FE(pg_put_line, arginfo_pg_put_line) ZEND_FE(pg_copy_to, arginfo_pg_copy_to) diff --git a/ext/pgsql/tests/98old_api.phpt b/ext/pgsql/tests/98old_api.phpt index b391097131329..425753136ae35 100644 --- a/ext/pgsql/tests/98old_api.phpt +++ b/ext/pgsql/tests/98old_api.phpt @@ -29,5 +29,28 @@ pg_cmdtuples($result); echo "OK"; ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Function pg_numrows() is deprecated in %s on line %d + +Deprecated: Function pg_numfields() is deprecated in %s on line %d + +Deprecated: Function pg_fieldname() is deprecated in %s on line %d + +Deprecated: Function pg_fieldsize() is deprecated in %s on line %d + +Deprecated: Function pg_fieldtype() is deprecated in %s on line %d + +Deprecated: Function pg_fieldprtlen() is deprecated in %s on line %d + +Deprecated: Function pg_fieldisnull() is deprecated in %s on line %d + +Deprecated: Function pg_result() is deprecated in %s on line %d + +Deprecated: Function pg_getlastoid() is deprecated in %s on line %d + +Deprecated: Function pg_freeresult() is deprecated in %s on line %d + +Deprecated: Function pg_errormessage() is deprecated in %s on line %d + +Deprecated: Function pg_cmdtuples() is deprecated in %s on line %d OK diff --git a/ext/pgsql/tests/lcmess.inc b/ext/pgsql/tests/lcmess.inc index 32ab0e36f59af..8c2171547709f 100644 --- a/ext/pgsql/tests/lcmess.inc +++ b/ext/pgsql/tests/lcmess.inc @@ -9,7 +9,7 @@ function _skip_lc_messages($lc_messages = 'C') function _set_lc_messages($lc_messages = 'C') { - if (pg_result(pg_query("SHOW LC_MESSAGES"), 0, 0) != $lc_messages) { + if (pg_fetch_result(pg_query("SHOW LC_MESSAGES"), 0, 0) != $lc_messages) { if (!@pg_exec("SET LC_MESSAGES='{$lc_messages}'")) { return false; } From 94854e0dff581e3cdf3ab635e8cdb30f22020c3f Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Sat, 19 Sep 2020 19:04:49 -0500 Subject: [PATCH 008/209] Standardize mbstring and string on using 'string' as a parameter name. Closes GH-6171. --- ext/mbstring/mbstring.stub.php | 30 +++++++++++++++--------------- ext/mbstring/mbstring_arginfo.h | 29 +++++++++++++---------------- ext/mbstring/tests/mb_ord.phpt | 2 +- 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 74f86404cf4eb..be54303896285 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -21,9 +21,9 @@ function mb_parse_str(string $encoded_string, &$result): bool {} function mb_output_handler(string $contents, int $status): string {} -function mb_str_split(string $str, int $split_length = 1, ?string $encoding = null): array {} +function mb_str_split(string $string, int $split_length = 1, ?string $encoding = null): array {} -function mb_strlen(string $str, ?string $encoding = null): int {} +function mb_strlen(string $string, ?string $encoding = null): int {} function mb_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {} @@ -43,33 +43,33 @@ function mb_strrichr(string $haystack, string $needle, bool $part = false, ?stri function mb_substr_count(string $haystack, string $needle, ?string $encoding = null): int {} -function mb_substr(string $str, int $start, ?int $length = null, ?string $encoding = null): string {} +function mb_substr(string $string, int $start, ?int $length = null, ?string $encoding = null): string {} -function mb_strcut(string $str, int $start, ?int $length = null, ?string $encoding = null): string {} +function mb_strcut(string $string, int $start, ?int $length = null, ?string $encoding = null): string {} -function mb_strwidth(string $str, ?string $encoding = null): int {} +function mb_strwidth(string $string, ?string $encoding = null): int {} -function mb_strimwidth(string $str, int $start, int $width, string $trim_marker = "", ?string $encoding = null): string {} +function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = "", ?string $encoding = null): string {} -function mb_convert_encoding(array|string $str, string $to, array|string|null $from = null): array|string|false {} +function mb_convert_encoding(array|string $string, string $to, array|string|null $from = null): array|string|false {} -function mb_convert_case(string $source_string, int $mode, ?string $encoding = null): string {} +function mb_convert_case(string $string, int $mode, ?string $encoding = null): string {} -function mb_strtoupper(string $source_string, ?string $encoding = null): string {} +function mb_strtoupper(string $string, ?string $encoding = null): string {} -function mb_strtolower(string $source_string, ?string $encoding = null): string {} +function mb_strtolower(string $string, ?string $encoding = null): string {} -function mb_detect_encoding(string $str, array|string|null $encoding_list = null, bool $strict = false): string|false {} +function mb_detect_encoding(string $string, array|string|null $encoding_list = null, bool $strict = false): string|false {} function mb_list_encodings(): array {} function mb_encoding_aliases(string $encoding): array {} -function mb_encode_mimeheader(string $str, ?string $charset = null, ?string $transfer = null, string $linefeed = "\r\n", int $indent = 0): string {} +function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer = null, string $linefeed = "\r\n", int $indent = 0): string {} function mb_decode_mimeheader(string $string): string {} -function mb_convert_kana(string $str, string $option = "KV", ?string $encoding = null): string {} +function mb_convert_kana(string $string, string $option = "KV", ?string $encoding = null): string {} function mb_convert_variables(string $to, array|string $from, mixed &$var, mixed &...$vars): string|false {} @@ -83,9 +83,9 @@ function mb_get_info(string $type = "all"): array|string|int|false {} function mb_check_encoding(array|string|null $var = null, ?string $encoding = null): bool {} -function mb_scrub(string $str, ?string $encoding = null): string {} +function mb_scrub(string $string, ?string $encoding = null): string {} -function mb_ord(string $str, ?string $encoding = null): int|false {} +function mb_ord(string $string, ?string $encoding = null): int|false {} function mb_chr(int $cp, ?string $encoding = null): string|false {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 27b692c26f617..6e71343ce4323 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e02a0588d1f46fa96452558e35ea904907b8bdf2 */ + * Stub hash: 85cabf678a06175d4da073be79a0951d4f3786ed */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null") @@ -38,13 +38,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_output_handler, 0, 2, IS_STRI ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_str_split, 0, 1, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, split_length, IS_LONG, 0, "1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_strlen, 0, 1, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -81,7 +81,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_substr_count, 0, 2, IS_LONG, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_substr, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") @@ -92,7 +92,7 @@ ZEND_END_ARG_INFO() #define arginfo_mb_strwidth arginfo_mb_strlen ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_strimwidth, 0, 3, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, trim_marker, IS_STRING, 0, "\"\"") @@ -100,26 +100,26 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_strimwidth, 0, 3, IS_STRING, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_encoding, 0, 2, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_MASK(0, str, MAY_BE_ARRAY|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_MASK(0, string, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_case, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, source_string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_strtoupper, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, source_string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_mb_strtolower arginfo_mb_strtoupper ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_detect_encoding, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, encoding_list, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() @@ -132,7 +132,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encoding_aliases, 0, 1, IS_AR ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_mimeheader, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, transfer, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, linefeed, IS_STRING, 0, "\"\\r\\n\"") @@ -144,7 +144,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_decode_mimeheader, 0, 1, IS_S ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_kana, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 0, "\"KV\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -186,13 +186,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_check_encoding, 0, 0, _IS_BOO ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_scrub, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") -ZEND_END_ARG_INFO() +#define arginfo_mb_scrub arginfo_mb_strtoupper ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ord, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() diff --git a/ext/mbstring/tests/mb_ord.phpt b/ext/mbstring/tests/mb_ord.phpt index 8785a29dfcfed..8336d573bef21 100644 --- a/ext/mbstring/tests/mb_ord.phpt +++ b/ext/mbstring/tests/mb_ord.phpt @@ -56,7 +56,7 @@ try { bool(true) bool(true) bool(true) -mb_ord(): Argument #1 ($str) must not be empty +mb_ord(): Argument #1 ($string) must not be empty mb_ord(): Argument #2 ($encoding) must be a valid encoding, "typo" given mb_ord(): Argument #2 ($encoding) must be a valid encoding, "pass" given mb_ord() does not support the "JIS" encoding From ef9ab9159b409c6d3ea184b4ba88764d85c4133b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 12:12:51 +0200 Subject: [PATCH 009/209] Use assertion for null-termination string Indicates an implementation bug, make sure we can automatically detect it. --- Zend/zend_API.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Zend/zend_API.h b/Zend/zend_API.h index da9a57d5c66dd..0b6808b678836 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -638,12 +638,9 @@ END_EXTERN_C() #if ZEND_DEBUG #define CHECK_ZVAL_STRING(str) \ - if (ZSTR_VAL(str)[ZSTR_LEN(str)] != '\0') { zend_error(E_WARNING, "String is not zero-terminated (%s)", ZSTR_VAL(str)); } -#define CHECK_ZVAL_STRING_REL(str) \ - if (ZSTR_VAL(str)[ZSTR_LEN(str)] != '\0') { zend_error(E_WARNING, "String is not zero-terminated (%s) (source: %s:%d)", ZSTR_VAL(str) ZEND_FILE_LINE_RELAY_CC); } + ZEND_ASSERT(ZSTR_VAL(str)[ZSTR_LEN(str)] == '\0' && "String is not null-terminated"); #else #define CHECK_ZVAL_STRING(z) -#define CHECK_ZVAL_STRING_REL(z) #endif #define CHECK_ZVAL_NULL_PATH(p) (Z_STRLEN_P(p) != strlen(Z_STRVAL_P(p))) From c5f93d191e2bf5a9def069cf9701b5eb6e297a74 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 12:37:44 +0200 Subject: [PATCH 010/209] Fix detection of code outside namespace Due to improvements to early binding, the opcode based check is no longer accurate. Reuse the syntactic check we're already using for declares instead. --- .../tests/attributes/004_name_resolution.phpt | 13 ++++---- Zend/tests/function_outside_namespace.phpt | 12 ++++++++ .../confusable_type_warning.phpt | 10 ++++--- Zend/zend_compile.c | 30 +++++++------------ 4 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 Zend/tests/function_outside_namespace.phpt diff --git a/Zend/tests/attributes/004_name_resolution.phpt b/Zend/tests/attributes/004_name_resolution.phpt index 6f266908b5c08..aececca0d46c2 100644 --- a/Zend/tests/attributes/004_name_resolution.phpt +++ b/Zend/tests/attributes/004_name_resolution.phpt @@ -2,12 +2,15 @@ Resolve attribute names --FILE-- $attribute->getName(), 'args' => $attribute->getArguments()]; + +namespace { + function dump_attributes($attributes) { + $arr = []; + foreach ($attributes as $attribute) { + $arr[] = ['name' => $attribute->getName(), 'args' => $attribute->getArguments()]; + } + var_dump($arr); } - var_dump($arr); } namespace Doctrine\ORM\Mapping { diff --git a/Zend/tests/function_outside_namespace.phpt b/Zend/tests/function_outside_namespace.phpt new file mode 100644 index 0000000000000..f63fb9f56ab27 --- /dev/null +++ b/Zend/tests/function_outside_namespace.phpt @@ -0,0 +1,12 @@ +--TEST-- +Function declaration should not be allowed before namespace declaration +--FILE-- + +--EXPECTF-- +Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in %s on line %d diff --git a/Zend/tests/type_declarations/confusable_type_warning.phpt b/Zend/tests/type_declarations/confusable_type_warning.phpt index e0202cee066e0..44bd173451948 100644 --- a/Zend/tests/type_declarations/confusable_type_warning.phpt +++ b/Zend/tests/type_declarations/confusable_type_warning.phpt @@ -3,10 +3,12 @@ Warnings for confusable types --FILE-- children) { if (file_ast->child[i] == ast) { return SUCCESS; } else if (file_ast->child[i] == NULL) { - /* Empty statements are not allowed prior to a declare */ + /* Empty statements count as statements. */ return FAILURE; } else if (file_ast->child[i]->kind != ZEND_AST_DECLARE) { - /* declares can only be preceded by other declares */ return FAILURE; } i++; @@ -5910,14 +5909,14 @@ void zend_compile_declare(zend_ast *ast) /* {{{ */ zval_ptr_dtor_nogc(&value_zv); } else if (zend_string_equals_literal_ci(name, "encoding")) { - if (FAILURE == zend_declare_is_first_statement(ast)) { + if (FAILURE == zend_is_first_statement(ast)) { zend_error_noreturn(E_COMPILE_ERROR, "Encoding declaration pragma must be " "the very first statement in the script"); } } else if (zend_string_equals_literal_ci(name, "strict_types")) { zval value_zv; - if (FAILURE == zend_declare_is_first_statement(ast)) { + if (FAILURE == zend_is_first_statement(ast)) { zend_error_noreturn(E_COMPILE_ERROR, "strict_types declaration must be " "the very first statement in the script"); } @@ -7682,20 +7681,11 @@ void zend_compile_namespace(zend_ast *ast) /* {{{ */ } } - if (((!with_bracket && !FC(current_namespace)) - || (with_bracket && !FC(has_bracketed_namespaces))) && CG(active_op_array)->last > 0 - ) { - /* ignore ZEND_EXT_STMT and ZEND_TICKS */ - uint32_t num = CG(active_op_array)->last; - while (num > 0 && - (CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT || - CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) { - --num; - } - if (num > 0) { - zend_error_noreturn(E_COMPILE_ERROR, "Namespace declaration statement has to be " - "the very first statement or after any declare call in the script"); - } + zend_bool is_first_namespace = (!with_bracket && !FC(current_namespace)) + || (with_bracket && !FC(has_bracketed_namespaces)); + if (is_first_namespace && FAILURE == zend_is_first_statement(ast)) { + zend_error_noreturn(E_COMPILE_ERROR, "Namespace declaration statement has to be " + "the very first statement or after any declare call in the script"); } if (FC(current_namespace)) { From 9f074a5c31c6fbed8de852909a294958ae32eb9d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 12:42:48 +0200 Subject: [PATCH 011/209] Move arm64 job to cron As we're branching soon, reduce the number of jobs we run on each commit, so that Travis can keep up with its role as the fast feedback build. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index dc2affa8996e3..34d2f2b74a271 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,7 @@ jobs: arch: amd64 - env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1 arch: arm64 + if: type = cron - env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 S390X=1 arch: s390x if: type = cron From 4c821cf20668776737272587e7a87876b4fca25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 19 Sep 2020 14:13:42 +0200 Subject: [PATCH 012/209] Improve default value handling of Exception constructors Closes GH-6166 --- Zend/tests/ErrorException_construct.phpt | 63 ++++++++++++++++++++++++ Zend/zend_exceptions.c | 15 +++--- Zend/zend_exceptions.stub.php | 6 +-- Zend/zend_exceptions_arginfo.h | 10 ++-- sapi/cli/tests/005.phpt | 4 +- 5 files changed, 82 insertions(+), 16 deletions(-) create mode 100644 Zend/tests/ErrorException_construct.phpt diff --git a/Zend/tests/ErrorException_construct.phpt b/Zend/tests/ErrorException_construct.phpt new file mode 100644 index 0000000000000..7304af3da05d5 --- /dev/null +++ b/Zend/tests/ErrorException_construct.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test default value handling of ErrorException::__construct() +--FILE-- +getMessage()); +var_dump($e->getFile()); +var_dump($e->getLine()); + +$e = new ErrorException("Second", 0, E_ERROR, null); +var_dump($e->getMessage()); +var_dump($e->getFile()); +var_dump($e->getLine()); + +$e = new ErrorException("Third", 0, E_ERROR, null, null); +var_dump($e->getMessage()); +var_dump($e->getFile()); +var_dump($e->getLine()); + +$e = new ErrorException("Forth", 0, E_ERROR, null, 123); +var_dump($e->getMessage()); +var_dump($e->getFile()); +var_dump($e->getLine()); + +$e = new ErrorException("Fifth", 0, E_ERROR, "abc.php"); +var_dump($e->getMessage()); +var_dump($e->getFile()); +var_dump($e->getLine()); + +$e = new ErrorException("Sixth", 0, E_ERROR, "abc.php", null); +var_dump($e->getMessage()); +var_dump($e->getFile()); +var_dump($e->getLine()); + +$e = new ErrorException("Seventh", 0, E_ERROR, "abc.php", 123); +var_dump($e->getMessage()); +var_dump($e->getFile()); +var_dump($e->getLine()); + +?> +--EXPECTF-- +string(0) "" +string(%d) "%sErrorException_construct.php" +int(3) +string(6) "Second" +string(%d) "%sErrorException_construct.php" +int(8) +string(5) "Third" +string(%d) "%sErrorException_construct.php" +int(13) +string(5) "Forth" +string(%d) "%sErrorException_construct.php" +int(123) +string(5) "Fifth" +string(7) "abc.php" +int(0) +string(5) "Sixth" +string(7) "abc.php" +int(0) +string(7) "Seventh" +string(7) "abc.php" +int(123) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 1a0b7d581a726..1f47d88997c3e 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -334,10 +334,10 @@ ZEND_METHOD(ErrorException, __construct) { zend_string *message = NULL, *filename = NULL; zend_long code = 0, severity = E_ERROR, lineno; + zend_bool lineno_is_null = 1; zval tmp, *object, *previous = NULL; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "|SllSlO!", &message, &code, &severity, &filename, &lineno, &previous, zend_ce_throwable) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|SllS!l!O!", &message, &code, &severity, &filename, &lineno, &lineno_is_null, &previous, zend_ce_throwable) == FAILURE) { RETURN_THROWS(); } @@ -361,15 +361,18 @@ ZEND_METHOD(ErrorException, __construct) ZVAL_LONG(&tmp, severity); zend_update_property_ex(zend_ce_exception, Z_OBJ_P(object), ZSTR_KNOWN(ZEND_STR_SEVERITY), &tmp); - if (argc >= 4) { + if (filename) { ZVAL_STR_COPY(&tmp, filename); zend_update_property_ex(zend_ce_exception, Z_OBJ_P(object), ZSTR_KNOWN(ZEND_STR_FILE), &tmp); zval_ptr_dtor(&tmp); - if (argc < 5) { - lineno = 0; /* invalidate lineno */ - } + } + + if (!lineno_is_null) { ZVAL_LONG(&tmp, lineno); zend_update_property_ex(zend_ce_exception, Z_OBJ_P(object), ZSTR_KNOWN(ZEND_STR_LINE), &tmp); + } else if (filename) { + ZVAL_LONG(&tmp, 0); + zend_update_property_ex(zend_ce_exception, Z_OBJ_P(object), ZSTR_KNOWN(ZEND_STR_LINE), &tmp); } } /* }}} */ diff --git a/Zend/zend_exceptions.stub.php b/Zend/zend_exceptions.stub.php index bc90b6f1b5e0c..f22fb3eae5497 100644 --- a/Zend/zend_exceptions.stub.php +++ b/Zend/zend_exceptions.stub.php @@ -24,7 +24,7 @@ class Exception implements Throwable { final private function __clone() {} - public function __construct(string $message = UNKNOWN, int $code = 0, ?Throwable $previous = null) {} + public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {} public function __wakeup() {} @@ -48,7 +48,7 @@ public function __toString(): string {} class ErrorException extends Exception { - public function __construct(string $message = UNKNOWN, int $code = 0, int $severity = E_ERROR, string $filename = UNKNOWN, int $lineno = 0, ?Throwable $previous = null) {} + public function __construct(string $message = "", int $code = 0, int $severity = E_ERROR, ?string $filename = null, ?int $line = null, ?Throwable $previous = null) {} final public function getSeverity(): int {} } @@ -59,7 +59,7 @@ class Error implements Throwable final private function __clone() {} /** @implementation-alias Exception::__construct */ - public function __construct(string $message = UNKNOWN, int $code = 0, ?Throwable $previous = null) {} + public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {} /** @implementation-alias Exception::__wakeup */ public function __wakeup() {} diff --git a/Zend/zend_exceptions_arginfo.h b/Zend/zend_exceptions_arginfo.h index fbab0aa90ea4d..e8ea0a59a8a05 100644 --- a/Zend/zend_exceptions_arginfo.h +++ b/Zend/zend_exceptions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d0679a3c11f089dcb31cfdfe56f0336ceba301a9 */ + * Stub hash: bc49b326136997660887b12f0c59f8a57b17ecaf */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Throwable_getMessage, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -23,7 +23,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_Exception___clone arginfo_class_Throwable_getCode ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Exception___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, message, IS_STRING, 0, "\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_LONG, 0, "0") ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, previous, Throwable, 1, "null") ZEND_END_ARG_INFO() @@ -47,11 +47,11 @@ ZEND_END_ARG_INFO() #define arginfo_class_Exception___toString arginfo_class_Throwable_getMessage ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ErrorException___construct, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, message, IS_STRING, 0, "\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, severity, IS_LONG, 0, "E_ERROR") - ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, lineno, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, line, IS_LONG, 1, "null") ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, previous, Throwable, 1, "null") ZEND_END_ARG_INFO() diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt index a1d51088aba47..ca3dfd97302d3 100644 --- a/sapi/cli/tests/005.phpt +++ b/sapi/cli/tests/005.phpt @@ -37,7 +37,7 @@ string(183) "Class [ class stdClass ] { } " -string(2177) "Class [ class Exception implements Throwable, Stringable ] { +string(2170) "Class [ class Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -68,7 +68,7 @@ string(2177) "Class [ class Exception implements Throwable, Stri Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ string $message = ] + Parameter #0 [ string $message = "" ] Parameter #1 [ int $code = 0 ] Parameter #2 [ ?Throwable $previous = null ] } From 8e0789a21c3218efbb58417b45a7c36649a606d6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 14:45:31 +0200 Subject: [PATCH 013/209] Use proper parameter type in Closure::bindTo() signature --- Zend/tests/closure_040.phpt | 10 +++--- Zend/zend_closures.c | 63 ++++++++++++++++++------------------ Zend/zend_closures.stub.php | 10 +++--- Zend/zend_closures_arginfo.h | 6 ++-- 4 files changed, 47 insertions(+), 42 deletions(-) diff --git a/Zend/tests/closure_040.phpt b/Zend/tests/closure_040.phpt index a18ae2640e018..436c99939b1ee 100644 --- a/Zend/tests/closure_040.phpt +++ b/Zend/tests/closure_040.phpt @@ -24,14 +24,16 @@ $a = new A(20); $ca = $a->getIncrementor(); $cas = $a->getStaticIncrementor(); -$ca->bindTo($a, array()); +try { + $ca->bindTo($a, array()); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} $cas->bindTo($a, 'A'); ?> --EXPECTF-- -Warning: Array to string conversion in %s on line %d - -Warning: Class "Array" not found in %s on line %d +Closure::bindTo(): Argument #2 ($newScope) must be of type object|string|null, array given Warning: Cannot bind an instance to a static closure in %s on line %d diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 86cabf0a10d84..034b0d2d071b8 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -192,30 +192,22 @@ ZEND_METHOD(Closure, call) } /* }}} */ -static void do_closure_bind(zval *return_value, zval *zclosure, zval *newthis, zval *scope_arg) +static void do_closure_bind(zval *return_value, zval *zclosure, zval *newthis, zend_object *scope_obj, zend_string *scope_str) { zend_class_entry *ce, *called_scope; zend_closure *closure = (zend_closure *) Z_OBJ_P(zclosure); - if (scope_arg != NULL) { /* scope argument was given */ - if (Z_TYPE_P(scope_arg) == IS_OBJECT) { - ce = Z_OBJCE_P(scope_arg); - } else if (Z_TYPE_P(scope_arg) == IS_NULL) { - ce = NULL; - } else { - zend_string *tmp_class_name; - zend_string *class_name = zval_get_tmp_string(scope_arg, &tmp_class_name); - if (zend_string_equals_literal(class_name, "static")) { - ce = closure->func.common.scope; - } else if ((ce = zend_lookup_class(class_name)) == NULL) { - zend_error(E_WARNING, "Class \"%s\" not found", ZSTR_VAL(class_name)); - zend_tmp_string_release(tmp_class_name); - RETURN_NULL(); - } - zend_tmp_string_release(tmp_class_name); + if (scope_obj) { + ce = scope_obj->ce; + } else if (scope_str) { + if (zend_string_equals(scope_str, ZSTR_KNOWN(ZEND_STR_STATIC))) { + ce = closure->func.common.scope; + } else if ((ce = zend_lookup_class(scope_str)) == NULL) { + zend_error(E_WARNING, "Class \"%s\" not found", ZSTR_VAL(scope_str)); + RETURN_NULL(); } - } else { /* scope argument not given; do not change the scope by default */ - ce = closure->func.common.scope; + } else { + ce = NULL; } if (!zend_valid_closure_binding(closure, newthis, ce)) { @@ -234,25 +226,34 @@ static void do_closure_bind(zval *return_value, zval *zclosure, zval *newthis, z /* {{{ Create a closure from another one and bind to another object and scope */ ZEND_METHOD(Closure, bind) { - zval *newthis, *zclosure, *scope_arg = NULL; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oo!|z", &zclosure, zend_ce_closure, &newthis, &scope_arg) == FAILURE) { - RETURN_THROWS(); - } + zval *zclosure, *newthis; + zend_object *scope_obj = NULL; + zend_string *scope_str = ZSTR_KNOWN(ZEND_STR_STATIC); + + ZEND_PARSE_PARAMETERS_START(2, 3) + Z_PARAM_OBJECT_OF_CLASS(zclosure, zend_ce_closure) + Z_PARAM_OBJECT_OR_NULL(newthis) + Z_PARAM_OPTIONAL + Z_PARAM_OBJ_OR_STR_OR_NULL(scope_obj, scope_str) + ZEND_PARSE_PARAMETERS_END(); - do_closure_bind(return_value, zclosure, newthis, scope_arg); + do_closure_bind(return_value, zclosure, newthis, scope_obj, scope_str); } /* {{{ Create a closure from another one and bind to another object and scope */ ZEND_METHOD(Closure, bindTo) { - zval *newthis, *scope_arg = NULL; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "o!|z", &newthis, &scope_arg) == FAILURE) { - RETURN_THROWS(); - } + zval *newthis; + zend_object *scope_obj = NULL; + zend_string *scope_str = ZSTR_KNOWN(ZEND_STR_STATIC); + + ZEND_PARSE_PARAMETERS_START(1, 2) + Z_PARAM_OBJECT_OR_NULL(newthis) + Z_PARAM_OPTIONAL + Z_PARAM_OBJ_OR_STR_OR_NULL(scope_obj, scope_str) + ZEND_PARSE_PARAMETERS_END(); - do_closure_bind(return_value, getThis(), newthis, scope_arg); + do_closure_bind(return_value, getThis(), newthis, scope_obj, scope_str); } static ZEND_NAMED_FUNCTION(zend_closure_call_magic) /* {{{ */ { diff --git a/Zend/zend_closures.stub.php b/Zend/zend_closures.stub.php index 70e555bff2dc4..875ee6920350d 100644 --- a/Zend/zend_closures.stub.php +++ b/Zend/zend_closures.stub.php @@ -6,11 +6,13 @@ final class Closure { private function __construct() {} - /** @param object|string|null $newScope */ - public static function bind(Closure $closure, ?object $newThis, $newScope = UNKNOWN): ?Closure {} + public static function bind( + Closure $closure, + ?object $newThis, + object|string|null $newScope = "static" + ): ?Closure {} - /** @param object|string|null $newScope */ - public function bindTo(?object $newThis, $newScope = UNKNOWN): ?Closure {} + public function bindTo(?object $newThis, object|string|null $newScope = "static"): ?Closure {} public function call(object $newThis, mixed ...$arguments): mixed {} diff --git a/Zend/zend_closures_arginfo.h b/Zend/zend_closures_arginfo.h index f09023b132d0f..1a01ab2810771 100644 --- a/Zend/zend_closures_arginfo.h +++ b/Zend/zend_closures_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: abbbe7b04323dc44b0675ad58700e996a6d7c43b */ + * Stub hash: 6c9840dd5c2e4c597cd0133bf2d0b523c272d3fe */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure___construct, 0, 0, 0) ZEND_END_ARG_INFO() @@ -7,12 +7,12 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Closure_bind, 0, 2, Closure, 1) ZEND_ARG_OBJ_INFO(0, closure, Closure, 0) ZEND_ARG_TYPE_INFO(0, newThis, IS_OBJECT, 1) - ZEND_ARG_INFO(0, newScope) + ZEND_ARG_TYPE_MASK(0, newScope, MAY_BE_OBJECT|MAY_BE_STRING|MAY_BE_NULL, "\"static\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Closure_bindTo, 0, 1, Closure, 1) ZEND_ARG_TYPE_INFO(0, newThis, IS_OBJECT, 1) - ZEND_ARG_INFO(0, newScope) + ZEND_ARG_TYPE_MASK(0, newScope, MAY_BE_OBJECT|MAY_BE_STRING|MAY_BE_NULL, "\"static\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Closure_call, 0, 1, IS_MIXED, 0) From 3642592a121dad939983a43d3de986fbc7c92da9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 14:56:14 +0200 Subject: [PATCH 014/209] Remove unnecessary check We should only produce IS_UNDEF if an exception is thrown, this check is not needed. --- Zend/zend_interfaces.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 1278f08209d67..0d5af66d92354 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -153,19 +153,7 @@ ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *ke { zend_user_iterator *iter = (zend_user_iterator*)_iter; zval *object = &iter->it.data; - zval retval; - - zend_call_method_with_0_params(Z_OBJ_P(object), iter->ce, &iter->ce->iterator_funcs_ptr->zf_key, "key", &retval); - - if (Z_TYPE(retval) != IS_UNDEF) { - ZVAL_COPY_VALUE(key, &retval); - } else { - if (!EG(exception)) { - zend_error(E_WARNING, "Nothing returned from %s::key()", ZSTR_VAL(iter->ce->name)); - } - - ZVAL_LONG(key, 0); - } + zend_call_method_with_0_params(Z_OBJ_P(object), iter->ce, &iter->ce->iterator_funcs_ptr->zf_key, "key", key); } /* }}} */ From d085a7439f577eb0690a4e896f39f65dc87cdfe3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 14:58:23 +0200 Subject: [PATCH 015/209] Assert on unknown list entry type --- Zend/zend_list.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Zend/zend_list.c b/Zend/zend_list.c index 45ff950b6bfec..bacdd739e6f2e 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -66,12 +66,10 @@ static void zend_resource_dtor(zend_resource *res) res->ptr = NULL; ld = zend_hash_index_find_ptr(&list_destructors, r.type); - if (ld) { - if (ld->list_dtor_ex) { - ld->list_dtor_ex(&r); - } - } else { - zend_error(E_WARNING, "Unknown list entry type (%d)", r.type); + ZEND_ASSERT(ld && "Unknown list entry type"); + + if (ld->list_dtor_ex) { + ld->list_dtor_ex(&r); } } @@ -191,12 +189,10 @@ void plist_entry_destructor(zval *zv) zend_rsrc_list_dtors_entry *ld; ld = zend_hash_index_find_ptr(&list_destructors, res->type); - if (ld) { - if (ld->plist_dtor_ex) { - ld->plist_dtor_ex(res); - } - } else { - zend_error(E_WARNING,"Unknown list entry type (%d)", res->type); + ZEND_ASSERT(ld && "Unknown list entry type"); + + if (ld->plist_dtor_ex) { + ld->plist_dtor_ex(res); } } free(res); From 213b6667817b887e29f7fdf3a046c37c4462f756 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 15:05:03 +0200 Subject: [PATCH 016/209] Synchronize GET_CLASS/GET_CALLED_CLASS opcodes with functions These error conditions throw in the function implementations, make the opcodes match. --- Zend/tests/009.phpt | 12 ++++++---- Zend/tests/bug47054.phpt | 6 +---- Zend/tests/get_called_class_001.phpt | 11 +++++---- Zend/zend_vm_def.h | 17 +++++++------- Zend/zend_vm_execute.h | 35 ++++++++++++++-------------- 5 files changed, 40 insertions(+), 41 deletions(-) diff --git a/Zend/tests/009.phpt b/Zend/tests/009.phpt index 16c060389d34e..ddf38e96f4e8c 100644 --- a/Zend/tests/009.phpt +++ b/Zend/tests/009.phpt @@ -26,7 +26,11 @@ $f2 = new foo2; $f1->bar(); $f2->bar(); -var_dump(get_class()); +try { + var_dump(get_class()); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} try { var_dump(get_class("qwerty")); } catch (TypeError $e) { @@ -40,12 +44,10 @@ $f1->testNull(); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- string(3) "foo" string(3) "foo" - -Warning: get_class() called without object from outside a class in %s on line %d -bool(false) +get_class() without arguments must be called from within a class get_class(): Argument #1 ($object) must be of type object, string given string(3) "foo" string(4) "foo2" diff --git a/Zend/tests/bug47054.phpt b/Zend/tests/bug47054.phpt index f607365bdcf8b..eca13e00af518 100644 --- a/Zend/tests/bug47054.phpt +++ b/Zend/tests/bug47054.phpt @@ -22,12 +22,8 @@ C::s(); $c = new C(); $c->s(); -get_called_class(); - ?> ---EXPECTF-- +--EXPECT-- Called class: D Called class: C Called class: C - -Warning: get_called_class() called from outside a class in %s on line %d diff --git a/Zend/tests/get_called_class_001.phpt b/Zend/tests/get_called_class_001.phpt index 7012ae8129fe5..caa6d154d9c59 100644 --- a/Zend/tests/get_called_class_001.phpt +++ b/Zend/tests/get_called_class_001.phpt @@ -3,9 +3,12 @@ Calling get_called_class() outside a class --FILE-- getMessage(), "\n"; +} ?> ---EXPECTF-- -Warning: get_called_class() called from outside a class in %s on line %d -bool(false) +--EXPECT-- +get_called_class() must be called from within a class diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 510595b7c8668..9e10721265ff8 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8940,9 +8940,9 @@ ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED) if (OP1_TYPE == IS_UNUSED) { if (UNEXPECTED(!EX(func)->common.scope)) { SAVE_OPLINE(); - zend_error(E_WARNING, "get_class() called without object from outside a class"); - ZVAL_FALSE(EX_VAR(opline->result.var)); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); + zend_throw_error(NULL, "get_class() without arguments must be called from within a class"); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } else { ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(func)->common.scope->name); ZEND_VM_NEXT_OPCODE(); @@ -8981,12 +8981,11 @@ ZEND_VM_HANDLER(192, ZEND_GET_CALLED_CLASS, UNUSED, UNUSED) } else if (Z_CE(EX(This))) { ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_CE(EX(This))->name); } else { - ZVAL_FALSE(EX_VAR(opline->result.var)); - if (UNEXPECTED(!EX(func)->common.scope)) { - SAVE_OPLINE(); - zend_error(E_WARNING, "get_called_class() called from outside a class"); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); - } + ZEND_ASSERT(!EX(func)->common.scope); + SAVE_OPLINE(); + zend_throw_error(NULL, "get_called_class() must be called from within a class"); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } ZEND_VM_NEXT_OPCODE(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index f59c923bd1613..ac0dd911c001c 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -10381,9 +10381,9 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CO if (IS_CONST == IS_UNUSED) { if (UNEXPECTED(!EX(func)->common.scope)) { SAVE_OPLINE(); - zend_error(E_WARNING, "get_class() called without object from outside a class"); - ZVAL_FALSE(EX_VAR(opline->result.var)); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); + zend_throw_error(NULL, "get_class() without arguments must be called from within a class"); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } else { ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(func)->common.scope->name); ZEND_VM_NEXT_OPCODE(); @@ -17624,9 +17624,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED_H if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) { if (UNEXPECTED(!EX(func)->common.scope)) { SAVE_OPLINE(); - zend_error(E_WARNING, "get_class() called without object from outside a class"); - ZVAL_FALSE(EX_VAR(opline->result.var)); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); + zend_throw_error(NULL, "get_class() without arguments must be called from within a class"); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } else { ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(func)->common.scope->name); ZEND_VM_NEXT_OPCODE(); @@ -35225,9 +35225,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_UNUSED_UNUSED_H if (IS_UNUSED == IS_UNUSED) { if (UNEXPECTED(!EX(func)->common.scope)) { SAVE_OPLINE(); - zend_error(E_WARNING, "get_class() called without object from outside a class"); - ZVAL_FALSE(EX_VAR(opline->result.var)); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); + zend_throw_error(NULL, "get_class() without arguments must be called from within a class"); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } else { ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(func)->common.scope->name); ZEND_VM_NEXT_OPCODE(); @@ -35266,12 +35266,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CALLED_CLASS_SPEC_UNUSED_U } else if (Z_CE(EX(This))) { ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_CE(EX(This))->name); } else { - ZVAL_FALSE(EX_VAR(opline->result.var)); - if (UNEXPECTED(!EX(func)->common.scope)) { - SAVE_OPLINE(); - zend_error(E_WARNING, "get_called_class() called from outside a class"); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); - } + ZEND_ASSERT(!EX(func)->common.scope); + SAVE_OPLINE(); + zend_throw_error(NULL, "get_called_class() must be called from within a class"); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } ZEND_VM_NEXT_OPCODE(); } @@ -47385,9 +47384,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CV_UNUSED_HANDL if (IS_CV == IS_UNUSED) { if (UNEXPECTED(!EX(func)->common.scope)) { SAVE_OPLINE(); - zend_error(E_WARNING, "get_class() called without object from outside a class"); - ZVAL_FALSE(EX_VAR(opline->result.var)); - ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); + zend_throw_error(NULL, "get_class() without arguments must be called from within a class"); + ZVAL_UNDEF(EX_VAR(opline->result.var)); + HANDLE_EXCEPTION(); } else { ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(func)->common.scope->name); ZEND_VM_NEXT_OPCODE(); From e55f0c796c05bf3e52b77902a61b34f2241609af Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 16 Sep 2020 02:03:46 +0200 Subject: [PATCH 017/209] Promote warnings to Error in COM extension Closes GH-6141 --- ext/com_dotnet/com_com.c | 24 +++++++++++++----------- ext/com_dotnet/com_extension.stub.php | 2 +- ext/com_dotnet/com_extension_arginfo.h | 4 ++-- ext/com_dotnet/com_handlers.c | 7 ++++--- ext/com_dotnet/com_iterator.c | 2 ++ ext/com_dotnet/com_misc.c | 1 + ext/com_dotnet/com_saproxy.c | 7 ++++--- ext/com_dotnet/com_typeinfo.c | 2 +- ext/com_dotnet/com_variant.c | 8 ++++---- ext/com_dotnet/tests/bug72498.phpt | 12 ++++++++---- 10 files changed, 40 insertions(+), 29 deletions(-) diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 45080ba39590a..3282bd9e5043c 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -746,7 +746,8 @@ PHP_FUNCTION(com_event_sink) /* {{{ Print out a PHP class definition for a dispatchable interface */ PHP_FUNCTION(com_print_typeinfo) { - zval *arg1; + zend_object *object_zpp; + zend_string *typelib_name_zpp = NULL; char *ifacename = NULL; char *typelibname = NULL; size_t ifacelen; @@ -754,17 +755,18 @@ PHP_FUNCTION(com_print_typeinfo) php_com_dotnet_object *obj = NULL; ITypeInfo *typeinfo; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "z/|s!b", &arg1, &ifacename, - &ifacelen, &wantsink)) { - RETURN_THROWS(); - } + ZEND_PARSE_PARAMETERS_START(1, 3) + Z_PARAM_OBJ_OF_CLASS_OR_STR(object_zpp, php_com_variant_class_entry, typelib_name_zpp) + Z_PARAM_OPTIONAL + Z_PARAM_STRING_OR_NULL(ifacename, ifacelen) + Z_PARAM_BOOL(wantsink) + ZEND_PARSE_PARAMETERS_END(); php_com_initialize(); - if (Z_TYPE_P(arg1) == IS_OBJECT) { - CDNO_FETCH_VERIFY(obj, arg1); + if (object_zpp) { + obj = (php_com_dotnet_object*)object_zpp; } else { - convert_to_string(arg1); - typelibname = Z_STRVAL_P(arg1); + typelibname = ZSTR_VAL(typelib_name_zpp); } typeinfo = php_com_locate_typeinfo(typelibname, obj, ifacename, wantsink ? 1 : 0); @@ -772,9 +774,9 @@ PHP_FUNCTION(com_print_typeinfo) php_com_process_typeinfo(typeinfo, NULL, 1, NULL, obj ? obj->code_page : COMG(code_page)); ITypeInfo_Release(typeinfo); RETURN_TRUE; - } else { - zend_error(E_WARNING, "Unable to find typeinfo using the parameters supplied"); } + + php_error_docref(NULL, E_WARNING, "Unable to find typeinfo using the parameters supplied"); RETURN_FALSE; } /* }}} */ diff --git a/ext/com_dotnet/com_extension.stub.php b/ext/com_dotnet/com_extension.stub.php index 9b1edf9d38d23..7d451e5baf525 100644 --- a/ext/com_dotnet/com_extension.stub.php +++ b/ext/com_dotnet/com_extension.stub.php @@ -46,7 +46,7 @@ function variant_cmp(mixed $left, mixed $right, int $lcid = LOCALE_SYSTEM_DEFAUL function variant_date_to_timestamp(variant $variant): ?int {} -function variant_date_from_timestamp(int $timestamp): variant|false {} +function variant_date_from_timestamp(int $timestamp): variant {} function variant_get_type(variant $variant): int {} diff --git a/ext/com_dotnet/com_extension_arginfo.h b/ext/com_dotnet/com_extension_arginfo.h index 3e583c321108b..074cb8575006d 100644 --- a/ext/com_dotnet/com_extension_arginfo.h +++ b/ext/com_dotnet/com_extension_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f78e9db58131f9d67021eaea4c3d4be75cafe2ac */ + * Stub hash: 637bee9d71fb0d566ce38004eec8bc6f75656837 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_set, 0, 2, IS_VOID, 0) ZEND_ARG_OBJ_INFO(0, variant, variant, 0) @@ -63,7 +63,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_date_to_timestamp, 0, 1, ZEND_ARG_OBJ_INFO(0, variant, variant, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_variant_date_from_timestamp, 0, 1, variant, MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_date_from_timestamp, 0, 1, variant, 0) ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0) ZEND_END_ARG_INFO() diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 4ff80d96e9292..fb4af4efec2c4 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -203,18 +203,19 @@ static int com_property_exists(zend_object *object, zend_string *member, int che static int com_dimension_exists(zend_object *object, zval *member, int check_empty) { - php_error_docref(NULL, E_WARNING, "Operation not yet supported on a COM object"); + /* TODO Add support */ + zend_throw_error(NULL, "Cannot check dimension on a COM object"); return 0; } static void com_property_delete(zend_object *object, zend_string *member, void **cache_slot) { - php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object"); + zend_throw_error(NULL, "Cannot delete properties from a COM object"); } static void com_dimension_delete(zend_object *object, zval *offset) { - php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object"); + zend_throw_error(NULL, "Cannot delete dimension from a COM object"); } static HashTable *com_properties_get(zend_object *object) diff --git a/ext/com_dotnet/com_iterator.c b/ext/com_dotnet/com_iterator.c index 6126e958d5a4d..66f885a9056ca 100644 --- a/ext/com_dotnet/com_iterator.c +++ b/ext/com_dotnet/com_iterator.c @@ -149,6 +149,7 @@ zend_object_iterator *php_com_iter_get(zend_class_entry *ce, zval *object, int b obj = CDNO_FETCH(object); if (V_VT(&obj->v) != VT_DISPATCH && !V_ISARRAY(&obj->v)) { + /* TODO Promote to TypeError? */ php_error_docref(NULL, E_WARNING, "Variant is not an object or array VT=%d", V_VT(&obj->v)); return NULL; } @@ -172,6 +173,7 @@ zend_object_iterator *php_com_iter_get(zend_class_entry *ce, zval *object, int b dims = SafeArrayGetDim(V_ARRAY(&obj->v)); if (dims != 1) { + /* TODO Promote to ValueError? */ php_error_docref(NULL, E_WARNING, "Can only handle single dimension variant arrays (this array has %d)", dims); goto fail; diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c index 24230761c167f..7f1ee3562de66 100644 --- a/ext/com_dotnet/com_misc.c +++ b/ext/com_dotnet/com_misc.c @@ -105,6 +105,7 @@ PHP_COM_DOTNET_API int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, dims = SafeArrayGetDim(V_ARRAY(array)); if (dims != 1) { + /* TODO Promote to ValueError? */ php_error_docref(NULL, E_WARNING, "Can only handle single dimension variant arrays (this array has %d)", dims); return 0; diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c index 56f7fc684653f..a138f796c3798 100644 --- a/ext/com_dotnet/com_saproxy.c +++ b/ext/com_dotnet/com_saproxy.c @@ -288,18 +288,19 @@ static int saproxy_property_exists(zend_object *object, zend_string *member, int static int saproxy_dimension_exists(zend_object *object, zval *member, int check_empty) { - php_error_docref(NULL, E_WARNING, "Operation not yet supported on a COM object"); + /* TODO Add support */ + zend_throw_error(NULL, "Cannot check dimension on a COM object"); return 0; } static void saproxy_property_delete(zend_object *object, zend_string *member, void **cache_slot) { - php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object"); + zend_throw_error(NULL, "Cannot delete properties from a COM object"); } static void saproxy_dimension_delete(zend_object *object, zval *offset) { - php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object"); + zend_throw_error(NULL, "Cannot delete dimension from a COM object"); } static HashTable *saproxy_properties_get(zend_object *object) diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index 4112b0ce06902..a036526d8bed6 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -633,7 +633,7 @@ int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int pri ret = 1; } else { - zend_error(E_WARNING, "That's not a dispatchable interface!! type kind = %08x", attr->typekind); + zend_throw_error(NULL, "Type kind must be dispatchable, %08x given", attr->typekind); } ITypeInfo_ReleaseTypeAttr(typeinfo, attr); diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 949f3ca1dd5b4..1acae5242412a 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -964,8 +964,8 @@ PHP_FUNCTION(variant_date_from_timestamp) } if (timestamp < 0) { - php_error_docref(NULL, E_WARNING, "Timestamp value must be a positive value."); - RETURN_FALSE; + zend_argument_value_error(1, "must be greater than or equal to 0"); + RETURN_THROWS(); } VariantInit(&res); @@ -975,8 +975,8 @@ PHP_FUNCTION(variant_date_from_timestamp) /* Invalid after 23:59:59, December 31, 3000, UTC */ if (!tmv) { - php_error_docref(NULL, E_WARNING, "Invalid timestamp " ZEND_LONG_FMT, timestamp); - RETURN_FALSE; + zend_argument_value_error(1, "must not go past 23:59:59, December 31, 3000, UTC"); + RETURN_THROWS(); } memset(&systime, 0, sizeof(systime)); diff --git a/ext/com_dotnet/tests/bug72498.phpt b/ext/com_dotnet/tests/bug72498.phpt index e43251bd3c747..b9bd498af31a2 100644 --- a/ext/com_dotnet/tests/bug72498.phpt +++ b/ext/com_dotnet/tests/bug72498.phpt @@ -8,8 +8,12 @@ if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- -Warning: variant_date_from_timestamp(): Invalid timestamp %d in %sbug72498.php on line %d -bool(false) +--EXPECT-- +variant_date_from_timestamp(): Argument #1 ($timestamp) must not go past 23:59:59, December 31, 3000, UTC From 6f76817f023b9659697f152243cda7bcece3bb77 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 15:22:47 +0200 Subject: [PATCH 018/209] Remove dead code The "if ever" here is the relevant bit... --- ext/pdo/pdo_stmt.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index b0f7bbeede813..91de279087a46 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1801,11 +1801,6 @@ int pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, zval *args, uint if (SUCCESS == retval) { ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); -#ifdef ilia_0 /* we'll only need this when we have persistent statements, if ever */ - if (stmt->dbh->is_persistent) { - php_error_docref(NULL, E_WARNING, "PHP might crash if you don't call $stmt->setFetchMode() to reset to defaults on this persistent statement. This will be fixed in a later release"); - } -#endif if (num_args == 2) { if (Z_TYPE(args[1]) != IS_NULL && Z_TYPE(args[1]) != IS_ARRAY) { pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "ctor_args must be either NULL or an array"); @@ -1832,11 +1827,6 @@ int pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, zval *args, uint } if (SUCCESS == retval) { -#ifdef ilia_0 /* we'll only need this when we have persistent statements, if ever */ - if (stmt->dbh->is_persistent) { - php_error_docref(NULL, E_WARNING, "PHP might crash if you don't call $stmt->setFetchMode() to reset to defaults on this persistent statement. This will be fixed in a later release"); - } -#endif ZVAL_COPY(&stmt->fetch.into, &args[0]); } From 5bb41fa63cec0b25470c8202c58f019929dc29a6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 15:29:10 +0200 Subject: [PATCH 019/209] Promote PDORow property write to Error --- ext/pdo/pdo_stmt.c | 8 ++++---- ext/pdo/tests/pdo_035.phpt | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 91de279087a46..945d5eb78ff64 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2356,13 +2356,13 @@ static zval *row_dim_read(zend_object *object, zval *member, int type, zval *rv) static zval *row_prop_write(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - php_error_docref(NULL, E_WARNING, "This PDORow is not from a writable result set"); + zend_throw_error(NULL, "Cannot write to PDORow property"); return value; } static void row_dim_write(zend_object *object, zval *member, zval *value) { - php_error_docref(NULL, E_WARNING, "This PDORow is not from a writable result set"); + zend_throw_error(NULL, "Cannot write to PDORow offset"); } static int row_prop_exists(zend_object *object, zend_string *name, int check_empty, void **cache_slot) @@ -2439,12 +2439,12 @@ static int row_dim_exists(zend_object *object, zval *member, int check_empty) static void row_prop_delete(zend_object *object, zend_string *offset, void **cache_slot) { - php_error_docref(NULL, E_WARNING, "Cannot delete properties from a PDORow"); + zend_throw_error(NULL, "Cannot unset PDORow property"); } static void row_dim_delete(zend_object *object, zval *offset) { - php_error_docref(NULL, E_WARNING, "Cannot delete properties from a PDORow"); + zend_throw_error(NULL, "Cannot unset PDORow offset"); } static HashTable *row_get_properties_for(zend_object *object, zend_prop_purpose purpose) diff --git a/ext/pdo/tests/pdo_035.phpt b/ext/pdo/tests/pdo_035.phpt index c35c50432d2d4..81e2b9e451b6d 100644 --- a/ext/pdo/tests/pdo_035.phpt +++ b/ext/pdo/tests/pdo_035.phpt @@ -16,7 +16,33 @@ $result = $stmt->fetch(PDO::FETCH_LAZY); echo get_class($result), "\n"; var_dump(get_parent_class($result)); + +try { + $result->foo = 1; +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + $result[0] = 1; +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + unset($result->foo); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +try { + unset($result[0]); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + ?> --EXPECT-- PDORow bool(false) +Cannot write to PDORow property +Cannot write to PDORow offset +Cannot unset PDORow property +Cannot unset PDORow offset From d1bbc39e4cbf3068ac64e8b107814e0bb8ddc762 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 15:46:55 +0200 Subject: [PATCH 020/209] pg_unescape_bytea() can only fail on OOM The implementation did not check for PQunescapeBytea failure correctly, because it checked for a null pointer after estrndup, which certainly cannot happen. Inspection of the PGunescapeBytea implementation has shown that this function can only fail on OOM, so let's check for that explicitly and remove false as a possible return type. While we're here, avoid an unnecessary copy of the result. --- ext/opcache/Optimizer/zend_func_info.c | 2 +- ext/pgsql/pgsql.c | 15 +++++++-------- ext/pgsql/pgsql.stub.php | 2 +- ext/pgsql/pgsql_arginfo.h | 4 ++-- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 6b8cb33f5690b..7471da8220b76 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -720,7 +720,7 @@ static const func_info_t func_infos[] = { F1("pg_copy_to", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("pg_escape_string", MAY_BE_STRING), F1("pg_escape_bytea", MAY_BE_STRING), - F1("pg_unescape_bytea", MAY_BE_FALSE | MAY_BE_STRING), + F1("pg_unescape_bytea", MAY_BE_STRING), F1("pg_escape_literal", MAY_BE_FALSE | MAY_BE_STRING), F1("pg_escape_identifier", MAY_BE_FALSE | MAY_BE_STRING), F1("pg_result_error", MAY_BE_FALSE | MAY_BE_STRING), diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 31bb83431474d..0112bcc7b66a8 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3362,7 +3362,7 @@ PHP_FUNCTION(pg_escape_bytea) /* {{{ Unescape binary for bytea type */ PHP_FUNCTION(pg_unescape_bytea) { - char *from = NULL, *to = NULL, *tmp = NULL; + char *from, *tmp; size_t to_len; size_t from_len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!", @@ -3371,14 +3371,13 @@ PHP_FUNCTION(pg_unescape_bytea) } tmp = (char *)PQunescapeBytea((unsigned char*)from, &to_len); - to = estrndup(tmp, to_len); - PQfreemem(tmp); - if (!to) { - php_error_docref(NULL, E_WARNING,"Invalid parameter"); - RETURN_FALSE; + if (!tmp) { + zend_error(E_ERROR, "Out of memory"); + return; } - RETVAL_STRINGL(to, to_len); - efree(to); + + RETVAL_STRINGL(tmp, to_len); + PQfreemem(tmp); } /* }}} */ diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index e5e5300056158..181d62c9cdd67 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -425,7 +425,7 @@ function pg_escape_string($connection, string $data = UNKNOWN): string {} /** @param resource|string $connection */ function pg_escape_bytea($connection, string $data = UNKNOWN): string {} -function pg_unescape_bytea(?string $data = null): string|false {} +function pg_unescape_bytea(?string $data = null): string {} /** @param resource|string $connection */ function pg_escape_literal($connection, string $data = UNKNOWN): string|false {} diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index a6adbb7582d38..c2b23871548be 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e5f2c8b3b23876a05a48500f626e81549e5d2ab1 */ + * Stub hash: 87152e947ab7bfb3a9d7df30dd6fbccac504504e */ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connect, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -325,7 +325,7 @@ ZEND_END_ARG_INFO() #define arginfo_pg_escape_bytea arginfo_pg_escape_string -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_unescape_bytea, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_unescape_bytea, 0, 0, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, data, IS_STRING, 1, "null") ZEND_END_ARG_INFO() From 9746490ad46d16473e6cac368f8943bd48969fbf Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 21 Sep 2020 14:48:02 +0100 Subject: [PATCH 021/209] Drop some connection retries in IMAP test They are unnecessary and just take time for no good reason --- ext/imap/tests/imap_errors_basic.phpt | 29 ++++++--------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/ext/imap/tests/imap_errors_basic.phpt b/ext/imap/tests/imap_errors_basic.phpt index c3d890aa5dbe6..c89719376658d 100644 --- a/ext/imap/tests/imap_errors_basic.phpt +++ b/ext/imap/tests/imap_errors_basic.phpt @@ -1,30 +1,25 @@ --TEST-- -Test imap_errors() function : basic functionality +Test imap_errors() function : invalid password --SKIPIF-- --FILE-- --EXPECTF-- -*** Testing imap_errors() : basic functionality *** -Issue open with invalid password with normal default number of retries, i.e 3 +*** Testing imap_errors() : invalid password *** +Issue opening with invalid password, 1 retry Warning: imap_open(): Couldn't open stream %s in %s on line %d List any errors @@ -33,16 +28,4 @@ array(%d) { string(%d) "%s" [1]=> string(%d) "%s" - [2]=> - string(%d) "%a -} - - -Issue open with invalid password with retries == 1 - -Warning: imap_open(): Couldn't open stream %s in %s on line %d -List any errors -array(%d) { - [0]=> - string(%d) "%a } From e95fa3eb0ce97d952598f599052a837ba90f2df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 21 Sep 2020 14:47:54 +0200 Subject: [PATCH 022/209] Fix a few Iterator signatures Closes GH-6176 --- ext/spl/spl_iterators.c | 16 ++++++++++------ ext/spl/spl_iterators.stub.php | 5 ++--- ext/spl/spl_iterators_arginfo.h | 8 ++++---- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 731f7f7b6e866..4735a257a89e7 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -684,13 +684,17 @@ PHP_METHOD(RecursiveIteratorIterator, getDepth) PHP_METHOD(RecursiveIteratorIterator, getSubIterator) { spl_recursive_it_object *object = Z_SPLRECURSIVE_IT_P(ZEND_THIS); - zend_long level = object->level; + zend_long level; + zend_bool level_is_null = 1; zval *value; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &level) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &level, &level_is_null) == FAILURE) { RETURN_THROWS(); } - if (level < 0 || level > object->level) { + + if (level_is_null) { + level = object->level; + } else if (level < 0 || level > object->level) { RETURN_NULL(); } @@ -1318,14 +1322,14 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z } case DIT_IteratorIterator: { zend_class_entry *ce_cast; - zend_string *class_name; + zend_string *class_name = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|S", &zobject, ce_inner, &class_name) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|S!", &zobject, ce_inner, &class_name) == FAILURE) { return NULL; } ce = Z_OBJCE_P(zobject); if (!instanceof_function(ce, zend_ce_iterator)) { - if (ZEND_NUM_ARGS() > 1) { + if (class_name) { if (!(ce_cast = zend_lookup_class(class_name)) || !instanceof_function(ce, ce_cast) || !ce_cast->get_iterator diff --git a/ext/spl/spl_iterators.stub.php b/ext/spl/spl_iterators.stub.php index ef2615d2ac8c4..4d99e60df451b 100644 --- a/ext/spl/spl_iterators.stub.php +++ b/ext/spl/spl_iterators.stub.php @@ -74,7 +74,7 @@ public function next() {} public function getDepth() {} /** @return RecursiveIterator|null */ - public function getSubIterator(int $level = UNKNOWN) {} + public function getSubIterator(?int $level = null) {} /** @return RecursiveIterator */ public function getInnerIterator() {} @@ -115,8 +115,7 @@ public function getInnerIterator(); class IteratorIterator implements OuterIterator { - /** @param Traversable $iterator */ - public function __construct($iterator, string $class_name = UNKNOWN) {} + public function __construct(Traversable $iterator, ?string $class_name = null) {} /** @return Iterator|null */ public function getInnerIterator() {} diff --git a/ext/spl/spl_iterators_arginfo.h b/ext/spl/spl_iterators_arginfo.h index f8d000e279aa1..7563521b46c84 100644 --- a/ext/spl/spl_iterators_arginfo.h +++ b/ext/spl/spl_iterators_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 38fb46070ea48e774343e59de53797969acf4b06 */ + * Stub hash: 65bcea1c2313ff50b3e15588e1cdba036995c131 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_EmptyIterator_current, 0, 0, 0) ZEND_END_ARG_INFO() @@ -51,7 +51,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_RecursiveIteratorIterator_getDepth arginfo_class_EmptyIterator_current ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RecursiveIteratorIterator_getSubIterator, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, level, IS_LONG, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_RecursiveIteratorIterator_getInnerIterator arginfo_class_EmptyIterator_current @@ -79,8 +79,8 @@ ZEND_END_ARG_INFO() #define arginfo_class_OuterIterator_getInnerIterator arginfo_class_EmptyIterator_current ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IteratorIterator___construct, 0, 0, 1) - ZEND_ARG_INFO(0, iterator) - ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_IteratorIterator_getInnerIterator arginfo_class_EmptyIterator_current From 19c844594e40d79cea016b54f9ab3a367440b4c9 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 21 Sep 2020 13:57:05 +0200 Subject: [PATCH 023/209] Fix mmap copying Instead of attempting to map large files into memory at once, we map chunks of at most `PHP_STREAM_MMAP_MAX` bytes, and repeat that until we hit the point where `php_stream_seek()` fails (see bug 54902), and copy the rest of the file by reading and writing small chunks. We also fix the mapping behavior for zero bytes on Windows, which did not error (as with `mmap()`), but would have mapped the remaining file. --- NEWS | 4 +++ main/streams/php_stream_mmap.h | 2 ++ main/streams/plain_wrapper.c | 5 ++++ main/streams/streams.c | 53 +++++++++++++++++++++++----------- 4 files changed, 47 insertions(+), 17 deletions(-) diff --git a/NEWS b/NEWS index 7ad5262506d9e..4259d4d0e8a58 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2020, PHP 7.4.12 +- Core: + . Fixed bug #80061 (Copying large files may have suboptimal performance). + (cmb) + - MySQLnd: . Fixed bug #80115 (mysqlnd.debug doesn't recognize absolute paths with slashes). (cmb) diff --git a/main/streams/php_stream_mmap.h b/main/streams/php_stream_mmap.h index 132f3214c117d..40288cc27f238 100644 --- a/main/streams/php_stream_mmap.h +++ b/main/streams/php_stream_mmap.h @@ -58,6 +58,8 @@ typedef struct { #define PHP_STREAM_MMAP_ALL 0 +#define PHP_STREAM_MMAP_MAX (512 * 1024 * 1024) + #define php_stream_mmap_supported(stream) (_php_stream_set_option((stream), PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_SUPPORTED, NULL) == 0 ? 1 : 0) /* Returns 1 if the stream in its current state can be memory mapped, diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 50ca925dea372..298950cf9ed7f 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -826,6 +826,11 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void delta = (DWORD)range->offset - loffs; } + /* MapViewOfFile()ing zero bytes would map to the end of the file; match *nix behavior instead */ + if (range->length + delta == 0) { + return PHP_STREAM_OPTION_RETURN_ERR; + } + data->last_mapped_addr = MapViewOfFile(data->file_mapping, acc, 0, loffs, range->length + delta); if (data->last_mapped_addr) { diff --git a/main/streams/streams.c b/main/streams/streams.c index f1f8bf7eab609..cf411a1dd3751 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1573,29 +1573,48 @@ PHPAPI int _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size if (php_stream_mmap_possible(src)) { char *p; - size_t mapped; - p = php_stream_mmap_range(src, php_stream_tell(src), maxlen, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped); + do { + size_t chunk_size = (maxlen == 0 || maxlen > PHP_STREAM_MMAP_MAX) ? PHP_STREAM_MMAP_MAX : maxlen; + size_t mapped; - if (p) { - ssize_t didwrite = php_stream_write(dest, p, mapped); - if (didwrite < 0) { - *len = 0; - return FAILURE; - } + p = php_stream_mmap_range(src, php_stream_tell(src), chunk_size, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped); + + if (p) { + ssize_t didwrite; + + if (php_stream_seek(src, mapped, SEEK_CUR) != 0) { + php_stream_mmap_unmap(src); + break; + } + + didwrite = php_stream_write(dest, p, mapped); + if (didwrite < 0) { + *len = haveread; + return FAILURE; + } - php_stream_mmap_unmap_ex(src, mapped); + php_stream_mmap_unmap(src); - *len = didwrite; + *len = haveread += didwrite; - /* we've got at least 1 byte to read - * less than 1 is an error - * AND read bytes match written */ - if (mapped > 0 && mapped == didwrite) { - return SUCCESS; + /* we've got at least 1 byte to read + * less than 1 is an error + * AND read bytes match written */ + if (mapped == 0 || mapped != didwrite) { + return FAILURE; + } + if (mapped < chunk_size) { + return SUCCESS; + } + if (maxlen != 0) { + maxlen -= mapped; + if (maxlen == 0) { + return SUCCESS; + } + } } - return FAILURE; - } + } while (p); } while(1) { From 3e33e1e86d15e262cd9e0224a9604e252f5d9284 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 5 Aug 2020 08:59:41 +0200 Subject: [PATCH 024/209] Check linker compatibility directly from HMODULE Checking the linker compatibility with extranous `ImageLoad()` calls is possible, but unnecessary, since the modules are either already loaded or loaded shortly afterwards, so that we can get the required information directly from the module handles. And actually, doing `ImageLoad()` as well as `LoadLibrary()` leaves a tiny room for a race condition, because both functions will lookup the module in the search path, so there is no *guarantee* that both are dealing with the same module. Dropping the `ImageLoad()` calls also has the advantage to no longer face the issue reported in bug #79557. A very minor additional advantage is that we no longer have to link against Imagehlp.dll. Furthermore, there is no need to check for CRT compatibility multiple times, so we can simplify the signature of `php_win32_crt_compatible`, and at the same time clean up main.c a bit. These changes require to change the signature of the exported `php_win32_image_compatible` and `php_win32_crt_compatible` functions, which now expect a `HMODULE` and nothing, respectively, instead of the module name. --- UPGRADING.INTERNALS | 4 +++ Zend/zend_extensions.c | 7 +++++ ext/standard/dl.c | 6 ++--- main/main.c | 11 +------- main/php_ini.c | 11 ++------ win32/build/confutils.js | 2 +- win32/winutil.c | 58 +++++++++++++++++++++------------------- win32/winutil.h | 4 +-- 8 files changed, 49 insertions(+), 54 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index ebced18ff3279..d69ca710f9ff0 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -373,6 +373,10 @@ PHP 8.0 INTERNALS UPGRADE NOTES - zend_get_op_array_extension_handle() 10. Argument zend_extension to const char* in Zend Engine 4.0: - zend_get_resource_handle() + 11. Argument const char * to HMODULE in Zend Engine 4.0: + - php_win32_image_compatible() + 12. const char * argument dropped in Zend Engine 4.0: + - php_win32_crt_compatible() u. Instead of overwriting zend_error_cb extensions with debugging, monitoring use-cases catching Errors/Exceptions are strongly encouraged to use diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index 1741182ba3be0..4d4b1ffe09b41 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -41,6 +41,13 @@ zend_result zend_load_extension(const char *path) #endif return FAILURE; } +#ifdef ZEND_WIN32 + char *err; + if (!php_win32_image_compatible(handle, &err)) { + zend_error(E_CORE_WARNING, err); + return FAILURE; + } +#endif return zend_load_extension_handle(handle, path); #else fprintf(stderr, "Extensions are not supported on this platform.\n"); diff --git a/ext/standard/dl.c b/ext/standard/dl.c index b7e3b3bfeb8ad..c1e9fabf404d6 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -161,19 +161,17 @@ PHPAPI int php_load_extension(const char *filename, int type, int start_now) efree(orig_libpath); efree(err1); } + efree(libpath); #ifdef PHP_WIN32 - if (!php_win32_image_compatible(libpath, &err1)) { + if (!php_win32_image_compatible(handle, &err1)) { php_error_docref(NULL, error_type, err1); efree(err1); - efree(libpath); DL_UNLOAD(handle); return FAILURE; } #endif - efree(libpath); - get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "get_module"); /* Some OS prepend _ to symbol names while their dynamic linker diff --git a/main/main.c b/main/main.c index 3667432f94a5f..da510f55518dc 100644 --- a/main/main.c +++ b/main/main.c @@ -2055,21 +2055,12 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod #endif #ifdef PHP_WIN32 -# if PHP_LINKER_MAJOR == 14 - /* Extend for other CRT if needed. */ -# if PHP_DEBUG -# define PHP_VCRUNTIME "vcruntime140d.dll" -# else -# define PHP_VCRUNTIME "vcruntime140.dll" -# endif char *img_err; - if (!php_win32_crt_compatible(PHP_VCRUNTIME, &img_err)) { + if (!php_win32_crt_compatible(&img_err)) { php_error(E_CORE_WARNING, img_err); efree(img_err); return FAILURE; } -# undef PHP_VCRUNTIME -# endif /* start up winsock services */ if (WSAStartup(wVersionRequested, &wsaData) != 0) { diff --git a/main/php_ini.c b/main/php_ini.c index 57573f4d309dc..53c08ae3c4c45 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -331,13 +331,6 @@ static void php_load_zend_extension_cb(void *arg) #endif if (IS_ABSOLUTE_PATH(filename, length)) { -#ifdef PHP_WIN32 - char *err; - if (!php_win32_image_compatible(filename, &err)) { - php_error(E_CORE_WARNING, err); - return; - } -#endif zend_load_extension(filename); } else { DL_HANDLE handle; @@ -381,13 +374,13 @@ static void php_load_zend_extension_cb(void *arg) efree(orig_libpath); efree(err1); + efree(libpath); } #ifdef PHP_WIN32 - if (!php_win32_image_compatible(libpath, &err1)) { + if (!php_win32_image_compatible(handle, &err1)) { php_error(E_CORE_WARNING, err1); efree(err1); - efree(libpath); DL_UNLOAD(handle); return; } diff --git a/win32/build/confutils.js b/win32/build/confutils.js index e71757748fdaa..857e50acbe82a 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -3401,7 +3401,7 @@ function toolset_setup_common_ldlags() function toolset_setup_common_libs() { // urlmon.lib ole32.lib oleaut32.lib uuid.lib gdi32.lib winspool.lib comdlg32.lib - DEFINE("LIBS", "kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_32.lib Dnsapi.lib psapi.lib bcrypt.lib imagehlp.lib"); + DEFINE("LIBS", "kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_32.lib Dnsapi.lib psapi.lib bcrypt.lib"); } function toolset_setup_build_mode() diff --git a/win32/winutil.c b/win32/winutil.c index 40664a9e038cd..530dc4f0f6c23 100644 --- a/win32/winutil.c +++ b/win32/winutil.c @@ -20,7 +20,6 @@ #include "codepage.h" #include #include -#include PHP_WINUTIL_API char *php_win32_error_to_msg(HRESULT error) @@ -436,26 +435,13 @@ PHP_WINUTIL_API char *php_win32_get_username(void) return uname; }/*}}}*/ -static zend_always_inline BOOL is_compatible(const char *name, BOOL is_smaller, char *format, char **err) +static zend_always_inline BOOL is_compatible(HMODULE handle, BOOL is_smaller, char *format, char **err) {/*{{{*/ - /* work around ImageLoad() issue */ - const char *name_stripped = name; - if (name[0] == '.' && IS_SLASH(name[1])) { - name_stripped += 2; - } - - PLOADED_IMAGE img = ImageLoad(name_stripped, NULL); + PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER) handle; + PIMAGE_NT_HEADERS pNTHeader = (PIMAGE_NT_HEADERS)((char *) dosHeader + dosHeader->e_lfanew); - if (!img) { - DWORD _err = GetLastError(); - char *err_txt = php_win32_error_to_msg(_err); - spprintf(err, 0, "Failed to load %s, %s", name, err_txt); - free(err_txt); - return FALSE; - } - - DWORD major = img->FileHeader->OptionalHeader.MajorLinkerVersion; - DWORD minor = img->FileHeader->OptionalHeader.MinorLinkerVersion; + DWORD major = pNTHeader->OptionalHeader.MajorLinkerVersion; + DWORD minor = pNTHeader->OptionalHeader.MinorLinkerVersion; #if PHP_LINKER_MAJOR == 14 /* VS 2015, 2017 and 2019 are binary compatible, but only forward compatible. @@ -474,23 +460,39 @@ static zend_always_inline BOOL is_compatible(const char *name, BOOL is_smaller, if (PHP_LINKER_MAJOR != major) #endif { - spprintf(err, 0, format, name, major, minor, PHP_LINKER_MAJOR, PHP_LINKER_MINOR); - ImageUnload(img); + char buf[MAX_PATH]; + if (GetModuleFileName(handle, buf, sizeof(buf)) != 0) { + spprintf(err, 0, format, buf, major, minor, PHP_LINKER_MAJOR, PHP_LINKER_MINOR); + } else { + spprintf(err, 0, "Can't retrieve the module name (error %u)", GetLastError()); + } return FALSE; } - ImageUnload(img); return TRUE; }/*}}}*/ -PHP_WINUTIL_API BOOL php_win32_image_compatible(const char *name, char **err) +PHP_WINUTIL_API BOOL php_win32_image_compatible(HMODULE handle, char **err) {/*{{{*/ - return is_compatible(name, TRUE, "Can't load module '%s' as it's linked with %u.%u, but the core is linked with %d.%d", err); + return is_compatible(handle, TRUE, "Can't load module '%s' as it's linked with %u.%u, but the core is linked with %d.%d", err); }/*}}}*/ -/* Expect a CRT name DLL. */ -PHP_WINUTIL_API BOOL php_win32_crt_compatible(const char *name, char **err) +/* Expect a CRT module handle */ +PHP_WINUTIL_API BOOL php_win32_crt_compatible(char **err) {/*{{{*/ - return is_compatible(name, FALSE, "'%s' %u.%u is not compatible with this PHP build linked with %d.%d", err); +#if PHP_LINKER_MAJOR == 14 + /* Extend for other CRT if needed. */ +# if PHP_DEBUG + const char *crt_name = "vcruntime140d.dll"; +# else + const char *crt_name = "vcruntime140.dll"; +# endif + HMODULE handle = GetModuleHandle(crt_name); + if (handle == NULL) { + spprintf(err, 0, "Can't get handle of module %s (error %u)", crt_name, GetLastError()); + return FALSE; + } + return is_compatible(handle, FALSE, "'%s' %u.%u is not compatible with this PHP build linked with %d.%d", err); +#endif + return TRUE; }/*}}}*/ - diff --git a/win32/winutil.h b/win32/winutil.h index 8acf87e67152e..cc3f115280a70 100644 --- a/win32/winutil.h +++ b/win32/winutil.h @@ -53,7 +53,7 @@ PHP_WINUTIL_API int php_win32_code_to_errno(unsigned long w32Err); PHP_WINUTIL_API char *php_win32_get_username(void); -PHP_WINUTIL_API BOOL php_win32_image_compatible(const char *img, char **err); -PHP_WINUTIL_API BOOL php_win32_crt_compatible(const char *img, char **err); +PHP_WINUTIL_API BOOL php_win32_image_compatible(HMODULE handle, char **err); +PHP_WINUTIL_API BOOL php_win32_crt_compatible(char **err); #endif From 68a907569c0d0406ad6e11017ccbe98ecc1f1405 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 15:59:44 +0200 Subject: [PATCH 025/209] Remove redundant check This was already checked directly above. --- ext/pgsql/pgsql.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 0112bcc7b66a8..779c1f444b93f 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3410,11 +3410,6 @@ static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int escape_l RETURN_THROWS(); } - if (pgsql == NULL) { - php_error_docref(NULL, E_WARNING,"Cannot get pgsql link"); - RETURN_FALSE; - } - if (escape_literal) { tmp = PQescapeLiteral(pgsql, from, (size_t)from_len); } else { From 54f03d31e07450defb230367a65d58cd42e80b1d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 16:11:50 +0200 Subject: [PATCH 026/209] Promote invalid field to ValueError in pgsql The same error condition is a ValueError in mysqli, be consistent. Additionally, do not display the argument name for these errors. As the signatures are overloaded, the argument name may not match the meaning at all. --- ext/opcache/Optimizer/zend_func_info.c | 8 +-- ext/pgsql/pgsql.c | 71 ++++++++++++------------ ext/pgsql/pgsql.stub.php | 16 +++--- ext/pgsql/pgsql_arginfo.h | 12 ++--- ext/pgsql/tests/03sync_query.phpt | 74 ++++++++++++++++++++++++++ 5 files changed, 128 insertions(+), 53 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 7471da8220b76..0d41c05f7adf4 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -702,16 +702,16 @@ static const func_info_t func_infos[] = { F1("pg_execute", MAY_BE_FALSE | MAY_BE_RESOURCE), FN("pg_last_notice", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY ), F1("pg_field_table", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), - F1("pg_field_name", MAY_BE_FALSE | MAY_BE_STRING), - F1("pg_field_type", MAY_BE_FALSE | MAY_BE_STRING), - F1("pg_field_type_oid", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), + F1("pg_field_name", MAY_BE_STRING), + F1("pg_field_type", MAY_BE_STRING), + F1("pg_field_type_oid", MAY_BE_LONG | MAY_BE_STRING), F1("pg_fetch_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING), F1("pg_fetch_row", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("pg_fetch_assoc", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("pg_fetch_array", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("pg_fetch_object", MAY_BE_FALSE | MAY_BE_OBJECT), F1("pg_fetch_all", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY), - F1("pg_fetch_all_columns", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), + F1("pg_fetch_all_columns", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("pg_last_oid", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), F1("pg_lo_create", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), F1("pg_lo_open", MAY_BE_FALSE | MAY_BE_RESOURCE), diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 779c1f444b93f..b2b08f7fc1619 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1560,8 +1560,8 @@ PHP_FUNCTION(pg_field_table) } if (fnum >= PQnfields(pg_result->result)) { - php_error_docref(NULL, E_WARNING, "Bad field offset specified"); - RETURN_FALSE; + zend_argument_value_error(2, "must be less than the number of fields for this result set"); + RETURN_THROWS(); } oid = PQftable(pg_result->result, (int)fnum); @@ -1650,8 +1650,8 @@ static void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_typ pgsql_result = pg_result->result; if (field >= PQnfields(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Bad field offset specified"); - RETURN_FALSE; + zend_argument_value_error(2, "must be less than the number of fields for this result set"); + RETURN_THROWS(); } switch (entry_type) { @@ -1728,6 +1728,29 @@ PHP_FUNCTION(pg_field_num) } /* }}} */ +static zend_long field_arg_to_offset( + PGresult *result, zend_string *field_name, zend_long field_offset, int arg_num) { + if (field_name) { + field_offset = PQfnumber(result, ZSTR_VAL(field_name)); + if (field_offset < 0) { + /* Avoid displaying the argument name, as the signature is overloaded and the name + * might not line up. */ + zend_value_error("Argument #%d must be a field name from this result set", arg_num); + return -1; + } + } else { + if (field_offset < 0) { + zend_value_error("Argument #%d must be greater than or equal to 0", arg_num); + return -1; + } + if (field_offset >= PQnfields(result)) { + zend_value_error("Argument #%d must be less than the number of fields for this result set", arg_num); + return -1; + } + } + return field_offset; +} + /* {{{ Returns values from a result identifier */ PHP_FUNCTION(pg_fetch_result) { @@ -1777,21 +1800,10 @@ PHP_FUNCTION(pg_fetch_result) } pgsql_row = (int)row; } - if (field_name) { - field_offset = PQfnumber(pgsql_result, ZSTR_VAL(field_name)); - if (field_offset < 0 || field_offset >= PQnfields(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Bad column offset specified"); - RETURN_FALSE; - } - } else { - if (field_offset < 0) { - zend_argument_value_error(argc, "must be greater than or equal to 0"); - RETURN_THROWS(); - } - if (field_offset >= PQnfields(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Bad column offset specified"); - RETURN_FALSE; - } + + field_offset = field_arg_to_offset(pgsql_result, field_name, field_offset, argc); + if (field_offset < 0) { + RETURN_THROWS(); } if (PQgetisnull(pgsql_result, pgsql_row, field_offset)) { @@ -2037,8 +2049,8 @@ PHP_FUNCTION(pg_fetch_all_columns) num_fields = PQnfields(pgsql_result); if (colno >= (zend_long)num_fields) { - php_error_docref(NULL, E_WARNING, "Invalid column number '" ZEND_LONG_FMT "'", colno); - RETURN_FALSE; + zend_argument_value_error(2, "must be less than the number of fields for this result set"); + RETURN_THROWS(); } array_init(return_value); @@ -2134,20 +2146,9 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) pgsql_row = (int)row; } - if (field_name) { - field_offset = PQfnumber(pgsql_result, ZSTR_VAL(field_name)); - if (field_offset < 0 || field_offset >= PQnfields(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Bad column offset specified"); - RETURN_FALSE; - } - } else { - if (field_offset < 0) { - zend_argument_value_error(argc, "must be greater than or equal to 0"); - } - if (field_offset >= PQnfields(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Bad column offset specified"); - RETURN_FALSE; - } + field_offset = field_arg_to_offset(pgsql_result, field_name, field_offset, argc); + if (field_offset < 0) { + RETURN_THROWS(); } switch (entry_type) { diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index 181d62c9cdd67..4e2b21e4f2d81 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -118,37 +118,37 @@ function pg_last_notice($connection, int $option = PGSQL_NOTICE_LAST): array|str function pg_field_table($result, int $field_number, bool $oid_only = false): string|int|false {} /** @param resource $result */ -function pg_field_name($result, int $field_number): string|false {} +function pg_field_name($result, int $field_number): string {} /** * @param resource $result * @alias pg_field_name * @deprecated */ -function pg_fieldname($result, int $field_number): string|false {} +function pg_fieldname($result, int $field_number): string {} /** @param resource $result */ -function pg_field_size($result, int $field_number): int|false {} +function pg_field_size($result, int $field_number): int {} /** * @param resource $result * @alias pg_field_size * @deprecated */ -function pg_fieldsize($result, int $field_number): int|false {} +function pg_fieldsize($result, int $field_number): int {} /** @param resource $result */ -function pg_field_type($result, int $field_number): string|false {} +function pg_field_type($result, int $field_number): string {} /** * @param resource $result * @alias pg_field_type * @deprecated */ -function pg_fieldtype($result, int $field_number): string|false {} +function pg_fieldtype($result, int $field_number): string {} /** @param resource $result */ -function pg_field_type_oid($result, int $field_number): string|int|false {} +function pg_field_type_oid($result, int $field_number): string|int {} /** @param resource $result */ function pg_field_num($result, string $field_name): int {} @@ -196,7 +196,7 @@ function pg_fetch_object($result, ?int $row_number = null, string $class_name = function pg_fetch_all($result, int $result_type = PGSQL_ASSOC): array|false {} /** @param resource $result */ -function pg_fetch_all_columns($result, int $column_number = 0): array|false {} +function pg_fetch_all_columns($result, int $field_number = 0): array {} /** @param resource $result */ function pg_result_seek($result, int $row_number): bool {} diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index c2b23871548be..f6cc2cf69c602 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 87152e947ab7bfb3a9d7df30dd6fbccac504504e */ + * Stub hash: 3f5e097d572721b42f2ad438c2af8c0d1f9c9086 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connect, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -93,14 +93,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_table, 0, 2, MAY_BE_STR ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, oid_only, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_name, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_field_name, 0, 2, IS_STRING, 0) ZEND_ARG_INFO(0, result) ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_pg_fieldname arginfo_pg_field_name -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_size, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_field_size, 0, 2, IS_LONG, 0) ZEND_ARG_INFO(0, result) ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -111,7 +111,7 @@ ZEND_END_ARG_INFO() #define arginfo_pg_fieldtype arginfo_pg_field_name -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_type_oid, 0, 2, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_type_oid, 0, 2, MAY_BE_STRING|MAY_BE_LONG) ZEND_ARG_INFO(0, result) ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -160,9 +160,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_all, 0, 1, MAY_BE_ARRAY ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_type, IS_LONG, 0, "PGSQL_ASSOC") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_all_columns, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_fetch_all_columns, 0, 1, IS_ARRAY, 0) ZEND_ARG_INFO(0, result) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column_number, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, field_number, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_result_seek, 0, 2, _IS_BOOL, 0) diff --git a/ext/pgsql/tests/03sync_query.phpt b/ext/pgsql/tests/03sync_query.phpt index 1cd439bc204ac..ce062cafd6bfb 100644 --- a/ext/pgsql/tests/03sync_query.phpt +++ b/ext/pgsql/tests/03sync_query.phpt @@ -31,6 +31,32 @@ for ($i=0; $i < $rows; $i++) pg_fetch_result($result, $i, 0); } +try { + pg_fetch_result($result, 0, -1); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_fetch_result($result, 0, 3); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_fetch_result($result, 0, "unknown"); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_fetch_all_columns($result, -1); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_fetch_all_columns($result, 3); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + pg_result_error($result); if (function_exists('pg_result_error_field')) { pg_result_error_field($result, PGSQL_DIAG_SEVERITY); @@ -61,6 +87,42 @@ pg_field_type($result, 0); pg_field_prtlen($result, 0); pg_field_is_null($result, 0); +try { + pg_field_is_null($result, -1); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_field_is_null($result, 3); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_field_is_null($result, "unknown"); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_field_name($result, -1); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_field_name($result, 3); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_field_table($result, -1); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + pg_field_table($result, 3); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + $result = pg_query($db, "INSERT INTO ".$table_name." VALUES (9999, 'ABC');"); pg_last_oid($result); @@ -70,4 +132,16 @@ pg_close($db); echo "OK"; ?> --EXPECT-- +Argument #3 must be greater than or equal to 0 +Argument #3 must be less than the number of fields for this result set +Argument #3 must be a field name from this result set +pg_fetch_all_columns(): Argument #2 ($field_number) must be greater than or equal to 0 +pg_fetch_all_columns(): Argument #2 ($field_number) must be less than the number of fields for this result set +Argument #2 must be greater than or equal to 0 +Argument #2 must be less than the number of fields for this result set +Argument #2 must be a field name from this result set +pg_field_name(): Argument #2 ($field_number) must be greater than or equal to 0 +pg_field_name(): Argument #2 ($field_number) must be less than the number of fields for this result set +pg_field_table(): Argument #2 ($field_number) must be greater than or equal to 0 +pg_field_table(): Argument #2 ($field_number) must be less than the number of fields for this result set OK From edf22962ef4f20d3b770ab7b2873a93ed84bab22 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 11:02:09 +0200 Subject: [PATCH 027/209] Make constant redeclaration a warning We missed the change to make this an Error exception in PHP 8, but at least elevate it to a warning, to avoid a notice -> exception jump at a later time. --- Zend/tests/008.phpt | 4 ++-- Zend/tests/bug53305.phpt | 2 +- Zend/tests/constants_001.phpt | 2 +- Zend/tests/constants_004.phpt | 2 +- Zend/tests/constants_008.phpt | 2 +- Zend/tests/halt_compiler3.phpt | 2 +- Zend/tests/halt_compiler4.phpt | 2 +- Zend/zend_constants.c | 2 +- ext/opcache/tests/bug71127.phpt | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Zend/tests/008.phpt b/Zend/tests/008.phpt index aa2dbb8d33a17..1057c82b95242 100644 --- a/Zend/tests/008.phpt +++ b/Zend/tests/008.phpt @@ -32,13 +32,13 @@ echo "Done\n"; --EXPECTF-- TypeError: define(): Argument #1 ($constant_name) must be of type string, array given -Notice: Constant TRUE already defined in %s on line %d +Warning: Constant TRUE already defined in %s on line %d bool(false) bool(true) bool(true) bool(true) -Notice: Constant test const already defined in %s on line %d +Warning: Constant test const already defined in %s on line %d bool(false) bool(true) bool(true) diff --git a/Zend/tests/bug53305.phpt b/Zend/tests/bug53305.phpt index c922ac6338823..c76b582e244a9 100644 --- a/Zend/tests/bug53305.phpt +++ b/Zend/tests/bug53305.phpt @@ -14,6 +14,6 @@ var_dump(constant('__COMPILER_HALT_OFFSET__1'.chr(0))); ?> --EXPECTF-- -Notice: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d +Warning: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d int(1) int(4) diff --git a/Zend/tests/constants_001.phpt b/Zend/tests/constants_001.phpt index 8419eb6613de0..7b274d6fd9c3a 100644 --- a/Zend/tests/constants_001.phpt +++ b/Zend/tests/constants_001.phpt @@ -17,7 +17,7 @@ var_dump(constant('1foo')); ?> --EXPECTF-- -Notice: Constant 1 already defined in %s on line %d +Warning: Constant 1 already defined in %s on line %d int(2) int(2) int(2) diff --git a/Zend/tests/constants_004.phpt b/Zend/tests/constants_004.phpt index 69369aa3d9631..e981415361253 100644 --- a/Zend/tests/constants_004.phpt +++ b/Zend/tests/constants_004.phpt @@ -10,4 +10,4 @@ const foo = 2; ?> --EXPECTF-- -Notice: Constant foo\foo already defined in %s on line %d +Warning: Constant foo\foo already defined in %s on line %d diff --git a/Zend/tests/constants_008.phpt b/Zend/tests/constants_008.phpt index 6a8f00edec235..17c6904579caf 100644 --- a/Zend/tests/constants_008.phpt +++ b/Zend/tests/constants_008.phpt @@ -13,5 +13,5 @@ if (defined('a')) { ?> --EXPECTF-- -Notice: Constant a already defined in %s on line %d +Warning: Constant a already defined in %s on line %d 2 diff --git a/Zend/tests/halt_compiler3.phpt b/Zend/tests/halt_compiler3.phpt index f0a5323e66fee..ff25b13333639 100644 --- a/Zend/tests/halt_compiler3.phpt +++ b/Zend/tests/halt_compiler3.phpt @@ -5,4 +5,4 @@ __HALT_COMPILER(); bad define() of __COMPILER_HALT_OFFSET__ 1 define ('__COMPILER_HALT_OFFSET__', 1); ?> --EXPECTF-- -Notice: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d +Warning: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d diff --git a/Zend/tests/halt_compiler4.phpt b/Zend/tests/halt_compiler4.phpt index 53a4fc76f9ef8..bb96f25ed96b7 100644 --- a/Zend/tests/halt_compiler4.phpt +++ b/Zend/tests/halt_compiler4.phpt @@ -7,4 +7,4 @@ __HALT_COMPILER(); ?> ==DONE== --EXPECTF-- -Notice: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d +Warning: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 3ad32446ff56c..f289cc5d9160d 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -503,7 +503,7 @@ ZEND_API zend_result zend_register_constant(zend_constant *c) || (!persistent && zend_get_special_const(ZSTR_VAL(name), ZSTR_LEN(name))) || zend_hash_add_constant(EG(zend_constants), name, c) == NULL ) { - zend_error(E_NOTICE,"Constant %s already defined", ZSTR_VAL(name)); + zend_error(E_WARNING, "Constant %s already defined", ZSTR_VAL(name)); zend_string_release(c->name); if (!persistent) { zval_ptr_dtor_nogc(&c->value); diff --git a/ext/opcache/tests/bug71127.phpt b/ext/opcache/tests/bug71127.phpt index 0c606097fead9..cc8886fc27aac 100644 --- a/ext/opcache/tests/bug71127.phpt +++ b/ext/opcache/tests/bug71127.phpt @@ -21,5 +21,5 @@ include($file); @unlink(__DIR__ . "/bug71127.inc"); ?> --EXPECTF-- -Notice: Constant FOO already defined in %sbug71127.inc on line %d +Warning: Constant FOO already defined in %sbug71127.inc on line %d okey From d60c43e397f45c3c92e2a980aa8bee2235bff8be Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 11:05:19 +0200 Subject: [PATCH 028/209] Convert exception instanceof checks to assertions --- Zend/zend_exceptions.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 1f47d88997c3e..f037f0399a11e 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -92,11 +92,10 @@ void zend_exception_set_previous(zend_object *exception, zend_object *add_previo return; } + ZEND_ASSERT(instanceof_function(add_previous->ce, zend_ce_throwable) + && "Previous execption must implement Throwable"); + ZVAL_OBJ(&pv, add_previous); - if (!instanceof_function(Z_OBJCE(pv), zend_ce_throwable)) { - zend_error_noreturn(E_CORE_ERROR, "Previous exception must implement Throwable"); - return; - } ZVAL_OBJ(&zv, exception); ex = &zv; do { @@ -837,16 +836,14 @@ static zend_object *zend_throw_exception_zstr(zend_class_entry *exception_ce, ze { zval ex, tmp; - if (exception_ce) { - if (!instanceof_function(exception_ce, zend_ce_throwable)) { - zend_error(E_NOTICE, "Exceptions must implement Throwable"); - exception_ce = zend_ce_exception; - } - } else { + if (!exception_ce) { exception_ce = zend_ce_exception; } - object_init_ex(&ex, exception_ce); + ZEND_ASSERT(instanceof_function(exception_ce, zend_ce_throwable) + && "Exceptions must implement Throwable"); + + object_init_ex(&ex, exception_ce); if (message) { ZVAL_STR(&tmp, message); From fb4554e431e4f4063917c1a80ad2e929e6768d0b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 11:07:42 +0200 Subject: [PATCH 029/209] Throw warning for failed object to int/float conversion We previously couldn't increase the error level here because it was coupled to comparison handling. This is no longer the case in PHP 8. --- Zend/tests/bug33999.phpt | 4 ++-- Zend/tests/cast_to_double.phpt | 2 +- Zend/tests/cast_to_int.phpt | 2 +- Zend/tests/offset_string.phpt | 2 +- Zend/tests/settype_double.phpt | 2 +- Zend/tests/settype_int.phpt | 2 +- Zend/zend_operators.c | 2 +- ext/gd/tests/bug67248.phpt | 6 +++--- ext/posix/tests/posix_ttyname_variation6.phpt | 18 ++++-------------- ext/spl/tests/countable_count_variation1.phpt | 2 +- .../array/array_multisort_variation9.phpt | 8 ++++---- .../gettype_settype_basic.phpt | 8 ++++---- .../gettype_settype_variation2.phpt | 12 ++++++------ .../gettype_settype_variation3.phpt | 12 ++++++------ .../general_functions/intval_variation1.phpt | 15 ++++----------- .../tests/strings/sprintf_variation54.phpt | Bin 2174 -> 2179 bytes .../xml_parser_set_option_variation3.phpt | 2 +- 17 files changed, 41 insertions(+), 58 deletions(-) diff --git a/Zend/tests/bug33999.phpt b/Zend/tests/bug33999.phpt index 7460815441beb..2b03c3124a3c3 100644 --- a/Zend/tests/bug33999.phpt +++ b/Zend/tests/bug33999.phpt @@ -23,8 +23,8 @@ object(Foo)#1 (1) { string(3) "bat" } -Notice: Object of class Foo could not be converted to int in %sbug33999.php on line 9 +Warning: Object of class Foo could not be converted to int in %s on line %d int(1) -Notice: Object of class Foo could not be converted to float in %sbug33999.php on line 12 +Warning: Object of class Foo could not be converted to float in %s on line %d float(1) diff --git a/Zend/tests/cast_to_double.phpt b/Zend/tests/cast_to_double.phpt index 58286436bd29b..2972fbbe8027a 100644 --- a/Zend/tests/cast_to_double.phpt +++ b/Zend/tests/cast_to_double.phpt @@ -52,6 +52,6 @@ float(1) float(0) float(%f) -Notice: Object of class test could not be converted to float in %s on line %d +Warning: Object of class test could not be converted to float in %s on line %d float(1) Done diff --git a/Zend/tests/cast_to_int.phpt b/Zend/tests/cast_to_int.phpt index 5dbab23fd2df2..6451c4a2f7208 100644 --- a/Zend/tests/cast_to_int.phpt +++ b/Zend/tests/cast_to_int.phpt @@ -50,6 +50,6 @@ int(1) int(0) int(%d) -Notice: Object of class test could not be converted to int in %s on line %d +Warning: Object of class test could not be converted to int in %s on line %d int(1) Done diff --git a/Zend/tests/offset_string.phpt b/Zend/tests/offset_string.phpt index 36481dccce7c1..f14c63af5de79 100644 --- a/Zend/tests/offset_string.phpt +++ b/Zend/tests/offset_string.phpt @@ -69,7 +69,7 @@ Warning: String offset cast occurred in %s on line %d string(1) "S" Cannot access offset of type resource on string -Notice: Object of class stdClass could not be converted to int in %s on line %d +Warning: Object of class stdClass could not be converted to int in %s on line %d Cannot access offset of type stdClass on string Cannot access offset of type array on string Done diff --git a/Zend/tests/settype_double.phpt b/Zend/tests/settype_double.phpt index d5b2f0e42ea94..6bbe773d0c2c9 100644 --- a/Zend/tests/settype_double.phpt +++ b/Zend/tests/settype_double.phpt @@ -52,6 +52,6 @@ float(1) float(0) float(%f) -Notice: Object of class test could not be converted to float in %s on line %d +Warning: Object of class test could not be converted to float in %s on line %d float(1) Done diff --git a/Zend/tests/settype_int.phpt b/Zend/tests/settype_int.phpt index 9dac9c5b8f2b9..e5eb098a67f56 100644 --- a/Zend/tests/settype_int.phpt +++ b/Zend/tests/settype_int.phpt @@ -50,6 +50,6 @@ int(1) int(0) int(%d) -Notice: Object of class test could not be converted to int in %s on line %d +Warning: Object of class test could not be converted to int in %s on line %d int(1) Done diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 0923741723d48..5f9dbe3d3ce01 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -142,7 +142,7 @@ ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len) /* { #define convert_object_to_type(op, dst, ctype) \ ZVAL_UNDEF(dst); \ if (Z_OBJ_HT_P(op)->cast_object(Z_OBJ_P(op), dst, ctype) == FAILURE) { \ - zend_error(E_NOTICE, \ + zend_error(E_WARNING, \ "Object of class %s could not be converted to %s", ZSTR_VAL(Z_OBJCE_P(op)->name),\ zend_get_type_by_const(ctype)); \ } \ diff --git a/ext/gd/tests/bug67248.phpt b/ext/gd/tests/bug67248.phpt index 5b5e0e8baec37..c48512e281ebe 100644 --- a/ext/gd/tests/bug67248.phpt +++ b/ext/gd/tests/bug67248.phpt @@ -19,7 +19,7 @@ for($i=0;$i<7;$i++) { !! [TypeError] imageaffinematrixget(): Argument #1 ($type) must be of type array when using translate or scale !! [TypeError] imageaffinematrixget(): Argument #1 ($type) must be of type array when using translate or scale -Notice: Object of class stdClass could not be converted to float in %s on line %d +Warning: Object of class stdClass could not be converted to float in %s on line %d array(6) { [0]=> float(%f) @@ -35,7 +35,7 @@ array(6) { float(0) } -Notice: Object of class stdClass could not be converted to float in %s on line %d +Warning: Object of class stdClass could not be converted to float in %s on line %d array(6) { [0]=> float(1) @@ -51,7 +51,7 @@ array(6) { float(0) } -Notice: Object of class stdClass could not be converted to float in %s on line %d +Warning: Object of class stdClass could not be converted to float in %s on line %d array(6) { [0]=> float(1) diff --git a/ext/posix/tests/posix_ttyname_variation6.phpt b/ext/posix/tests/posix_ttyname_variation6.phpt index 691c5eea7ee3a..4af6334b2f310 100644 --- a/ext/posix/tests/posix_ttyname_variation6.phpt +++ b/ext/posix/tests/posix_ttyname_variation6.phpt @@ -16,18 +16,6 @@ if (!extension_loaded('posix')) { echo "*** Test substituting argument 1 with object values ***\n"; - - -function test_error_handler($err_no, $err_msg, $filename, $linenum) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - class classWithToString { public function __toString() { @@ -51,7 +39,9 @@ foreach ( $variation_array as $var ) { ?> --EXPECTF-- *** Test substituting argument 1 with object values *** -Error: 8 - Object of class classWithToString could not be converted to int, %s(%d) + +Warning: Object of class classWithToString could not be converted to int in %s on line %d bool(false) -Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d) + +Warning: Object of class classWithoutToString could not be converted to int in %s on line %d bool(false) diff --git a/ext/spl/tests/countable_count_variation1.phpt b/ext/spl/tests/countable_count_variation1.phpt index 8ce29410d9ab9..0e17eccbe68ab 100644 --- a/ext/spl/tests/countable_count_variation1.phpt +++ b/ext/spl/tests/countable_count_variation1.phpt @@ -60,7 +60,7 @@ Count returns a string: int(0) Count returns an object: -Notice: Object of class returnObject could not be converted to int in %s on line 40 +Warning: Object of class returnObject could not be converted to int in %s on line %d int(1) Count returns an array: int(1) diff --git a/ext/standard/tests/array/array_multisort_variation9.phpt b/ext/standard/tests/array/array_multisort_variation9.phpt index 0451daca330d7..d7203c335b7ae 100644 --- a/ext/standard/tests/array/array_multisort_variation9.phpt +++ b/ext/standard/tests/array/array_multisort_variation9.phpt @@ -33,13 +33,13 @@ var_dump($inputs); --EXPECTF-- *** Testing array_multisort() : usage variation - test sort order of all types*** -Notice: Object of class classWithToString could not be converted to float in %sarray_multisort_variation9.php on line %d +Warning: Object of class classWithToString could not be converted to float in %s on line %d -Notice: Object of class classWithToString could not be converted to float in %sarray_multisort_variation9.php on line %d +Warning: Object of class classWithToString could not be converted to float in %s on line %d -Notice: Object of class classWithoutToString could not be converted to float in %sarray_multisort_variation9.php on line %d +Warning: Object of class classWithoutToString could not be converted to float in %s on line %d -Notice: Object of class classWithoutToString could not be converted to float in %sarray_multisort_variation9.php on line %d +Warning: Object of class classWithoutToString could not be converted to float in %s on line %d bool(true) array(10) { ["float -10.5"]=> diff --git a/ext/standard/tests/general_functions/gettype_settype_basic.phpt b/ext/standard/tests/general_functions/gettype_settype_basic.phpt index 0c336f8a23672..a5e1a0b5bf3c4 100644 --- a/ext/standard/tests/general_functions/gettype_settype_basic.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_basic.phpt @@ -237,7 +237,7 @@ bool(true) int(%d) string(7) "integer" -- Iteration 14 -- -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" @@ -296,7 +296,7 @@ bool(true) int(%d) string(7) "integer" -- Iteration 14 -- -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" @@ -355,7 +355,7 @@ bool(true) float(%f) string(6) "double" -- Iteration 14 -- -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" @@ -414,7 +414,7 @@ bool(true) float(%f) string(6) "double" -- Iteration 14 -- -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" diff --git a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt index 91561715acd1f..12f001e924e46 100644 --- a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt @@ -554,19 +554,19 @@ int(-512000) string(7) "integer" -- Iteration 76 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" -- Iteration 77 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" -- Iteration 78 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" @@ -949,19 +949,19 @@ int(-512000) string(7) "integer" -- Iteration 76 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" -- Iteration 77 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" -- Iteration 78 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" diff --git a/ext/standard/tests/general_functions/gettype_settype_variation3.phpt b/ext/standard/tests/general_functions/gettype_settype_variation3.phpt index 75e01cfccf6a8..16cc2b8dfd234 100644 --- a/ext/standard/tests/general_functions/gettype_settype_variation3.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_variation3.phpt @@ -548,19 +548,19 @@ float(-512000) string(6) "double" -- Iteration 76 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" -- Iteration 77 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" -- Iteration 78 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" @@ -943,19 +943,19 @@ float(-512000) string(6) "double" -- Iteration 76 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" -- Iteration 77 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" -- Iteration 78 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" diff --git a/ext/standard/tests/general_functions/intval_variation1.phpt b/ext/standard/tests/general_functions/intval_variation1.phpt index f2e3db9f1065c..c18910a1d8023 100644 --- a/ext/standard/tests/general_functions/intval_variation1.phpt +++ b/ext/standard/tests/general_functions/intval_variation1.phpt @@ -4,15 +4,6 @@ Test intval() function : usage variation Date: Mon, 21 Sep 2020 17:20:28 +0200 Subject: [PATCH 030/209] Return empty array for no rows in pg_fetch_all() This makes it line up with pg_fetch_all_columns(), as well as similar functions in other exts, such as mysqli_fetch_all(). --- UPGRADING | 2 ++ ext/opcache/Optimizer/zend_func_info.c | 2 +- ext/pgsql/pgsql.c | 15 +++++---------- ext/pgsql/pgsql.stub.php | 2 +- ext/pgsql/pgsql_arginfo.h | 9 ++++++--- ext/pgsql/php_pgsql.h | 2 +- ext/pgsql/tests/03sync_query.phpt | 3 +++ 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/UPGRADING b/UPGRADING index 062b82d59c4c4..fc3d283e6e26c 100644 --- a/UPGRADING +++ b/UPGRADING @@ -431,6 +431,8 @@ PHP 8.0 UPGRADE NOTES . The deprecated pg_lo_import() and pg_lo_export() signature that passes the connection as the last argument is no longer supported. The connection should be passed as first argument instead. + . pg_fetch_all() will now return an empty array instead of false for result + sets with zero rows. - Phar: . Metadata associated with a phar will no longer be automatically unserialized, diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 0d41c05f7adf4..42dd8c6914080 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -710,7 +710,7 @@ static const func_info_t func_infos[] = { F1("pg_fetch_assoc", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("pg_fetch_array", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("pg_fetch_object", MAY_BE_FALSE | MAY_BE_OBJECT), - F1("pg_fetch_all", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY), + F1("pg_fetch_all", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY), F1("pg_fetch_all_columns", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("pg_last_oid", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), F1("pg_lo_create", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING), diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index b2b08f7fc1619..c08ed40d01d22 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2015,10 +2015,7 @@ PHP_FUNCTION(pg_fetch_all) pgsql_result = pg_result->result; array_init(return_value); - if (php_pgsql_result2array(pgsql_result, return_value, result_type) == FAILURE) { - zend_array_destroy(Z_ARR_P(return_value)); - RETURN_FALSE; - } + php_pgsql_result2array(pgsql_result, return_value, result_type); } /* }}} */ @@ -5796,7 +5793,7 @@ PHP_FUNCTION(pg_delete) /* }}} */ /* {{{ php_pgsql_result2array */ -PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long result_type) +PHP_PGSQL_API void php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long result_type) { zval row; char *field_name; @@ -5805,9 +5802,7 @@ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, l uint32_t i; assert(Z_TYPE_P(ret_array) == IS_ARRAY); - if ((pg_numrows = PQntuples(pg_result)) <= 0) { - return FAILURE; - } + pg_numrows = PQntuples(pg_result); for (pg_row = 0; pg_row < pg_numrows; pg_row++) { array_init(&row); for (i = 0, num_fields = PQnfields(pg_result); i < num_fields; i++) { @@ -5834,7 +5829,6 @@ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, l } add_index_zval(ret_array, pg_row, &row); } - return SUCCESS; } /* }}} */ @@ -5877,7 +5871,8 @@ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, l pg_result = PQexec(pg_link, ZSTR_VAL(querystr.s)); if (PQresultStatus(pg_result) == PGRES_TUPLES_OK) { - ret = php_pgsql_result2array(pg_result, ret_array, result_type); + php_pgsql_result2array(pg_result, ret_array, result_type); + ret = SUCCESS; } else { php_error_docref(NULL, E_NOTICE, "Failed to execute '%s'", ZSTR_VAL(querystr.s)); } diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index 4e2b21e4f2d81..a6dfb5d18512e 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -193,7 +193,7 @@ function pg_fetch_array($result, ?int $row_number = null, int $result_type = PGS function pg_fetch_object($result, ?int $row_number = null, string $class_name = "stdClass", ?array $ctor_params = null): object|false {} /** @param resource $result */ -function pg_fetch_all($result, int $result_type = PGSQL_ASSOC): array|false {} +function pg_fetch_all($result, int $result_type = PGSQL_ASSOC): array {} /** @param resource $result */ function pg_fetch_all_columns($result, int $field_number = 0): array {} diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index f6cc2cf69c602..a0f267c8ff896 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3f5e097d572721b42f2ad438c2af8c0d1f9c9086 */ + * Stub hash: 9735dbc8a4ca642ee825ae8942470ac2dec89f50 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connect, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -155,7 +155,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_object, 0, 1, MAY_BE_OB ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ctor_params, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_all, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_fetch_all, 0, 1, IS_ARRAY, 0) ZEND_ARG_INFO(0, result) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_type, IS_LONG, 0, "PGSQL_ASSOC") ZEND_END_ARG_INFO() @@ -385,7 +385,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_result_status, 0, 1, MAY_BE_S ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_type, IS_LONG, 0, "PGSQL_STATUS_LONG") ZEND_END_ARG_INFO() -#define arginfo_pg_get_notify arginfo_pg_fetch_all +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_get_notify, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) + ZEND_ARG_INFO(0, result) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_type, IS_LONG, 0, "PGSQL_ASSOC") +ZEND_END_ARG_INFO() #define arginfo_pg_get_pid arginfo_pg_connect_poll diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index fe52d9ce96226..3da04282d9b87 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -182,7 +182,7 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *val PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval *ids, zend_ulong opt , zend_string **sql); PHP_PGSQL_API int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_ulong opt, zend_string **sql); PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval *ret_array, zend_ulong opt, long fetch_option, zend_string **sql ); -PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long fetch_option); +PHP_PGSQL_API void php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long fetch_option); /* internal functions */ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent); diff --git a/ext/pgsql/tests/03sync_query.phpt b/ext/pgsql/tests/03sync_query.phpt index ce062cafd6bfb..cc3b1b86b98a5 100644 --- a/ext/pgsql/tests/03sync_query.phpt +++ b/ext/pgsql/tests/03sync_query.phpt @@ -125,6 +125,7 @@ try { $result = pg_query($db, "INSERT INTO ".$table_name." VALUES (9999, 'ABC');"); pg_last_oid($result); +var_dump(pg_fetch_all($result)); pg_free_result($result); pg_close($db); @@ -144,4 +145,6 @@ pg_field_name(): Argument #2 ($field_number) must be greater than or equal to 0 pg_field_name(): Argument #2 ($field_number) must be less than the number of fields for this result set pg_field_table(): Argument #2 ($field_number) must be greater than or equal to 0 pg_field_table(): Argument #2 ($field_number) must be less than the number of fields for this result set +array(0) { +} OK From 2b6f5eec6c3d2b0596f7376ec41b316d1c4ac4e7 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 21 Sep 2020 15:33:23 +0100 Subject: [PATCH 031/209] Drop Hex support in numeric strings for Intl collator Support for this was removed in PHP 7.0. See: https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings --- ext/intl/collator/collator_is_numeric.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c index 6f7311fa96070..553b9d11edbcf 100644 --- a/ext/intl/collator/collator_is_numeric.c +++ b/ext/intl/collator/collator_is_numeric.c @@ -212,19 +212,13 @@ zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, dou zend_long local_lval; double local_dval; UChar *end_ptr_long, *end_ptr_double; - int conv_base=10; if (!length) { return 0; } - /* handle hex numbers */ - if (length>=2 && str[0]=='0' && (str[1]=='x' || str[1]=='X')) { - conv_base=16; - } - errno=0; - local_lval = collator_u_strtol(str, &end_ptr_long, conv_base); + local_lval = collator_u_strtol(str, &end_ptr_long, 10); if (errno != ERANGE) { if (end_ptr_long == str+length) { /* integer string */ if (lval) { @@ -238,11 +232,6 @@ zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, dou end_ptr_long = NULL; } - if (conv_base == 16) { /* hex string, under UNIX strtod() messes it up */ - /* UTODO: keep compatibility with is_numeric_string() here? */ - return 0; - } - local_dval = collator_u_strtod(str, &end_ptr_double); if (local_dval == 0 && end_ptr_double == str) { end_ptr_double = NULL; From ddd99a700563af06e8897901abf87e5da73009e6 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 21 Sep 2020 15:38:26 +0100 Subject: [PATCH 032/209] Drop -1 mode for collator_is_numeric() It is used only once with allow_errors enabled --- ext/intl/collator/collator_convert.c | 4 ++-- ext/intl/collator/collator_is_numeric.c | 5 +---- ext/intl/collator/collator_is_numeric.h | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c index da2cb85673b5c..c9c49fcb3c729 100644 --- a/ext/intl/collator/collator_convert.c +++ b/ext/intl/collator/collator_convert.c @@ -320,7 +320,7 @@ zval* collator_convert_string_to_double( zval* str, zval *rv ) */ zval* collator_convert_string_to_number_if_possible( zval* str, zval *rv ) { - int is_numeric = 0; + zend_uchar is_numeric = 0; zend_long lval = 0; double dval = 0; @@ -329,7 +329,7 @@ zval* collator_convert_string_to_number_if_possible( zval* str, zval *rv ) COLLATOR_CONVERT_RETURN_FAILED( str ); } - if( ( is_numeric = collator_is_numeric( (UChar*) Z_STRVAL_P(str), UCHARS( Z_STRLEN_P(str) ), &lval, &dval, 1 ) ) ) + if ( ( is_numeric = collator_is_numeric( (UChar*) Z_STRVAL_P(str), UCHARS( Z_STRLEN_P(str) ), &lval, &dval, /* allow_errors */ 1 ) ) ) { if( is_numeric == IS_LONG ) { ZVAL_LONG(rv, lval); diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c index 553b9d11edbcf..3fa9c0d13bc5c 100644 --- a/ext/intl/collator/collator_is_numeric.c +++ b/ext/intl/collator/collator_is_numeric.c @@ -207,7 +207,7 @@ static zend_long collator_u_strtol(nptr, endptr, base) /* {{{ collator_is_numeric] * Taken from PHP6:is_numeric_unicode() */ -zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, double *dval, int allow_errors ) +zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, double *dval, bool allow_errors ) { zend_long local_lval; double local_dval; @@ -252,9 +252,6 @@ zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, dou if (!allow_errors) { return 0; } - if (allow_errors == -1) { - zend_error(E_NOTICE, "A non well formed numeric value encountered"); - } if (allow_errors) { if (end_ptr_double > end_ptr_long && dval) { diff --git a/ext/intl/collator/collator_is_numeric.h b/ext/intl/collator/collator_is_numeric.h index 34b84e9990ba2..e6b5b18658cd6 100644 --- a/ext/intl/collator/collator_is_numeric.h +++ b/ext/intl/collator/collator_is_numeric.h @@ -19,6 +19,6 @@ #include #include -zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, double *dval, int allow_errors ); +zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, double *dval, bool allow_errors ); #endif // COLLATOR_IS_NUMERIC_H From 5a085777b7f5fc015b885be928efc244a5e89e1f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 21 Sep 2020 21:53:03 +0300 Subject: [PATCH 033/209] Fixed incorrect JIT for FETCH_THIS+SEND_REF --- ext/opcache/jit/zend_jit_x86.dasc | 5 ++++- ext/opcache/tests/jit/send_ref_001.phpt | 26 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 ext/opcache/tests/jit/send_ref_001.phpt diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index c689359272ede..a6f9edecc3065 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -10136,13 +10136,16 @@ static int zend_jit_send_ref(dasm_State **Dst, const zend_op *opline, const zend |2: | // ZVAL_NEW_REF(arg, varptr); if (opline->op1_type == IS_VAR) { + if (Z_REG(op1_addr) != ZREG_R0 || Z_OFFSET(op1_addr) != 0) { + | LOAD_ZVAL_ADDR r0, op1_addr + } | mov aword T1, r0 // save } | EMALLOC sizeof(zend_reference), op_array, opline | mov dword [r0], 2 | mov dword [r0 + offsetof(zend_reference, gc.u.type_info)], GC_REFERENCE | mov aword [r0 + offsetof(zend_reference, sources.ptr)], 0 - ref_addr = ZEND_ADDR_MEM_ZVAL(ZREG_R0, 8); + ref_addr = ZEND_ADDR_MEM_ZVAL(ZREG_R0, offsetof(zend_reference, val)); if (opline->op1_type == IS_VAR) { zend_jit_addr val_addr = ZEND_ADDR_MEM_ZVAL(ZREG_R1, 0); diff --git a/ext/opcache/tests/jit/send_ref_001.phpt b/ext/opcache/tests/jit/send_ref_001.phpt new file mode 100644 index 0000000000000..55a2359038bb4 --- /dev/null +++ b/ext/opcache/tests/jit/send_ref_001.phpt @@ -0,0 +1,26 @@ +--TEST-- +JIT SEND_REF: 001 +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--SKIPIF-- + +--FILE-- +foo(); +?> +--EXPECT-- +ok From 2ee7e2982f5609ca6c3837c0b93ba9c5e89f84cb Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 21 Sep 2020 17:01:40 +0100 Subject: [PATCH 034/209] Promote count() warning to TypeError Closes GH-6180 --- Zend/tests/generators/errors/count_error.phpt | 8 +- Zend/zend_vm_def.h | 16 +- Zend/zend_vm_execute.h | 48 +- ext/standard/array.c | 18 +- ext/standard/tests/array/count_invalid.phpt | 82 ++-- ext/standard/tests/array/count_recursive.phpt | 55 --- ext/standard/tests/array/sizeof_basic1.phpt | 65 --- ext/standard/tests/array/sizeof_object2.phpt | 98 ++-- .../tests/array/sizeof_variation1.phpt | 322 ------------ .../tests/array/sizeof_variation4.phpt | 463 ------------------ .../is_countable_with_variables.phpt | 11 +- 11 files changed, 117 insertions(+), 1069 deletions(-) delete mode 100644 ext/standard/tests/array/sizeof_basic1.phpt delete mode 100644 ext/standard/tests/array/sizeof_variation1.phpt delete mode 100644 ext/standard/tests/array/sizeof_variation4.phpt diff --git a/Zend/tests/generators/errors/count_error.phpt b/Zend/tests/generators/errors/count_error.phpt index 2eacfd0d359ea..b88902d841c18 100644 --- a/Zend/tests/generators/errors/count_error.phpt +++ b/Zend/tests/generators/errors/count_error.phpt @@ -9,10 +9,10 @@ $gen = gen(); try { count($gen); -} catch (Exception $e) { - echo $e; +} catch (\TypeError $e) { + echo $e->getMessage(), PHP_EOL; } ?> ---EXPECTF-- -Warning: count(): Argument #1 ($var) must be of type Countable|array, Generator given in %s on line %d +--EXPECT-- +count(): Argument #1 ($var) must be of type Countable|array, Generator given diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 9e10721265ff8..1c06bb42e91c0 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8883,6 +8883,7 @@ ZEND_VM_COLD_CONST_HANDLER(190, ZEND_COUNT, CONST|TMPVAR|CV, UNUSED) SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); + while (1) { if (Z_TYPE_P(op1) == IS_ARRAY) { count = zend_array_count(Z_ARRVAL_P(op1)); @@ -8911,20 +8912,15 @@ ZEND_VM_COLD_CONST_HANDLER(190, ZEND_COUNT, CONST|TMPVAR|CV, UNUSED) break; } - /* If There's no handler and it doesn't implement Countable then add a warning */ - count = 1; + /* If There's no handler and it doesn't implement Countable then emit a TypeError */ } else if ((OP1_TYPE & (IS_VAR|IS_CV)) != 0 && Z_TYPE_P(op1) == IS_REFERENCE) { op1 = Z_REFVAL_P(op1); continue; - } else if (Z_TYPE_P(op1) <= IS_NULL) { - if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP1(); - } - count = 0; - } else { - count = 1; + } else if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP1(); } - zend_error(E_WARNING, "%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + count = 0; + zend_type_error("%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); break; } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index ac0dd911c001c..f43fc024b9c31 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -10324,6 +10324,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CONST_ SAVE_OPLINE(); op1 = RT_CONSTANT(opline, opline->op1); + while (1) { if (Z_TYPE_P(op1) == IS_ARRAY) { count = zend_array_count(Z_ARRVAL_P(op1)); @@ -10352,20 +10353,15 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CONST_ break; } - /* If There's no handler and it doesn't implement Countable then add a warning */ - count = 1; + /* If There's no handler and it doesn't implement Countable then emit a TypeError */ } else if ((IS_CONST & (IS_VAR|IS_CV)) != 0 && Z_TYPE_P(op1) == IS_REFERENCE) { op1 = Z_REFVAL_P(op1); continue; - } else if (Z_TYPE_P(op1) <= IS_NULL) { - if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP1(); - } - count = 0; - } else { - count = 1; + } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP1(); } - zend_error(E_WARNING, "%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + count = 0; + zend_type_error("%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); break; } @@ -17567,6 +17563,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_TMPVAR_UNUSED_HANDL SAVE_OPLINE(); op1 = _get_zval_ptr_var(opline->op1.var EXECUTE_DATA_CC); + while (1) { if (Z_TYPE_P(op1) == IS_ARRAY) { count = zend_array_count(Z_ARRVAL_P(op1)); @@ -17595,20 +17592,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_TMPVAR_UNUSED_HANDL break; } - /* If There's no handler and it doesn't implement Countable then add a warning */ - count = 1; + /* If There's no handler and it doesn't implement Countable then emit a TypeError */ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) != 0 && Z_TYPE_P(op1) == IS_REFERENCE) { op1 = Z_REFVAL_P(op1); continue; - } else if (Z_TYPE_P(op1) <= IS_NULL) { - if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP1(); - } - count = 0; - } else { - count = 1; + } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP1(); } - zend_error(E_WARNING, "%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + count = 0; + zend_type_error("%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); break; } @@ -47327,6 +47319,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(Z SAVE_OPLINE(); op1 = EX_VAR(opline->op1.var); + while (1) { if (Z_TYPE_P(op1) == IS_ARRAY) { count = zend_array_count(Z_ARRVAL_P(op1)); @@ -47355,20 +47348,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(Z break; } - /* If There's no handler and it doesn't implement Countable then add a warning */ - count = 1; + /* If There's no handler and it doesn't implement Countable then emit a TypeError */ } else if ((IS_CV & (IS_VAR|IS_CV)) != 0 && Z_TYPE_P(op1) == IS_REFERENCE) { op1 = Z_REFVAL_P(op1); continue; - } else if (Z_TYPE_P(op1) <= IS_NULL) { - if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP1(); - } - count = 0; - } else { - count = 1; + } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP1(); } - zend_error(E_WARNING, "%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + count = 0; + zend_type_error("%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); break; } diff --git a/ext/standard/array.c b/ext/standard/array.c index bd2823a4076ca..f99af846114dd 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -740,11 +740,6 @@ PHP_FUNCTION(count) } switch (Z_TYPE_P(array)) { - case IS_NULL: - /* Intentionally not converted to an exception */ - php_error_docref(NULL, E_WARNING, "%s(): Argument #1 ($var) must be of type Countable|array, %s given", get_active_function_name(), zend_zval_type_name(array)); - RETURN_LONG(0); - break; case IS_ARRAY: if (mode != COUNT_RECURSIVE) { cnt = zend_array_count(Z_ARRVAL_P(array)); @@ -774,18 +769,11 @@ PHP_FUNCTION(count) } return; } - - /* If There's no handler and it doesn't implement Countable then add a warning */ - /* Intentionally not converted to an exception */ - php_error_docref(NULL, E_WARNING, "%s(): Argument #1 ($var) must be of type Countable|array, %s given", get_active_function_name(), zend_zval_type_name(array)); - RETURN_LONG(1); - break; } + /* fallthrough */ default: - /* Intentionally not converted to an exception */ - php_error_docref(NULL, E_WARNING, "%s(): Argument #1 ($var) must be of type Countable|array, %s given", get_active_function_name(), zend_zval_type_name(array)); - RETURN_LONG(1); - break; + zend_argument_type_error(1, "must be of type Countable|array, %s given", zend_zval_type_name(array)); + RETURN_THROWS(); } } /* }}} */ diff --git a/ext/standard/tests/array/count_invalid.phpt b/ext/standard/tests/array/count_invalid.phpt index 4b146de85b933..b4fb27c8a967b 100644 --- a/ext/standard/tests/array/count_invalid.phpt +++ b/ext/standard/tests/array/count_invalid.phpt @@ -3,40 +3,54 @@ Only arrays and countable objects can be counted --FILE-- getMessage() . \PHP_EOL; +} + +try { + $result = count("string"); + var_dump($result); +} catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +try { + $result = count(123); + var_dump($result); +} catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +try { + $result = count(true); + var_dump($result); +} catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +try { + $result = count(false); + var_dump($result); +} catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; +} + +try { + $result = count((object) []); + var_dump($result); +} catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- -Warning: count(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -Warning: count(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -Warning: count(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - -Warning: count(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -Warning: count(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) +--EXPECT-- +count(): Argument #1 ($var) must be of type Countable|array, null given +count(): Argument #1 ($var) must be of type Countable|array, string given +count(): Argument #1 ($var) must be of type Countable|array, int given +count(): Argument #1 ($var) must be of type Countable|array, bool given +count(): Argument #1 ($var) must be of type Countable|array, bool given +count(): Argument #1 ($var) must be of type Countable|array, stdClass given -Warning: count(): Argument #1 ($var) must be of type Countable|array, stdClass given in %s on line %d -int(1) diff --git a/ext/standard/tests/array/count_recursive.phpt b/ext/standard/tests/array/count_recursive.phpt index 8532a74cb68ed..321706bc24869 100644 --- a/ext/standard/tests/array/count_recursive.phpt +++ b/ext/standard/tests/array/count_recursive.phpt @@ -3,10 +3,6 @@ Test count() function --FILE-- 1, "b" => 2, array("c" => 3, array("d" => 5))); print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n"; print "COUNT_RECURSIVE: should be 6, is ".count($arr, COUNT_RECURSIVE)."\n"; -print "-- Testing strings --\n"; -print "COUNT_NORMAL: should be 1, is ".count("string", COUNT_NORMAL)."\n"; -print "COUNT_RECURSIVE: should be 1, is ".count("string", COUNT_RECURSIVE)."\n"; - print "-- Testing various types with no second argument --\n"; -print "COUNT_NORMAL: should be 1, is ".count("string")."\n"; print "COUNT_NORMAL: should be 2, is ".count(array("a", array("b")))."\n"; $arr = array('a'=>array(NULL, NULL, NULL), 1=>array(NULL=>1, 1=>NULL), @@ -56,18 +47,6 @@ foreach ($count_array as $count_value) { $i++; } - -/* Testing count() by passing constant with no second argument */ -print "\n-- Testing count() on constants with no second argument --\n"; -print "COUNT_NORMAL: should be 1, is ".count(100)."\n"; -print "COUNT_NORMAL: should be 1, is ".count(-23.45)."\n"; - -print "\n-- Testing count() on NULL and Unset variables --\n"; -print "COUNT_NORMAL: should be 0, is ".count(NULL)."\n"; -print "COUNT_NORMAL: should be 1, is ".count("")."\n"; -print "COUNT_NORMAL: should be 0, is ".@count($a)."\n"; - - print "\n-- Testing count() on an empty sub-array --\n"; $arr = array(1, array(3, 4, array())); print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n"; @@ -111,30 +90,13 @@ closedir( $resource2 ); ?> --EXPECTF-- *** Testing basic functionality of count() function *** --- Testing NULL -- - -Warning: count(): count(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -COUNT_NORMAL: should be 0, is 0 - -Warning: count(): count(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -COUNT_RECURSIVE: should be 0, is 0 -- Testing arrays -- COUNT_NORMAL: should be 2, is 2 COUNT_RECURSIVE: should be 8, is 8 -- Testing hashes -- COUNT_NORMAL: should be 3, is 3 COUNT_RECURSIVE: should be 6, is 6 --- Testing strings -- - -Warning: count(): count(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -COUNT_NORMAL: should be 1, is 1 - -Warning: count(): count(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -COUNT_RECURSIVE: should be 1, is 1 -- Testing various types with no second argument -- - -Warning: count(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -COUNT_NORMAL: should be 1, is 1 COUNT_NORMAL: should be 2, is 2 -- Testing really cool arrays -- COUNT_NORMAL: should be 3, is 3 @@ -173,23 +135,6 @@ COUNT_RECURSIVE is 6 COUNT_NORMAL is 4 COUNT_RECURSIVE is 7 --- Testing count() on constants with no second argument -- - -Warning: count(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -COUNT_NORMAL: should be 1, is 1 - -Warning: count(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -COUNT_NORMAL: should be 1, is 1 - --- Testing count() on NULL and Unset variables -- - -Warning: count(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -COUNT_NORMAL: should be 0, is 0 - -Warning: count(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -COUNT_NORMAL: should be 1, is 1 -COUNT_NORMAL: should be 0, is 0 - -- Testing count() on an empty sub-array -- COUNT_NORMAL: should be 2, is 2 COUNT_RECURSIVE: should be 5, is 5 diff --git a/ext/standard/tests/array/sizeof_basic1.phpt b/ext/standard/tests/array/sizeof_basic1.phpt deleted file mode 100644 index 4c5910e3570e6..0000000000000 --- a/ext/standard/tests/array/sizeof_basic1.phpt +++ /dev/null @@ -1,65 +0,0 @@ ---TEST-- -Test sizeof() function : basic functionality - for scalar types ---FILE-- - ---EXPECTF-- -*** Testing sizeof() : basic functionality *** --- Testing sizeof() for integer type in default, COUNT_NORMAL and COUNT_RECURSIVE modes -- -default mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - -COUNT_NORMAL mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - -COUNT_RECURSIVE mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - --- Testing sizeof() for float type in default, COUNT_NORMAL and COUNT_RECURSIVE modes -- -default mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_NORMAL mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_RECURSIVE mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) -Done diff --git a/ext/standard/tests/array/sizeof_object2.phpt b/ext/standard/tests/array/sizeof_object2.phpt index 9a96719eb68c0..754198765685f 100644 --- a/ext/standard/tests/array/sizeof_object2.phpt +++ b/ext/standard/tests/array/sizeof_object2.phpt @@ -74,88 +74,52 @@ for($i = 0; $i < count($objects); $i++) $var = $objects[$i]; echo "Default Mode: "; - var_dump( sizeof($var) ); - echo "\n"; + try { + var_dump( sizeof($var) ); + } catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; + } echo "COUNT_NORMAL Mode: "; - var_dump( sizeof($var, COUNT_NORMAL) ); - echo "\n"; + try { + var_dump( sizeof($var, COUNT_NORMAL) ); + } catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; + } echo "COUNT_RECURSIVE Mode: "; - var_dump( sizeof($var, COUNT_RECURSIVE) ); - echo "\n"; + try { + var_dump( sizeof($var, COUNT_RECURSIVE) ); + } catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; + } $counter++; } echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing sizeof() : object functionality *** --- Testing sizeof() with objects which doesn't implement Countable interface --- -- Iteration 1 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, test given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, test given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, test given in %s on line %d -int(1) - +Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test given -- Iteration 2 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given in %s on line %d -int(1) - +Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given -- Iteration 3 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given in %s on line %d -int(1) - +Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given -- Iteration 4 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given in %s on line %d -int(1) - +Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given -- Iteration 5 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given in %s on line %d -int(1) - +Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given Done diff --git a/ext/standard/tests/array/sizeof_variation1.phpt b/ext/standard/tests/array/sizeof_variation1.phpt deleted file mode 100644 index 13196d3170edb..0000000000000 --- a/ext/standard/tests/array/sizeof_variation1.phpt +++ /dev/null @@ -1,322 +0,0 @@ ---TEST-- -Test sizeof() function : usage variations - for all scalar types and resource variable ---FILE-- - ---EXPECTF-- -*** Testing sizeof() : usage variations *** ---- Testing sizeof() for all scalar types in default,COUNT_NORMAL and COUNT_RECURSIVE mode --- --- Iteration 1 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - --- Iteration 2 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, int given in %s on line %d -int(1) - --- Iteration 3 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - --- Iteration 4 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - --- Iteration 5 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - --- Iteration 6 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - --- Iteration 7 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, float given in %s on line %d -int(1) - --- Iteration 8 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 9 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 10 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - --- Iteration 11 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - --- Iteration 12 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - --- Iteration 13 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, bool given in %s on line %d -int(1) - --- Iteration 14 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - --- Iteration 15 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - --- Iteration 16 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - --- Iteration 17 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, string given in %s on line %d -int(1) - --- Iteration 18 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 19 -- -Default Mode: -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, resource given in %s on line %d -int(1) - -COUNT_NORMAL Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, resource given in %s on line %d -int(1) - -COUNT_RECURSIVE Mode: -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, resource given in %s on line %d -int(1) - -Done diff --git a/ext/standard/tests/array/sizeof_variation4.phpt b/ext/standard/tests/array/sizeof_variation4.phpt deleted file mode 100644 index c8484d84512ca..0000000000000 --- a/ext/standard/tests/array/sizeof_variation4.phpt +++ /dev/null @@ -1,463 +0,0 @@ ---TEST-- -Test sizeof() function : usage variations - all kinds of unset variables for 'var' argument ---FILE-- - ---EXPECTF-- -*** Testing sizeof() : usage variations *** ---- Testing sizeof() for all kinds of unset variables in default, Normal and Recursive Modes --- --- Iteration 1 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 2 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 3 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 4 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 5 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 6 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 7 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 8 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 9 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 10 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 11 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 12 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 13 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 14 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 15 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 16 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 17 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 18 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 19 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - --- Iteration 20 -- -Default Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_NORMAL Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -COUNT_RECURSIVE Mode: -Warning: Undefined variable $value in %s on line %d - -Warning: sizeof(): sizeof(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d -int(0) - -Done diff --git a/ext/standard/tests/general_functions/is_countable_with_variables.phpt b/ext/standard/tests/general_functions/is_countable_with_variables.phpt index 7a4efc914b27d..01fa0fae6f6f2 100644 --- a/ext/standard/tests/general_functions/is_countable_with_variables.phpt +++ b/ext/standard/tests/general_functions/is_countable_with_variables.phpt @@ -16,13 +16,16 @@ if (is_countable($foo)) { $bar = null; if (!is_countable($bar)) { - count($bar); + try { + count($bar); + } catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; + } } ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(false) int(2) - -Warning: count(): Argument #1 ($var) must be of type Countable|array, null given in %s on line %d +count(): Argument #1 ($var) must be of type Countable|array, null given From 4ff21222757ffcce9ffbff8a86780fe34d93b209 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 21 Sep 2020 23:43:31 +0300 Subject: [PATCH 035/209] Ficed 32-bit JIT (inconsistent CPU stack state) --- ext/opcache/jit/zend_jit_x86.dasc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index a6f9edecc3065..8af035ec1f98e 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -9178,12 +9178,12 @@ static int zend_jit_init_method_call(dasm_State **Dst, } else { | EXT_CALL zend_jit_find_method_helper, r0 } - | test r0, r0 - | jz ->exception_handler |.if not(X64) | add r4, 12 |.endif - | jmp >2 + | test r0, r0 + | jnz >2 + | jmp ->exception_handler |.code |2: From 43e58d32214ff224bd373eadfcb6b897d2765b26 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 21 Sep 2020 23:58:18 +0300 Subject: [PATCH 036/209] Fixed incorrect assumption about sizeof(zend_reference) --- ext/opcache/jit/zend_jit_x86.dasc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 8af035ec1f98e..7630badc7deef 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -1485,7 +1485,7 @@ static void* dasm_labels[zend_lb_MAX]; || } |.endmacro -|.macro EFREE_REG_24 +|.macro EFREE_REG_REFERENCE ||#if ZEND_DEBUG | xor FCARG2a, FCARG2a // filename | .if X64WIN @@ -1508,16 +1508,16 @@ static void* dasm_labels[zend_lb_MAX]; | .endif ||#else ||#ifdef HAVE_BUILTIN_CONSTANT_P -| EXT_CALL _efree_24, r0 +| EXT_CALL _efree_32, r0 ||#else | EXT_CALL _efree, r0 ||#endif ||#endif |.endmacro -|.macro EFREE_24, ptr +|.macro EFREE_REFERENCE, ptr | mov FCARG1a, ptr -| EFREE_REG_24 +| EFREE_REG_REFERENCE |.endmacro |.macro EMALLOC, size, op_array, opline @@ -1545,8 +1545,8 @@ static void* dasm_labels[zend_lb_MAX]; | .endif ||#else ||#ifdef HAVE_BUILTIN_CONSTANT_P -|| if (size == 24) { -| EXT_CALL _emalloc_24, r0 +|| if (size > 24 && size <= 32) { +| EXT_CALL _emalloc_32, r0 || } else { | mov FCARG1a, size | EXT_CALL _emalloc, r0 @@ -5781,7 +5781,7 @@ static int zend_jit_simple_assign(dasm_State **Dst, if (save_r1) { | mov aword T1, FCARG1a // save } - | EFREE_24 aword [Ra(Z_REG(val_addr))+Z_OFFSET(val_addr)] + | EFREE_REFERENCE aword [Ra(Z_REG(val_addr))+Z_OFFSET(val_addr)] if (save_r1) { | mov FCARG1a, aword T1 // restore } @@ -10366,7 +10366,7 @@ static int zend_jit_send_var(dasm_State **Dst, const zend_op *opline, const zend | GC_ADDREF r2 | jmp >2 |1: - | EFREE_REG_24 + | EFREE_REG_REFERENCE | jmp >2 |.code | ZVAL_COPY_VALUE arg_addr, MAY_BE_ANY, op1_addr, op1_info, ZREG_R0, ZREG_R2 @@ -11237,7 +11237,7 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o | jmp >9 } |2: - | EFREE_24 r0 + | EFREE_REFERENCE r0 if (jit_return_label >= 0) { | jmp =>jit_return_label } else { From 57a3fbb1e143c0f8431bb5246308b9b581b99c52 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 22 Sep 2020 00:47:23 +0300 Subject: [PATCH 037/209] Fixed INIT_METHOD_CALL + IS_VAR + reference in tracing JIT --- ext/opcache/jit/zend_jit_x86.dasc | 16 +++++++--- ext/opcache/tests/jit/method_call_001.phpt | 35 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 ext/opcache/tests/jit/method_call_001.phpt diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 7630badc7deef..deed2c402e8ca 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -9092,6 +9092,7 @@ static int zend_jit_init_method_call(dasm_State **Dst, | ZVAL_DEREF FCARG1a, op1_info op1_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FCARG1a, 0); } else { + /* Hack: Convert reference to regular value to simplify JIT code */ ZEND_ASSERT(Z_REG(op1_addr) == ZREG_FP); | IF_NOT_ZVAL_TYPE op1_addr, IS_REFERENCE, >1 | LOAD_ZVAL_ADDR FCARG1a, op1_addr @@ -14707,10 +14708,17 @@ static zend_bool zend_jit_fetch_reference(dasm_State **Dst, const zend_op *oplin if (add_ref_guard) { | IF_NOT_ZVAL_TYPE var_addr, IS_REFERENCE, &exit_addr } - | GET_ZVAL_PTR FCARG1a, var_addr - - var_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FCARG1a, offsetof(zend_reference, val)); - *var_addr_ptr = var_addr; + if (opline->opcode == ZEND_INIT_METHOD_CALL && opline->op1_type == IS_VAR) { + /* Hack: Convert reference to regular value to simplify JIT code for INIT_METHOD_CALL */ + if (Z_REG(var_addr) != ZREG_FCARG1a || Z_OFFSET(var_addr) != 0) { + | LOAD_ZVAL_ADDR FCARG1a, var_addr + } + | EXT_CALL zend_jit_unref_helper, r0 + } else { + | GET_ZVAL_PTR FCARG1a, var_addr + var_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FCARG1a, offsetof(zend_reference, val)); + *var_addr_ptr = var_addr; + } if (var_type != IS_UNKNOWN) { var_type &= ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT|IS_TRACE_PACKED); diff --git a/ext/opcache/tests/jit/method_call_001.phpt b/ext/opcache/tests/jit/method_call_001.phpt new file mode 100644 index 0000000000000..2d96d359e0724 --- /dev/null +++ b/ext/opcache/tests/jit/method_call_001.phpt @@ -0,0 +1,35 @@ +--TEST-- +JIT METHOD_CALL: 001 +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--SKIPIF-- + +--FILE-- +bar(); + } + static function loop() { + for ($i = 0; $i < 10; $i++) { + self::foo(); + } + echo "ok\n"; + } +} +class B { + function bar() { + } +} +A::$o = new B; +A::loop(); +?> +--EXPECT-- +ok From 8f3a38d927d0ada4ae84aed03aff6fc8df38ea61 Mon Sep 17 00:00:00 2001 From: Ikko Ashimine Date: Tue, 22 Sep 2020 10:49:59 +0900 Subject: [PATCH 038/209] Fixed minor typo in comment Initiailize -> Initialize Closes GH-6181. --- ext/standard/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/file.c b/ext/standard/file.c index 458b66432b9fe..9ffcf322fb6ae 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -387,7 +387,7 @@ PHP_FUNCTION(get_meta_tags) php_meta_tags_token tok, tok_last; php_meta_tags_data md; - /* Initiailize our structure */ + /* Initialize our structure */ memset(&md, 0, sizeof(md)); /* Parse arguments */ From ade57e691bcdf76494a824a712688b25d049a506 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 09:59:25 +0200 Subject: [PATCH 039/209] substr_replace() cannot return false --- ext/opcache/Optimizer/zend_func_info.c | 2 +- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 42dd8c6914080..87ec2e1ffa9eb 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -160,7 +160,7 @@ static const func_info_t func_infos[] = { F1("str_word_count", MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("str_split", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("strpbrk", MAY_BE_FALSE | MAY_BE_STRING), - FN("substr_replace", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING), + FN("substr_replace", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING), F1("quotemeta", MAY_BE_STRING), F1("ucwords", MAY_BE_STRING), F1("addcslashes", MAY_BE_STRING), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 33357352e8f61..1ef91e4623768 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -609,7 +609,7 @@ function chunk_split(string $str, int $chunklen = 76, string $ending = "\r\n"): function substr(string $str, int $start, ?int $length = null): string|false {} -function substr_replace(array|string $str, array|string $replace, array|int $start, array|int|null $length = null): string|array|false {} +function substr_replace(array|string $str, array|string $replace, array|int $start, array|int|null $length = null): string|array {} function quotemeta(string $str): string {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 5919da6b8ea52..b51a11bafa1e2 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3dc6fc3e3cd4bb5442bfd50c34463b3834bba289 */ + * Stub hash: e71146872a1913d2cef37132c8b27ce1dc9b1a39 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -930,7 +930,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr, 0, 2, MAY_BE_STRING|MAY_ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY) ZEND_ARG_TYPE_MASK(0, str, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, start, MAY_BE_ARRAY|MAY_BE_LONG, NULL) From 12e772f18dcf0116935e5fad8443a717e4ffde8e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 10:22:43 +0200 Subject: [PATCH 040/209] Promote substr_replace warnings The implementation here was pretty confused. In reality the only error condition it has right now is that for a string input, from & length cannot be arrays. The fact that the array lengths are the same was probably supposed to be checked for the case of array input, as it wouldn't matter otherwise. --- ext/standard/string.c | 120 +++++++++--------- .../tests/strings/substr_replace_error.phpt | 38 ++---- 2 files changed, 73 insertions(+), 85 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index 7e6f05ad71c7c..a3f547c55690f 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2265,87 +2265,87 @@ PHP_FUNCTION(substr_replace) } if (str) { - if ((len_is_null && from_ht) || (!len_is_null && (from_ht == NULL) != (len_ht == NULL))) { - php_error_docref(NULL, E_WARNING, "'start' and 'length' should be of same type - numerical or array "); - RETURN_STR_COPY(str); + if (from_ht) { + zend_argument_type_error(3, "cannot be an array when working on a single string"); + RETURN_THROWS(); } - if (!len_is_null && from_ht) { - if (zend_hash_num_elements(from_ht) != zend_hash_num_elements(len_ht)) { - php_error_docref(NULL, E_WARNING, "'start' and 'length' should have the same number of elements"); - RETURN_STR_COPY(str); - } + if (len_ht) { + zend_argument_type_error(4, "cannot be an array when working on a single string"); + RETURN_THROWS(); } - } - if (str) { - if (!from_ht) { - f = from_long; + f = from_long; - /* if "from" position is negative, count start position from the end - * of the string - */ + /* if "from" position is negative, count start position from the end + * of the string + */ + if (f < 0) { + f = (zend_long)ZSTR_LEN(str) + f; if (f < 0) { - f = (zend_long)ZSTR_LEN(str) + f; - if (f < 0) { - f = 0; - } - } else if ((size_t)f > ZSTR_LEN(str)) { - f = ZSTR_LEN(str); + f = 0; } - /* if "length" position is negative, set it to the length - * needed to stop that many chars from the end of the string - */ + } else if ((size_t)f > ZSTR_LEN(str)) { + f = ZSTR_LEN(str); + } + /* if "length" position is negative, set it to the length + * needed to stop that many chars from the end of the string + */ + if (l < 0) { + l = ((zend_long)ZSTR_LEN(str) - f) + l; if (l < 0) { - l = ((zend_long)ZSTR_LEN(str) - f) + l; - if (l < 0) { - l = 0; - } + l = 0; } + } - if ((size_t)l > ZSTR_LEN(str) || (l < 0 && (size_t)(-l) > ZSTR_LEN(str))) { - l = ZSTR_LEN(str); - } + if ((size_t)l > ZSTR_LEN(str) || (l < 0 && (size_t)(-l) > ZSTR_LEN(str))) { + l = ZSTR_LEN(str); + } - if ((f + l) > (zend_long)ZSTR_LEN(str)) { - l = ZSTR_LEN(str) - f; - } + if ((f + l) > (zend_long)ZSTR_LEN(str)) { + l = ZSTR_LEN(str) - f; + } - zend_string *tmp_repl_str = NULL; - if (repl_ht) { - repl_idx = 0; - while (repl_idx < repl_ht->nNumUsed) { - tmp_repl = &repl_ht->arData[repl_idx].val; - if (Z_TYPE_P(tmp_repl) != IS_UNDEF) { - break; - } - repl_idx++; - } - if (repl_idx < repl_ht->nNumUsed) { - repl_str = zval_get_tmp_string(tmp_repl, &tmp_repl_str); - } else { - repl_str = STR_EMPTY_ALLOC(); + zend_string *tmp_repl_str = NULL; + if (repl_ht) { + repl_idx = 0; + while (repl_idx < repl_ht->nNumUsed) { + tmp_repl = &repl_ht->arData[repl_idx].val; + if (Z_TYPE_P(tmp_repl) != IS_UNDEF) { + break; } + repl_idx++; } + if (repl_idx < repl_ht->nNumUsed) { + repl_str = zval_get_tmp_string(tmp_repl, &tmp_repl_str); + } else { + repl_str = STR_EMPTY_ALLOC(); + } + } - result = zend_string_safe_alloc(1, ZSTR_LEN(str) - l + ZSTR_LEN(repl_str), 0, 0); + result = zend_string_safe_alloc(1, ZSTR_LEN(str) - l + ZSTR_LEN(repl_str), 0, 0); - memcpy(ZSTR_VAL(result), ZSTR_VAL(str), f); - if (ZSTR_LEN(repl_str)) { - memcpy((ZSTR_VAL(result) + f), ZSTR_VAL(repl_str), ZSTR_LEN(repl_str)); - } - memcpy((ZSTR_VAL(result) + f + ZSTR_LEN(repl_str)), ZSTR_VAL(str) + f + l, ZSTR_LEN(str) - f - l); - ZSTR_VAL(result)[ZSTR_LEN(result)] = '\0'; - zend_tmp_string_release(tmp_repl_str); - RETURN_NEW_STR(result); - } else { - php_error_docref(NULL, E_WARNING, "Functionality of 'start' and 'length' as arrays is not implemented"); - RETURN_STR_COPY(str); + memcpy(ZSTR_VAL(result), ZSTR_VAL(str), f); + if (ZSTR_LEN(repl_str)) { + memcpy((ZSTR_VAL(result) + f), ZSTR_VAL(repl_str), ZSTR_LEN(repl_str)); } + memcpy((ZSTR_VAL(result) + f + ZSTR_LEN(repl_str)), ZSTR_VAL(str) + f + l, ZSTR_LEN(str) - f - l); + ZSTR_VAL(result)[ZSTR_LEN(result)] = '\0'; + zend_tmp_string_release(tmp_repl_str); + RETURN_NEW_STR(result); } else { /* str is array of strings */ zend_string *str_index = NULL; size_t result_len; zend_ulong num_index; + /* TODO + if (!len_is_null && from_ht) { + if (zend_hash_num_elements(from_ht) != zend_hash_num_elements(len_ht)) { + php_error_docref(NULL, E_WARNING, "'start' and 'length' should have the same number of elements"); + RETURN_STR_COPY(str); + } + } + */ + array_init(return_value); from_idx = len_idx = repl_idx = 0; diff --git a/ext/standard/tests/strings/substr_replace_error.phpt b/ext/standard/tests/strings/substr_replace_error.phpt index d52983646acc5..6fc0c2e203553 100644 --- a/ext/standard/tests/strings/substr_replace_error.phpt +++ b/ext/standard/tests/strings/substr_replace_error.phpt @@ -10,34 +10,22 @@ echo "*** Testing substr_replace() : error conditions ***\n"; $s1 = "Good morning"; -echo "\n-- Testing substr_replace() function with start and length different types --\n"; -var_dump(substr_replace($s1, "evening", array(5))); -var_dump(substr_replace($s1, "evening", 5, array(8))); - -echo "\n-- Testing substr_replace() function with start and length with a different number of elements --\n"; -var_dump(substr_replace($s1, "evening", array(5, 1), array(8))); - echo "\n-- Testing substr_replace() function with start and length as arrays but string not--\n"; -var_dump(substr_replace($s1, "evening", array(5), array(8))); +try { + var_dump(substr_replace($s1, "evening", array(5))); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(substr_replace($s1, "evening", 5, array(1))); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> ---EXPECTF-- +--EXPECT-- *** Testing substr_replace() : error conditions *** --- Testing substr_replace() function with start and length different types -- - -Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s on line %d -string(12) "Good morning" - -Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s on line %d -string(12) "Good morning" - --- Testing substr_replace() function with start and length with a different number of elements -- - -Warning: substr_replace(): 'start' and 'length' should have the same number of elements in %s on line %d -string(12) "Good morning" - -- Testing substr_replace() function with start and length as arrays but string not-- - -Warning: substr_replace(): Functionality of 'start' and 'length' as arrays is not implemented in %s on line %d -string(12) "Good morning" +substr_replace(): Argument #3 ($start) cannot be an array when working on a single string +substr_replace(): Argument #4 ($length) cannot be an array when working on a single string From 5d9ab53a5d53f11a18ae11ed31b17ff87c8d52a7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 10:42:24 +0200 Subject: [PATCH 041/209] Check string bounds in strspn/strcspn strspn/strcspn are string search functions, and as such should throw ValueError on out-of-bounds offsets, just like strpos etc do. --- ext/standard/basic_functions.stub.php | 4 +- ext/standard/basic_functions_arginfo.h | 4 +- ext/standard/string.c | 37 +- ext/standard/tests/strings/bug40754.phpt | 17 +- ext/standard/tests/strings/strcspn.phpt | 8 +- ext/standard/tests/strings/strcspn_basic.phpt | 2 +- .../tests/strings/strcspn_variation11.phpt | 922 ++-- .../tests/strings/strcspn_variation12.phpt | 3828 +++++++------- .../tests/strings/strcspn_variation7.phpt | 605 --- .../tests/strings/strcspn_variation8.phpt | 1885 ------- ext/standard/tests/strings/strspn_basic.phpt | 2 +- .../tests/strings/strspn_variation11.phpt | 922 ++-- .../tests/strings/strspn_variation12.phpt | 4400 +++++++++-------- .../tests/strings/strspn_variation7.phpt | 605 --- .../tests/strings/strspn_variation8.phpt | 1887 ------- 15 files changed, 5085 insertions(+), 10043 deletions(-) delete mode 100644 ext/standard/tests/strings/strcspn_variation7.phpt delete mode 100644 ext/standard/tests/strings/strcspn_variation8.phpt delete mode 100644 ext/standard/tests/strings/strspn_variation7.phpt delete mode 100644 ext/standard/tests/strings/strspn_variation8.phpt diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 1ef91e4623768..49ca4d7f82d00 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -542,9 +542,9 @@ function bin2hex(string $data): string {} function hex2bin(string $data): string|false {} -function strspn(string $str, string $mask, int $start = 0, ?int $len = null): int|false {} +function strspn(string $str, string $mask, int $start = 0, ?int $len = null): int {} -function strcspn(string $str, string $mask, int $start = 0, ?int $len = null): int|false {} +function strcspn(string $str, string $mask, int $start = 0, ?int $len = null): int {} #if HAVE_NL_LANGINFO function nl_langinfo(int $item): string|false {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index b51a11bafa1e2..12a8c0c5ed3e6 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e71146872a1913d2cef37132c8b27ce1dc9b1a39 */ + * Stub hash: 3f866608d73047b04b6a1abb6cbfa75abfeeed58 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -807,7 +807,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hex2bin, 0, 1, MAY_BE_STRING|MAY ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strspn, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strspn, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, mask, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") diff --git a/ext/standard/string.c b/ext/standard/string.c index a3f547c55690f..35404cb3fd574 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -258,33 +258,28 @@ static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior) / Z_PARAM_LONG_OR_NULL(len, len_is_null) ZEND_PARSE_PARAMETERS_END(); - if (len_is_null) { - len = ZSTR_LEN(s11); - } - - /* look at substr() function for more information */ - if (start < 0) { start += (zend_long)ZSTR_LEN(s11); - if (start < 0) { - start = 0; - } - } else if ((size_t)start > ZSTR_LEN(s11)) { - RETURN_FALSE; + } + if (start < 0 || (size_t)start > ZSTR_LEN(s11)) { + zend_argument_value_error(3, "must be contained in argument #1 ($str)"); + RETURN_THROWS(); } - if (len < 0) { - len += (ZSTR_LEN(s11) - start); + size_t remain_len = ZSTR_LEN(s11) - start; + if (!len_is_null) { if (len < 0) { - len = 0; + len += remain_len; } + if (len < 0 || (size_t)len > remain_len) { + zend_argument_value_error(4, "must be contained in argument #1 ($str)"); + RETURN_THROWS(); + } + } else { + len = remain_len; } - if (len > (zend_long)ZSTR_LEN(s11) - start) { - len = ZSTR_LEN(s11) - start; - } - - if(len == 0) { + if (len == 0) { RETURN_LONG(0); } @@ -293,13 +288,13 @@ static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior) / ZSTR_VAL(s22) /*str2_start*/, ZSTR_VAL(s11) + start + len /*str1_end*/, ZSTR_VAL(s22) + ZSTR_LEN(s22) /*str2_end*/)); - } else if (behavior == STR_STRCSPN) { + } else { + ZEND_ASSERT(behavior == STR_STRCSPN); RETURN_LONG(php_strcspn(ZSTR_VAL(s11) + start /*str1_start*/, ZSTR_VAL(s22) /*str2_start*/, ZSTR_VAL(s11) + start + len /*str1_end*/, ZSTR_VAL(s22) + ZSTR_LEN(s22) /*str2_end*/)); } - } /* }}} */ diff --git a/ext/standard/tests/strings/bug40754.phpt b/ext/standard/tests/strings/bug40754.phpt index 609e47732a6d6..602fd28b27e04 100644 --- a/ext/standard/tests/strings/bug40754.phpt +++ b/ext/standard/tests/strings/bug40754.phpt @@ -8,8 +8,17 @@ $v = 2147483647; var_dump(substr("abcde", 1, $v)); var_dump(substr_replace("abcde", "x", $v, $v)); -var_dump(strspn("abcde", "abc", $v, $v)); -var_dump(strcspn("abcde", "abc", $v, $v)); +try { + var_dump(strspn("abcde", "abc", $v, $v)); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} + +try { + var_dump(strcspn("abcde", "abc", $v, $v)); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} try { var_dump(substr_count("abcde", "abc", $v, $v)); @@ -79,8 +88,8 @@ var_dump(substr("abcde", $v, $v)); --EXPECT-- string(4) "bcde" string(6) "abcdex" -bool(false) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystack) substr_compare(): Argument #3 ($offset) must be contained in argument #1 ($main_str) stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/standard/tests/strings/strcspn.phpt b/ext/standard/tests/strings/strcspn.phpt index d948655ef031e..bdeac113bbe8c 100644 --- a/ext/standard/tests/strings/strcspn.phpt +++ b/ext/standard/tests/strings/strcspn.phpt @@ -9,7 +9,11 @@ var_dump($b); var_dump(strcspn($a,$b)); var_dump(strcspn($a,$b,9)); var_dump(strcspn($a,$b,9,6)); -var_dump(strcspn('a', 'B', 1, 2147483647)); +try { + var_dump(strcspn('a', 'B', 1, 2147483647)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> --EXPECT-- string(25) "22222222aaaa bbb1111 cccc" @@ -17,4 +21,4 @@ string(4) "1234" int(0) int(7) int(6) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) diff --git a/ext/standard/tests/strings/strcspn_basic.phpt b/ext/standard/tests/strings/strcspn_basic.phpt index 88ef76619b7b2..5eac4c677df42 100644 --- a/ext/standard/tests/strings/strcspn_basic.phpt +++ b/ext/standard/tests/strings/strcspn_basic.phpt @@ -13,7 +13,7 @@ echo "*** Testing strcspn() : basic functionality ***\n"; $str = "this is the test string"; $mask = "es"; $start = 15; -$len = 30; +$len = 3; // Calling strcspn() with all possible arguments var_dump( strcspn($str, $mask, $start, $len) ); diff --git a/ext/standard/tests/strings/strcspn_variation11.phpt b/ext/standard/tests/strings/strcspn_variation11.phpt index f491177f6b9bc..3c69373af093f 100644 --- a/ext/standard/tests/strings/strcspn_variation11.phpt +++ b/ext/standard/tests/strings/strcspn_variation11.phpt @@ -62,7 +62,11 @@ foreach($strings as $str) { echo "\n-- Iteration $count --\n"; foreach($mask_array as $mask) { foreach($start_array as $start) { - var_dump( strcspn($str,$mask,$start) ); + try { + var_dump( strcspn($str,$mask,$start) ); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } } } $count++; @@ -75,219 +79,219 @@ echo "Done" -- Iteration 1 -- int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 2 -- int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 3 -- int(1) int(0) -bool(false) -int(1) -int(1) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) -int(1) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) -bool(false) -int(1) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) -int(1) -int(1) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) -int(1) -int(1) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) -int(1) -int(1) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) -int(1) -int(1) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) -int(1) -int(1) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) -int(1) -bool(false) -int(1) -int(0) -int(0) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 4 -- int(2) @@ -295,71 +299,71 @@ int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -bool(false) -int(0) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 5 -- int(24) @@ -367,71 +371,71 @@ int(23) int(22) int(1) int(2) -bool(false) -int(24) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(24) int(23) int(22) int(1) int(2) -bool(false) -int(24) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(0) int(1) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(24) int(23) int(22) int(1) int(2) -bool(false) -int(24) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(24) int(23) int(22) int(1) int(2) -bool(false) -int(24) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(0) int(1) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 6 -- int(28) @@ -439,71 +443,71 @@ int(27) int(26) int(1) int(2) -bool(false) -int(28) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(28) int(27) int(26) int(1) int(2) -bool(false) -int(28) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(0) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(28) int(27) int(26) int(1) int(2) -bool(false) -int(28) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(0) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(0) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(0) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(28) int(27) int(26) int(1) int(2) -bool(false) -int(28) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(0) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 7 -- int(20) @@ -511,71 +515,71 @@ int(19) int(18) int(1) int(2) -bool(false) -int(20) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(20) int(19) int(18) int(1) int(2) -bool(false) -int(20) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(20) int(19) int(18) int(1) int(2) -bool(false) -int(20) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(20) int(19) int(18) int(1) int(2) -bool(false) -int(20) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 8 -- int(21) @@ -583,71 +587,71 @@ int(20) int(19) int(1) int(2) -bool(false) -int(21) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -bool(false) -int(21) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -bool(false) -int(21) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -bool(false) -int(21) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 9 -- int(5) @@ -655,71 +659,71 @@ int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(0) int(1) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -bool(false) -int(12) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -bool(false) -int(12) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -bool(false) -int(12) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -bool(false) -int(12) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -bool(false) -int(12) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(0) int(1) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 10 -- int(16) @@ -727,71 +731,71 @@ int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -bool(false) -int(16) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 11 -- int(0) @@ -799,71 +803,71 @@ int(0) int(0) int(0) int(0) -bool(false) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -int(0) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 12 -- int(0) @@ -871,71 +875,71 @@ int(5) int(4) int(0) int(1) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(5) int(4) int(0) int(1) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(3) int(2) int(1) int(1) int(2) -bool(false) -int(3) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(3) int(2) int(1) int(1) int(2) -bool(false) -int(3) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -bool(false) -int(13) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -bool(false) -int(13) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -bool(false) -int(13) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -bool(false) -int(13) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -bool(false) -int(13) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -bool(false) -int(13) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 13 -- int(0) @@ -943,71 +947,71 @@ int(12) int(11) int(0) int(1) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(12) int(11) int(0) int(1) -bool(false) -int(0) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(3) int(2) int(1) int(1) int(2) -bool(false) -int(3) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(3) int(2) int(1) int(1) int(2) -bool(false) -int(3) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -bool(false) -int(14) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -bool(false) -int(14) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 14 -- int(5) @@ -1015,71 +1019,71 @@ int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 15 -- int(5) @@ -1087,71 +1091,71 @@ int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -bool(false) -int(11) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 16 -- int(5) @@ -1159,71 +1163,71 @@ int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -bool(false) -int(14) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -bool(false) -int(14) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -bool(false) -int(14) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -bool(false) -int(14) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -bool(false) -int(14) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -bool(false) -int(6) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 17 -- int(21) @@ -1231,69 +1235,69 @@ int(20) int(19) int(1) int(2) -bool(false) -int(21) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -bool(false) -int(21) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -bool(false) -int(2) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -bool(false) -int(21) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -bool(false) -int(21) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -bool(false) -int(5) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) Done diff --git a/ext/standard/tests/strings/strcspn_variation12.phpt b/ext/standard/tests/strings/strcspn_variation12.phpt index c4103e8a99ff3..7367e20dce900 100644 --- a/ext/standard/tests/strings/strcspn_variation12.phpt +++ b/ext/standard/tests/strings/strcspn_variation12.phpt @@ -63,7 +63,11 @@ foreach($strings as $str) { foreach($mask_array as $mask) { foreach($start_array as $start) { foreach($len_array as $len) { - var_dump( strcspn($str,$mask,$start,$len) ); + try { + var_dump( strcspn($str,$mask,$start,$len) ); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } } } } @@ -77,2399 +81,2399 @@ echo "Done" -- Iteration 1 -- int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 2 -- int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 2 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 3 -- -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 4 -- -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 5 -- -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(2) -int(21) -int(22) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(2) -int(21) -int(22) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(2) -int(21) -int(22) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) - --- Iteration 6 -- -int(0) -int(1) -int(2) -int(19) -int(20) -int(0) -int(0) -int(1) -int(2) -int(18) -int(19) -int(0) -int(0) -int(1) -int(2) -int(17) -int(18) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(19) -int(20) -int(0) -int(0) -int(1) -int(2) -int(19) -int(20) -int(0) -int(0) -int(1) -int(2) -int(18) -int(19) -int(0) -int(0) -int(1) -int(2) -int(17) -int(18) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(19) -int(20) -int(0) -int(0) -int(1) -int(2) -int(6) -int(6) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(6) -int(6) -int(0) -int(0) -int(1) -int(2) -int(16) -int(16) -int(0) -int(0) -int(1) -int(2) -int(15) -int(15) -int(0) -int(0) -int(1) -int(2) -int(14) -int(14) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(16) -int(16) -int(0) -int(0) -int(1) -int(2) -int(19) -int(20) -int(0) -int(0) -int(1) -int(2) -int(18) -int(19) -int(0) -int(0) -int(1) -int(2) -int(17) -int(18) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(19) -int(20) -int(0) -int(0) -int(1) -int(2) -int(16) -int(16) -int(0) -int(0) -int(1) -int(2) -int(15) -int(15) -int(0) -int(0) -int(1) -int(2) -int(14) -int(14) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(16) -int(16) -int(0) - --- Iteration 7 -- -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(11) -int(12) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 3 -- int(0) int(1) -int(2) -int(10) -int(11) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 4 -- int(0) int(1) int(2) -int(9) -int(10) -int(0) -int(0) -int(1) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(11) -int(12) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(11) -int(12) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) -int(10) -int(11) -int(0) -int(0) int(1) -int(2) -int(9) -int(10) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(0) -int(1) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(11) -int(12) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -int(1) -int(2) -int(11) -int(11) int(0) int(0) -int(1) -int(2) -int(10) -int(10) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(9) -int(9) -int(0) -int(0) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) -int(11) -int(11) -int(0) - --- Iteration 8 -- +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 5 -- int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +int(1) +int(2) +int(23) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(22) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(21) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(23) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(22) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(21) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(1) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(23) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(22) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(21) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +int(1) +int(2) +int(4) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 6 -- int(0) +int(1) +int(2) +int(19) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(18) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(17) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) +int(19) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) int(2) -int(0) +int(18) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(1) +int(2) +int(17) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(6) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(16) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +int(2) +int(15) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) +int(2) +int(14) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) +int(19) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) int(2) -int(0) +int(18) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) +int(17) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) -int(2) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) -int(1) +int(2) +int(16) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +int(2) +int(15) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(14) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 7 -- int(0) +int(1) +int(2) +int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -int(0) -int(1) int(1) +int(2) +int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +int(2) +int(4) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) +int(3) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) -int(2) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) -int(1) int(2) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(1) -int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(0) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(11) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +int(2) +int(10) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) +int(2) +int(9) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) +int(11) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) int(2) -int(0) +int(10) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) +int(9) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) -int(2) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) +int(2) +int(11) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) +int(2) +int(10) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +int(2) +int(9) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 8 -- int(0) int(0) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(1) -int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(1) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -int(1) -int(2) -int(1) -int(2) int(0) - --- Iteration 9 -- int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) -int(5) -int(5) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) -int(4) -int(4) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 9 -- int(0) int(0) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -int(5) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -int(3) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(1) -int(0) int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(3) -int(3) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -int(13) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -int(12) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -int(11) -int(0) -int(0) -int(1) -int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -int(13) -int(0) -int(0) -int(1) -int(2) -int(12) -int(13) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -int(12) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -int(11) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(12) -int(13) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -int(13) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -int(12) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -int(11) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(12) -int(13) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 10 -- int(0) int(1) int(2) int(5) -int(5) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -int(3) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -int(5) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(5) -int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -int(2) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) -int(1) -int(1) -int(0) -int(1) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(2) -int(2) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -int(11) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -int(10) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(8) -int(9) -int(0) -int(0) -int(1) -int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -int(11) -int(0) -int(0) -int(1) -int(2) -int(10) -int(11) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -int(10) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(8) -int(9) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(10) -int(11) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -int(11) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -int(10) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(8) -int(9) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(10) -int(11) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 11 -- int(0) int(1) int(2) int(5) -int(5) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -int(3) -int(0) -int(0) -int(1) -int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(5) -int(5) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -int(2) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(0) -int(1) int(1) int(1) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(2) -int(2) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -int(13) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -int(12) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -int(11) -int(0) -int(0) -int(1) -int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(12) -int(13) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -int(13) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -int(12) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -int(11) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(2) -int(12) -int(13) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(6) -int(6) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -int(5) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(6) -int(6) -int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) Done diff --git a/ext/standard/tests/strings/strcspn_variation7.phpt b/ext/standard/tests/strings/strcspn_variation7.phpt deleted file mode 100644 index 2b89e1efa328e..0000000000000 --- a/ext/standard/tests/strings/strcspn_variation7.phpt +++ /dev/null @@ -1,605 +0,0 @@ ---TEST-- -Test strcspn() function : usage variations - with heredoc strings, varying start and default len args ---FILE-- - ---EXPECT-- -*** Testing strcspn() : with different start values *** - --- Iteration 1 -- -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) - --- Iteration 2 -- -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) - --- Iteration 3 -- -int(86) -int(85) -int(84) -int(1) -int(2) -bool(false) -int(86) -int(86) -int(85) -int(84) -int(1) -int(2) -bool(false) -int(86) -int(1) -int(0) -int(0) -int(1) -int(2) -bool(false) -int(1) -int(1) -int(0) -int(0) -int(1) -int(0) -bool(false) -int(1) -int(86) -int(85) -int(84) -int(1) -int(2) -bool(false) -int(86) -int(4) -int(3) -int(2) -int(1) -int(2) -bool(false) -int(4) -int(4) -int(3) -int(2) -int(1) -int(2) -bool(false) -int(4) -int(5) -int(4) -int(3) -int(1) -int(2) -bool(false) -int(5) -int(5) -int(4) -int(3) -int(1) -int(2) -bool(false) -int(5) -int(1) -int(0) -int(5) -int(1) -int(2) -bool(false) -int(1) - --- Iteration 4 -- -int(24) -int(23) -int(22) -int(1) -int(2) -bool(false) -int(24) -int(24) -int(23) -int(22) -int(1) -int(2) -bool(false) -int(24) -int(2) -int(1) -int(0) -int(0) -int(1) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(5) -int(4) -int(3) -int(1) -int(2) -bool(false) -int(5) -int(24) -int(23) -int(22) -int(1) -int(2) -bool(false) -int(24) -int(24) -int(23) -int(22) -int(1) -int(2) -bool(false) -int(24) -int(5) -int(4) -int(3) -int(1) -int(2) -bool(false) -int(5) -int(5) -int(4) -int(3) -int(1) -int(2) -bool(false) -int(5) -int(5) -int(4) -int(3) -int(1) -int(2) -bool(false) -int(5) - --- Iteration 5 -- -int(31) -int(30) -int(29) -int(1) -int(2) -bool(false) -int(31) -int(31) -int(30) -int(29) -int(1) -int(2) -bool(false) -int(31) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(26) -int(25) -int(24) -int(1) -int(2) -bool(false) -int(26) -int(31) -int(30) -int(29) -int(1) -int(2) -bool(false) -int(31) -int(31) -int(30) -int(29) -int(1) -int(2) -bool(false) -int(31) -int(26) -int(25) -int(24) -int(1) -int(2) -bool(false) -int(26) -int(26) -int(25) -int(24) -int(1) -int(2) -bool(false) -int(26) -int(26) -int(25) -int(24) -int(1) -int(2) -bool(false) -int(26) - --- Iteration 6 -- -int(5) -int(4) -int(3) -int(0) -int(1) -bool(false) -int(5) -int(5) -int(4) -int(3) -int(0) -int(1) -bool(false) -int(5) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(25) -int(24) -int(23) -int(1) -int(2) -bool(false) -int(25) -int(25) -int(24) -int(23) -int(1) -int(2) -bool(false) -int(25) -int(25) -int(24) -int(23) -int(1) -int(2) -bool(false) -int(25) -int(25) -int(24) -int(23) -int(1) -int(2) -bool(false) -int(25) -int(25) -int(24) -int(23) -int(1) -int(2) -bool(false) -int(25) -int(25) -int(24) -int(23) -int(1) -int(2) -bool(false) -int(25) - --- Iteration 7 -- -int(5) -int(4) -int(3) -int(0) -int(1) -bool(false) -int(5) -int(5) -int(4) -int(3) -int(0) -int(1) -bool(false) -int(5) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(27) -int(26) -int(25) -int(1) -int(2) -bool(false) -int(27) -int(27) -int(26) -int(25) -int(1) -int(2) -bool(false) -int(27) -int(27) -int(26) -int(25) -int(1) -int(2) -bool(false) -int(27) -int(27) -int(26) -int(25) -int(1) -int(2) -bool(false) -int(27) -int(27) -int(26) -int(25) -int(1) -int(2) -bool(false) -int(27) -int(6) -int(5) -int(4) -int(1) -int(2) -bool(false) -int(6) -Done diff --git a/ext/standard/tests/strings/strcspn_variation8.phpt b/ext/standard/tests/strings/strcspn_variation8.phpt deleted file mode 100644 index 6689d2b52fdc2..0000000000000 --- a/ext/standard/tests/strings/strcspn_variation8.phpt +++ /dev/null @@ -1,1885 +0,0 @@ ---TEST-- -Test strcspn() function : usage variations - with heredoc strings, varying start and len args ---FILE-- - ---EXPECT-- -*** Testing strcspn() : with different start and len values *** - --- Iteration 1 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 2 -- -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) - --- Iteration 3 -- -int(0) -int(1) -int(2) -int(85) -int(86) -int(0) -int(0) -int(1) -int(2) -int(84) -int(85) -int(0) -int(0) -int(1) -int(2) -int(83) -int(84) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(85) -int(86) -int(0) -int(0) -int(1) -int(2) -int(85) -int(86) -int(0) -int(0) -int(1) -int(2) -int(84) -int(85) -int(0) -int(0) -int(1) -int(2) -int(83) -int(84) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(85) -int(86) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(1) -int(2) -int(85) -int(86) -int(0) -int(0) -int(1) -int(2) -int(84) -int(85) -int(0) -int(0) -int(1) -int(2) -int(83) -int(84) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(85) -int(86) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) - --- Iteration 4 -- -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(2) -int(21) -int(22) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(2) -int(21) -int(22) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(2) -int(21) -int(22) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) - --- Iteration 5 -- -int(0) -int(1) -int(2) -int(30) -int(31) -int(0) -int(0) -int(1) -int(2) -int(29) -int(30) -int(0) -int(0) -int(1) -int(2) -int(28) -int(29) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(30) -int(31) -int(0) -int(0) -int(1) -int(2) -int(30) -int(31) -int(0) -int(0) -int(1) -int(2) -int(29) -int(30) -int(0) -int(0) -int(1) -int(2) -int(28) -int(29) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(30) -int(31) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(26) -int(26) -int(0) -int(0) -int(1) -int(2) -int(25) -int(25) -int(0) -int(0) -int(1) -int(2) -int(24) -int(24) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(26) -int(26) -int(0) -int(0) -int(1) -int(2) -int(30) -int(31) -int(0) -int(0) -int(1) -int(2) -int(29) -int(30) -int(0) -int(0) -int(1) -int(2) -int(28) -int(29) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(30) -int(31) -int(0) -int(0) -int(1) -int(2) -int(26) -int(26) -int(0) -int(0) -int(1) -int(2) -int(25) -int(25) -int(0) -int(0) -int(1) -int(2) -int(24) -int(24) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(26) -int(26) -int(0) -int(0) -int(1) -int(2) -int(26) -int(26) -int(0) -int(0) -int(1) -int(2) -int(25) -int(25) -int(0) -int(0) -int(1) -int(2) -int(24) -int(24) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(26) -int(26) -int(0) - --- Iteration 6 -- -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(2) -int(23) -int(24) -int(0) -int(0) -int(1) -int(2) -int(22) -int(23) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) - --- Iteration 7 -- -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(26) -int(27) -int(0) -int(0) -int(1) -int(2) -int(25) -int(26) -int(0) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(26) -int(27) -int(0) -int(0) -int(1) -int(2) -int(26) -int(27) -int(0) -int(0) -int(1) -int(2) -int(25) -int(26) -int(0) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(26) -int(27) -int(0) -int(0) -int(1) -int(2) -int(26) -int(27) -int(0) -int(0) -int(1) -int(2) -int(25) -int(26) -int(0) -int(0) -int(1) -int(2) -int(24) -int(25) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(26) -int(27) -int(0) -int(0) -int(1) -int(2) -int(6) -int(6) -int(0) -int(0) -int(1) -int(2) -int(5) -int(5) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(6) -int(6) -int(0) -Done diff --git a/ext/standard/tests/strings/strspn_basic.phpt b/ext/standard/tests/strings/strspn_basic.phpt index 068610a89bab4..4712eeb87ee85 100644 --- a/ext/standard/tests/strings/strspn_basic.phpt +++ b/ext/standard/tests/strings/strspn_basic.phpt @@ -13,7 +13,7 @@ echo "*** Testing strspn() : basic functionality ***\n"; $str = "this is the test string"; $mask = "htes "; $start = 8; -$len = 30; +$len = 12; // Calling strspn() with all possible arguments var_dump( strspn($str, $mask, $start, $len) ); diff --git a/ext/standard/tests/strings/strspn_variation11.phpt b/ext/standard/tests/strings/strspn_variation11.phpt index 6692ce641b8c7..8e30a6d900a24 100644 --- a/ext/standard/tests/strings/strspn_variation11.phpt +++ b/ext/standard/tests/strings/strspn_variation11.phpt @@ -62,7 +62,11 @@ foreach($strings as $str) { echo "\n-- Iteration $count --\n"; foreach($mask_array as $mask) { foreach($start_array as $start) { - var_dump( strspn($str,$mask,$start) ); + try { + var_dump( strspn($str,$mask,$start) ); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } } } $count++; @@ -75,219 +79,219 @@ echo "Done" -- Iteration 1 -- int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 2 -- int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 3 -- int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) -int(0) -int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) -int(1) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) -bool(false) -int(1) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) -bool(false) -int(1) -int(1) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 4 -- int(0) @@ -295,71 +299,71 @@ int(0) int(0) int(0) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -bool(false) -int(1) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -bool(false) -int(2) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -bool(false) -int(1) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -bool(false) -int(1) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -bool(false) -int(1) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -bool(false) -int(1) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 5 -- int(0) @@ -367,71 +371,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 6 -- int(0) @@ -439,71 +443,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(2) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(1) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 7 -- int(0) @@ -511,71 +515,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) int(0) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) -bool(false) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) int(0) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) int(0) int(0) int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 8 -- int(0) @@ -583,71 +587,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) -bool(false) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) int(0) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) -bool(false) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 9 -- int(0) @@ -655,71 +659,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 10 -- int(0) @@ -727,71 +731,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 11 -- int(0) @@ -799,71 +803,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) -bool(false) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) int(0) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) int(0) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) -bool(false) int(0) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 12 -- int(0) @@ -871,71 +875,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 13 -- int(0) @@ -943,71 +947,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 14 -- int(0) @@ -1015,71 +1019,71 @@ int(0) int(0) int(0) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 15 -- int(0) @@ -1087,71 +1091,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 16 -- int(0) @@ -1159,71 +1163,71 @@ int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -- Iteration 17 -- int(0) @@ -1231,69 +1235,69 @@ int(0) int(0) int(0) int(0) -bool(false) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -bool(false) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) -int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) int(0) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -bool(false) -int(4) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) Done diff --git a/ext/standard/tests/strings/strspn_variation12.phpt b/ext/standard/tests/strings/strspn_variation12.phpt index 6f5fddb527004..9fec20735c4b6 100644 --- a/ext/standard/tests/strings/strspn_variation12.phpt +++ b/ext/standard/tests/strings/strspn_variation12.phpt @@ -63,7 +63,11 @@ foreach($strings as $str) { foreach($mask_array as $mask) { foreach($start_array as $start) { foreach($len_array as $len) { - var_dump( strspn($str,$mask,$start,$len) ); + try { + var_dump( strspn($str,$mask,$start,$len) ); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } } } } @@ -77,2795 +81,2795 @@ echo "Done" -- Iteration 1 -- int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 2 -- int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 3 -- int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +int(0) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 4 -- int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(1) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(1) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(1) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 5 -- int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) --- Iteration 2 -- +-- Iteration 6 -- int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 7 -- int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) - --- Iteration 3 -- int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 8 -- int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -int(1) -int(1) int(0) -int(1) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) -int(1) -int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) -int(1) -int(1) int(0) -int(1) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 9 -- int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) -int(1) -int(1) int(0) -int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -int(1) -int(1) int(0) -int(1) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) -int(1) -int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) - --- Iteration 4 -- -int(0) -int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 10 -- int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -int(1) -int(1) -int(1) -int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) -int(1) -int(1) -int(1) -int(0) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +int(0) int(1) int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) -int(1) -int(1) -int(0) -int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) -int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) -int(1) int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) + +-- Iteration 11 -- int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -int(1) -int(1) -int(1) -int(1) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(4) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(3) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) +int(1) +int(2) +int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) - --- Iteration 5 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) - --- Iteration 6 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 7 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) - --- Iteration 8 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 9 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 10 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) - --- Iteration 11 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -int(3) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -int(2) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -int(3) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -int(2) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -int(4) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -int(3) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -int(2) -int(0) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($start) must be contained in argument #1 ($str) Done diff --git a/ext/standard/tests/strings/strspn_variation7.phpt b/ext/standard/tests/strings/strspn_variation7.phpt deleted file mode 100644 index 02b1286dca6fd..0000000000000 --- a/ext/standard/tests/strings/strspn_variation7.phpt +++ /dev/null @@ -1,605 +0,0 @@ ---TEST-- -Test strspn() function : usage variations - with heredoc strings, varying start and default len args ---FILE-- - ---EXPECT-- -*** Testing strspn() : with different start values *** - --- Iteration 1 -- -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) -int(0) -bool(false) -bool(false) -int(0) -int(0) -bool(false) -int(0) - --- Iteration 2 -- -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(1) -int(2) -bool(false) -int(2) - --- Iteration 3 -- -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(8) -int(7) -int(6) -int(0) -int(0) -bool(false) -int(8) -int(11) -int(10) -int(9) -int(0) -int(1) -bool(false) -int(11) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(2) - --- Iteration 4 -- -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(4) -int(3) -int(2) -int(1) -int(0) -bool(false) -int(4) -int(4) -int(3) -int(2) -int(0) -int(0) -bool(false) -int(4) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(1) -int(0) -bool(false) -int(2) - --- Iteration 5 -- -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(4) -int(3) -int(2) -int(0) -int(0) -bool(false) -int(4) -int(4) -int(3) -int(2) -int(0) -int(0) -bool(false) -int(4) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(2) - --- Iteration 6 -- -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(4) -int(3) -int(2) -int(0) -int(0) -bool(false) -int(4) -int(4) -int(3) -int(2) -int(0) -int(0) -bool(false) -int(4) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(2) - --- Iteration 7 -- -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(4) -int(3) -int(2) -int(0) -int(0) -bool(false) -int(4) -int(4) -int(3) -int(2) -int(0) -int(0) -bool(false) -int(4) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -int(0) -int(2) -int(1) -int(0) -int(0) -int(0) -bool(false) -int(2) -Done diff --git a/ext/standard/tests/strings/strspn_variation8.phpt b/ext/standard/tests/strings/strspn_variation8.phpt deleted file mode 100644 index 58013a6dbafae..0000000000000 --- a/ext/standard/tests/strings/strspn_variation8.phpt +++ /dev/null @@ -1,1887 +0,0 @@ ---TEST-- -Test strspn() function : usage variations - with heredoc strings, varying start and len args ---FILE-- - ---EXPECT-- -*** Testing strspn() : with different start and len values *** - --- Iteration 1 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 2 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(1) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Iteration 3 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(8) -int(8) -int(0) -int(0) -int(1) -int(2) -int(7) -int(7) -int(0) -int(0) -int(1) -int(2) -int(6) -int(6) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(8) -int(8) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) - --- Iteration 4 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(0) -int(1) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) - --- Iteration 5 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) - --- Iteration 6 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) - --- Iteration 7 -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(1) -int(1) -int(1) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -int(0) -int(1) -int(2) -int(3) -int(3) -int(0) -int(0) -int(1) -int(2) -int(2) -int(2) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(0) -int(1) -int(2) -int(4) -int(4) -int(0) -Done From d0fb2f409eb0bf4cc865ade8c4de255bf9f9eaff Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 10:54:44 +0200 Subject: [PATCH 042/209] substr_compare() cannot return false --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 49ca4d7f82d00..ecc97686d3b3e 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -687,7 +687,7 @@ function str_split(string $str, int $split_length = 1): array {} function strpbrk(string $haystack, string $char_list): string|false {} -function substr_compare(string $main_str, string $str, int $offset, ?int $length = null, bool $case_insensitivity = false): int|false {} +function substr_compare(string $main_str, string $str, int $offset, ?int $length = null, bool $case_insensitivity = false): int {} function utf8_encode(string $data): string {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 12a8c0c5ed3e6..0f96cb302c4f4 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3f866608d73047b04b6a1abb6cbfa75abfeeed58 */ + * Stub hash: 5e8cd8c22edadede2814b26b6fb984f1c3626850 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1082,7 +1082,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY ZEND_ARG_TYPE_INFO(0, char_list, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_compare, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr_compare, 0, 3, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, main_str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) From 84be22f1f5db499001379f762869d00fc3bc6f55 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 11:19:02 +0200 Subject: [PATCH 043/209] Validate phonemes parameter of metaphone() And thus avoid the false return value. --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 6 ++-- ext/standard/metaphone.c | 42 ++++++++--------------- ext/standard/tests/strings/metaphone.phpt | 10 +++--- 4 files changed, 24 insertions(+), 36 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index ecc97686d3b3e..74a049831c6d6 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -494,7 +494,7 @@ function inet_pton(string $ip_address): string|false {} /* metaphone.c */ -function metaphone(string $text, int $phones = 0): string|false {} +function metaphone(string $text, int $phonemes = 0): string {} /* {{{ head.c */ function header(string $string, bool $replace = true, int $http_response_code = 0): void {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 0f96cb302c4f4..5c63fb509a6e8 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 5e8cd8c22edadede2814b26b6fb984f1c3626850 */ + * Stub hash: 5d9126adf07f6f480b5879f551de466140b98462 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -725,9 +725,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inet_pton, 0, 1, MAY_BE_STRING|M ZEND_END_ARG_INFO() #endif -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_metaphone, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_metaphone, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, phones, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, phonemes, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_header, 0, 1, IS_VOID, 0) diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 1665caddceb48..573bf9a4b0d0f 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -20,7 +20,7 @@ #include "php.h" -static int metaphone(unsigned char *word, size_t word_len, zend_long max_phonemes, zend_string **phoned_word, int traditional); +static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonemes, zend_string **phoned_word, int traditional); /* {{{ Break english phrases down into their phonemes */ PHP_FUNCTION(metaphone) @@ -35,14 +35,13 @@ PHP_FUNCTION(metaphone) Z_PARAM_LONG(phones) ZEND_PARSE_PARAMETERS_END(); - if (metaphone((unsigned char *)ZSTR_VAL(str), ZSTR_LEN(str), phones, &result, 1) == 0) { - RETVAL_STR(result); - } else { - if (result) { - zend_string_free(result); - } - RETURN_FALSE; + if (phones < 0) { + zend_argument_value_error(2, "must be greater than or equal to 0"); + RETURN_THROWS(); } + + metaphone((unsigned char *)ZSTR_VAL(str), ZSTR_LEN(str), phones, &result, 1); + RETVAL_STR(result); } /* }}} */ @@ -145,7 +144,7 @@ static char Lookahead(char *word, int how_far) ZSTR_LEN(*phoned_word) = p_idx; \ } /* Slap a null character on the end of the phoned word */ -#define End_Phoned_Word { \ +#define End_Phoned_Word() { \ if (p_idx == max_buffer_len) { \ *phoned_word = zend_string_extend(*phoned_word, 1 * sizeof(char) + max_buffer_len, 0); \ max_buffer_len += 1; \ @@ -160,24 +159,13 @@ static char Lookahead(char *word, int how_far) #define Isbreak(c) (!isalpha(c)) /* {{{ metaphone */ -static int metaphone(unsigned char *word, size_t word_len, zend_long max_phonemes, zend_string **phoned_word, int traditional) +static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonemes, zend_string **phoned_word, int traditional) { int w_idx = 0; /* point in the phonization we're at. */ size_t p_idx = 0; /* end of the phoned phrase */ size_t max_buffer_len = 0; /* maximum length of the destination buffer */ - -/*-- Parameter checks --*/ - /* Negative phoneme length is meaningless */ - - if (max_phonemes < 0) - return -1; - - /* Empty/null string is meaningless */ - /* Overly paranoid */ - /* assert(word != NULL && word[0] != '\0'); */ - - if (word == NULL) - return -1; + ZEND_ASSERT(word != NULL); + ZEND_ASSERT(max_phonemes >= 0); /*-- Allocate memory for our phoned_phrase --*/ if (max_phonemes == 0) { /* Assume largest possible */ @@ -194,8 +182,8 @@ static int metaphone(unsigned char *word, size_t word_len, zend_long max_phoneme for (; !isalpha(Curr_Letter); w_idx++) { /* On the off chance we were given nothing but crap... */ if (Curr_Letter == '\0') { - End_Phoned_Word - return SUCCESS; /* For testing */ + End_Phoned_Word(); + return; } } @@ -460,8 +448,6 @@ static int metaphone(unsigned char *word, size_t word_len, zend_long max_phoneme w_idx += skip_letter; } /* END FOR */ - End_Phoned_Word; - - return 0; + End_Phoned_Word(); } /* END metaphone */ /* }}} */ diff --git a/ext/standard/tests/strings/metaphone.phpt b/ext/standard/tests/strings/metaphone.phpt index a6b52e3934a1f..0356c1fd69909 100644 --- a/ext/standard/tests/strings/metaphone.phpt +++ b/ext/standard/tests/strings/metaphone.phpt @@ -5,9 +5,12 @@ metaphone() tests var_dump(metaphone("")); var_dump(metaphone(-1)); -var_dump(metaphone(-1, -1)); -var_dump(metaphone("valid phrase", -1)); +try { + var_dump(metaphone("valid phrase", -1)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} var_dump(metaphone("valid phrase", 0)); var_dump(metaphone("valid phrase", 10000)); @@ -27,8 +30,7 @@ echo "Done\n"; --EXPECT-- string(0) "" string(0) "" -bool(false) -bool(false) +metaphone(): Argument #2 ($phonemes) must be greater than or equal to 0 string(6) "FLTFRS" string(6) "FLTFRS" string(26) "0FLFRWRTKRFLNKHTLSLN0KLTR0" From 0fbebfd1ae3dfc8d9e088abbb6b062f5c86f2587 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 11:23:01 +0200 Subject: [PATCH 044/209] html_entity_decode() cannot fail php_unescape_html_entities() never returns null, so this function can never return false. php_unescape_html_entities() probably should be failing with OOM for the "overflow" case, but even if it did, it would not be signalled through a false return value. --- ext/standard/basic_functions.stub.php | 4 ++-- ext/standard/basic_functions_arginfo.h | 6 +++--- ext/standard/html.c | 11 ++--------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 74a049831c6d6..0f59a2bdcd52c 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -519,9 +519,9 @@ function headers_list(): array {} function htmlspecialchars(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {} -function htmlspecialchars_decode(string $string, int $quote_style = ENT_COMPAT): string|false {} +function htmlspecialchars_decode(string $string, int $quote_style = ENT_COMPAT): string {} -function html_entity_decode(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null): string|false {} +function html_entity_decode(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null): string {} function htmlentities(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 5c63fb509a6e8..6ca9dfc34c463 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 5d9126adf07f6f480b5879f551de466140b98462 */ + * Stub hash: 02f033de2ff8c06e24b22b150baa1a503ce6b95e */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -770,12 +770,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_htmlspecialchars, 0, 1, IS_STRIN ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, double_encode, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_htmlspecialchars_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_htmlspecialchars_decode, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_html_entity_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_html_entity_decode, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") diff --git a/ext/standard/html.c b/ext/standard/html.c index 463e55c255cb8..c949e058c1a2c 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1377,10 +1377,7 @@ PHP_FUNCTION(htmlspecialchars_decode) ZEND_PARSE_PARAMETERS_END(); replaced = php_unescape_html_entities(str, 0 /*!all*/, (int)quote_style, NULL); - if (replaced) { - RETURN_STR(replaced); - } - RETURN_FALSE; + RETURN_STR(replaced); } /* }}} */ @@ -1400,11 +1397,7 @@ PHP_FUNCTION(html_entity_decode) replaced = php_unescape_html_entities( str, 1 /*all*/, (int)quote_style, hint_charset ? ZSTR_VAL(hint_charset) : NULL); - - if (replaced) { - RETURN_STR(replaced); - } - RETURN_FALSE; + RETURN_STR(replaced); } /* }}} */ From e547ea43c1a490d445b3d58294d12bdb17ffdf60 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 11:30:02 +0200 Subject: [PATCH 045/209] http_build_query() cannot fail Assert that ht is not null and make php_url_encode_hash_ex() return void to clarify that this is an infallible function. --- ext/opcache/Optimizer/zend_func_info.c | 4 ++-- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 4 ++-- ext/standard/http.c | 18 ++++-------------- ext/standard/php_http.h | 2 +- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 87ec2e1ffa9eb..043a660d6c406 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -188,7 +188,7 @@ static const func_info_t func_infos[] = { F1("urldecode", MAY_BE_STRING), F1("rawurlencode", MAY_BE_STRING), F1("rawurldecode", MAY_BE_STRING), - F1("http_build_query", MAY_BE_FALSE | MAY_BE_STRING), + F1("http_build_query", MAY_BE_STRING), #if defined(HAVE_SYMLINK) || defined(PHP_WIN32) F1("readlink", MAY_BE_FALSE | MAY_BE_STRING), #endif @@ -344,7 +344,7 @@ static const func_info_t func_infos[] = { F0("syslog", MAY_BE_TRUE), F0("closelog", MAY_BE_TRUE), #endif - F1("metaphone", MAY_BE_FALSE | MAY_BE_STRING), + F1("metaphone", MAY_BE_STRING), F1("ob_get_flush", MAY_BE_FALSE | MAY_BE_STRING), F1("ob_get_clean", MAY_BE_FALSE | MAY_BE_STRING), F1("ob_get_status", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 0f59a2bdcd52c..bd185d5382040 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -978,7 +978,7 @@ function pfsockopen(string $hostname, int $port = -1, &$errno = null, &$errstr = /* http.c */ -function http_build_query(array|object $data, string $numeric_prefix = "", ?string $arg_separator = null, int $enc_type = PHP_QUERY_RFC1738): string|false {} +function http_build_query(array|object $data, string $numeric_prefix = "", ?string $arg_separator = null, int $enc_type = PHP_QUERY_RFC1738): string {} /* image.c */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 6ca9dfc34c463..64f35950a4c57 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 02f033de2ff8c06e24b22b150baa1a503ce6b95e */ + * Stub hash: d840ea5a32c8414bdc29e21635e7a36ee7c202e1 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1501,7 +1501,7 @@ ZEND_END_ARG_INFO() #define arginfo_pfsockopen arginfo_fsockopen -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_http_build_query, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_http_build_query, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, data, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, numeric_prefix, IS_STRING, 0, "\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arg_separator, IS_STRING, 1, "null") diff --git a/ext/standard/http.c b/ext/standard/http.c index 804940fd1a63e..18b7c6070bb03 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -21,7 +21,7 @@ #define URL_DEFAULT_ARG_SEP "&" /* {{{ php_url_encode_hash */ -PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, +PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, const char *key_prefix, size_t key_prefix_len, const char *key_suffix, size_t key_suffix_len, @@ -33,14 +33,11 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, size_t arg_sep_len, newprefix_len, prop_len; zend_ulong idx; zval *zdata = NULL; - - if (!ht) { - return FAILURE; - } + ZEND_ASSERT(ht); if (GC_IS_RECURSIVE(ht)) { /* Prevent recursion */ - return SUCCESS; + return; } if (!arg_sep) { @@ -219,8 +216,6 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, } } } ZEND_HASH_FOREACH_END(); - - return SUCCESS; } /* }}} */ @@ -241,12 +236,7 @@ PHP_FUNCTION(http_build_query) Z_PARAM_LONG(enc_type) ZEND_PARSE_PARAMETERS_END(); - if (php_url_encode_hash_ex(HASH_OF(formdata), &formstr, prefix, prefix_len, NULL, 0, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL), arg_sep, (int)enc_type) == FAILURE) { - if (formstr.s) { - smart_str_free(&formstr); - } - RETURN_FALSE; - } + php_url_encode_hash_ex(HASH_OF(formdata), &formstr, prefix, prefix_len, NULL, 0, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL), arg_sep, (int)enc_type); if (!formstr.s) { RETURN_EMPTY_STRING(); diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h index b77cd0bda38bf..1df941ee00949 100644 --- a/ext/standard/php_http.h +++ b/ext/standard/php_http.h @@ -20,7 +20,7 @@ #include "php.h" #include "zend_smart_str.h" -PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, +PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, size_t num_prefix_len, const char *key_prefix, size_t key_prefix_len, const char *key_suffix, size_t key_suffix_len, From f26d855e2908c840e87ce62ae73abf8f0608602f Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Tue, 22 Sep 2020 03:36:32 -0600 Subject: [PATCH 046/209] Skip if https wrapper isn't present --- ext/standard/tests/network/bug80067.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/standard/tests/network/bug80067.phpt b/ext/standard/tests/network/bug80067.phpt index 19b2c76bb9458..ed7802cc40d2b 100644 --- a/ext/standard/tests/network/bug80067.phpt +++ b/ext/standard/tests/network/bug80067.phpt @@ -3,6 +3,7 @@ Bug #80067 (Omitting the port in bindto setting errors) --SKIPIF-- --FILE-- Date: Tue, 22 Sep 2020 11:42:50 +0200 Subject: [PATCH 047/209] Don't return false for empty string in soundex() Return "0000" instead of false to have a consistent return type. "0000" is already a possible return value if the string doesn't contain any letters, such as with soundex(" "). We can treat the case of soundex("") exactly the same. --- ext/opcache/Optimizer/zend_func_info.c | 2 +- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 14 ++++++-------- ext/standard/soundex.c | 4 ---- ext/standard/tests/strings/soundex.phpt | 2 +- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 043a660d6c406..10a90aff2dc85 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -175,7 +175,7 @@ static const func_info_t func_infos[] = { #if HAVE_NL_LANGINFO F1("nl_langinfo", MAY_BE_FALSE | MAY_BE_STRING), #endif - F1("soundex", MAY_BE_FALSE | MAY_BE_STRING), + F1("soundex", MAY_BE_STRING), F1("chr", MAY_BE_STRING), F1("str_getcsv", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("strchr", MAY_BE_FALSE | MAY_BE_STRING), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index bd185d5382040..da890a5735609 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1199,7 +1199,7 @@ function random_int(int $min, int $max): int {} /* soundex.c */ -function soundex(string $string): string|false {} +function soundex(string $string): string {} /* streamsfuncs.c */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 64f35950a4c57..82a88ddee4c06 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d840ea5a32c8414bdc29e21635e7a36ee7c202e1 */ + * Stub hash: 56fb3ef4c53a1ed7abf6a115567bca47e1a14cda */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1842,7 +1842,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_random_int, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, max, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_soundex, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_soundex, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -2121,15 +2121,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_url, 0, 0, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, component, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_urlencode, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_urlencode arginfo_soundex -#define arginfo_urldecode arginfo_urlencode +#define arginfo_urldecode arginfo_soundex -#define arginfo_rawurlencode arginfo_urlencode +#define arginfo_rawurlencode arginfo_soundex -#define arginfo_rawurldecode arginfo_urlencode +#define arginfo_rawurldecode arginfo_soundex ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, url, IS_STRING, 0) diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c index 5342139f98d00..db57c1ef6991a 100644 --- a/ext/standard/soundex.c +++ b/ext/standard/soundex.c @@ -60,10 +60,6 @@ PHP_FUNCTION(soundex) Z_PARAM_STRING(str, str_len) ZEND_PARSE_PARAMETERS_END(); - if (str_len == 0) { - RETURN_FALSE; - } - /* build soundex string */ last = -1; for (i = 0, _small = 0; i < str_len && _small < 4; i++) { diff --git a/ext/standard/tests/strings/soundex.phpt b/ext/standard/tests/strings/soundex.phpt index c4acc2ff6842d..95d0b76085e79 100644 --- a/ext/standard/tests/strings/soundex.phpt +++ b/ext/standard/tests/strings/soundex.phpt @@ -31,7 +31,7 @@ foreach ($array as $str) { echo "Done\n"; ?> --EXPECT-- -bool(false) +string(4) "0000" string(4) "0000" string(4) "F650" string(4) "T300" From 9ef2c5c3035904cfd453ab5c106f7738c6f20e0a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 12:02:39 +0200 Subject: [PATCH 048/209] stream_get_transports/wrappers cannot return false These may return an empty array, but not false. --- ext/opcache/Optimizer/zend_func_info.c | 4 ++-- ext/standard/basic_functions.stub.php | 4 ++-- ext/standard/basic_functions_arginfo.h | 6 +++--- ext/standard/streamsfuncs.c | 30 +++++++++++--------------- 4 files changed, 19 insertions(+), 25 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 10a90aff2dc85..7ad8ffd5bbb38 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -316,8 +316,8 @@ static const func_info_t func_infos[] = { F1("get_meta_tags", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING), F1("stream_get_meta_data", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), F1("stream_get_line", MAY_BE_FALSE | MAY_BE_STRING), - F1("stream_get_wrappers", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), - F1("stream_get_transports", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), + F1("stream_get_wrappers", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), + F1("stream_get_transports", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("stream_resolve_include_path", MAY_BE_FALSE | MAY_BE_STRING), F1("get_headers", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY), F1("socket_get_status", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index da890a5735609..ae322129ba6ea 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1339,9 +1339,9 @@ function stream_get_line($handle, int $max_length, string $ending = ""): string| function stream_resolve_include_path(string $filename): string|false {} -function stream_get_wrappers(): array|false {} +function stream_get_wrappers(): array {} -function stream_get_transports(): array|false {} +function stream_get_transports(): array {} /** @param resource|string $stream */ function stream_is_local($stream): bool {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 82a88ddee4c06..bfa90549b312d 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 56fb3ef4c53a1ed7abf6a115567bca47e1a14cda */ + * Stub hash: c61d8a28acaa2a7206f74287dce98282f2fedd2a */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -2011,9 +2011,9 @@ ZEND_END_ARG_INFO() #define arginfo_stream_resolve_include_path arginfo_filetype -#define arginfo_stream_get_wrappers arginfo_net_get_interfaces +#define arginfo_stream_get_wrappers arginfo_ob_list_handlers -#define arginfo_stream_get_transports arginfo_net_get_interfaces +#define arginfo_stream_get_transports arginfo_ob_list_handlers #define arginfo_stream_is_local arginfo_stream_supports_lock diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 8e4c4ff2611a6..1600b99794335 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -573,14 +573,11 @@ PHP_FUNCTION(stream_get_transports) ZEND_PARSE_PARAMETERS_NONE(); - if ((stream_xport_hash = php_stream_xport_get_hash())) { - array_init(return_value); - ZEND_HASH_FOREACH_STR_KEY(stream_xport_hash, stream_xport) { - add_next_index_str(return_value, zend_string_copy(stream_xport)); - } ZEND_HASH_FOREACH_END(); - } else { - RETURN_FALSE; - } + stream_xport_hash = php_stream_xport_get_hash(); + array_init(return_value); + ZEND_HASH_FOREACH_STR_KEY(stream_xport_hash, stream_xport) { + add_next_index_str(return_value, zend_string_copy(stream_xport)); + } ZEND_HASH_FOREACH_END(); } /* }}} */ @@ -592,16 +589,13 @@ PHP_FUNCTION(stream_get_wrappers) ZEND_PARSE_PARAMETERS_NONE(); - if ((url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash())) { - array_init(return_value); - ZEND_HASH_FOREACH_STR_KEY(url_stream_wrappers_hash, stream_protocol) { - if (stream_protocol) { - add_next_index_str(return_value, zend_string_copy(stream_protocol)); - } - } ZEND_HASH_FOREACH_END(); - } else { - RETURN_FALSE; - } + url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash(); + array_init(return_value); + ZEND_HASH_FOREACH_STR_KEY(url_stream_wrappers_hash, stream_protocol) { + if (stream_protocol) { + add_next_index_str(return_value, zend_string_copy(stream_protocol)); + } + } ZEND_HASH_FOREACH_END(); } /* }}} */ From e60f927f058b8db43d646fa9ad9d1c1e2fe59789 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 12:07:53 +0200 Subject: [PATCH 049/209] stream_bucket_new() cannot return false php_stream_bucket_new() is infallible. --- ext/opcache/Optimizer/zend_func_info.c | 2 +- ext/standard/basic_functions.stub.php | 4 +++- ext/standard/basic_functions_arginfo.h | 4 ++-- ext/standard/user_filters.c | 4 ---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 7ad8ffd5bbb38..0ae34307e5fec 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -409,7 +409,7 @@ static const func_info_t func_infos[] = { F1("str_rot13", MAY_BE_STRING), F1("stream_get_filters", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("stream_bucket_make_writeable", MAY_BE_NULL | MAY_BE_OBJECT), - F1("stream_bucket_new", MAY_BE_FALSE | MAY_BE_OBJECT), + F1("stream_bucket_new", MAY_BE_OBJECT), F1("sys_get_temp_dir", MAY_BE_STRING), /* ext/date */ diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index ae322129ba6ea..03615f3bdb5e6 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1445,6 +1445,8 @@ function rawurldecode(string $string): string {} /** @param resource $context */ function get_headers(string $url, int $format = 0, $context = null): array|false {} +/* user_filters.c */ + /** @param resource $brigade */ function stream_bucket_make_writeable($brigade): ?object {} @@ -1455,7 +1457,7 @@ function stream_bucket_prepend($brigade, object $bucket): void {} function stream_bucket_append($brigade, object $bucket): void {} /** @param resource $stream */ -function stream_bucket_new($stream, string $buffer): object|false {} +function stream_bucket_new($stream, string $buffer): object {} function stream_get_filters(): array {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index bfa90549b312d..01292812d295a 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c61d8a28acaa2a7206f74287dce98282f2fedd2a */ + * Stub hash: 621176b0f79f4fcb833c6be568adb2070239cce1 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -2146,7 +2146,7 @@ ZEND_END_ARG_INFO() #define arginfo_stream_bucket_append arginfo_stream_bucket_prepend -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_bucket_new, 0, 2, MAY_BE_OBJECT|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_bucket_new, 0, 2, IS_OBJECT, 0) ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, buffer, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 990a8e6420608..b62e8a2d7cde9 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -500,10 +500,6 @@ PHP_FUNCTION(stream_bucket_new) bucket = php_stream_bucket_new(stream, pbuffer, buffer_len, 1, php_stream_is_persistent(stream)); - if (bucket == NULL) { - RETURN_FALSE; - } - ZVAL_RES(&zbucket, zend_register_resource(bucket, le_bucket)); object_init(return_value); add_property_zval(return_value, "bucket", &zbucket); From fdd9018bdfa6a4b99279a982e7c9d490849c8ae4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 12:39:39 +0200 Subject: [PATCH 050/209] Support uuencoding empty string Cross checking implementations from other languages, empty strings are always allowed. PHP's output is peculiar due to it's insistence to encode a trailing \0, but otherwise sensible and does round-trip as expected. --- ext/opcache/Optimizer/zend_func_info.c | 2 +- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 4 ++-- ext/standard/tests/strings/uuencode.phpt | 13 +++++++++---- ext/standard/uuencode.c | 6 ++++-- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 0ae34307e5fec..e3a258802875b 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -213,7 +213,7 @@ static const func_info_t func_infos[] = { F1("base64_encode", MAY_BE_STRING), F1("password_hash", MAY_BE_STRING), F1("password_get_info", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY), - F1("convert_uuencode", MAY_BE_FALSE | MAY_BE_STRING), + F1("convert_uuencode", MAY_BE_STRING), F1("convert_uudecode", MAY_BE_FALSE | MAY_BE_STRING), F1("pow", MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_OBJECT), F1("decbin", MAY_BE_STRING), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 03615f3bdb5e6..0bc7bd8aef754 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1465,7 +1465,7 @@ function stream_filter_register(string $filtername, string $classname): bool {} /* uuencode.c */ -function convert_uuencode(string $data): string|false {} +function convert_uuencode(string $data): string {} function convert_uudecode(string $data): string|false {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 01292812d295a..6aff74adcfd3a 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 621176b0f79f4fcb833c6be568adb2070239cce1 */ + * Stub hash: 3c02183529eed2eb21d801ed2ba615deaf749b1d */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -2158,7 +2158,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_filter_register, 0, 2, _I ZEND_ARG_TYPE_INFO(0, classname, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_convert_uuencode arginfo_hex2bin +#define arginfo_convert_uuencode arginfo_bin2hex #define arginfo_convert_uudecode arginfo_hex2bin diff --git a/ext/standard/tests/strings/uuencode.phpt b/ext/standard/tests/strings/uuencode.phpt index b0a2a2321d025..d03c2b1bf0f37 100644 --- a/ext/standard/tests/strings/uuencode.phpt +++ b/ext/standard/tests/strings/uuencode.phpt @@ -3,20 +3,22 @@ uuencode family tests --FILE-- --EXPECTF-- -bool(false) -bool(false) +string(2) "` +" +string(0) "" string(60) "J?B%`(R0E7B8J*"E??7M03TE5651215=145-$1D=(2DM,.CQ-3D)60UA: ` " @@ -27,6 +29,9 @@ string(36) "6;F]T('9E Date: Tue, 22 Sep 2020 13:05:05 +0200 Subject: [PATCH 051/209] Use C zpp for get_class_vars() --- Zend/tests/get_class_vars_001.phpt | 7 +++++++ Zend/zend_builtin_functions.c | 25 ++++++++++--------------- Zend/zend_builtin_functions.stub.php | 2 +- Zend/zend_builtin_functions_arginfo.h | 4 ++-- ext/opcache/Optimizer/zend_func_info.c | 2 +- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Zend/tests/get_class_vars_001.phpt b/Zend/tests/get_class_vars_001.phpt index a5939ccd5f1d0..84f502610ecaf 100644 --- a/Zend/tests/get_class_vars_001.phpt +++ b/Zend/tests/get_class_vars_001.phpt @@ -19,6 +19,12 @@ class B extends A { var_dump(get_class_vars('A')); var_dump(get_class_vars('B')); +try { + get_class_vars("Unknown"); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + ?> --EXPECT-- array(1) { @@ -31,3 +37,4 @@ array(2) { ["aa"]=> int(4) } +get_class_vars(): Argument #1 ($class) must be a valid class name, Unknown given diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index fbc7d1332907c..ac652b3b8a009 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -747,27 +747,22 @@ static void add_class_vars(zend_class_entry *scope, zend_class_entry *ce, bool s /* {{{ Returns an array of default properties of the class. */ ZEND_FUNCTION(get_class_vars) { - zend_string *class_name; - zend_class_entry *ce, *scope; + zend_class_entry *ce = NULL, *scope; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &class_name) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "C", &ce) == FAILURE) { RETURN_THROWS(); } - ce = zend_lookup_class(class_name); - if (!ce) { - RETURN_FALSE; - } else { - array_init(return_value); - if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { - if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) { - return; - } + array_init(return_value); + if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { + if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) { + return; } - scope = zend_get_executed_scope(); - add_class_vars(scope, ce, 0, return_value); - add_class_vars(scope, ce, 1, return_value); } + + scope = zend_get_executed_scope(); + add_class_vars(scope, ce, 0, return_value); + add_class_vars(scope, ce, 1, return_value); } /* }}} */ diff --git a/Zend/zend_builtin_functions.stub.php b/Zend/zend_builtin_functions.stub.php index 5d5ebcde14a1f..eaf2ac490a422 100644 --- a/Zend/zend_builtin_functions.stub.php +++ b/Zend/zend_builtin_functions.stub.php @@ -39,7 +39,7 @@ function is_subclass_of(mixed $object_or_class, string $class, bool $allow_strin /** @param object|string $object_or_class */ function is_a(mixed $object_or_class, string $class, bool $allow_string = false): bool {} -function get_class_vars(string $class): array|false {} +function get_class_vars(string $class): array {} function get_object_vars(object $object): array {} diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h index 4b551e3d59c48..d10e2c3d68824 100644 --- a/Zend/zend_builtin_functions_arginfo.h +++ b/Zend/zend_builtin_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 1f644f72600eddbbb01a4c3912a2c9c5fe12188e */ + * Stub hash: fed3b572fbcae7bda87efc377b56e027da12b511 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -69,7 +69,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_a, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, allow_string, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_class_vars, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_class_vars, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, class, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index e3a258802875b..936e8a8915ff4 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -97,7 +97,7 @@ static const func_info_t func_infos[] = { F1("zend_version", MAY_BE_STRING), FN("func_get_arg", UNKNOWN_INFO), FN("func_get_args", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY), - F1("get_class_vars", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF), + F1("get_class_vars", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF), F1("get_class_methods", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("get_included_files", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), FN("set_error_handler", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_OBJECT | MAY_BE_OBJECT), From 4000780b3d0bbba2d94f65602e602c3892d9775b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 9 Sep 2020 19:21:41 +0200 Subject: [PATCH 052/209] Fix #79423: copy command is limited to size of file it can copy Passing `NULL` as `lpFileSizeHigh` to `GetFileSize()` gives wrong results for files larger than 0xFFFFFFFF bytes. We fix this by using `GetFileSizeEx()`, and let the mapping fail, if the file size is too large for the architecture. Closes GH-5319. --- NEWS | 4 ++++ main/streams/plain_wrapper.c | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 98dd5861148cd..54463d49838cb 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.3.24 +- Core: + . Fixed bug #79423 (copy command is limited to size of file it can copy). + (cmb) + - MySQLnd: . Fixed bug #80115 (mysqlnd.debug doesn't recognize absolute paths with slashes). (cmb) diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 2b81912857626..d00a6efe29d28 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -749,6 +749,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void php_stream_mmap_range *range = (php_stream_mmap_range*)ptrparam; HANDLE hfile = (HANDLE)_get_osfhandle(fd); DWORD prot, acc, loffs = 0, delta = 0; + LARGE_INTEGER file_size; switch (value) { case PHP_STREAM_MMAP_SUPPORTED: @@ -785,7 +786,22 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void return PHP_STREAM_OPTION_RETURN_ERR; } - size = GetFileSize(hfile, NULL); + if (!GetFileSizeEx(hfile, &file_size)) { + CloseHandle(data->file_mapping); + data->file_mapping = NULL; + return PHP_STREAM_OPTION_RETURN_ERR; + } +# if defined(_WIN64) + size = file_size.QuadPart; +# else + if (file_size.HighPart) { + CloseHandle(data->file_mapping); + data->file_mapping = NULL; + return PHP_STREAM_OPTION_RETURN_ERR; + } else { + size = file_size.LowPart; + } +# endif if (range->offset > size) { range->offset = size; } From 048cc9ba78f740e4dcd400f372b9ca2876a26117 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 14:00:48 +0200 Subject: [PATCH 053/209] Convert unpack offset warning to ValueError --- ext/standard/pack.c | 5 +++-- ext/standard/tests/strings/unpack_offset.phpt | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 013173dc7386a..bbae59c6ae9c0 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -731,9 +731,10 @@ PHP_FUNCTION(unpack) if (offset < 0 || offset > inputlen) { - php_error_docref(NULL, E_WARNING, "Offset " ZEND_LONG_FMT " is out of input range" , offset); - RETURN_FALSE; + zend_argument_value_error(3, "must be contained in argument #2 ($data)"); + RETURN_THROWS(); } + input += offset; inputlen -= offset; diff --git a/ext/standard/tests/strings/unpack_offset.phpt b/ext/standard/tests/strings/unpack_offset.phpt index 451dd367246b0..bd787859c11af 100644 --- a/ext/standard/tests/strings/unpack_offset.phpt +++ b/ext/standard/tests/strings/unpack_offset.phpt @@ -10,7 +10,20 @@ printf("0x%08x 0x%08x\n", $a[1], $a[2]); printf("0x%08x 0x%08x\n", unpack("l", $data, 3)[1], unpack("@4/l", $data, 3)[1]); + +try { + unpack("l", "foo", 10); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + unpack("l", "foo", -1); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> --EXPECT-- 0x01020304 0x05060708 0x01020304 0x05060708 +unpack(): Argument #3 ($offset) must be contained in argument #2 ($data) +unpack(): Argument #3 ($offset) must be contained in argument #2 ($data) From de77344de27ae2d913432832b4c4484682d15be1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 14:08:13 +0200 Subject: [PATCH 054/209] Promote pack/unpack format errors Errors related to invalid format strings (unlike data mismatch errors) should throw ValueError. Closes GH-6185. --- ext/opcache/Optimizer/zend_func_info.c | 2 +- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 7 +- ext/standard/pack.c | 29 ++++--- ext/standard/tests/strings/bug78833.phpt | 11 ++- ext/standard/tests/strings/pack64_32.phpt | 80 ++++++++++++-------- ext/standard/tests/strings/unpack.phpt | 11 --- ext/standard/tests/strings/unpack_error.phpt | 18 ++--- 8 files changed, 81 insertions(+), 79 deletions(-) delete mode 100644 ext/standard/tests/strings/unpack.phpt diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 936e8a8915ff4..e3b4da720c4d1 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -324,7 +324,7 @@ static const func_info_t func_infos[] = { F1("realpath", MAY_BE_FALSE | MAY_BE_STRING), F1("fsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE), FN("pfsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE), - F1("pack", MAY_BE_FALSE | MAY_BE_STRING), + F1("pack", MAY_BE_STRING), F1("unpack", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY), F1("get_browser", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY), F1("crypt", MAY_BE_STRING), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 0bc7bd8aef754..58f09ca2a19ba 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1134,7 +1134,7 @@ function getrusage(int $who = 0): array|false {} /* pack.c */ -function pack(string $format, mixed ...$args): string|false {} +function pack(string $format, mixed ...$args): string {} function unpack(string $format, string $data, int $offset = 0): array|false {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 6aff74adcfd3a..1c90803d96dff 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3c02183529eed2eb21d801ed2ba615deaf749b1d */ + * Stub hash: f029ab7f1d9fa2a99a5612a928d0b731de6aaeed */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1747,10 +1747,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getrusage, 0, 0, MAY_BE_ARRAY|MA ZEND_END_ARG_INFO() #endif -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pack, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) -ZEND_END_ARG_INFO() +#define arginfo_pack arginfo_sprintf ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_unpack, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) diff --git a/ext/standard/pack.c b/ext/standard/pack.c index bbae59c6ae9c0..bfa6708f66d86 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -47,8 +47,8 @@ if ((a) < 0 || ((INT_MAX - outputpos)/((int)b)) < (a)) { \ efree(formatcodes); \ efree(formatargs); \ - php_error_docref(NULL, E_WARNING, "Type %c: integer overflow in format string", code); \ - RETURN_FALSE; \ + zend_value_error("Type %c: integer overflow in format string", code); \ + RETURN_THROWS(); \ } \ outputpos += (a)*(b); @@ -282,8 +282,8 @@ PHP_FUNCTION(pack) if (currentarg >= num_args) { efree(formatcodes); efree(formatargs); - php_error_docref(NULL, E_WARNING, "Type %c: not enough arguments", code); - RETURN_FALSE; + zend_value_error("Type %c: not enough arguments", code); + RETURN_THROWS(); } if (arg < 0) { @@ -313,8 +313,8 @@ PHP_FUNCTION(pack) #if SIZEOF_ZEND_LONG < 8 efree(formatcodes); efree(formatargs); - php_error_docref(NULL, E_WARNING, "64-bit format codes are not available for 32-bit versions of PHP"); - RETURN_FALSE; + zend_value_error("64-bit format codes are not available for 32-bit versions of PHP"); + RETURN_THROWS(); #endif case 'c': case 'C': @@ -346,16 +346,16 @@ PHP_FUNCTION(pack) too_few_args: efree(formatcodes); efree(formatargs); - php_error_docref(NULL, E_WARNING, "Type %c: too few arguments", code); - RETURN_FALSE; + zend_value_error("Type %c: too few arguments", code); + RETURN_THROWS(); } break; default: efree(formatcodes); efree(formatargs); - php_error_docref(NULL, E_WARNING, "Type %c: unknown format code", code); - RETURN_FALSE; + zend_value_error("Type %c: unknown format code", code); + RETURN_THROWS(); } formatcodes[formatcount] = code; @@ -845,9 +845,9 @@ PHP_FUNCTION(unpack) size = 8; break; #else - php_error_docref(NULL, E_WARNING, "64-bit format codes are not available for 32-bit versions of PHP"); + zend_value_error("64-bit format codes are not available for 32-bit versions of PHP"); zend_array_destroy(Z_ARR_P(return_value)); - RETURN_FALSE; + RETURN_THROWS(); #endif /* Use sizeof(float) bytes of input */ @@ -865,10 +865,9 @@ PHP_FUNCTION(unpack) break; default: - php_error_docref(NULL, E_WARNING, "Invalid format type %c", type); + zend_value_error("Invalid format type %c", type); zend_array_destroy(Z_ARR_P(return_value)); - RETURN_FALSE; - break; + RETURN_THROWS(); } if (size != 0 && size != -1 && size < 0) { diff --git a/ext/standard/tests/strings/bug78833.phpt b/ext/standard/tests/strings/bug78833.phpt index 763b6ec4eac32..7712e133facec 100644 --- a/ext/standard/tests/strings/bug78833.phpt +++ b/ext/standard/tests/strings/bug78833.phpt @@ -2,8 +2,11 @@ Bug #78833 (Integer overflow in pack causes out-of-bound access) --FILE-- getMessage(), "\n"; +} ?> ---EXPECTF-- -Warning: pack(): Type E: too few arguments in %s on line %d -bool(false) +--EXPECT-- +Type E: too few arguments diff --git a/ext/standard/tests/strings/pack64_32.phpt b/ext/standard/tests/strings/pack64_32.phpt index 978e04449de61..87e945c5fac66 100644 --- a/ext/standard/tests/strings/pack64_32.phpt +++ b/ext/standard/tests/strings/pack64_32.phpt @@ -8,37 +8,55 @@ if (PHP_INT_SIZE > 4) { ?> --FILE-- getMessage(), "\n"; +} +try { + var_dump(pack("J", 0)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(pack("P", 0)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(pack("q", 0)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + +try { + var_dump(unpack("Q", '')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(unpack("J", '')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(unpack("P", '')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(unpack("q", '')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} -var_dump(unpack("Q", '')); -var_dump(unpack("J", '')); -var_dump(unpack("P", '')); -var_dump(unpack("q", '')); ?> --EXPECTF-- -Warning: pack(): 64-bit format codes are not available for 32-bit versions of PHP in %s on line %d -bool(false) - -Warning: pack(): 64-bit format codes are not available for 32-bit versions of PHP in %s on line %d -bool(false) - -Warning: pack(): 64-bit format codes are not available for 32-bit versions of PHP in %s on line %d -bool(false) - -Warning: pack(): 64-bit format codes are not available for 32-bit versions of PHP in %s on line %d -bool(false) - -Warning: unpack(): 64-bit format codes are not available for 32-bit versions of PHP in %s on line %d -bool(false) - -Warning: unpack(): 64-bit format codes are not available for 32-bit versions of PHP in %s on line %d -bool(false) - -Warning: unpack(): 64-bit format codes are not available for 32-bit versions of PHP in %s on line %d -bool(false) - -Warning: unpack(): 64-bit format codes are not available for 32-bit versions of PHP in %s on line %d -bool(false) +64-bit format codes are not available for 32-bit versions of PHP +64-bit format codes are not available for 32-bit versions of PHP +64-bit format codes are not available for 32-bit versions of PHP +64-bit format codes are not available for 32-bit versions of PHP +64-bit format codes are not available for 32-bit versions of PHP +64-bit format codes are not available for 32-bit versions of PHP +64-bit format codes are not available for 32-bit versions of PHP +64-bit format codes are not available for 32-bit versions of PHP diff --git a/ext/standard/tests/strings/unpack.phpt b/ext/standard/tests/strings/unpack.phpt deleted file mode 100644 index 435361cca54a6..0000000000000 --- a/ext/standard/tests/strings/unpack.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Invalid format type validation ---FILE-- - ---EXPECTF-- -Warning: unpack(): Invalid format type - in %sunpack.php on line %d -bool(false) -Done diff --git a/ext/standard/tests/strings/unpack_error.phpt b/ext/standard/tests/strings/unpack_error.phpt index 5da3cee273372..c41185b23acef 100644 --- a/ext/standard/tests/strings/unpack_error.phpt +++ b/ext/standard/tests/strings/unpack_error.phpt @@ -3,16 +3,12 @@ Test unpack() function : error conditions --FILE-- getMessage(), "\n"; +} -echo "\n-- Testing unpack() function with invalid format character --\n"; -$extra_arg = 10; -var_dump(unpack("B", pack("I", 65534))); ?> ---EXPECTF-- -*** Testing unpack() : error conditions *** - --- Testing unpack() function with invalid format character -- - -Warning: unpack(): Invalid format type B in %s on line %d -bool(false) +--EXPECT-- +Invalid format type B From 35013ac8233b6d868da98761db707f16584dc36e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 22 Sep 2020 14:43:31 +0100 Subject: [PATCH 055/209] Skip IMAP test which chokes on ASAN build --- ext/imap/tests/imap_getsubscribed_basic.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/imap/tests/imap_getsubscribed_basic.phpt b/ext/imap/tests/imap_getsubscribed_basic.phpt index bba82271c7ca3..8e5d85383daef 100644 --- a/ext/imap/tests/imap_getsubscribed_basic.phpt +++ b/ext/imap/tests/imap_getsubscribed_basic.phpt @@ -5,6 +5,7 @@ Olivier Doucet --SKIPIF-- --FILE-- Date: Tue, 22 Sep 2020 13:01:32 +0200 Subject: [PATCH 056/209] Fix #76943: Inconsistent stream_wrapper_restore() errors If restoring of any not registered built-in wrapper is requested, the function is supposed to fail with a warning, so we have to check this condition first. Furthermore, to be able to detect whether a built-in wrapper has been changed, it is not sufficient to check whether *any* userland wrapper has been registered, but rather whether the specific wrapper has been modified. Closes GH-6183. --- NEWS | 1 + ext/standard/tests/streams/bug76943.phpt | 28 ++++++++++++++++++++++++ main/streams/userspace.c | 13 ++++++----- 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 ext/standard/tests/streams/bug76943.phpt diff --git a/NEWS b/NEWS index 54463d49838cb..12a2de1385f01 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,7 @@ PHP NEWS - Standard: . Fixed bug #80114 (parse_url does not accept URLs with port 0). (cmb, twosee) + . Fixed bug #76943 (Inconsistent stream_wrapper_restore() errors). (cmb) 01 Oct 2020, PHP 7.3.23 diff --git a/ext/standard/tests/streams/bug76943.phpt b/ext/standard/tests/streams/bug76943.phpt new file mode 100644 index 0000000000000..755c348f8616e --- /dev/null +++ b/ext/standard/tests/streams/bug76943.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #76943 (Inconsistent stream_wrapper_restore() errors) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: stream_wrapper_restore(): foo:// never existed, nothing to restore in %s on line %d +bool(false) + +Notice: stream_wrapper_restore(): phar:// was never changed, nothing to restore in %s on line %d +bool(true) + +Warning: stream_wrapper_restore(): foo:// never existed, nothing to restore in %s on line %d +bool(false) + +Notice: stream_wrapper_restore(): phar:// was never changed, nothing to restore in %s on line %d +bool(true) diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 3b513cb7f110d..9d15310b16f72 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -559,23 +559,24 @@ PHP_FUNCTION(stream_wrapper_restore) { zend_string *protocol; php_stream_wrapper *wrapper; - HashTable *global_wrapper_hash; + HashTable *global_wrapper_hash, *wrapper_hash; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &protocol) == FAILURE) { RETURN_FALSE; } global_wrapper_hash = php_stream_get_url_stream_wrappers_hash_global(); - if (php_stream_get_url_stream_wrappers_hash() == global_wrapper_hash) { - php_error_docref(NULL, E_NOTICE, "%s:// was never changed, nothing to restore", ZSTR_VAL(protocol)); - RETURN_TRUE; - } - if ((wrapper = zend_hash_find_ptr(global_wrapper_hash, protocol)) == NULL) { php_error_docref(NULL, E_WARNING, "%s:// never existed, nothing to restore", ZSTR_VAL(protocol)); RETURN_FALSE; } + wrapper_hash = php_stream_get_url_stream_wrappers_hash(); + if (wrapper_hash == global_wrapper_hash || zend_hash_find_ptr(wrapper_hash, protocol) == wrapper) { + php_error_docref(NULL, E_NOTICE, "%s:// was never changed, nothing to restore", ZSTR_VAL(protocol)); + RETURN_TRUE; + } + /* A failure here could be okay given that the protocol might have been merely unregistered */ php_unregister_url_stream_wrapper_volatile(protocol); From 1312c417dea0e86e8af7f98bc24b3dd055e51e14 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 16:35:53 +0200 Subject: [PATCH 057/209] Fix grapheme out of bounds check An offset equal to the string length is not out of bounds. --- ext/intl/grapheme/grapheme_util.h | 2 +- ext/intl/tests/grapheme2.phpt | 2 +- ext/intl/tests/grapheme_out_of_bounds.phpt | 95 ++++++++++++++++++++++ 3 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 ext/intl/tests/grapheme_out_of_bounds.phpt diff --git a/ext/intl/grapheme/grapheme_util.h b/ext/intl/grapheme/grapheme_util.h index 508b7355f0217..6aeeed2bd798e 100644 --- a/ext/intl/grapheme/grapheme_util.h +++ b/ext/intl/grapheme/grapheme_util.h @@ -37,6 +37,6 @@ int32_t grapheme_get_haystack_offset(UBreakIterator* bi, int32_t offset); UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *status ); /* OUTSIDE_STRING: check if (possibly negative) long offset is outside the string with int32_t length */ -#define OUTSIDE_STRING(offset, max_len) ( offset <= INT32_MIN || offset > INT32_MAX || (offset < 0 ? -offset > (zend_long) max_len : offset >= (zend_long) max_len) ) +#define OUTSIDE_STRING(offset, max_len) ( offset <= INT32_MIN || offset > INT32_MAX || (offset < 0 ? -offset > (zend_long) max_len : offset > (zend_long) max_len) ) #endif // GRAPHEME_GRAPHEME_UTIL_H diff --git a/ext/intl/tests/grapheme2.phpt b/ext/intl/tests/grapheme2.phpt index 90af00732fa7f..1335fcb04dd6e 100644 --- a/ext/intl/tests/grapheme2.phpt +++ b/ext/intl/tests/grapheme2.phpt @@ -961,7 +961,7 @@ find "a%CC%8ABca%CC%8A" in "o%CC%88a%CC%8AaA%CC%8AbCa%CC%8Adef" - grapheme_strri function grapheme_substr($string, $start, $length = -1) {} -substring of "abc" from "3" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) +substring of "abc" from "3" - grapheme_substr = false == false substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false substring of "aoa%CC%8Abco%CC%88O" from "2" - grapheme_substr = a%CC%8Abco%CC%88O == a%CC%8Abco%CC%88O substring of "o%CC%88a%CC%8AaA%CC%8Abc" from "2" - grapheme_substr = aA%CC%8Abc == aA%CC%8Abc diff --git a/ext/intl/tests/grapheme_out_of_bounds.phpt b/ext/intl/tests/grapheme_out_of_bounds.phpt new file mode 100644 index 0000000000000..ab7a575e21bcd --- /dev/null +++ b/ext/intl/tests/grapheme_out_of_bounds.phpt @@ -0,0 +1,95 @@ +--TEST-- +grapheme_* functions with out-of-bounds offsets +--FILE-- +getMessage(), "\n"; +} +try { + var_dump(grapheme_stripos("foo", "bar", 4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_strrpos("foo", "bar", 4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_strripos("foo", "bar", 4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +echo "\n"; + +// Negative out of bounds. +try { + var_dump(grapheme_strpos("foo", "bar", -4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_stripos("foo", "bar", -4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_strrpos("foo", "bar", -4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_strripos("foo", "bar", -4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +echo "\n"; + +// TODO: substr is special. +var_dump(grapheme_substr("foo", 3)); +var_dump(grapheme_substr("foo", -3)); +//var_dump(grapheme_substr("foo", 4)); +//var_dump(grapheme_substr("foo", -4)); + +?> +--EXPECT-- +bool(false) +bool(false) +bool(false) +bool(false) + +bool(false) +bool(false) +bool(false) +bool(false) + +grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) + +grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) + +bool(false) +string(3) "foo" From 6436ddbfc8e79cfcc424741f4321e5b533c27a4f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 17:01:06 +0200 Subject: [PATCH 058/209] Handle out-of-bounds offset consistently in grapheme_* API Make sure we throw the same kind of error regardless of whether the offset is out-of-bounds in the fast path or in the slow path. --- ext/intl/grapheme/grapheme_string.c | 14 ++-- ext/intl/grapheme/grapheme_util.c | 39 +++++------ ext/intl/tests/grapheme_out_of_bounds.phpt | 76 ++++++++++++++++++++++ 3 files changed, 97 insertions(+), 32 deletions(-) diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index e987c176e1a79..c5d2c6585c679 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -129,21 +129,17 @@ PHP_FUNCTION(grapheme_strpos) RETURN_THROWS(); } - if (offset >= 0) { + if (offset >= 0 && grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0) { /* quick check to see if the string might be there * I realize that 'offset' is 'grapheme count offset' but will work in spite of that */ found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len); /* if it isn't there the we are done */ - if (!found) { - RETURN_FALSE; - } - - /* if it is there, and if the haystack is ascii, we are all done */ - if ( grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0 ) { + if (found) { RETURN_LONG(found - haystack); } + RETURN_FALSE; } /* do utf16 part of the strpos */ @@ -586,9 +582,7 @@ static void strstr_common_handler(INTERNAL_FUNCTION_PARAMETERS, int f_ignore_cas if ( !f_ignore_case ) { - /* ASCII optimization: quick check to see if the string might be there - * I realize that 'offset' is 'grapheme count offset' but will work in spite of that - */ + /* ASCII optimization: quick check to see if the string might be there */ found = php_memnstr(haystack, needle, needle_len, haystack + haystack_len); /* if it isn't there the we are done */ diff --git a/ext/intl/grapheme/grapheme_util.c b/ext/intl/grapheme/grapheme_util.c index 71d60749990c0..44592edaaa927 100644 --- a/ext/intl/grapheme/grapheme_util.c +++ b/ext/intl/grapheme/grapheme_util.c @@ -107,23 +107,12 @@ void grapheme_substr_ascii(char *str, size_t str_len, int32_t f, int32_t l, char } /* }}} */ -#define STRPOS_CHECK_STATUS(status, error) \ - if ( U_FAILURE( (status) ) ) { \ - intl_error_set_code( NULL, (status) ); \ - intl_error_set_custom_msg( NULL, (error), 0 ); \ - if (uhaystack) { \ - efree( uhaystack ); \ - } \ - if (uneedle) { \ - efree( uneedle ); \ - } \ - if(bi) { \ - ubrk_close (bi); \ - } \ - if(src) { \ - usearch_close(src); \ - } \ - return -1; \ +#define STRPOS_CHECK_STATUS(status, error) \ + if ( U_FAILURE( (status) ) ) { \ + intl_error_set_code( NULL, (status) ); \ + intl_error_set_custom_msg( NULL, (error), 0 ); \ + ret_pos = -1; \ + goto finish; \ } @@ -172,9 +161,10 @@ int32_t grapheme_strpos_utf16(char *haystack, size_t haystack_len, char *needle, if(offset != 0) { offset_pos = grapheme_get_haystack_offset(bi, offset); - if(offset_pos == -1) { - status = U_ILLEGAL_ARGUMENT_ERROR; - STRPOS_CHECK_STATUS(status, "Invalid search offset"); + if (offset_pos == -1) { + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); + ret_pos = -1; + goto finish; } status = U_ZERO_ERROR; usearch_setOffset(src, offset_pos, &status); @@ -201,14 +191,19 @@ int32_t grapheme_strpos_utf16(char *haystack, size_t haystack_len, char *needle, ret_pos = -1; } +finish: if (uhaystack) { efree( uhaystack ); } if (uneedle) { efree( uneedle ); } - ubrk_close (bi); - usearch_close (src); + if (bi) { + ubrk_close (bi); + } + if (src) { + usearch_close (src); + } return ret_pos; } diff --git a/ext/intl/tests/grapheme_out_of_bounds.phpt b/ext/intl/tests/grapheme_out_of_bounds.phpt index ab7a575e21bcd..ce74dc6dbc69f 100644 --- a/ext/intl/tests/grapheme_out_of_bounds.phpt +++ b/ext/intl/tests/grapheme_out_of_bounds.phpt @@ -8,6 +8,10 @@ var_dump(grapheme_strpos("foo", "bar", 3)); var_dump(grapheme_stripos("foo", "bar", 3)); var_dump(grapheme_strrpos("foo", "bar", 3)); var_dump(grapheme_strripos("foo", "bar", 3)); +var_dump(grapheme_strpos("äöü", "bar", 3)); +var_dump(grapheme_stripos("äöü", "bar", 3)); +var_dump(grapheme_strrpos("äöü", "bar", 3)); +var_dump(grapheme_strripos("äöü", "bar", 3)); echo "\n"; // Offset == -Length is legal. @@ -15,6 +19,17 @@ var_dump(grapheme_strpos("foo", "bar", -3)); var_dump(grapheme_stripos("foo", "bar", -3)); var_dump(grapheme_strrpos("foo", "bar", -3)); var_dump(grapheme_strripos("foo", "bar", -3)); +var_dump(grapheme_strpos("äöü", "bar", -3)); +var_dump(grapheme_stripos("äöü", "bar", -3)); +var_dump(grapheme_strrpos("äöü", "bar", -3)); +var_dump(grapheme_strripos("äöü", "bar", -3)); +echo "\n"; + +// Offset == Length is legal. +var_dump(grapheme_strpos("", "bar", 0)); +var_dump(grapheme_stripos("", "bar", 0)); +var_dump(grapheme_strrpos("", "bar", 0)); +var_dump(grapheme_strripos("", "bar", 0)); echo "\n"; // Positive out of bounds. @@ -38,6 +53,26 @@ try { } catch (ValueError $e) { echo $e->getMessage(), "\n"; } +try { + var_dump(grapheme_strpos("äöü", "bar", 4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_stripos("äöü", "bar", 4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_strrpos("äöü", "bar", 4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_strripos("äöü", "bar", 4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} echo "\n"; // Negative out of bounds. @@ -61,6 +96,26 @@ try { } catch (ValueError $e) { echo $e->getMessage(), "\n"; } +try { + var_dump(grapheme_strpos("äöü", "bar", -4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_stripos("äöü", "bar", -4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_strrpos("äöü", "bar", -4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(grapheme_strripos("äöü", "bar", -4)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} echo "\n"; // TODO: substr is special. @@ -75,17 +130,38 @@ bool(false) bool(false) bool(false) bool(false) +bool(false) +bool(false) +bool(false) +bool(false) + +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) bool(false) bool(false) bool(false) bool(false) +grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) From 73631e517f1edbc1c9cc42b8e01dbb36d638c18f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 17:04:06 +0200 Subject: [PATCH 059/209] Try to fix test --- ext/intl/tests/grapheme.phpt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/intl/tests/grapheme.phpt b/ext/intl/tests/grapheme.phpt index 18cf3fb6d5057..3fe02fcda78d2 100644 --- a/ext/intl/tests/grapheme.phpt +++ b/ext/intl/tests/grapheme.phpt @@ -973,8 +973,7 @@ find "a%CC%8ABca%CC%8A" in "o%CC%88a%CC%8AaA%CC%8AbCa%CC%8Adef" - grapheme_strri function grapheme_substr($string, $start, $length = -1) {} -substring of "abc" from "3" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) - = 3 == false **FAILED** +substring of "abc" from "3" - grapheme_substr = false == false substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false substring of "aoa%CC%8Abco%CC%88O" from "2" - grapheme_substr = a%CC%8Abco%CC%88O == a%CC%8Abco%CC%88O substring of "o%CC%88a%CC%8AaA%CC%8Abc" from "2" - grapheme_substr = aA%CC%8Abc == aA%CC%8Abc From 7fde9918af7663c3819e193800588952d1557d7b Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 21 Sep 2020 16:11:18 +0100 Subject: [PATCH 060/209] Refactor imap_mail()'s internal implementation to use zend_strings --- ext/imap/php_imap.c | 107 +++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 27ff2058c7a3b..6549f3f6fcc29 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3411,7 +3411,8 @@ PHP_FUNCTION(imap_mail_compose) /* }}} */ /* {{{ _php_imap_mail */ -int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *cc, char *bcc, char* rpath) +bool _php_imap_mail(zend_string *to, zend_string *subject, zend_string *message, zend_string *headers, + zend_string *cc, zend_string *bcc, zend_string* rpath) { #ifdef PHP_WIN32 int tsm_err; @@ -3420,6 +3421,9 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * int ret; #endif + ZEND_ASSERT(to && ZSTR_LEN(to) != 0); + ZEND_ASSERT(subject && ZSTR_LEN(subject) != 0); + #ifdef PHP_WIN32 char *tempMailTo; char *tsm_errmsg = NULL; @@ -3428,14 +3432,13 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * size_t offset, bufferLen = 0; size_t bt_len; + /* Add "To" field's necessary buffer length */ + bufferLen += ZSTR_LEN(to) + 6; if (headers) { - bufferLen += strlen(headers); - } - if (to) { - bufferLen += strlen(to) + 6; + bufferLen += ZSTR_LEN(headers); } if (cc) { - bufferLen += strlen(cc) + 6; + bufferLen += ZSTR_LEN(cc) + 6; } #define PHP_IMAP_CLEAN if (bufferTo) efree(bufferTo); if (bufferCc) efree(bufferCc); if (bufferBcc) efree(bufferBcc); if (bufferHeader) efree(bufferHeader); @@ -3443,41 +3446,41 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * bufferHeader = (char *)safe_emalloc(bufferLen, 1, 1); memset(bufferHeader, 0, bufferLen); - if (to && *to) { - strlcat(bufferHeader, "To: ", bufferLen + 1); - strlcat(bufferHeader, to, bufferLen + 1); - strlcat(bufferHeader, "\r\n", bufferLen + 1); - tempMailTo = estrdup(to); - bt_len = strlen(to); - bufferTo = (char *)safe_emalloc(bt_len, 1, 1); - bt_len++; - offset = 0; - addr = NULL; - rfc822_parse_adrlist(&addr, tempMailTo, "NO HOST"); - while (addr) { - if (addr->host == NULL || strcmp(addr->host, ERRHOST) == 0) { - PHP_IMAP_BAD_DEST; - } else { - bufferTo = safe_erealloc(bufferTo, bt_len, 1, strlen(addr->mailbox)); - bt_len += strlen(addr->mailbox); - bufferTo = safe_erealloc(bufferTo, bt_len, 1, strlen(addr->host)); - bt_len += strlen(addr->host); - offset += slprintf(bufferTo + offset, bt_len - offset, "%s@%s,", addr->mailbox, addr->host); - } - addr = addr->next; - } - efree(tempMailTo); - if (offset>0) { - bufferTo[offset-1] = 0; + + /* Handle "To" Field */ + strlcat(bufferHeader, "To: ", bufferLen + 1); + strlcat(bufferHeader, ZSTR_VAL(to), bufferLen + 1); + strlcat(bufferHeader, "\r\n", bufferLen + 1); + tempMailTo = estrdup(ZSTR_VAL(to)); + bt_len = ZSTR_LEN(to); + bufferTo = (char *)safe_emalloc(bt_len, 1, 1); + bt_len++; + offset = 0; + addr = NULL; + rfc822_parse_adrlist(&addr, tempMailTo, "NO HOST"); + while (addr) { + if (addr->host == NULL || strcmp(addr->host, ERRHOST) == 0) { + PHP_IMAP_BAD_DEST; + } else { + bufferTo = safe_erealloc(bufferTo, bt_len, 1, strlen(addr->mailbox)); + bt_len += strlen(addr->mailbox); + bufferTo = safe_erealloc(bufferTo, bt_len, 1, strlen(addr->host)); + bt_len += strlen(addr->host); + offset += slprintf(bufferTo + offset, bt_len - offset, "%s@%s,", addr->mailbox, addr->host); } + addr = addr->next; + } + efree(tempMailTo); + if (offset>0) { + bufferTo[offset-1] = 0; } - if (cc && *cc) { + if (cc && ZSTR_LEN(cc) != 0) { strlcat(bufferHeader, "Cc: ", bufferLen + 1); - strlcat(bufferHeader, cc, bufferLen + 1); + strlcat(bufferHeader, ZSTR_VAL(cc), bufferLen + 1); strlcat(bufferHeader, "\r\n", bufferLen + 1); - tempMailTo = estrdup(cc); - bt_len = strlen(cc); + tempMailTo = estrdup(ZSTR_VAL(cc)); + bt_len = ZSTR_LEN(cc); bufferCc = (char *)safe_emalloc(bt_len, 1, 1); bt_len++; offset = 0; @@ -3501,9 +3504,9 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * } } - if (bcc && *bcc) { - tempMailTo = estrdup(bcc); - bt_len = strlen(bcc); + if (bcc && ZSTR_LEN(bcc)) { + tempMailTo = estrdup(ZSTR_VAL(bcc)); + bt_len = ZSTR_LEN(bcc); bufferBcc = (char *)safe_emalloc(bt_len, 1, 1); bt_len++; offset = 0; @@ -3527,11 +3530,12 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * } } - if (headers && *headers) { - strlcat(bufferHeader, headers, bufferLen + 1); + if (headers && ZSTR_LEN(headers)) { + strlcat(bufferHeader, ZSTR_VAL(headers), bufferLen + 1); } - if (TSendMail(INI_STR("SMTP"), &tsm_err, &tsm_errmsg, bufferHeader, subject, bufferTo, message, bufferCc, bufferBcc, rpath) != SUCCESS) { + if (TSendMail(INI_STR("SMTP"), &tsm_err, &tsm_errmsg, bufferHeader, ZSTR_VAL(subject), + bufferTo, ZSTR_VAL(message), bufferCc, bufferBcc, ZSTR_VAL(rpath)) != SUCCESS) { if (tsm_errmsg) { php_error_docref(NULL, E_WARNING, "%s", tsm_errmsg); efree(tsm_errmsg); @@ -3548,15 +3552,15 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * } sendmail = popen(INI_STR("sendmail_path"), "w"); if (sendmail) { - if (rpath && rpath[0]) fprintf(sendmail, "From: %s\n", rpath); - fprintf(sendmail, "To: %s\n", to); - if (cc && cc[0]) fprintf(sendmail, "Cc: %s\n", cc); - if (bcc && bcc[0]) fprintf(sendmail, "Bcc: %s\n", bcc); - fprintf(sendmail, "Subject: %s\n", subject); + if (ZSTR_LEN(rpath) != 0) fprintf(sendmail, "From: %s\n", ZSTR_VAL(rpath)); + fprintf(sendmail, "To: %s\n", ZSTR_VAL(to)); + if (ZSTR_LEN(cc) != 0) fprintf(sendmail, "Cc: %s\n", ZSTR_VAL(cc)); + if (ZSTR_LEN(bcc) != 0) fprintf(sendmail, "Bcc: %s\n", ZSTR_VAL(bcc)); + fprintf(sendmail, "Subject: %s\n", ZSTR_VAL(subject)); if (headers != NULL) { - fprintf(sendmail, "%s\n", headers); + fprintf(sendmail, "%s\n", ZSTR_VAL(headers)); } - fprintf(sendmail, "\n%s\n", message); + fprintf(sendmail, "\n%s\n", ZSTR_VAL(message)); ret = pclose(sendmail); return ret != -1; @@ -3575,7 +3579,7 @@ PHP_FUNCTION(imap_mail) zend_string *to=NULL, *message=NULL, *headers=NULL, *subject=NULL, *cc=NULL, *bcc=NULL, *rpath=NULL; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "SSS|SSSS", &to, &subject, &message, + if (zend_parse_parameters(argc, "PPP|PPPP", &to, &subject, &message, &headers, &cc, &bcc, &rpath) == FAILURE) { RETURN_THROWS(); } @@ -3598,8 +3602,7 @@ PHP_FUNCTION(imap_mail) php_error_docref(NULL, E_WARNING, "No message string in mail command"); } - if (_php_imap_mail(ZSTR_VAL(to), ZSTR_VAL(subject), ZSTR_VAL(message), headers?ZSTR_VAL(headers):NULL, cc?ZSTR_VAL(cc):NULL, - bcc?ZSTR_VAL(bcc):NULL, rpath?ZSTR_VAL(rpath):NULL)) { + if (_php_imap_mail(to, subject, message, headers, cc, bcc, rpath)) { RETURN_TRUE; } else { RETURN_FALSE; From 5d7d5e2773d140be3c31a27be45e89cae0d218e2 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 21 Sep 2020 16:19:10 +0100 Subject: [PATCH 061/209] Add proper default values for optional arguments in IMAP Closes GH-6179 --- UPGRADING | 4 ++++ ext/imap/php_imap.c | 28 ++++++++++++---------------- ext/imap/php_imap.stub.php | 16 +++++----------- ext/imap/php_imap_arginfo.h | 24 ++++++++++-------------- 4 files changed, 31 insertions(+), 41 deletions(-) diff --git a/UPGRADING b/UPGRADING index fc3d283e6e26c..aaebf52de9a6f 100644 --- a/UPGRADING +++ b/UPGRADING @@ -325,6 +325,10 @@ PHP 8.0 UPGRADE NOTES . iconv() implementations which do not properly set errno in case of errors are no longer supported. +- IMAP: + . The unused default_host argument of imap_headerinfo() has been removed. + . The imap_header() function which is an alias of imap_headerinfo() has been removed. + - Intl: . The deprecated constant INTL_IDNA_VARIANT_2003 has been removed. RFC: https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003 diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 6549f3f6fcc29..d8c07a86dd778 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -702,10 +702,10 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) zend_long retries = 0, flags = NIL, cl_flags = NIL; MAILSTREAM *imap_stream; pils *imap_le_struct; - zval *params = NULL; + HashTable *params = NULL; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "PSS|lla", &mailbox, &user, + if (zend_parse_parameters(argc, "PSS|llh", &mailbox, &user, &passwd, &flags, &retries, ¶ms) == FAILURE) { RETURN_THROWS(); } @@ -723,7 +723,7 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) if (params) { zval *disabled_auth_method; - if ((disabled_auth_method = zend_hash_str_find(Z_ARRVAL_P(params), "DISABLE_AUTHENTICATOR", sizeof("DISABLE_AUTHENTICATOR") - 1)) != NULL) { + if ((disabled_auth_method = zend_hash_str_find(params, "DISABLE_AUTHENTICATOR", sizeof("DISABLE_AUTHENTICATOR") - 1)) != NULL) { switch (Z_TYPE_P(disabled_auth_method)) { case IS_STRING: if (Z_STRLEN_P(disabled_auth_method) > 1) { @@ -866,7 +866,7 @@ PHP_FUNCTION(imap_append) pils *imap_le_struct; STRING st; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS|SS", &streamind, &folder, &message, &flags, &internal_date) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS|S!S!", &streamind, &folder, &message, &flags, &internal_date) == FAILURE) { RETURN_THROWS(); } @@ -1603,7 +1603,6 @@ PHP_FUNCTION(imap_undelete) PHP_FUNCTION(imap_headerinfo) { zval *streamind; - zend_string *defaulthost = NULL; int argc = ZEND_NUM_ARGS(); zend_long msgno, fromlength, subjectlength; pils *imap_le_struct; @@ -1611,7 +1610,7 @@ PHP_FUNCTION(imap_headerinfo) ENVELOPE *en; char dummy[2000], fulladdress[MAILTMPLEN + 1]; - if (zend_parse_parameters(argc, "rl|llS", &streamind, &msgno, &fromlength, &subjectlength, &defaulthost) == FAILURE) { + if (zend_parse_parameters(argc, "rl|ll", &streamind, &msgno, &fromlength, &subjectlength) == FAILURE) { RETURN_THROWS(); } @@ -2645,9 +2644,8 @@ PHP_FUNCTION(imap_sort) char *search_criteria; SORTPGM *mypgm=NIL; SEARCHPGM *spg=NIL; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rll|lSS", &streamind, &pgm, &rev, &flags, &criteria, &charset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll|lS!S!", &streamind, &pgm, &rev, &flags, &criteria, &charset) == FAILURE) { RETURN_THROWS(); } @@ -2659,13 +2657,11 @@ PHP_FUNCTION(imap_sort) php_error_docref(NULL, E_WARNING, "Unrecognized sort criteria"); RETURN_FALSE; } - if (argc >= 4) { - if (flags < 0) { - php_error_docref(NULL, E_WARNING, "Search options parameter has to be greater than or equal to 0"); - RETURN_FALSE; - } + if (flags < 0) { + php_error_docref(NULL, E_WARNING, "Search options parameter has to be greater than or equal to 0"); + RETURN_FALSE; } - if (argc >= 5) { + if (criteria) { search_criteria = estrndup(ZSTR_VAL(criteria), ZSTR_LEN(criteria)); spg = mail_criteria(search_criteria); efree(search_criteria); @@ -2678,7 +2674,7 @@ PHP_FUNCTION(imap_sort) mypgm->function = (short) pgm; mypgm->next = NIL; - slst = mail_sort(imap_le_struct->imap_stream, (argc == 6 ? ZSTR_VAL(charset) : NIL), spg, mypgm, (argc >= 4 ? flags : NIL)); + slst = mail_sort(imap_le_struct->imap_stream, (charset ? ZSTR_VAL(charset) : NIL), spg, mypgm, flags); if (spg && !(flags & SE_FREE)) { mail_free_searchpgm(&spg); @@ -3579,7 +3575,7 @@ PHP_FUNCTION(imap_mail) zend_string *to=NULL, *message=NULL, *headers=NULL, *subject=NULL, *cc=NULL, *bcc=NULL, *rpath=NULL; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "PPP|PPPP", &to, &subject, &message, + if (zend_parse_parameters(argc, "PPP|P!P!P!P!", &to, &subject, &message, &headers, &cc, &bcc, &rpath) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/imap/php_imap.stub.php b/ext/imap/php_imap.stub.php index 9d2e1082c1a7c..0a7adc2736977 100644 --- a/ext/imap/php_imap.stub.php +++ b/ext/imap/php_imap.stub.php @@ -5,7 +5,7 @@ /** * @return resource|false */ -function imap_open(string $mailbox, string $user, string $password, int $options = 0, int $n_retries = 0, array $params = UNKNOWN) {} +function imap_open(string $mailbox, string $user, string $password, int $options = 0, int $n_retries = 0, array $params = []) {} /** * @param resource $stream_id @@ -27,13 +27,7 @@ function imap_num_recent($stream_id): int|false {} function imap_headers($stream_id): array|false {} /** @param resource $stream_id */ -function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {} - -/** - * @param resource $stream_id - * @alias imap_headerinfo - */ -function imap_header($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0, string $default_host = UNKNOWN): stdClass|false {} +function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0): stdClass|false {} function imap_rfc822_parse_headers(string $headers, string $default_host = "UNKNOWN"): stdClass {} @@ -148,7 +142,7 @@ function imap_subscribe($stream_id, string $mailbox): bool {} function imap_unsubscribe($stream_id, string $mailbox): bool {} /** @param resource $stream_id */ -function imap_append($stream_id, string $folder, string $message, string $options = UNKNOWN, string $internal_date = UNKNOWN): bool {} +function imap_append($stream_id, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {} /** @param resource $stream_id */ function imap_ping($stream_id): bool {} @@ -180,7 +174,7 @@ function imap_setflag_full($stream_id, string $sequence, string $flag, int $opti function imap_clearflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {} /** @param resource $stream_id */ -function imap_sort($stream_id, int $criteria, int $reverse, int $options = 0, string $search_criteria = UNKNOWN, string $charset = UNKNOWN): array|false {} +function imap_sort($stream_id, int $criteria, int $reverse, int $options = 0, ?string $search_criteria = null, ?string $charset = null): array|false {} /** @param resource $stream_id */ function imap_uid($stream_id, int $msg_no): int|false {} @@ -258,4 +252,4 @@ function imap_setacl($stream_id, string $mailbox, string $id, string $rights): b function imap_getacl($stream_id, string $mailbox): array|false {} #endif -function imap_mail(string $to, string $subject, string $message, string $additional_headers = UNKNOWN, string $cc = UNKNOWN, string $bcc = UNKNOWN, string $rpath = UNKNOWN): bool {} +function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $rpath = null): bool {} diff --git a/ext/imap/php_imap_arginfo.h b/ext/imap/php_imap_arginfo.h index 69fe25e4d0f4c..ffb60a034f890 100644 --- a/ext/imap/php_imap_arginfo.h +++ b/ext/imap/php_imap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4991f82d78672ab23044864fa6dd75851952965c */ + * Stub hash: e501d6869d721ad720a1a7c8b597b96e9591d5ed */ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_open, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0) @@ -7,7 +7,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_open, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, n_retries, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_reopen, 0, 2, _IS_BOOL, 0) @@ -37,11 +37,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_headerinfo, 0, 2, stdCl ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, from_length, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, subject_length, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_imap_header arginfo_imap_headerinfo - ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_rfc822_parse_headers, 0, 1, stdClass, 0) ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, default_host, IS_STRING, 0, "\"UNKNOWN\"") @@ -173,8 +170,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_append, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream_id) ZEND_ARG_TYPE_INFO(0, folder, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, internal_date, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, internal_date, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_imap_ping arginfo_imap_expunge @@ -217,8 +214,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_sort, 0, 3, MAY_BE_ARRAY|MA ZEND_ARG_TYPE_INFO(0, criteria, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, reverse, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO(0, search_criteria, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, search_criteria, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_uid, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) @@ -342,10 +339,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, additional_headers, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cc, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, bcc, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, rpath, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_headers, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cc, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bcc, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rpath, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -440,7 +437,6 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(imap_num_recent, arginfo_imap_num_recent) ZEND_FE(imap_headers, arginfo_imap_headers) ZEND_FE(imap_headerinfo, arginfo_imap_headerinfo) - ZEND_FALIAS(imap_header, imap_headerinfo, arginfo_imap_header) ZEND_FE(imap_rfc822_parse_headers, arginfo_imap_rfc822_parse_headers) ZEND_FE(imap_rfc822_write_address, arginfo_imap_rfc822_write_address) ZEND_FE(imap_rfc822_parse_adrlist, arginfo_imap_rfc822_parse_adrlist) From 82e14ff8e77cf818e3727b2efa46c0fc4e9db0dc Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 22 Sep 2020 18:32:21 +0100 Subject: [PATCH 062/209] Drop usage of E_RECOVERABLE_ERROR in Session extension --- ext/session/session.c | 19 ++++++++++--------- ext/session/tests/bug60860.phpt | 2 +- ext/session/tests/bug73100.phpt | 10 +++++++--- ...g_save_handler_ini_setting_in_runtime.phpt | 12 ++++++++++++ .../session_set_save_handler_class_014.phpt | 2 +- 5 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 ext/session/tests/error_when_setting_save_handler_ini_setting_in_runtime.phpt diff --git a/ext/session/session.c b/ext/session/session.c index 79b82f90f786f..bf05a547acc35 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -536,21 +536,18 @@ static void php_session_normalize_vars() /* {{{ */ static PHP_INI_MH(OnUpdateSaveHandler) /* {{{ */ { const ps_module *tmp; + int err_type = E_ERROR; SESSION_CHECK_ACTIVE_STATE; SESSION_CHECK_OUTPUT_STATE; tmp = _php_find_ps_module(ZSTR_VAL(new_value)); - if (PG(modules_activated) && !tmp) { - int err_type; - - if (stage == ZEND_INI_STAGE_RUNTIME) { - err_type = E_WARNING; - } else { - err_type = E_ERROR; - } + if (stage == ZEND_INI_STAGE_RUNTIME) { + err_type = E_WARNING; + } + if (PG(modules_activated) && !tmp) { /* Do not output error when restoring ini options. */ if (stage != ZEND_INI_STAGE_DEACTIVATE) { php_error_docref(NULL, err_type, "Session save handler \"%s\" cannot be found", ZSTR_VAL(new_value)); @@ -561,7 +558,7 @@ static PHP_INI_MH(OnUpdateSaveHandler) /* {{{ */ /* "user" save handler should not be set by user */ if (!PS(set_handler) && tmp == ps_user_ptr) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Session save handler \"user\" cannot be set by ini_set() or session_module_name()"); + php_error_docref(NULL, err_type, "Session save handler \"user\" cannot be set by ini_set()"); return FAILURE; } @@ -1917,6 +1914,10 @@ PHP_FUNCTION(session_module_name) } if (name) { + if (zend_string_equals_literal_ci(name, "user")) { + zend_argument_value_error(1, "cannot be \"user\""); + RETURN_THROWS(); + } if (!_php_find_ps_module(ZSTR_VAL(name))) { php_error_docref(NULL, E_WARNING, "Session handler module \"%s\" cannot be found", ZSTR_VAL(name)); diff --git a/ext/session/tests/bug60860.phpt b/ext/session/tests/bug60860.phpt index 487fba53074c6..fbd8a6eeab9ed 100644 --- a/ext/session/tests/bug60860.phpt +++ b/ext/session/tests/bug60860.phpt @@ -15,5 +15,5 @@ echo "ok\n"; ?> --EXPECT-- -Recoverable fatal error: PHP Startup: Session save handler "user" cannot be set by ini_set() or session_module_name() in Unknown on line 0 +Fatal error: PHP Startup: Session save handler "user" cannot be set by ini_set() in Unknown on line 0 ok diff --git a/ext/session/tests/bug73100.phpt b/ext/session/tests/bug73100.phpt index a59e9f41cc123..a9c140aa88bd0 100644 --- a/ext/session/tests/bug73100.phpt +++ b/ext/session/tests/bug73100.phpt @@ -14,7 +14,11 @@ var_dump(session_start()); session_module_name("user"); var_dump(session_destroy()); -session_module_name("user"); +try { + session_module_name("user"); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> ===DONE=== --EXPECTF-- @@ -22,5 +26,5 @@ bool(true) Warning: session_module_name(): Session save handler module cannot be changed when a session is active in %s on line %d bool(true) - -Recoverable fatal error: session_module_name(): Session save handler "user" cannot be set by ini_set() or session_module_name() in %s on line %d +session_module_name(): Argument #1 ($module) cannot be "user" +===DONE=== diff --git a/ext/session/tests/error_when_setting_save_handler_ini_setting_in_runtime.phpt b/ext/session/tests/error_when_setting_save_handler_ini_setting_in_runtime.phpt new file mode 100644 index 0000000000000..f176a7ae79d47 --- /dev/null +++ b/ext/session/tests/error_when_setting_save_handler_ini_setting_in_runtime.phpt @@ -0,0 +1,12 @@ +--TEST-- +Error when setting session.save_handler to user via ini_set +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: ini_set(): Session save handler "user" cannot be set by ini_set() in %s on line %d diff --git a/ext/session/tests/session_set_save_handler_class_014.phpt b/ext/session/tests/session_set_save_handler_class_014.phpt index 6eee4f8b6a31f..ff1b84a87e9d8 100644 --- a/ext/session/tests/session_set_save_handler_class_014.phpt +++ b/ext/session/tests/session_set_save_handler_class_014.phpt @@ -21,5 +21,5 @@ session_set_save_handler($handler); session_start(); ?> --EXPECT-- -Recoverable fatal error: PHP Startup: Session save handler "user" cannot be set by ini_set() or session_module_name() in Unknown on line 0 +Fatal error: PHP Startup: Session save handler "user" cannot be set by ini_set() in Unknown on line 0 *** Testing session_set_save_handler() : calling default handler when save_handler=user *** From 8fef83dd3ceb6105f40ab4b0748a5360f1d6adf2 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 19 Apr 2020 14:35:25 +0200 Subject: [PATCH 063/209] Promote warnings to error in DOM extension Closes GH-5418 --- ext/dom/attr.c | 4 +- ext/dom/cdatasection.c | 2 +- ext/dom/comment.c | 2 +- ext/dom/document.c | 5 +- ext/dom/documentfragment.c | 2 +- ext/dom/domimplementation.c | 18 +++--- ext/dom/element.c | 34 +++++------ ext/dom/entityreference.c | 4 +- ext/dom/namednodemap.c | 58 +++++++++---------- ext/dom/node.c | 40 ++++++++----- ext/dom/php_dom.c | 11 ++-- ext/dom/php_dom.h | 4 +- ext/dom/php_dom.stub.php | 4 +- ext/dom/php_dom_arginfo.h | 2 +- ext/dom/processinginstruction.c | 4 +- .../tests/DOMAttr_ownerElement_error_001.phpt | 13 +++-- ext/dom/tests/DOMDocument_adoptNode.phpt | 10 +++- ext/dom/tests/DOMDocument_encoding_basic.phpt | 18 +++--- ext/dom/tests/DOMNode_C14NFile_basic.phpt | 12 ++++ ext/dom/tests/DOMNode_C14N_basic.phpt | 13 +++++ ext/dom/tests/bug36756.phpt | 15 +++-- ext/dom/tests/bug77569.phpt | 10 +++- ext/dom/tests/domxpath.phpt | 15 +++++ ext/dom/text.c | 13 ++++- ext/dom/xpath.c | 38 ++++++------ 25 files changed, 208 insertions(+), 143 deletions(-) diff --git a/ext/dom/attr.c b/ext/dom/attr.c index 99178bfe3e9ba..e348f8fc5abaf 100644 --- a/ext/dom/attr.c +++ b/ext/dom/attr.c @@ -50,14 +50,14 @@ PHP_METHOD(DOMAttr, __construct) name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { php_dom_throw_error(INVALID_CHARACTER_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } nodep = xmlNewProp(NULL, (xmlChar *) name, (xmlChar *) value); if (!nodep) { php_dom_throw_error(INVALID_STATE_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } oldnode = dom_object_get_node(intern); diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c index ce62377917745..2d6fd8dc05c6c 100644 --- a/ext/dom/cdatasection.c +++ b/ext/dom/cdatasection.c @@ -46,7 +46,7 @@ PHP_METHOD(DOMCdataSection, __construct) if (!nodep) { php_dom_throw_error(INVALID_STATE_ERR, 1); - return; + RETURN_THROWS(); } intern = Z_DOMOBJ_P(ZEND_THIS); diff --git a/ext/dom/comment.c b/ext/dom/comment.c index db2341b72584f..79588f0c87abb 100644 --- a/ext/dom/comment.c +++ b/ext/dom/comment.c @@ -46,7 +46,7 @@ PHP_METHOD(DOMComment, __construct) if (!nodep) { php_dom_throw_error(INVALID_STATE_ERR, 1); - return; + RETURN_THROWS(); } intern = Z_DOMOBJ_P(ZEND_THIS); diff --git a/ext/dom/document.c b/ext/dom/document.c index 6ff1750137187..b580842667d3a 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -136,7 +136,7 @@ int dom_document_encoding_read(dom_object *obj, zval *retval) return SUCCESS; } -int dom_document_encoding_write(dom_object *obj, zval *newval) +zend_result dom_document_encoding_write(dom_object *obj, zval *newval) { xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj); zend_string *str; @@ -161,7 +161,8 @@ int dom_document_encoding_write(dom_object *obj, zval *newval) } docp->encoding = xmlStrdup((const xmlChar *) ZSTR_VAL(str)); } else { - php_error_docref(NULL, E_WARNING, "Invalid Document Encoding"); + zend_value_error("Invalid document encoding"); + return FAILURE; } zend_string_release_ex(str, 0); diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index 641c3f5b34d45..051416792d349 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -44,7 +44,7 @@ PHP_METHOD(DOMDocumentFragment, __construct) if (!nodep) { php_dom_throw_error(INVALID_STATE_ERR, 1); - return; + RETURN_THROWS(); } intern = Z_DOMOBJ_P(ZEND_THIS); diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index 86ec4a23684fe..b195af5549c66 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -67,8 +67,8 @@ PHP_METHOD(DOMImplementation, createDocumentType) } if (name_len == 0) { - php_error_docref(NULL, E_WARNING, "qualifiedName is required"); - RETURN_FALSE; + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); } if (publicid_len > 0) { @@ -134,12 +134,12 @@ PHP_METHOD(DOMImplementation, createDocument) if (node != NULL) { DOM_GET_OBJ(doctype, node, xmlDtdPtr, doctobj); if (doctype->type == XML_DOCUMENT_TYPE_NODE) { - php_error_docref(NULL, E_WARNING, "Invalid DocumentType object"); - RETURN_FALSE; + zend_argument_value_error(3, "is an invalid DocumentType object"); + RETURN_THROWS(); } if (doctype->doc != NULL) { php_dom_throw_error(WRONG_DOCUMENT_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } } else { doctobj = NULL; @@ -163,7 +163,7 @@ PHP_METHOD(DOMImplementation, createDocument) xmlFree(localname); } php_dom_throw_error(errorcode, 1); - RETURN_FALSE; + RETURN_THROWS(); } /* currently letting libxml2 set the version string */ @@ -195,9 +195,9 @@ PHP_METHOD(DOMImplementation, createDocument) } xmlFreeDoc(docp); xmlFree(localname); - /* Need some type of error here */ - php_error_docref(NULL, E_WARNING, "Unexpected Error"); - RETURN_FALSE; + /* Need some better type of error here */ + php_dom_throw_error(PHP_ERR, 1); + RETURN_THROWS(); } nodep->nsDef = nsptr; diff --git a/ext/dom/element.c b/ext/dom/element.c index 41bc7296ca875..317619001beea 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -49,7 +49,7 @@ PHP_METHOD(DOMElement, __construct) name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { php_dom_throw_error(INVALID_CHARACTER_ERR, 1); - return; + RETURN_THROWS(); } /* Namespace logic is separate and only when uri passed in to insure no BC breakage */ @@ -71,7 +71,7 @@ PHP_METHOD(DOMElement, __construct) xmlFreeNode(nodep); } php_dom_throw_error(errorcode, 1); - return; + RETURN_THROWS(); } } else { /* If you don't pass a namespace uri, then you can't set a prefix */ @@ -80,14 +80,14 @@ PHP_METHOD(DOMElement, __construct) xmlFree(localname); xmlFree(prefix); php_dom_throw_error(NAMESPACE_ERR, 1); - return; + RETURN_THROWS(); } nodep = xmlNewNode(NULL, (xmlChar *) name); } if (!nodep) { php_dom_throw_error(INVALID_STATE_ERR, 1); - return; + RETURN_THROWS(); } if (value_len > 0) { @@ -255,14 +255,14 @@ PHP_METHOD(DOMElement, setAttribute) } if (name_len == 0) { - php_error_docref(NULL, E_WARNING, "Attribute Name is required"); - RETURN_FALSE; + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); } name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { php_dom_throw_error(INVALID_CHARACTER_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); @@ -294,8 +294,8 @@ PHP_METHOD(DOMElement, setAttribute) attr = (xmlNodePtr)xmlSetProp(nodep, (xmlChar *) name, (xmlChar *)value); } if (!attr) { - php_error_docref(NULL, E_WARNING, "No such attribute '%s'", name); - RETURN_FALSE; + zend_argument_value_error(1, "must be a valid XML attribute"); + RETURN_THROWS(); } DOM_RET_OBJ(attr, &ret, intern); @@ -424,8 +424,8 @@ PHP_METHOD(DOMElement, setAttributeNode) DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); if (attrp->type != XML_ATTRIBUTE_NODE) { - php_error_docref(NULL, E_WARNING, "Attribute node is required"); - RETURN_FALSE; + zend_argument_value_error(1, "must have the node attribute"); + RETURN_THROWS(); } if (!(attrp->doc == NULL || attrp->doc == nodep->doc)) { @@ -628,8 +628,8 @@ PHP_METHOD(DOMElement, setAttributeNS) } if (name_len == 0) { - php_error_docref(NULL, E_WARNING, "Attribute Name is required"); - RETURN_FALSE; + zend_argument_value_error(2, "cannot be empty"); + RETURN_THROWS(); } DOM_GET_OBJ(elemp, id, xmlNodePtr, intern); @@ -873,10 +873,10 @@ PHP_METHOD(DOMElement, setAttributeNodeNS) DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); - if (attrp->type != XML_ATTRIBUTE_NODE) { - php_error_docref(NULL, E_WARNING, "Attribute node is required"); - RETURN_FALSE; - } + /* ZPP Guarantees that a DOMAttr class is given, as it is converted to a xmlAttr + * to pass to libxml (see http://www.xmlsoft.org/html/libxml-tree.html#xmlAttr) + * if it is not of type XML_ATTRIBUTE_NODE it indicates a bug somewhere */ + ZEND_ASSERT(attrp->type == XML_ATTRIBUTE_NODE); if (!(attrp->doc == NULL || attrp->doc == nodep->doc)) { php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document)); diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c index 4e45119b48f06..635cfe7653c43 100644 --- a/ext/dom/entityreference.c +++ b/ext/dom/entityreference.c @@ -46,14 +46,14 @@ PHP_METHOD(DOMEntityReference, __construct) name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { php_dom_throw_error(INVALID_CHARACTER_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } node = xmlNewReference(NULL, (xmlChar *) name); if (!node) { php_dom_throw_error(INVALID_STATE_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } intern = Z_DOMOBJ_P(ZEND_THIS); diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c index fd96003e565f8..26e0551f3bc87 100644 --- a/ext/dom/namednodemap.c +++ b/ext/dom/namednodemap.c @@ -146,44 +146,42 @@ PHP_METHOD(DOMNamedNodeMap, item) if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { RETURN_THROWS(); } - if (index >= 0) { - if (ZEND_LONG_INT_OVFL(index)) { - php_error_docref(NULL, E_WARNING, "Invalid index"); - RETURN_NULL(); - } + if (index < 0 || ZEND_LONG_INT_OVFL(index)) { + zend_argument_value_error(1, "must be between 0 and %d", INT_MAX); + RETURN_THROWS(); + } - intern = Z_DOMOBJ_P(id); + intern = Z_DOMOBJ_P(id); - objmap = (dom_nnodemap_object *)intern->ptr; + objmap = (dom_nnodemap_object *)intern->ptr; - if (objmap != NULL) { - if ((objmap->nodetype == XML_NOTATION_NODE) || - objmap->nodetype == XML_ENTITY_NODE) { - if (objmap->ht) { - if (objmap->nodetype == XML_ENTITY_NODE) { - itemnode = php_dom_libxml_hash_iter(objmap->ht, index); - } else { - itemnode = php_dom_libxml_notation_iter(objmap->ht, index); - } + if (objmap != NULL) { + if ((objmap->nodetype == XML_NOTATION_NODE) || + objmap->nodetype == XML_ENTITY_NODE) { + if (objmap->ht) { + if (objmap->nodetype == XML_ENTITY_NODE) { + itemnode = php_dom_libxml_hash_iter(objmap->ht, index); + } else { + itemnode = php_dom_libxml_notation_iter(objmap->ht, index); } - } else { - nodep = dom_object_get_node(objmap->baseobj); - if (nodep) { - curnode = (xmlNodePtr)nodep->properties; - count = 0; - while (count < index && curnode != NULL) { - count++; - curnode = (xmlNodePtr)curnode->next; - } - itemnode = curnode; + } + } else { + nodep = dom_object_get_node(objmap->baseobj); + if (nodep) { + curnode = (xmlNodePtr)nodep->properties; + count = 0; + while (count < index && curnode != NULL) { + count++; + curnode = (xmlNodePtr)curnode->next; } + itemnode = curnode; } } + } - if (itemnode) { - DOM_RET_OBJ(itemnode, &ret, objmap->baseobj); - return; - } + if (itemnode) { + DOM_RET_OBJ(itemnode, &ret, objmap->baseobj); + return; } RETVAL_NULL(); diff --git a/ext/dom/node.c b/ext/dom/node.c index 16a6c6cc54e1e..a6f88b5c0f1bb 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -97,8 +97,7 @@ int dom_node_node_name_read(dom_object *obj, zval *retval) case XML_TEXT_NODE: str = "#text"; break; - default: - php_error_docref(NULL, E_WARNING, "Invalid Node Type"); + EMPTY_SWITCH_DEFAULT_CASE(); } if (str != NULL) { @@ -875,6 +874,7 @@ PHP_METHOD(DOMNode, insertBefore) } if (child->type == XML_DOCUMENT_FRAG_NODE && child->children == NULL) { + /* TODO Drop Warning? */ php_error_docref(NULL, E_WARNING, "Document Fragment is empty"); RETURN_FALSE; } @@ -981,8 +981,8 @@ PHP_METHOD(DOMNode, insertBefore) } if (NULL == new_child) { - php_error_docref(NULL, E_WARNING, "Couldn't add newnode as the previous sibling of refnode"); - RETURN_FALSE; + zend_throw_error(NULL, "Cannot add newnode as the previous sibling of refnode"); + RETURN_THROWS(); } dom_reconcile_ns(parentp->doc, new_child); @@ -1074,7 +1074,7 @@ PHP_METHOD(DOMNode, replaceChild) DOM_RET_OBJ(oldchild, &ret, intern); return; } else { - php_dom_throw_error(NOT_FOUND_ERR, dom_get_strict_error(intern->document)); + php_dom_throw_error(NOT_FOUND_ERR, stricterror); RETURN_FALSE; } } @@ -1173,6 +1173,7 @@ PHP_METHOD(DOMNode, appendChild) } if (child->type == XML_DOCUMENT_FRAG_NODE && child->children == NULL) { + /* TODO Drop Warning? */ php_error_docref(NULL, E_WARNING, "Document Fragment is empty"); RETURN_FALSE; } @@ -1221,6 +1222,7 @@ PHP_METHOD(DOMNode, appendChild) if (new_child == NULL) { new_child = xmlAddChild(nodep, child); if (new_child == NULL) { + // TODO Convert to Error? php_error_docref(NULL, E_WARNING, "Couldn't append node"); RETURN_FALSE; } @@ -1570,8 +1572,8 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ docp = nodep->doc; if (! docp) { - php_error_docref(NULL, E_WARNING, "Node must be associated with a document"); - RETURN_FALSE; + zend_throw_error(NULL, "Node must be associated with a document"); + RETURN_THROWS(); } if (xpath_array == NULL) { @@ -1587,8 +1589,8 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlXPathFreeObject(xpathobjp); } xmlXPathFreeContext(ctxp); - php_error_docref(NULL, E_WARNING, "XPath query did not return a nodeset."); - RETURN_FALSE; + zend_throw_error(NULL, "XPath query did not return a nodeset"); + RETURN_THROWS(); } } } else { @@ -1598,12 +1600,17 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ char *xquery; tmp = zend_hash_str_find(ht, "query", sizeof("query")-1); - if (tmp && Z_TYPE_P(tmp) == IS_STRING) { - xquery = Z_STRVAL_P(tmp); - } else { - php_error_docref(NULL, E_WARNING, "'query' missing from xpath array or is not a string"); - RETURN_FALSE; + if (!tmp) { + /* if mode == 0 then $xpath arg is 3, if mode == 1 then $xpath is 4 */ + zend_argument_value_error(3 + mode, "must have a \"query\" key"); + RETURN_THROWS(); + } + if (Z_TYPE_P(tmp) != IS_STRING) { + /* if mode == 0 then $xpath arg is 3, if mode == 1 then $xpath is 4 */ + zend_argument_type_error(3 + mode, "\"query\" option must be a string, %s given", zend_zval_type_name(tmp)); + RETURN_THROWS(); } + xquery = Z_STRVAL_P(tmp); ctxp = xmlXPathNewContext(docp); ctxp->node = nodep; @@ -1631,8 +1638,8 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlXPathFreeObject(xpathobjp); } xmlXPathFreeContext(ctxp); - php_error_docref(NULL, E_WARNING, "XPath query did not return a nodeset."); - RETURN_FALSE; + zend_throw_error(NULL, "XPath query did not return a nodeset"); + RETURN_THROWS(); } } @@ -1738,6 +1745,7 @@ PHP_METHOD(DOMNode, getNodePath) value = (char *) xmlGetNodePath(nodep); if (value == NULL) { + /* TODO Research if can return empty string */ RETURN_NULL(); } else { RETVAL_STRING(value); diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 8eae00fc03bbe..78d22f6a5e05c 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -317,7 +317,9 @@ zval *dom_read_property(zend_object *object, zend_string *name, int type, void * if (obj->prop_handler != NULL) { hnd = zend_hash_find_ptr(obj->prop_handler, name); } else if (instanceof_function(obj->std.ce, dom_node_class_entry)) { - php_error(E_WARNING, "Couldn't fetch %s. Node no longer exists", ZSTR_VAL(obj->std.ce->name)); + zend_throw_error(NULL, "Couldn't fetch %s. Node no longer exists", ZSTR_VAL(obj->std.ce->name)); + retval = &EG(uninitialized_zval); + return retval; } if (hnd) { @@ -466,8 +468,8 @@ PHP_FUNCTION(dom_import_simplexml) if (nodep && nodeobj && (nodep->type == XML_ELEMENT_NODE || nodep->type == XML_ATTRIBUTE_NODE)) { DOM_RET_OBJ((xmlNodePtr) nodep, &ret, (dom_object *)nodeobj); } else { - php_error_docref(NULL, E_WARNING, "Invalid Nodetype to import"); - RETURN_NULL(); + zend_argument_value_error(1, "is not a valid node type"); + RETURN_THROWS(); } } /* }}} */ @@ -1208,7 +1210,8 @@ PHP_DOM_EXPORT zend_bool php_dom_create_object(xmlNodePtr obj, zval *return_valu break; } default: - php_error_docref(NULL, E_WARNING, "Unsupported node type: %d", obj->type); + /* TODO Convert to a ZEND assertion? */ + zend_throw_error(NULL, "Unsupported node type: %d", obj->type); ZVAL_NULL(return_value); return 0; } diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index 285980b64644b..24e1ea646a05d 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -151,8 +151,8 @@ entry = zend_register_internal_class_ex(&ce, parent_ce); } #define DOM_NOT_IMPLEMENTED() \ - php_error_docref(NULL, E_WARNING, "Not yet implemented"); \ - return; + zend_throw_error(NULL, "Not yet implemented"); \ + RETURN_THROWS(); #define DOM_NODELIST 0 #define DOM_NAMEDNODEMAP 1 diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index 5f15f99e174e5..bce79c9177d61 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -201,7 +201,7 @@ public function hasAttributeNS(?string $namespace, string $localName) {} /** @return bool */ public function removeAttribute(string $qualifiedName) {} - /** @return DOMAttr|false */ + /** @return void */ public function removeAttributeNS(?string $namespace, string $localName) {} /** @return DOMAttr|false */ @@ -210,7 +210,7 @@ public function removeAttributeNode(string $qualifiedName) {} /** @return DOMAttr|bool */ public function setAttribute(string $qualifiedName, string $value) {} - /** @return bool|null */ + /** @return void */ public function setAttributeNS(?string $namespace, string $qualifiedName, string $value) {} /** @return DOMAttr|null|false */ diff --git a/ext/dom/php_dom_arginfo.h b/ext/dom/php_dom_arginfo.h index d5da40e46393f..fb8aaf59f23d9 100644 --- a/ext/dom/php_dom_arginfo.h +++ b/ext/dom/php_dom_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8ac9356f9b19b84e98d335bc9d091b022a0f549d */ + * Stub hash: 128108b08807ce0b125fc7b963bf3c5b77e6987a */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 1) ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0) diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c index 9255213e7162a..73367442eb1c7 100644 --- a/ext/dom/processinginstruction.c +++ b/ext/dom/processinginstruction.c @@ -46,14 +46,14 @@ PHP_METHOD(DOMProcessingInstruction, __construct) name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { php_dom_throw_error(INVALID_CHARACTER_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } nodep = xmlNewPI((xmlChar *) name, (xmlChar *) value); if (!nodep) { php_dom_throw_error(INVALID_STATE_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } intern = Z_DOMOBJ_P(ZEND_THIS); diff --git a/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt b/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt index e57c3da913c1e..67a66ae16ea35 100644 --- a/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt +++ b/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt @@ -14,10 +14,11 @@ $document->appendChild($root); $attr = $root->setAttribute('category', 'books'); $document->removeChild($root); $root = null; -var_dump($attr->ownerElement); +try { + var_dump($attr->ownerElement); +} catch (\Error $e) { + echo get_class($e) . ': ' . $e->getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- -Warning: Couldn't fetch DOMAttr. Node no longer exists in %s on line %d - -Warning: Undefined property: DOMAttr::$ownerElement in %s on line %d -NULL +--EXPECT-- +Error: Couldn't fetch DOMAttr. Node no longer exists diff --git a/ext/dom/tests/DOMDocument_adoptNode.phpt b/ext/dom/tests/DOMDocument_adoptNode.phpt index 5fc8e79d9dc31..0f0a32ae498ff 100644 --- a/ext/dom/tests/DOMDocument_adoptNode.phpt +++ b/ext/dom/tests/DOMDocument_adoptNode.phpt @@ -10,7 +10,11 @@ require_once('skipif.inc'); $dom = new DOMDocument(); $dom->loadXML(""); -$dom->adoptNode($dom->documentElement); +try { + $dom->adoptNode($dom->documentElement); +} catch (\Error $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- -Warning: DOMDocument::adoptNode(): Not yet implemented in %s +--EXPECT-- +Not yet implemented diff --git a/ext/dom/tests/DOMDocument_encoding_basic.phpt b/ext/dom/tests/DOMDocument_encoding_basic.phpt index 6ac405da69859..925c84d5f185e 100644 --- a/ext/dom/tests/DOMDocument_encoding_basic.phpt +++ b/ext/dom/tests/DOMDocument_encoding_basic.phpt @@ -19,10 +19,14 @@ if( !$dom ) exit; } -echo "Empty Encoding Read: {$dom->encoding}\n"; +echo "Empty Encoding Read: '{$dom->encoding}'\n"; -$ret = $dom->encoding = 'NYPHP DOMinatrix'; -echo "Adding invalid encoding: $ret\n"; +try { + $ret = $dom->encoding = 'NYPHP DOMinatrix'; + echo "Adding invalid encoding: $ret\n"; +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} $ret = $dom->encoding = 'ISO-8859-1'; echo "Adding ISO-8859-1 encoding: $ret\n"; @@ -38,11 +42,9 @@ echo "UTF-16 Encoding Read: {$dom->encoding}\n"; ?> ---EXPECTF-- -Empty Encoding Read: - -Warning: main(): Invalid Document Encoding in %s on line %d -Adding invalid encoding: NYPHP DOMinatrix +--EXPECT-- +Empty Encoding Read: '' +Invalid document encoding Adding ISO-8859-1 encoding: ISO-8859-1 ISO-8859-1 Encoding Read: ISO-8859-1 Adding UTF-8 encoding: UTF-8 diff --git a/ext/dom/tests/DOMNode_C14NFile_basic.phpt b/ext/dom/tests/DOMNode_C14NFile_basic.phpt index b006e47deb7ad..85a8b6f1a51bd 100644 --- a/ext/dom/tests/DOMNode_C14NFile_basic.phpt +++ b/ext/dom/tests/DOMNode_C14NFile_basic.phpt @@ -27,6 +27,16 @@ $node = $doc->getElementsByTagName('title')->item(0); var_dump($node->C14NFile($output)); $content = file_get_contents($output); var_dump($content); +try { + var_dump($node->C14NFile($output, false, false, [])); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + var_dump($node->C14NFile($output, false, false, ['query' => []])); +} catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> --CLEAN-- The Grapes of Wrath" +DOMNode::C14NFile(): Argument #4 ($xpath) must have a "query" key +DOMNode::C14NFile(): Argument #4 ($xpath) "query" option must be a string, array given diff --git a/ext/dom/tests/DOMNode_C14N_basic.phpt b/ext/dom/tests/DOMNode_C14N_basic.phpt index bbfd7bcefb298..79a5366e222f5 100644 --- a/ext/dom/tests/DOMNode_C14N_basic.phpt +++ b/ext/dom/tests/DOMNode_C14N_basic.phpt @@ -24,6 +24,19 @@ $doc = new DOMDocument(); $doc->loadXML($xml); $node = $doc->getElementsByTagName('title')->item(0); var_dump($node->C14N()); + +try { + var_dump($node->C14N(false, false, [])); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + var_dump($node->C14N(false, false, ['query' => []])); +} catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> --EXPECT-- string(34) "The Grapes of Wrath" +DOMNode::C14N(): Argument #3 ($xpath) must have a "query" key +DOMNode::C14N(): Argument #3 ($xpath) "query" option must be a string, array given diff --git a/ext/dom/tests/bug36756.phpt b/ext/dom/tests/bug36756.phpt index ccf9ba5049bb1..bf7aa20276bf0 100644 --- a/ext/dom/tests/bug36756.phpt +++ b/ext/dom/tests/bug36756.phpt @@ -13,7 +13,6 @@ $node = $xpath->query('/root')->item(0); echo $node->nodeName . "\n"; $dom->removeChild($GLOBALS['dom']->firstChild); echo "nodeType: " . $node->nodeType . "\n"; - /* Node gets destroyed during removeChild */ $dom->loadXML(''); $xpath = new DOMXpath($dom); @@ -21,15 +20,15 @@ $node = $xpath->query('//child')->item(0); echo $node->nodeName . "\n"; $GLOBALS['dom']->removeChild($GLOBALS['dom']->firstChild); -echo "nodeType: " . $node->nodeType . "\n"; +try { + echo "nodeType: " . $node->nodeType . "\n"; +} catch (\Error $e) { + echo get_class($e) . ': ' . $e->getMessage() .\PHP_EOL; +} ?> ---EXPECTF-- +--EXPECT-- root nodeType: 1 child - -Warning: Couldn't fetch DOMElement. Node no longer exists in %sbug36756.php on line %d - -Warning: Undefined property: DOMElement::$nodeType in %s on line %d -nodeType: +Error: Couldn't fetch DOMElement. Node no longer exists diff --git a/ext/dom/tests/bug77569.phpt b/ext/dom/tests/bug77569.phpt index 9eef2af65a788..4c63e263e47d6 100644 --- a/ext/dom/tests/bug77569.phpt +++ b/ext/dom/tests/bug77569.phpt @@ -8,7 +8,11 @@ if (!extension_loaded('dom')) die('skip dom extension not available'); createDocument("", ""); -$dom->encoding = null; +try { + $dom->encoding = null; +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- -Warning: main(): Invalid Document Encoding in %s on line %d +--EXPECT-- +Invalid document encoding diff --git a/ext/dom/tests/domxpath.phpt b/ext/dom/tests/domxpath.phpt index f67b2584aacba..32aaffee01869 100644 --- a/ext/dom/tests/domxpath.phpt +++ b/ext/dom/tests/domxpath.phpt @@ -50,9 +50,24 @@ $root->appendChild($dom->createElementNS("urn::default", "testnode", 5)); $avg = $xpath->evaluate('number(php:function("MyAverage", //def:testnode))'); var_dump($avg); + +try { + $xpath->registerPHPFunctions('non_existent'); + $avg = $xpath->evaluate('number(php:function("non_existent", //def:testnode))'); +} catch (\Error $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + $xpath->registerPhpFunctions(['non_existant']); + $avg = $xpath->evaluate('number(php:function("non_existent", //def:testnode))'); +} catch (\Error $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> --EXPECT-- myval float(1) bool(true) float(4) +Unable to call handler non_existent() +Unable to call handler non_existent() diff --git a/ext/dom/text.c b/ext/dom/text.c index b1053b2039bfc..7a45be246360e 100644 --- a/ext/dom/text.c +++ b/ext/dom/text.c @@ -47,7 +47,7 @@ PHP_METHOD(DOMText, __construct) if (!nodep) { php_dom_throw_error(INVALID_STATE_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } intern = Z_DOMOBJ_P(ZEND_THIS); @@ -122,17 +122,25 @@ PHP_METHOD(DOMText, splitText) } DOM_GET_OBJ(node, id, xmlNodePtr, intern); + if (offset < 0) { + zend_argument_value_error(1, "must be greater than or equal to 0"); + RETURN_THROWS(); + } + if (node->type != XML_TEXT_NODE && node->type != XML_CDATA_SECTION_NODE) { + /* TODO Add warning? */ RETURN_FALSE; } cur = xmlNodeGetContent(node); if (cur == NULL) { + /* TODO Add warning? */ RETURN_FALSE; } length = xmlUTF8Strlen(cur); - if (ZEND_LONG_INT_OVFL(offset) || (int)offset > length || offset < 0) { + if (ZEND_LONG_INT_OVFL(offset) || (int)offset > length) { + /* TODO Add warning? */ xmlFree(cur); RETURN_FALSE; } @@ -149,6 +157,7 @@ PHP_METHOD(DOMText, splitText) xmlFree(second); if (nnode == NULL) { + /* TODO Add warning? */ RETURN_FALSE; } diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index cc3cbf8433655..1f97601c426d1 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -136,15 +136,9 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, obj = valuePop(ctxt); if (obj->stringval == NULL) { - php_error_docref(NULL, E_WARNING, "Handler name must be a string"); + zend_type_error("Handler name must be a string"); xmlXPathFreeObject(obj); - if (fci.param_count > 0) { - for (i = 0; i < nargs - 1; i++) { - zval_ptr_dtor(&fci.params[i]); - } - efree(fci.params); - } - return; + goto cleanup; } ZVAL_STRING(&fci.function_name, (char *) obj->stringval); xmlXPathFreeObject(obj); @@ -154,11 +148,11 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, fci.retval = &retval; if (!zend_make_callable(&fci.function_name, &callable)) { - php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", ZSTR_VAL(callable)); + zend_throw_error(NULL, "Unable to call handler %s()", ZSTR_VAL(callable)); + goto cleanup; } else if (intern->registerPhpFunctions == 2 && zend_hash_exists(intern->registered_phpfunctions, callable) == 0) { - php_error_docref(NULL, E_WARNING, "Not allowed to call handler '%s()'.", ZSTR_VAL(callable)); - /* Push an empty string, so that we at least have an xslt result... */ - valuePush(ctxt, xmlXPathNewString((xmlChar *)"")); + zend_throw_error(NULL, "Not allowed to call handler '%s()'.", ZSTR_VAL(callable)); + goto cleanup; } else { result = zend_call_function(&fci, NULL); if (result == SUCCESS && Z_TYPE(retval) != IS_UNDEF) { @@ -176,8 +170,8 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, } else if (Z_TYPE(retval) == IS_FALSE || Z_TYPE(retval) == IS_TRUE) { valuePush(ctxt, xmlXPathNewBoolean(Z_TYPE(retval) == IS_TRUE)); } else if (Z_TYPE(retval) == IS_OBJECT) { - php_error_docref(NULL, E_WARNING, "A PHP Object cannot be converted to a XPath-string"); - valuePush(ctxt, xmlXPathNewString((xmlChar *)"")); + zend_type_error("A PHP Object cannot be converted to a XPath-string"); + return; } else { zend_string *str = zval_get_string(&retval); valuePush(ctxt, xmlXPathNewString((xmlChar *) ZSTR_VAL(str))); @@ -186,6 +180,7 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, zval_ptr_dtor(&retval); } } +cleanup: zend_string_release_ex(callable, 0); zval_ptr_dtor_str(&fci.function_name); if (fci.param_count > 0) { @@ -228,7 +223,7 @@ PHP_METHOD(DOMXPath, __construct) ctx = xmlXPathNewContext(docp); if (ctx == NULL) { php_dom_throw_error(INVALID_STATE_ERR, 1); - RETURN_FALSE; + RETURN_THROWS(); } intern = Z_XPATHOBJ_P(ZEND_THIS); @@ -308,8 +303,8 @@ PHP_METHOD(DOMXPath, registerNamespace) ctxp = (xmlXPathContextPtr) intern->dom.ptr; if (ctxp == NULL) { - php_error_docref(NULL, E_WARNING, "Invalid XPath Context"); - RETURN_FALSE; + zend_throw_error(NULL, "Invalid XPath Context"); + RETURN_THROWS(); } if (xmlXPathRegisterNs(ctxp, prefix, ns_uri) != 0) { @@ -352,8 +347,8 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ ctxp = (xmlXPathContextPtr) intern->dom.ptr; if (ctxp == NULL) { - php_error_docref(NULL, E_WARNING, "Invalid XPath Context"); - RETURN_FALSE; + zend_throw_error(NULL, "Invalid XPath Context"); + RETURN_THROWS(); } docp = (xmlDocPtr) ctxp->doc; @@ -371,8 +366,8 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ } if (nodep && docp != nodep->doc) { - php_error_docref(NULL, E_WARNING, "Node From Wrong Document"); - RETURN_FALSE; + zend_throw_error(NULL, "Node from wrong document"); + RETURN_THROWS(); } ctxp->node = nodep; @@ -401,6 +396,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ } if (! xpathobjp) { + /* TODO Add Warning? */ RETURN_FALSE; } From 3dde6fc4ac0e0f3cd500f842b0766f98ba51ac52 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 23 Sep 2020 00:21:39 +0300 Subject: [PATCH 064/209] Fix extra args leak --- ext/opcache/jit/zend_jit_internal.h | 3 +++ ext/opcache/jit/zend_jit_trace.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 0bbdb949a8a7a..5983cc3d06791 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -427,6 +427,9 @@ struct _zend_jit_trace_stack_frame { #define TRACE_FRAME_NO_NEED_REKEASE_THIS(frame) \ ((frame)->_info & TRACE_FRAME_MASK_NO_NEED_RELEASE_THIS) +#define TRACE_FRAME_SET_UNKNOWM_NUM_ARGS(frame) do { \ + (frame)->_info |= (0xffff << TRACE_FRAME_SHIFT_NUM_ARGS); \ + } while (0) #define TRACE_FRAME_SET_RETURN_SSA_VAR(frame, var) do { \ (frame)->_info = var; \ } while (0) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 4edb08e08f9b0..3fbea0918be07 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -5091,6 +5091,13 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } } goto done; + case ZEND_SEND_ARRAY: + case ZEND_SEND_UNPACK: + if (JIT_G(current_frame) + && JIT_G(current_frame)->call) { + TRACE_FRAME_SET_UNKNOWM_NUM_ARGS(JIT_G(current_frame)->call); + } + break; default: break; } From c2a2d2438a8e2779e34206c433b0c22c987f028c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 23:31:56 +0200 Subject: [PATCH 065/209] Fix double free on unpack error --- ext/standard/pack.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/standard/pack.c b/ext/standard/pack.c index bfa6708f66d86..e14bbbcedbd8e 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -846,7 +846,6 @@ PHP_FUNCTION(unpack) break; #else zend_value_error("64-bit format codes are not available for 32-bit versions of PHP"); - zend_array_destroy(Z_ARR_P(return_value)); RETURN_THROWS(); #endif @@ -866,7 +865,6 @@ PHP_FUNCTION(unpack) default: zend_value_error("Invalid format type %c", type); - zend_array_destroy(Z_ARR_P(return_value)); RETURN_THROWS(); } From 1e9db80d7264911fa4089cb7e4b3dc7f97b19c6e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 20 May 2020 19:35:39 +0200 Subject: [PATCH 066/209] Tweak some macro definition on Windows Closes GH-5606 --- ext/standard/filestat.c | 6 +----- ext/standard/link.c | 6 +----- ext/standard/pageinfo.c | 6 +----- win32/build/config.w32 | 1 - win32/build/config.w32.h.in | 2 ++ win32/grp.h | 27 --------------------------- 6 files changed, 5 insertions(+), 43 deletions(-) delete mode 100644 win32/grp.h diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 3e431c744d63f..61546c3da6368 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -59,11 +59,7 @@ #endif #if HAVE_GRP_H -# ifdef PHP_WIN32 -# include "win32/grp.h" -# else -# include -# endif +# include #endif #if HAVE_UTIME diff --git a/ext/standard/link.c b/ext/standard/link.c index 002f9576eb6cb..86ad6707c3755 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -40,11 +40,7 @@ #endif #endif #if HAVE_GRP_H -#ifdef PHP_WIN32 -#include "win32/grp.h" -#else -#include -#endif +# include #endif #include #include diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 56e5462f3c84c..798f7cdbb3d08 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -28,11 +28,7 @@ #endif #endif #if HAVE_GRP_H -# ifdef PHP_WIN32 -# include "win32/grp.h" -# else -# include -# endif +# include #endif #ifdef PHP_WIN32 #undef getgid diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 7eb6593acafad..a7d60812bd6f8 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -293,7 +293,6 @@ if (main_network_has_ipv6) { AC_DEFINE('HAVE_GAI_STRERROR', 1); AC_DEFINE('HAVE_IPV6', 1); } -AC_DEFINE('HAVE_GETADDRINFO', main_network_has_ipv6); /* this allows up to 256 sockets to be select()ed in a single * call to select(), instead of the usual 64 */ diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index 2167b1297b4be..ce4b71282e7a0 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -135,3 +135,5 @@ #ifdef __clang__ #define HAVE_FUNC_ATTRIBUTE_TARGET 1 #endif + +#define HAVE_GETADDRINFO 1 diff --git a/win32/grp.h b/win32/grp.h deleted file mode 100644 index f8cc8fe206c99..0000000000000 --- a/win32/grp.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Sterling Hughes | - +----------------------------------------------------------------------+ -*/ - -#ifndef PHP_WIN32_GRP_H -#define PHP_WIN32_GRP_H - -struct group { - char *gr_name; - char *gr_passwd; - int gr_gid; - char **gr_mem; -}; - -#endif From 4222ae16e7848e0b3f062a9a989d387de307a7af Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 11 May 2020 20:32:13 +0200 Subject: [PATCH 067/209] SplFixedArray is Aggregate, not Iterable One strange feature of SplFixedArray was that it could not be used in nested foreach loops. If one did so, the inner loop would overwrite the iteration state of the outer loop. To illustrate: $spl = SplFixedArray::fromArray([0, 1]); foreach ($spl as $a) { foreach ($spl as $b) { echo "$a $b"; } } Would only print two lines: 0 0 0 1 Use the new InternalIterator feature which was introduced in ff19ec2df3 to convert SplFixedArray to an Aggregate rather than Iterable. As a bonus, we get to trim down some ugly code! Yay! --- NEWS | 2 + UPGRADING | 6 + ext/spl/spl_fixedarray.c | 211 ++++-------------- ext/spl/spl_fixedarray.stub.php | 17 +- ext/spl/spl_fixedarray_arginfo.h | 25 +-- ...xedArray_change_size_during_iteration.phpt | 43 ++++ ext/spl/tests/SplFixedArray_key_setsize.phpt | 20 -- .../tests/SplFixedArray_nested_foreach.phpt | 19 ++ .../SplFixedArray_override_getIterator.phpt | 46 ++++ ext/spl/tests/fixedarray_003.phpt | 86 ------- ext/spl/tests/fixedarray_019.phpt | 51 ----- 11 files changed, 162 insertions(+), 364 deletions(-) create mode 100644 ext/spl/tests/SplFixedArray_change_size_during_iteration.phpt delete mode 100644 ext/spl/tests/SplFixedArray_key_setsize.phpt create mode 100644 ext/spl/tests/SplFixedArray_nested_foreach.phpt create mode 100644 ext/spl/tests/SplFixedArray_override_getIterator.phpt delete mode 100644 ext/spl/tests/fixedarray_003.phpt delete mode 100644 ext/spl/tests/fixedarray_019.phpt diff --git a/NEWS b/NEWS index c4926322db961..940fb2cbf82a3 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP NEWS - Core: . Fixed bug #80109 (Cannot skip arguments when extended debug is enabled). (Nikita) +- SPL: + . SplFixedArray is now IteratorAggregate rather than Iterator. (alexdowad) 17 Sep 2020, PHP 8.0.0beta4 diff --git a/UPGRADING b/UPGRADING index aaebf52de9a6f..a0aa20841f768 100644 --- a/UPGRADING +++ b/UPGRADING @@ -502,6 +502,12 @@ PHP 8.0 UPGRADE NOTES . spl_autoload_register() will now always throw a TypeError on invalid arguments, therefore the second argument $do_throw is ignored and a notice will be emitted if it is set to false. + . SplFixedArray is now an IteratorAggregate and not an Iterator. + SplFixedArray::rewind(), ::current(), ::key(), ::next(), and ::valid() + have been removed. In their place, SplFixedArray::getIterator() has been + added. Any code which uses explicit iteration over SplFixedArray must now + obtain an Iterator through SplFixedArray::getIterator(). This means that + SplFixedArray is now safe to use in nested loops. - Standard: . assert() will no longer evaluate string arguments, instead they will be diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 915e55f17cc6c..b9471d07bfa71 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -46,29 +46,22 @@ typedef struct _spl_fixedarray { /* {{{ */ /* }}} */ typedef struct _spl_fixedarray_object { /* {{{ */ - spl_fixedarray array; - zend_function *fptr_offset_get; - zend_function *fptr_offset_set; - zend_function *fptr_offset_has; - zend_function *fptr_offset_del; - zend_function *fptr_count; - int current; - int flags; - zend_object std; + spl_fixedarray array; + zend_function *fptr_offset_get; + zend_function *fptr_offset_set; + zend_function *fptr_offset_has; + zend_function *fptr_offset_del; + zend_function *fptr_count; + zend_object std; } spl_fixedarray_object; /* }}} */ typedef struct _spl_fixedarray_it { /* {{{ */ - zend_user_iterator intern; + zend_object_iterator intern; + int current; } spl_fixedarray_it; /* }}} */ -#define SPL_FIXEDARRAY_OVERLOADED_REWIND 0x0001 -#define SPL_FIXEDARRAY_OVERLOADED_VALID 0x0002 -#define SPL_FIXEDARRAY_OVERLOADED_KEY 0x0004 -#define SPL_FIXEDARRAY_OVERLOADED_CURRENT 0x0008 -#define SPL_FIXEDARRAY_OVERLOADED_NEXT 0x0010 - static inline spl_fixedarray_object *spl_fixed_array_from_obj(zend_object *obj) /* {{{ */ { return (spl_fixedarray_object*)((char*)(obj) - XtOffsetOf(spl_fixedarray_object, std)); } @@ -201,23 +194,17 @@ static void spl_fixedarray_object_free_storage(zend_object *object) /* {{{ */ } /* }}} */ -zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *object, int by_ref); - static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, zend_object *orig, int clone_orig) /* {{{ */ { spl_fixedarray_object *intern; zend_class_entry *parent = class_type; int inherited = 0; - zend_class_iterator_funcs *funcs_ptr; intern = zend_object_alloc(sizeof(spl_fixedarray_object), parent); zend_object_std_init(&intern->std, class_type); object_properties_init(&intern->std, class_type); - intern->current = 0; - intern->flags = 0; - if (orig && clone_orig) { spl_fixedarray_object *other = spl_fixed_array_from_obj(orig); spl_fixedarray_init(&intern->array, other->array.size); @@ -236,31 +223,7 @@ static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, z ZEND_ASSERT(parent); - funcs_ptr = class_type->iterator_funcs_ptr; - if (!funcs_ptr->zf_current) { - funcs_ptr->zf_rewind = zend_hash_str_find_ptr(&class_type->function_table, "rewind", sizeof("rewind") - 1); - funcs_ptr->zf_valid = zend_hash_str_find_ptr(&class_type->function_table, "valid", sizeof("valid") - 1); - funcs_ptr->zf_key = zend_hash_str_find_ptr(&class_type->function_table, "key", sizeof("key") - 1); - funcs_ptr->zf_current = zend_hash_str_find_ptr(&class_type->function_table, "current", sizeof("current") - 1); - funcs_ptr->zf_next = zend_hash_str_find_ptr(&class_type->function_table, "next", sizeof("next") - 1); - } if (inherited) { - if (funcs_ptr->zf_rewind->common.scope != parent) { - intern->flags |= SPL_FIXEDARRAY_OVERLOADED_REWIND; - } - if (funcs_ptr->zf_valid->common.scope != parent) { - intern->flags |= SPL_FIXEDARRAY_OVERLOADED_VALID; - } - if (funcs_ptr->zf_key->common.scope != parent) { - intern->flags |= SPL_FIXEDARRAY_OVERLOADED_KEY; - } - if (funcs_ptr->zf_current->common.scope != parent) { - intern->flags |= SPL_FIXEDARRAY_OVERLOADED_CURRENT; - } - if (funcs_ptr->zf_next->common.scope != parent) { - intern->flags |= SPL_FIXEDARRAY_OVERLOADED_NEXT; - } - intern->fptr_offset_get = zend_hash_str_find_ptr(&class_type->function_table, "offsetget", sizeof("offsetget") - 1); if (intern->fptr_offset_get->common.scope == parent) { intern->fptr_offset_get = NULL; @@ -780,36 +743,35 @@ PHP_METHOD(SplFixedArray, offsetUnset) } /* }}} */ -static void spl_fixedarray_it_dtor(zend_object_iterator *iter) /* {{{ */ +/* {{{ Create a new iterator from a SplFixedArray instance. */ +PHP_METHOD(SplFixedArray, getIterator) { - spl_fixedarray_it *iterator = (spl_fixedarray_it *)iter; + if (zend_parse_parameters_none() == FAILURE) { + return; + } - zend_user_it_invalidate_current(iter); - zval_ptr_dtor(&iterator->intern.it.data); + zend_create_internal_iterator_zval(return_value, ZEND_THIS); } /* }}} */ -static void spl_fixedarray_it_rewind(zend_object_iterator *iter) /* {{{ */ +static void spl_fixedarray_it_dtor(zend_object_iterator *iter) /* {{{ */ { - spl_fixedarray_object *object = Z_SPLFIXEDARRAY_P(&iter->data); + zval_ptr_dtor(&iter->data); +} +/* }}} */ - if (object->flags & SPL_FIXEDARRAY_OVERLOADED_REWIND) { - zend_user_it_rewind(iter); - } else { - object->current = 0; - } +static void spl_fixedarray_it_rewind(zend_object_iterator *iter) /* {{{ */ +{ + ((spl_fixedarray_it*)iter)->current = 0; } /* }}} */ static int spl_fixedarray_it_valid(zend_object_iterator *iter) /* {{{ */ { - spl_fixedarray_object *object = Z_SPLFIXEDARRAY_P(&iter->data); + spl_fixedarray_it *iterator = (spl_fixedarray_it*)iter; + spl_fixedarray_object *object = Z_SPLFIXEDARRAY_P(&iter->data); - if (object->flags & SPL_FIXEDARRAY_OVERLOADED_VALID) { - return zend_user_it_valid(iter); - } - - if (object->current >= 0 && object->current < object->array.size) { + if (iterator->current >= 0 && iterator->current < object->array.size) { return SUCCESS; } @@ -819,122 +781,29 @@ static int spl_fixedarray_it_valid(zend_object_iterator *iter) /* {{{ */ static zval *spl_fixedarray_it_get_current_data(zend_object_iterator *iter) /* {{{ */ { - zval zindex; - spl_fixedarray_object *object = Z_SPLFIXEDARRAY_P(&iter->data); - - if (object->flags & SPL_FIXEDARRAY_OVERLOADED_CURRENT) { - return zend_user_it_get_current_data(iter); - } else { - zval *data; + zval zindex, *data; + spl_fixedarray_it *iterator = (spl_fixedarray_it*)iter; + spl_fixedarray_object *object = Z_SPLFIXEDARRAY_P(&iter->data); - ZVAL_LONG(&zindex, object->current); + ZVAL_LONG(&zindex, iterator->current); + data = spl_fixedarray_object_read_dimension_helper(object, &zindex); - data = spl_fixedarray_object_read_dimension_helper(object, &zindex); - - if (data == NULL) { - data = &EG(uninitialized_zval); - } - return data; + if (data == NULL) { + data = &EG(uninitialized_zval); } + return data; } /* }}} */ static void spl_fixedarray_it_get_current_key(zend_object_iterator *iter, zval *key) /* {{{ */ { - spl_fixedarray_object *object = Z_SPLFIXEDARRAY_P(&iter->data); - - if (object->flags & SPL_FIXEDARRAY_OVERLOADED_KEY) { - zend_user_it_get_current_key(iter, key); - } else { - ZVAL_LONG(key, object->current); - } + ZVAL_LONG(key, ((spl_fixedarray_it*)iter)->current); } /* }}} */ static void spl_fixedarray_it_move_forward(zend_object_iterator *iter) /* {{{ */ { - spl_fixedarray_object *object = Z_SPLFIXEDARRAY_P(&iter->data); - - if (object->flags & SPL_FIXEDARRAY_OVERLOADED_NEXT) { - zend_user_it_move_forward(iter); - } else { - zend_user_it_invalidate_current(iter); - object->current++; - } -} -/* }}} */ - -/* {{{ Return current array key */ -PHP_METHOD(SplFixedArray, key) -{ - spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); - - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } - - RETURN_LONG(intern->current); -} -/* }}} */ - -/* {{{ Move to next entry */ -PHP_METHOD(SplFixedArray, next) -{ - spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); - - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } - - intern->current++; -} -/* }}} */ - -/* {{{ Check whether the datastructure contains more entries */ -PHP_METHOD(SplFixedArray, valid) -{ - spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); - - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } - - RETURN_BOOL(intern->current >= 0 && intern->current < intern->array.size); -} -/* }}} */ - -/* {{{ Rewind the datastructure back to the start */ -PHP_METHOD(SplFixedArray, rewind) -{ - spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); - - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } - - intern->current = 0; -} -/* }}} */ - -/* {{{ Return current datastructure entry */ -PHP_METHOD(SplFixedArray, current) -{ - zval zindex, *value; - spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); - - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } - - ZVAL_LONG(&zindex, intern->current); - - value = spl_fixedarray_object_read_dimension_helper(intern, &zindex); - - if (value) { - ZVAL_COPY_DEREF(return_value, value); - } else { - RETURN_NULL(); - } + ((spl_fixedarray_it*)iter)->current++; } /* }}} */ @@ -963,12 +832,10 @@ zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *ob zend_iterator_init((zend_object_iterator*)iterator); - ZVAL_OBJ_COPY(&iterator->intern.it.data, Z_OBJ_P(object)); - iterator->intern.it.funcs = &spl_fixedarray_it_funcs; - iterator->intern.ce = ce; - ZVAL_UNDEF(&iterator->intern.value); + ZVAL_OBJ_COPY(&iterator->intern.data, Z_OBJ_P(object)); + iterator->intern.funcs = &spl_fixedarray_it_funcs; - return &iterator->intern.it; + return &iterator->intern; } /* }}} */ @@ -990,7 +857,7 @@ PHP_MINIT_FUNCTION(spl_fixedarray) spl_handler_SplFixedArray.dtor_obj = zend_objects_destroy_object; spl_handler_SplFixedArray.free_obj = spl_fixedarray_object_free_storage; - REGISTER_SPL_IMPLEMENTS(SplFixedArray, Iterator); + REGISTER_SPL_IMPLEMENTS(SplFixedArray, Aggregate); REGISTER_SPL_IMPLEMENTS(SplFixedArray, ArrayAccess); REGISTER_SPL_IMPLEMENTS(SplFixedArray, Countable); diff --git a/ext/spl/spl_fixedarray.stub.php b/ext/spl/spl_fixedarray.stub.php index 553de5c2faf35..b169dfdeac780 100755 --- a/ext/spl/spl_fixedarray.stub.php +++ b/ext/spl/spl_fixedarray.stub.php @@ -2,7 +2,7 @@ /** @generate-function-entries */ -class SplFixedArray implements Iterator, ArrayAccess, Countable +class SplFixedArray implements IteratorAggregate, ArrayAccess, Countable { public function __construct(int $size = 0) {} @@ -48,18 +48,5 @@ public function offsetSet($index, mixed $value) {} */ public function offsetUnset($index) {} - /** @return void */ - public function rewind() {} - - /** @return mixed */ - public function current() {} - - /** @return int */ - public function key() {} - - /** @return void */ - public function next() {} - - /** @return bool */ - public function valid() {} + public function getIterator(): Iterator {} } diff --git a/ext/spl/spl_fixedarray_arginfo.h b/ext/spl/spl_fixedarray_arginfo.h index 899202683e82c..6817380c6bfa5 100644 --- a/ext/spl/spl_fixedarray_arginfo.h +++ b/ext/spl/spl_fixedarray_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4b6c37c54416ee46f610baba2a8b2be45d1db96f */ + * Stub hash: 2075619a330ed636ce7f7c85aeb208a8f9f55ca7 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFixedArray___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, size, IS_LONG, 0, "0") @@ -36,15 +36,8 @@ ZEND_END_ARG_INFO() #define arginfo_class_SplFixedArray_offsetUnset arginfo_class_SplFixedArray_offsetExists -#define arginfo_class_SplFixedArray_rewind arginfo_class_SplFixedArray___wakeup - -#define arginfo_class_SplFixedArray_current arginfo_class_SplFixedArray___wakeup - -#define arginfo_class_SplFixedArray_key arginfo_class_SplFixedArray___wakeup - -#define arginfo_class_SplFixedArray_next arginfo_class_SplFixedArray___wakeup - -#define arginfo_class_SplFixedArray_valid arginfo_class_SplFixedArray___wakeup +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_SplFixedArray_getIterator, 0, 0, Iterator, 0) +ZEND_END_ARG_INFO() ZEND_METHOD(SplFixedArray, __construct); @@ -58,11 +51,7 @@ ZEND_METHOD(SplFixedArray, offsetExists); ZEND_METHOD(SplFixedArray, offsetGet); ZEND_METHOD(SplFixedArray, offsetSet); ZEND_METHOD(SplFixedArray, offsetUnset); -ZEND_METHOD(SplFixedArray, rewind); -ZEND_METHOD(SplFixedArray, current); -ZEND_METHOD(SplFixedArray, key); -ZEND_METHOD(SplFixedArray, next); -ZEND_METHOD(SplFixedArray, valid); +ZEND_METHOD(SplFixedArray, getIterator); static const zend_function_entry class_SplFixedArray_methods[] = { @@ -77,10 +66,6 @@ static const zend_function_entry class_SplFixedArray_methods[] = { ZEND_ME(SplFixedArray, offsetGet, arginfo_class_SplFixedArray_offsetGet, ZEND_ACC_PUBLIC) ZEND_ME(SplFixedArray, offsetSet, arginfo_class_SplFixedArray_offsetSet, ZEND_ACC_PUBLIC) ZEND_ME(SplFixedArray, offsetUnset, arginfo_class_SplFixedArray_offsetUnset, ZEND_ACC_PUBLIC) - ZEND_ME(SplFixedArray, rewind, arginfo_class_SplFixedArray_rewind, ZEND_ACC_PUBLIC) - ZEND_ME(SplFixedArray, current, arginfo_class_SplFixedArray_current, ZEND_ACC_PUBLIC) - ZEND_ME(SplFixedArray, key, arginfo_class_SplFixedArray_key, ZEND_ACC_PUBLIC) - ZEND_ME(SplFixedArray, next, arginfo_class_SplFixedArray_next, ZEND_ACC_PUBLIC) - ZEND_ME(SplFixedArray, valid, arginfo_class_SplFixedArray_valid, ZEND_ACC_PUBLIC) + ZEND_ME(SplFixedArray, getIterator, arginfo_class_SplFixedArray_getIterator, ZEND_ACC_PUBLIC) ZEND_FE_END }; diff --git a/ext/spl/tests/SplFixedArray_change_size_during_iteration.phpt b/ext/spl/tests/SplFixedArray_change_size_during_iteration.phpt new file mode 100644 index 0000000000000..56565ff7aac83 --- /dev/null +++ b/ext/spl/tests/SplFixedArray_change_size_during_iteration.phpt @@ -0,0 +1,43 @@ +--TEST-- +SPL: FixedArray: change array size during iteration +--FILE-- + $v) { + echo "$k => $v\n"; + if ($k == 0) { + $splFixedArray->setSize(2); + } +} +echo "---\n"; + +$splFixedArray = SplFixedArray::fromArray(["a","b","c"]); +foreach ($splFixedArray as $k => $v) { + echo "$k => $v\n"; + if ($k == 1) { + $splFixedArray->setSize(2); + } +} +echo "---\n"; + +$splFixedArray = SplFixedArray::fromArray(["a","b","c"]); +foreach ($splFixedArray as $k => $v) { + echo "$k => $v\n"; + if ($k == 2) { + $splFixedArray->setSize(2); + } +} +echo "\n"; +--EXPECT-- +0 => a +1 => b +--- +0 => a +1 => b +--- +0 => a +1 => b +2 => c diff --git a/ext/spl/tests/SplFixedArray_key_setsize.phpt b/ext/spl/tests/SplFixedArray_key_setsize.phpt deleted file mode 100644 index 5c035e71c7774..0000000000000 --- a/ext/spl/tests/SplFixedArray_key_setsize.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -SplFixedArray::key() when the array has a size higher than the amount of values specified. ---CREDITS-- -PHPNW Test Fest 2009 - Jordan Hatch ---FILE-- -key( ); -} - -?> ---EXPECT-- -0123 diff --git a/ext/spl/tests/SplFixedArray_nested_foreach.phpt b/ext/spl/tests/SplFixedArray_nested_foreach.phpt new file mode 100644 index 0000000000000..0042ab7890523 --- /dev/null +++ b/ext/spl/tests/SplFixedArray_nested_foreach.phpt @@ -0,0 +1,19 @@ +--TEST-- +Nested iteration of SplFixedArray using foreach loops +--FILE-- + +--EXPECT-- +0 0 +0 1 +1 0 +1 1 diff --git a/ext/spl/tests/SplFixedArray_override_getIterator.phpt b/ext/spl/tests/SplFixedArray_override_getIterator.phpt new file mode 100644 index 0000000000000..52bf52f2a1b51 --- /dev/null +++ b/ext/spl/tests/SplFixedArray_override_getIterator.phpt @@ -0,0 +1,46 @@ +--TEST-- +SPL: FixedArray: overriding getIterator() +--FILE-- +valid()) { + echo "In A: key={$iterator->key()} value={$iterator->current()}\n"; + yield $iterator->key() => $iterator->current(); + $iterator->next(); + } + } +} + +echo "==SplFixedArray instance==\n"; +$a = new SplFixedArray(3); +$a[0] = "a"; +$a[1] = "b"; +$a[2] = "c"; +foreach ($a as $k => $v) { + echo "$k => $v\n"; +} + +echo "==Subclass instance==\n"; +$a = new A(3); +$a[0] = "d"; +$a[1] = "e"; +$a[2] = "f"; +foreach ($a as $k => $v) { + echo "$k => $v\n"; +} +--EXPECT-- +==SplFixedArray instance== +0 => a +1 => b +2 => c +==Subclass instance== +In A: key=0 value=d +0 => d +In A: key=1 value=e +1 => e +In A: key=2 value=f +2 => f diff --git a/ext/spl/tests/fixedarray_003.phpt b/ext/spl/tests/fixedarray_003.phpt deleted file mode 100644 index d2f8a78fdf080..0000000000000 --- a/ext/spl/tests/fixedarray_003.phpt +++ /dev/null @@ -1,86 +0,0 @@ ---TEST-- -SPL: FixedArray: Iterators ---FILE-- - $v) { - echo "$k => $v\n"; -} -echo "==Child instance==\n"; -$a = new A(5); -$a[0] = "a"; -$a[1] = "c"; -$a[2] = "d"; -$a[3] = "e"; -$a[4] = "f"; -foreach ($a as $k => $v) { - echo "$k => $v\n"; -} -?> ---EXPECT-- -==Direct instance== -0 => a -1 => c -2 => d -3 => e -4 => f -==Child instance== -A::rewind -A::valid -A::current -A::key -0 => a -A::next -A::valid -A::current -A::key -1 => c -A::next -A::valid -A::current -A::key -2 => d -A::next -A::valid -A::current -A::key -3 => e -A::next -A::valid -A::current -A::key -4 => f -A::next -A::valid diff --git a/ext/spl/tests/fixedarray_019.phpt b/ext/spl/tests/fixedarray_019.phpt deleted file mode 100644 index 9414e97304505..0000000000000 --- a/ext/spl/tests/fixedarray_019.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -SPL: FixedArray: overridden iterator methods ---FILE-- -$v) { - echo "$k=>"; - var_dump($v); -} -?> ---EXPECT-- -rewind -valid -current -key -0=>NULL -next -valid -current -key -1=>NULL -next -valid -current -key -2=>NULL -next -valid From dafc72cb33ea677cd0b3caffc8fe7bf510a4bf7c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 23 Sep 2020 09:31:44 +0200 Subject: [PATCH 068/209] for consistency use for all *Name methods --- ext/zip/php_zip.stub.php | 8 ++++---- ext/zip/php_zip_arginfo.h | 12 +++++------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index 7da7bfea39221..9a276a05df10e 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -138,13 +138,13 @@ public function deleteIndex(int $index) {} public function deleteName(string $name) {} /** @return array|false */ - public function statName(string $filename, int $flags = 0) {} + public function statName(string $name, int $flags = 0) {} /** @return array|false */ public function statIndex(int $index, int $flags = 0) {} /** @return int|false */ - public function locateName(string $filename, int $flags = 0) {} + public function locateName(string $name, int $flags = 0) {} /** @return string|false */ public function getNameIndex(int $index, int $flags = 0) {} @@ -165,13 +165,13 @@ public function unchangeName(string $name) {} public function extractTo(string $pathto, array|string|null $files = null) {} /** @return string|false */ - public function getFromName(string $entryname, int $len = 0, int $flags = 0) {} + public function getFromName(string $name, int $len = 0, int $flags = 0) {} /** @return string|false */ public function getFromIndex(int $index, int $len = 0, int $flags = 0) {} /** @return resource|false */ - public function getStream(string $entryname) {} + public function getStream(string $name) {} #ifdef ZIP_OPSYS_DEFAULT /** @return bool */ diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index 6274f6afefadf..a4167fa8ca4bf 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 58d4035ad8d21582e93091d5c14f78640c1a17c3 */ + * Stub hash: 4ca2b108e71924309abcdc1a0f86f5963a8516f3 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -157,11 +157,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_deleteName, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_class_ZipArchive_statName arginfo_class_ZipArchive_open +#define arginfo_class_ZipArchive_statName arginfo_class_ZipArchive_getCommentName #define arginfo_class_ZipArchive_statIndex arginfo_class_ZipArchive_getCommentIndex -#define arginfo_class_ZipArchive_locateName arginfo_class_ZipArchive_open +#define arginfo_class_ZipArchive_locateName arginfo_class_ZipArchive_getCommentName #define arginfo_class_ZipArchive_getNameIndex arginfo_class_ZipArchive_getCommentIndex @@ -179,7 +179,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_extractTo, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getFromName, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, entryname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, len, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -190,9 +190,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getFromIndex, 0, 0, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getStream, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, entryname, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_class_ZipArchive_getStream arginfo_class_ZipArchive_deleteName #if defined(ZIP_OPSYS_DEFAULT) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_setExternalAttributesName, 0, 0, 3) From 7fedee873f0ae977aac1008daa87713a80fc9267 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 23 Sep 2020 10:04:32 +0200 Subject: [PATCH 069/209] Fix shift ub And typo in macro name --- ext/opcache/jit/zend_jit_internal.h | 4 ++-- ext/opcache/jit/zend_jit_trace.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index 5983cc3d06791..d17d2451d3b0a 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -427,8 +427,8 @@ struct _zend_jit_trace_stack_frame { #define TRACE_FRAME_NO_NEED_REKEASE_THIS(frame) \ ((frame)->_info & TRACE_FRAME_MASK_NO_NEED_RELEASE_THIS) -#define TRACE_FRAME_SET_UNKNOWM_NUM_ARGS(frame) do { \ - (frame)->_info |= (0xffff << TRACE_FRAME_SHIFT_NUM_ARGS); \ +#define TRACE_FRAME_SET_UNKNOWN_NUM_ARGS(frame) do { \ + (frame)->_info |= (0xffffu << TRACE_FRAME_SHIFT_NUM_ARGS); \ } while (0) #define TRACE_FRAME_SET_RETURN_SSA_VAR(frame, var) do { \ (frame)->_info = var; \ diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 3fbea0918be07..2b407364993d1 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -5095,7 +5095,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par case ZEND_SEND_UNPACK: if (JIT_G(current_frame) && JIT_G(current_frame)->call) { - TRACE_FRAME_SET_UNKNOWM_NUM_ARGS(JIT_G(current_frame)->call); + TRACE_FRAME_SET_UNKNOWN_NUM_ARGS(JIT_G(current_frame)->call); } break; default: From 72e8719ed08135e737f77e4f4419fc62620cd13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 23 Sep 2020 09:56:19 +0200 Subject: [PATCH 070/209] Fix a few ZEND_UNREACHABLE() calls --- ext/dom/document.c | 3 ++- ext/standard/net.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index b580842667d3a..d3a8fa43a5aa7 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1102,7 +1102,8 @@ PHP_METHOD(DOMDocument, __construct) } intern->document = NULL; if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp) == -1) { - RETURN_FALSE; + /* docp is always non-null so php_libxml_increment_doc_ref() never returns -1 */ + ZEND_UNREACHABLE(); } php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)docp, (void *)intern); } diff --git a/ext/standard/net.c b/ext/standard/net.c index 424dad44f4263..2700c7b24390b 100644 --- a/ext/standard/net.c +++ b/ext/standard/net.c @@ -301,7 +301,7 @@ PHP_FUNCTION(net_get_interfaces) { freeifaddrs(addrs); #else /* Should never happen as we never register the function */ - ZEND_UNREACHABLE("No support for net_get_interfaces"); + ZEND_UNREACHABLE(); #endif } /* }}} */ From 625d8463a41d6b1da5921b87c93cebd06f1758f6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 16:07:31 +0200 Subject: [PATCH 071/209] Consistent error handling for fgetcsv/fputcsv Normalize the behavior between the file functions and those on SplFileObject. Be consistent about throwing regardless of whether the delimiter etc is empty or has too many characters. I don't think it's worthwhile to distinguish these cases. Back when we looked into this originally, there was some hope that we might want to add support for multiple-character delimiter etc, but after a cursory look, I really don't think this is going to happen (for fputcsv maybe, but for fgetcsv this just makes an already broken function much more complicated.) Closes GH-6188. --- ext/spl/spl_directory.c | 39 +- ...SplFileObject_fgetcsv_delimiter_error.phpt | 11 +- ...SplFileObject_fgetcsv_enclosure_error.phpt | 11 +- .../SplFileObject_fgetcsv_escape_error.phpt | 11 +- .../SplFileObject_fputcsv_variation13.phpt | 12 +- .../SplFileObject_fputcsv_variation14.phpt | 12 +- .../SplFileObject_setCsvControl_error001.phpt | 10 +- .../SplFileObject_setCsvControl_error002.phpt | 10 +- .../SplFileObject_setCsvControl_error003.phpt | 10 +- ext/standard/file.c | 22 +- .../tests/file/fgetcsv_variation12.phpt | 800 +++-------- .../tests/file/fgetcsv_variation19.phpt | 685 +++------- .../tests/file/fgetcsv_variation24.phpt | 666 --------- .../tests/file/fputcsv_variation13.phpt | 982 +++++--------- .../tests/file/fputcsv_variation14.phpt | 405 ------ .../tests/file/fputcsv_variation9.phpt | 1197 +++++------------ 16 files changed, 1050 insertions(+), 3833 deletions(-) delete mode 100644 ext/standard/tests/file/fgetcsv_variation24.phpt delete mode 100644 ext/standard/tests/file/fputcsv_variation14.phpt diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index cc5e4b7ac4849..a67b9efb03d70 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -2328,13 +2328,12 @@ PHP_METHOD(SplFileObject, fgetcsv) CHECK_SPL_FILE_OBJECT_IS_INITIALIZED(intern); - // TODO Align behaviour on normal fgetcsv() switch(ZEND_NUM_ARGS()) { case 3: if (esc_len > 1) { - php_error_docref(NULL, E_WARNING, "escape must be empty or a single character"); - RETURN_FALSE; + zend_argument_value_error(3, "must be empty or a single character"); + RETURN_THROWS(); } if (esc_len == 0) { escape = PHP_CSV_NO_ESCAPE; @@ -2344,15 +2343,15 @@ PHP_METHOD(SplFileObject, fgetcsv) /* no break */ case 2: if (e_len != 1) { - php_error_docref(NULL, E_WARNING, "enclosure must be a character"); - RETURN_FALSE; + zend_argument_value_error(2, "must be a single character"); + RETURN_THROWS(); } enclosure = enclo[0]; /* no break */ case 1: if (d_len != 1) { - php_error_docref(NULL, E_WARNING, "delimiter must be a character"); - RETURN_FALSE; + zend_argument_value_error(1, "must be a single character"); + RETURN_THROWS(); } delimiter = delim[0]; /* no break */ @@ -2377,7 +2376,6 @@ PHP_METHOD(SplFileObject, fputcsv) if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|sss", &fields, &delim, &d_len, &enclo, &e_len, &esc, &esc_len) == SUCCESS) { - // TODO Align behaviour on normal fputcsv() switch(ZEND_NUM_ARGS()) { case 4: @@ -2389,21 +2387,21 @@ PHP_METHOD(SplFileObject, fputcsv) escape = (unsigned char) esc[0]; break; default: - php_error_docref(NULL, E_WARNING, "escape must be empty or a single character"); - RETURN_FALSE; + zend_argument_value_error(4, "must be empty or a single character"); + RETURN_THROWS(); } /* no break */ case 3: if (e_len != 1) { - php_error_docref(NULL, E_WARNING, "enclosure must be a character"); - RETURN_FALSE; + zend_argument_value_error(3, "must be a single character"); + RETURN_THROWS(); } enclosure = enclo[0]; /* no break */ case 2: if (d_len != 1) { - php_error_docref(NULL, E_WARNING, "delimiter must be a character"); - RETURN_FALSE; + zend_argument_value_error(2, "must be a single character"); + RETURN_THROWS(); } delimiter = delim[0]; /* no break */ @@ -2430,7 +2428,6 @@ PHP_METHOD(SplFileObject, setCsvControl) size_t d_len = 0, e_len = 0, esc_len = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sss", &delim, &d_len, &enclo, &e_len, &esc, &esc_len) == SUCCESS) { - // TODO Align behaviour on normal fgetcsv() switch(ZEND_NUM_ARGS()) { case 3: @@ -2442,21 +2439,21 @@ PHP_METHOD(SplFileObject, setCsvControl) escape = (unsigned char) esc[0]; break; default: - php_error_docref(NULL, E_WARNING, "escape must be empty or a single character"); - RETURN_FALSE; + zend_argument_value_error(3, "must be empty or a single character"); + RETURN_THROWS(); } /* no break */ case 2: if (e_len != 1) { - php_error_docref(NULL, E_WARNING, "enclosure must be a character"); - RETURN_FALSE; + zend_argument_value_error(2, "must be a single character"); + RETURN_THROWS(); } enclosure = enclo[0]; /* no break */ case 1: if (d_len != 1) { - php_error_docref(NULL, E_WARNING, "delimiter must be a character"); - RETURN_FALSE; + zend_argument_value_error(1, "must be a single character"); + RETURN_THROWS(); } delimiter = delim[0]; /* no break */ diff --git a/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt index 2db10f989a09f..03010f3935c90 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt @@ -12,12 +12,15 @@ fputcsv($fp, array( fclose($fp); $fo = new SplFileObject('SplFileObject__fgetcsv3.csv'); -var_dump($fo->fgetcsv('invalid')); +try { + var_dump($fo->fgetcsv('invalid')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> --CLEAN-- ---EXPECTF-- -Warning: SplFileObject::fgetcsv(): delimiter must be a character in %s on line %d -bool(false) +--EXPECT-- +SplFileObject::fgetcsv(): Argument #1 ($delimiter) must be a single character diff --git a/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt index 6dd0a593c5b38..b510ae909c3c4 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt @@ -12,12 +12,15 @@ fputcsv($fp, array( fclose($fp); $fo = new SplFileObject('SplFileObject__fgetcsv5.csv'); -var_dump($fo->fgetcsv(',', 'invalid')); +try { + var_dump($fo->fgetcsv(',', 'invalid')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> --CLEAN-- ---EXPECTF-- -Warning: SplFileObject::fgetcsv(): enclosure must be a character in %s on line %d -bool(false) +--EXPECT-- +SplFileObject::fgetcsv(): Argument #2 ($enclosure) must be a single character diff --git a/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt index 4873341e5a2b9..a1471c8e0e7d7 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt @@ -7,12 +7,15 @@ fwrite($fp, '"aaa","b""bb","ccc"'); fclose($fp); $fo = new SplFileObject('SplFileObject__fgetcsv8.csv'); -var_dump($fo->fgetcsv(',', '"', 'invalid')); +try { + var_dump($fo->fgetcsv(',', '"', 'invalid')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> --CLEAN-- ---EXPECTF-- -Warning: SplFileObject::fgetcsv(): escape must be empty or a single character in %s on line %d -bool(false) +--EXPECT-- +SplFileObject::fgetcsv(): Argument #3 ($escape) must be empty or a single character diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation13.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation13.phpt index a4c24510216b8..0dc2a4fe7e680 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation13.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation13.phpt @@ -10,7 +10,11 @@ echo "*** Testing fputcsv() : with default enclosure & delimiter of two chars ** $fo = new SplFileObject(__DIR__ . '/SplFileObject_fputcsv_variation13.csv', 'w'); -var_dump($fo->fputcsv(array('water', 'fruit'), ',,', '"')); +try { + var_dump($fo->fputcsv(array('water', 'fruit'), ',,', '"')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} unset($fo); @@ -21,9 +25,7 @@ echo "Done\n"; $file = __DIR__ . '/SplFileObject_fputcsv_variation13.csv'; unlink($file); ?> ---EXPECTF-- +--EXPECT-- *** Testing fputcsv() : with default enclosure & delimiter of two chars *** - -Warning: SplFileObject::fputcsv(): delimiter must be a character in %s on line %d -bool(false) +SplFileObject::fputcsv(): Argument #2 ($delimiter) must be a single character Done diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation14.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation14.phpt index a659da92af46e..60efae632dae2 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation14.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation14.phpt @@ -10,7 +10,11 @@ echo "*** Testing fputcsv() : with enclosure & delimiter of two chars and file o $fo = new SplFileObject(__DIR__ . '/SplFileObject_fputcsv_variation14.csv', 'w'); -var_dump($fo->fputcsv(array('water', 'fruit'), ',,', '""')); +try { + var_dump($fo->fputcsv(array('water', 'fruit'), ',,', '""')); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} unset($fo); @@ -21,9 +25,7 @@ echo "Done\n"; $file = __DIR__ . '/SplFileObject_fputcsv_variation14.csv'; unlink($file); ?> ---EXPECTF-- +--EXPECT-- *** Testing fputcsv() : with enclosure & delimiter of two chars and file opened in read mode *** - -Warning: SplFileObject::fputcsv(): enclosure must be a character in %s on line %d -bool(false) +SplFileObject::fputcsv(): Argument #3 ($enclosure) must be a single character Done diff --git a/ext/spl/tests/SplFileObject_setCsvControl_error001.phpt b/ext/spl/tests/SplFileObject_setCsvControl_error001.phpt index 296c4a1aa0c44..75249dbce4e59 100644 --- a/ext/spl/tests/SplFileObject_setCsvControl_error001.phpt +++ b/ext/spl/tests/SplFileObject_setCsvControl_error001.phpt @@ -13,11 +13,15 @@ CDATA ); $s = new SplFileObject('csv_control_data_error001.csv'); $s->setFlags(SplFileObject::READ_CSV); -$s->setCsvControl('||'); +try { + $s->setCsvControl('||'); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> --CLEAN-- ---EXPECTF-- -Warning: SplFileObject::setCsvControl(): delimiter must be a character in %s on line %d +--EXPECT-- +SplFileObject::setCsvControl(): Argument #1 ($delimiter) must be a single character diff --git a/ext/spl/tests/SplFileObject_setCsvControl_error002.phpt b/ext/spl/tests/SplFileObject_setCsvControl_error002.phpt index 885d600225256..3e4c206fe0ab7 100644 --- a/ext/spl/tests/SplFileObject_setCsvControl_error002.phpt +++ b/ext/spl/tests/SplFileObject_setCsvControl_error002.phpt @@ -13,11 +13,15 @@ CDATA ); $s = new SplFileObject('csv_control_data_error002.csv'); $s->setFlags(SplFileObject::READ_CSV); -$s->setCsvControl('|', 'two'); +try { + $s->setCsvControl('|', 'two'); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> --CLEAN-- ---EXPECTF-- -Warning: SplFileObject::setCsvControl(): enclosure must be a character in %s on line %d +--EXPECT-- +SplFileObject::setCsvControl(): Argument #2 ($enclosure) must be a single character diff --git a/ext/spl/tests/SplFileObject_setCsvControl_error003.phpt b/ext/spl/tests/SplFileObject_setCsvControl_error003.phpt index 9e885cbbe3dce..35934f5e5cb0a 100644 --- a/ext/spl/tests/SplFileObject_setCsvControl_error003.phpt +++ b/ext/spl/tests/SplFileObject_setCsvControl_error003.phpt @@ -15,11 +15,15 @@ CDATA ); $s = new SplFileObject('csv_control_data_error003.csv'); $s->setFlags(SplFileObject::READ_CSV); -$s->setCsvControl('|', '\'', 'three'); +try { + $s->setCsvControl('|', '\'', 'three'); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> --CLEAN-- ---EXPECTF-- -Warning: SplFileObject::setCsvControl(): escape must be empty or a single character in %s on line %d +--EXPECT-- +SplFileObject::setCsvControl(): Argument #3 ($escape) must be empty or a single character diff --git a/ext/standard/file.c b/ext/standard/file.c index 9ffcf322fb6ae..c9cf1d29b064d 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1815,11 +1815,9 @@ PHP_FUNCTION(fputcsv) if (delimiter_str != NULL) { /* Make sure that there is at least one character in string */ - if (delimiter_str_len < 1) { + if (delimiter_str_len != 1) { zend_argument_value_error(3, "must be a single character"); RETURN_THROWS(); - } else if (delimiter_str_len > 1) { - php_error_docref(NULL, E_WARNING, "Argument #3 ($delimiter) must be a single character"); } /* use first character from string */ @@ -1827,11 +1825,9 @@ PHP_FUNCTION(fputcsv) } if (enclosure_str != NULL) { - if (enclosure_str_len < 1) { + if (enclosure_str_len != 1) { zend_argument_value_error(4, "must be a single character"); RETURN_THROWS(); - } else if (enclosure_str_len > 1) { - php_error_docref(NULL, E_WARNING, "Argument #4 ($enclosure) must be a single character"); } /* use first character from string */ enclosure = *enclosure_str; @@ -1839,7 +1835,8 @@ PHP_FUNCTION(fputcsv) if (escape_str != NULL) { if (escape_str_len > 1) { - php_error_docref(NULL, E_WARNING, "Argument #5 ($escape) must be empty or a single character"); + zend_argument_value_error(5, "must be empty or a single character"); + RETURN_THROWS(); } if (escape_str_len < 1) { escape_char = PHP_CSV_NO_ESCAPE; @@ -1953,11 +1950,9 @@ PHP_FUNCTION(fgetcsv) if (delimiter_str != NULL) { /* Make sure that there is at least one character in string */ - if (delimiter_str_len < 1) { + if (delimiter_str_len != 1) { zend_argument_value_error(3, "must be a single character"); RETURN_THROWS(); - } else if (delimiter_str_len > 1) { - php_error_docref(NULL, E_WARNING, "Argument #3 ($delimiter) must be a single character"); } /* use first character from string */ @@ -1965,11 +1960,9 @@ PHP_FUNCTION(fgetcsv) } if (enclosure_str != NULL) { - if (enclosure_str_len < 1) { + if (enclosure_str_len != 1) { zend_argument_value_error(4, "must be a single character"); RETURN_THROWS(); - } else if (enclosure_str_len > 1) { - php_error_docref(NULL, E_WARNING, "Argument #4 ($enclosure) must be a single character"); } /* use first character from string */ @@ -1978,7 +1971,8 @@ PHP_FUNCTION(fgetcsv) if (escape_str != NULL) { if (escape_str_len > 1) { - php_error_docref(NULL, E_WARNING, "Argument #5 ($enclosure) must be empty or a single character"); + zend_argument_value_error(5, "must be empty or a single character"); + RETURN_THROWS(); } if (escape_str_len < 1) { diff --git a/ext/standard/tests/file/fgetcsv_variation12.phpt b/ext/standard/tests/file/fgetcsv_variation12.phpt index 34a855c2d11da..faf75bdb93ae8 100644 --- a/ext/standard/tests/file/fgetcsv_variation12.phpt +++ b/ext/standard/tests/file/fgetcsv_variation12.phpt @@ -69,7 +69,11 @@ foreach ($csv_lists as $csv_list) { fseek($file_handle, 0, SEEK_SET); $del = "++"; $enc = "%%"; - var_dump( fgetcsv($file_handle, 1024, $del, $enc) ); + try { + var_dump( fgetcsv($file_handle, 1024, $del, $enc) ); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } // check the file pointer position and if eof var_dump( ftell($file_handle) ); var_dump( feof($file_handle) ); @@ -83,870 +87,366 @@ foreach ($csv_lists as $csv_list) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing fgetcsv() : with two chars as enclosure & delimiter *** -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) Done diff --git a/ext/standard/tests/file/fgetcsv_variation19.phpt b/ext/standard/tests/file/fgetcsv_variation19.phpt index bf692c7be9a25..bae8985cb554f 100644 --- a/ext/standard/tests/file/fgetcsv_variation19.phpt +++ b/ext/standard/tests/file/fgetcsv_variation19.phpt @@ -1,5 +1,5 @@ --TEST-- -Test fgetcsv() : usage variations - with default enclosure & delimiter of two chars +Test fgetcsv() : usage variations - with enclosure of two chars --FILE-- getMessage(), "\n"; + } // check the file pointer position and if eof var_dump( ftell($file_handle) ); var_dump( feof($file_handle) ); @@ -81,756 +85,381 @@ foreach ($csv_lists as $csv_list) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing fgetcsv() : with default enclosure & delimiter of two chars *** -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water,fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(11) "water fruit" -} -int(12) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) "water "fruit"" -} -int(16) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(19) "water\"fruit"\"air"" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "water\"fruit"\"""" -} -int(20) +fgetcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) Done diff --git a/ext/standard/tests/file/fgetcsv_variation24.phpt b/ext/standard/tests/file/fgetcsv_variation24.phpt deleted file mode 100644 index 1a6ef177523fa..0000000000000 --- a/ext/standard/tests/file/fgetcsv_variation24.phpt +++ /dev/null @@ -1,666 +0,0 @@ ---TEST-- -Test fgetcsv() : usage variations - two chars as enclosure & delimiter (various write modes) ---FILE-- - ---EXPECTF-- -*** Testing fgetcsv() : with two chars as enclosure & delimiter *** - --- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) -bool(false) - --- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) -bool(false) - --- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) -bool(false) - --- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) -bool(false) - --- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) -bool(false) - --- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(13) ""water",fruit" -} -int(14) -bool(false) - --- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) ""water","fruit"" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "^water^ ^fruit^" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "&water&:&fruit&" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(15) "=water===fruit=" -} -int(16) -bool(false) - --- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) -bool(false) - --- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) -bool(false) - --- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) -bool(false) - --- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) -bool(false) - --- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) -bool(false) - --- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(17) "-water--fruit-air" -} -int(18) -bool(false) - --- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) -bool(false) - --- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) -bool(false) - --- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) -bool(false) - --- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) -bool(false) - --- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) -bool(false) - --- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(21) "-water---fruit---air-" -} -int(22) -bool(false) - --- Testing fgetcsv() with file opened using w+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) -bool(false) - --- Testing fgetcsv() with file opened using w+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) -bool(false) - --- Testing fgetcsv() with file opened using w+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) -bool(false) - --- Testing fgetcsv() with file opened using x+ mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) -bool(false) - --- Testing fgetcsv() with file opened using x+b mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) -bool(false) - --- Testing fgetcsv() with file opened using x+t mode -- - -Warning: fgetcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fgetcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -array(1) { - [0]=> - string(23) "&""""&:&"&:,:":&,&:,,,," -} -int(24) -bool(false) -Done diff --git a/ext/standard/tests/file/fputcsv_variation13.phpt b/ext/standard/tests/file/fputcsv_variation13.phpt index 7c1d71093ee7e..297819f68165d 100644 --- a/ext/standard/tests/file/fputcsv_variation13.phpt +++ b/ext/standard/tests/file/fputcsv_variation13.phpt @@ -1,5 +1,5 @@ --TEST-- -Test fputcsv() : usage variations - with default enclosure & delimiter of two chars +Test fputcsv() : usage variations - with enclosure of two chars --FILE-- getMessage(), "\n"; + } // check the file pointer position and eof var_dump( ftell($file_handle) ); var_dump( feof($file_handle) ); @@ -68,978 +72,654 @@ foreach ($csv_lists as $csv_list) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing fputcsv() : with default enclosure & delimiter of two chars *** -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "water,fruit -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "water,fruit -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "water,fruit -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "water,fruit -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(20) """"water"",""fruit" -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(20) """"water"",""fruit" -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) """"water"",""fruit" -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(20) """"water"",""fruit" -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(20) """"water"",""fruit" -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) """"water"",""fruit" -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(20) """"water"",""fruit" -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(20) """"water"",""fruit" -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) """"water"",""fruit" -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(20) """"water"",""fruit" -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(20) """"water"",""fruit" -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(20) -int(20) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) """"water"",""fruit" -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) """"water"",""fruit""" -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) """"water"",""fruit""" -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) """"water"",""fruit""" -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) """"water"",""fruit""" -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) """"water"",""fruit""" -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) """"water"",""fruit""" -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) """"water"",""fruit""" -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) """"water"",""fruit""" -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) """"water"",""fruit""" -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) """"water"",""fruit""" -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) """"water"",""fruit""" -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) """"water"",""fruit""" -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) ""^water^ ^fruit^" -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) ""^water^ ^fruit^" -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) ""^water^ ^fruit^" -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) ""^water^ ^fruit^" -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) ""^water^ ^fruit^" -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) ""^water^ ^fruit^" -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) ""^water^ ^fruit^" -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) ""^water^ ^fruit^" -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) ""^water^ ^fruit^" -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) ""^water^ ^fruit^" -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) ""^water^ ^fruit^" -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) ""^water^ ^fruit^" -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "&water&:&fruit& -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "&water&:&fruit& -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "&water&:&fruit& -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "&water&:&fruit& -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "=water===fruit= -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "=water===fruit= -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "=water===fruit= -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "=water===fruit= -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "-water--fruit-air -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "-water--fruit-air -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "-water--fruit-air -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "-water--fruit-air -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "-water---fruit---air- -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "-water---fruit---air- -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "-water---fruit---air- -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) "-water---fruit---air- -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(32) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(32) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(32) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(32) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(32) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(32) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(32) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(32) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d -int(32) -int(32) +fputcsv(): Argument #4 ($enclosure) must be a single character +int(0) bool(false) -string(%d) ""&""""""""&:&""&:,:"":&,&:,,,," -" +string(0) "" Done diff --git a/ext/standard/tests/file/fputcsv_variation14.phpt b/ext/standard/tests/file/fputcsv_variation14.phpt deleted file mode 100644 index 5c4c669e7f562..0000000000000 --- a/ext/standard/tests/file/fputcsv_variation14.phpt +++ /dev/null @@ -1,405 +0,0 @@ ---TEST-- -Test fputcsv() : usage variations - with enclosure & delimiter of two chars(read only modes) ---FILE-- - ---EXPECTF-- -*** Testing fputcsv() : with enclosure & delimiter of two chars and file opened in read mode *** - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 12 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 12 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 12 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 15 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 15 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 15 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 22 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 22 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 22 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in r -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 24 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rb -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 24 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" - --- file opened in rt -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d - -Notice: fputcsv(): Write of 24 bytes failed with errno=9 Bad file descriptor in %s on line %d -bool(false) -int(0) -bool(false) -string(0) "" -Done diff --git a/ext/standard/tests/file/fputcsv_variation9.phpt b/ext/standard/tests/file/fputcsv_variation9.phpt index 957fb9966f38e..405122b448ef3 100644 --- a/ext/standard/tests/file/fputcsv_variation9.phpt +++ b/ext/standard/tests/file/fputcsv_variation9.phpt @@ -50,8 +50,11 @@ foreach ($csv_lists as $csv_list) { $csv_field = $csv_list[2]; // write to a file in csv format - var_dump( fputcsv($file_handle, $csv_field, '++', '%%' -) ); + try { + var_dump( fputcsv($file_handle, $csv_field, '++', '%%') ); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } // check the file pointer position and eof var_dump( ftell($file_handle) ); var_dump( feof($file_handle) ); @@ -68,1194 +71,654 @@ foreach ($csv_lists as $csv_list) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing fputcsv() : with two chars as enclosure & delimiter *** -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "water,fruit -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "water,fruit -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "water,fruit -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(12) "water,fruit -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(12) -int(12) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "water,fruit -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(15) ""water","fruit -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(15) ""water","fruit -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) ""water","fruit -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(15) ""water","fruit -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(15) ""water","fruit -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) ""water","fruit -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(15) ""water","fruit -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(15) ""water","fruit -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) ""water","fruit -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(15) ""water","fruit -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(15) ""water","fruit -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(15) -int(15) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) ""water","fruit -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) ""water","fruit" -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) ""water","fruit" -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) ""water","fruit" -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) ""water","fruit" -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) ""water","fruit" -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) ""water","fruit" -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) ""water","fruit" -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) ""water","fruit" -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) ""water","fruit" -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) ""water","fruit" -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) ""water","fruit" -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) ""water","fruit" -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "%^water^ ^fruit^% -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "%^water^ ^fruit^% -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "%^water^ ^fruit^% -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "%^water^ ^fruit^% -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "%^water^ ^fruit^% -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "%^water^ ^fruit^% -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "%^water^ ^fruit^% -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "%^water^ ^fruit^% -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "%^water^ ^fruit^% -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "%^water^ ^fruit^% -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "%^water^ ^fruit^% -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "%^water^ ^fruit^% -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "&water&:&fruit& -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "&water&:&fruit& -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "&water&:&fruit& -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "&water&:&fruit& -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "&water&:&fruit& -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "=water===fruit= -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "=water===fruit= -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "=water===fruit= -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(16) "=water===fruit= -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(16) -int(16) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "=water===fruit= -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "-water--fruit-air -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "-water--fruit-air -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "-water--fruit-air -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(18) "-water--fruit-air -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(18) -int(18) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "-water--fruit-air -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "-water---fruit---air- -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "-water---fruit---air- -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "-water---fruit---air- -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(22) "-water---fruit---air- -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(22) -int(22) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "-water---fruit---air- -" +string(0) "" -- file opened in r+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(24) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in r+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(24) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in r+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in a+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(24) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in a+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(24) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in a+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in w+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(24) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in w+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(24) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in w+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in x+ -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(24) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in x+b -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(24) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" -- file opened in x+t -- - -Warning: fputcsv(): Argument #3 ($delimiter) must be a single character in %s on line %d - -Warning: fputcsv(): Argument #4 ($enclosure) must be a single character in %s on line %d -int(24) -int(24) +fputcsv(): Argument #3 ($delimiter) must be a single character +int(0) bool(false) -string(%d) "&""""&:&"&:,:":&,&:,,,, -" +string(0) "" Done From 9439d65f0d74d391f9620491896a1a04bc033648 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 23 Sep 2020 10:38:59 +0200 Subject: [PATCH 072/209] Fix #77493: curl_basic_009 fails with newer curl versions libcurl 7.62.0 introduced a maximum protocol length of 8, so this test case failed with `CURLE_URL_MALFORMAT`. While this is lifted to 40 as of libcurl 7.65.0, and this test case has already been fixed with commit e27301c[1], we restore the original intention to check for a `CURLE_UNSUPPORTED_PROTOCOL ` error. [1] --- ext/curl/tests/curl_basic_009.phpt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/curl/tests/curl_basic_009.phpt b/ext/curl/tests/curl_basic_009.phpt index 3b36a785409cf..a9aaf4c50f1af 100644 --- a/ext/curl/tests/curl_basic_009.phpt +++ b/ext/curl/tests/curl_basic_009.phpt @@ -7,7 +7,7 @@ TestFest 2009 - AFUP - Perrick Penet --FILE-- ---EXPECTREGEX-- -string\(\d+\) "([^\r\n]*rotocol[^\r\n]+|Could not resolve host: .+)" -int\(\d\) +--EXPECTF-- +string(%d) "%Srotocol%s" +int(1) From 2576c57a5133df757c51f341e794bf53add7663f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 22 Sep 2020 18:57:21 +0200 Subject: [PATCH 073/209] Fix #76735: Incorrect message in fopen on invalid mode We have to log errors in `stream_opener` callbacks to the wrapper's error log, because otherwise we may pick up an unrelated `errno` or a most generic message. Closes GH-6187. --- NEWS | 1 + ext/bz2/tests/002.phpt | 4 ++-- ext/standard/tests/file/bug76735.phpt | 8 ++++++++ main/streams/plain_wrapper.c | 4 +--- 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 ext/standard/tests/file/bug76735.phpt diff --git a/NEWS b/NEWS index 12a2de1385f01..6d8ed53499e1c 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ PHP NEWS - Standard: . Fixed bug #80114 (parse_url does not accept URLs with port 0). (cmb, twosee) . Fixed bug #76943 (Inconsistent stream_wrapper_restore() errors). (cmb) + . Fixed bug #76735 (Incorrect message in fopen on invalid mode). (cmb) 01 Oct 2020, PHP 7.3.23 diff --git a/ext/bz2/tests/002.phpt b/ext/bz2/tests/002.phpt index a69514a71132c..1b0fd2a660742 100644 --- a/ext/bz2/tests/002.phpt +++ b/ext/bz2/tests/002.phpt @@ -83,12 +83,12 @@ bool(false) resource(%d) of type (stream) resource(%d) of type (stream) -Warning: fopen(bz_open_002.txt): failed to open stream: Bad file %s in %s on line %d +Warning: fopen(bz_open_002.txt): failed to open stream: `br' is not a valid mode for fopen in %s on line %d Warning: bzopen(): first parameter has to be string or file-resource in %s on line %d bool(false) -Warning: fopen(bz_open_002.txt): failed to open stream: Bad file %s in %s on line %d +Warning: fopen(bz_open_002.txt): failed to open stream: `br' is not a valid mode for fopen in %s on line %d Warning: bzopen(): first parameter has to be string or file-resource in %s on line %d bool(false) diff --git a/ext/standard/tests/file/bug76735.phpt b/ext/standard/tests/file/bug76735.phpt new file mode 100644 index 0000000000000..451988cc65542 --- /dev/null +++ b/ext/standard/tests/file/bug76735.phpt @@ -0,0 +1,8 @@ +--TEST-- +Bug #76735 (Incorrect message in fopen on invalid mode) +--FILE-- + +--EXPECTF-- +Warning: fopen(%s): failed to open stream: `Q' is not a valid mode for fopen in %s on line %d diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index d00a6efe29d28..131f77c4218eb 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -1021,9 +1021,7 @@ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, zen char *persistent_id = NULL; if (FAILURE == php_stream_parse_fopen_modes(mode, &open_flags)) { - if (options & REPORT_ERRORS) { - php_error_docref(NULL, E_WARNING, "`%s' is not a valid mode for fopen", mode); - } + php_stream_wrapper_log_error(&php_plain_files_wrapper, options, "`%s' is not a valid mode for fopen", mode); return NULL; } From 47b2e449904a2d24496820e4e6a63511ef227caf Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 23 Sep 2020 11:20:30 +0200 Subject: [PATCH 074/209] Fix test case --- ext/bz2/tests/002.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/bz2/tests/002.phpt b/ext/bz2/tests/002.phpt index 79f68b38f71a0..3ff0aedeb5b82 100644 --- a/ext/bz2/tests/002.phpt +++ b/ext/bz2/tests/002.phpt @@ -93,7 +93,7 @@ resource(%d) of type (stream) Warning: fopen(bz_open_002.txt): Failed to open stream: `br' is not a valid mode for fopen in %s on line %d bzopen(): Argument #1 ($file) must be of type string or file-resource, bool given -Warning: fopen(bz_open_002.txt): Failed to open stream: `br' is not a valid mode for fopen %s in %s on line %d +Warning: fopen(bz_open_002.txt): Failed to open stream: `br' is not a valid mode for fopen in %s on line %d bzopen(): Argument #1 ($file) must be of type string or file-resource, bool given Warning: bzopen(): cannot write to a stream opened in read only mode in %s on line %d From 821f6bb51128ab41ae2f0de637baabbb974c12b0 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 23 Sep 2020 11:44:32 +0200 Subject: [PATCH 075/209] Clean up file created during testing --- ext/standard/tests/file/bug78241.phpt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/tests/file/bug78241.phpt b/ext/standard/tests/file/bug78241.phpt index 99fed8a5a3fd6..e612560ada5c2 100644 --- a/ext/standard/tests/file/bug78241.phpt +++ b/ext/standard/tests/file/bug78241.phpt @@ -19,6 +19,10 @@ for ($i = 2037; $i <= 2040; $i++) { echo 'File: '.date('D, d M Y H:i:s', $file), PHP_EOL, PHP_EOL; } ?> +--CLEAN-- + --EXPECT-- Date: Thu, 01 Jan 2037 01:01:01 File: Thu, 01 Jan 2037 01:01:01 From 6a4eeb1c47c46d8f6a1c43eb7de8e6ee8158ec99 Mon Sep 17 00:00:00 2001 From: twosee Date: Tue, 10 Dec 2019 14:55:10 +0800 Subject: [PATCH 076/209] Improve PDO::inTransaction() support for MySQL Closes GH-4996. --- ext/pdo_mysql/mysql_driver.c | 17 ++++- .../tests/pdo_mysql_inTransaction.phpt | 67 +++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 ext/pdo_mysql/tests/pdo_mysql_inTransaction.phpt diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 95f719a6150f3..a666489a503f9 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -532,6 +532,21 @@ static void pdo_mysql_request_shutdown(pdo_dbh_t *dbh) } /* }}} */ +#ifdef PDO_USE_MYSQLND +# define pdo_mysql_get_server_status(m) mysqlnd_get_server_status(m) +#else +# define pdo_mysql_get_server_status(m) (m)->server_status +#endif + +/* {{{ pdo_mysql_in_transaction */ +static int pdo_mysql_in_transaction(pdo_dbh_t *dbh) +{ + pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; + PDO_DBG_ENTER("pdo_mysql_in_transaction"); + PDO_DBG_RETURN((pdo_mysql_get_server_status(H->server) & SERVER_STATUS_IN_TRANS) != 0); +} +/* }}} */ + /* {{{ mysql_methods */ static const struct pdo_dbh_methods mysql_methods = { mysql_handle_closer, @@ -548,7 +563,7 @@ static const struct pdo_dbh_methods mysql_methods = { pdo_mysql_check_liveness, NULL, pdo_mysql_request_shutdown, - NULL + pdo_mysql_in_transaction }; /* }}} */ diff --git a/ext/pdo_mysql/tests/pdo_mysql_inTransaction.phpt b/ext/pdo_mysql/tests/pdo_mysql_inTransaction.phpt new file mode 100644 index 0000000000000..6d82e22b1238f --- /dev/null +++ b/ext/pdo_mysql/tests/pdo_mysql_inTransaction.phpt @@ -0,0 +1,67 @@ +--TEST-- +MySQL PDO class inTransaction +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_EMULATE_PREPARES, false); // mysql does not support +for ($b = 0; $b < count(BEGIN); $b++) { + for ($e = 0; $e < count(END); $e++) { + foreach (['exec', 'query', 'execute'] as $w) { + foreach ([BEGIN[$b], END[$e]] as $command) { + switch ($w) { + case 'exec': + $db->exec($command); + break; + case'query': + $db->query($command)->execute(); + break; + case 'execute': + /* EMULATE_PREPARES = QUERY */ + $db->prepare($command)->execute(); + break; + default: + assert(0); + } + var_dump($db->inTransaction()); + } + } + } +} + +?> +--EXPECT-- +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) From 1fcd6cdbb8927c7f770520f2cd4362015efce91d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 23 Sep 2020 12:13:35 +0200 Subject: [PATCH 077/209] Fix #80139: copy_variation5.phpt fails when run on bind mount This test case is not supposed to run on case-insensitive file system; just checking for macOS/Windows doesn't cut it. --- ext/standard/tests/file/copy_variation5.phpt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/standard/tests/file/copy_variation5.phpt b/ext/standard/tests/file/copy_variation5.phpt index 6da9f1f48c725..0f0d985c3d858 100644 --- a/ext/standard/tests/file/copy_variation5.phpt +++ b/ext/standard/tests/file/copy_variation5.phpt @@ -2,8 +2,7 @@ Test copy() function: usage variations - destination file names(case sensitive) --SKIPIF-- --FILE-- Date: Wed, 23 Sep 2020 12:34:19 +0200 Subject: [PATCH 078/209] Remove unused --temp-urlbase option from run-tests.php This was part of the removed HTML functionality. --- run-tests.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/run-tests.php b/run-tests.php index 8d62c8337599c..761ef949fe931 100755 --- a/run-tests.php +++ b/run-tests.php @@ -145,7 +145,7 @@ function main(): void $optionals, $output_file, $pass_option_n, $pass_options, $pattern_match, $php, $php_cgi, $phpdbg, $preload, $redir_tests, $repeat, $result_tests_file, $slow_min_ms, $start_time, $switch, - $temp_source, $temp_target, $temp_urlbase, $test_cnt, $test_dirs, + $temp_source, $temp_target, $test_cnt, $test_dirs, $test_files, $test_idx, $test_list, $test_results, $testfile, $user_tests, $valgrind, $sum_results, $shuffle, $file_cache; // Parallel testing @@ -389,7 +389,6 @@ function main(): void $valgrind = null; $temp_source = null; $temp_target = null; - $temp_urlbase = null; $conf_passed = null; $no_clean = false; $colorize = true; @@ -594,12 +593,6 @@ function main(): void break; case '--temp-target': $temp_target = $argv[++$i]; - if ($temp_urlbase) { - $temp_urlbase = $temp_target; - } - break; - case '--temp-urlbase': - $temp_urlbase = $argv[++$i]; break; case 'v': case '--verbose': From 3c4fb70f2b3dcc3b60759f94bb4186fc67c19027 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 23 Sep 2020 15:44:04 +0300 Subject: [PATCH 079/209] Replace ZEND_JIT_TRACE_STOP_RETURN_HALT and ZEND_JIT_TRACE_STOP_HALT by separate ZEND_JIT_TRACE_HALT flag. --- ext/opcache/jit/zend_jit_internal.h | 3 +-- ext/opcache/jit/zend_jit_trace.c | 26 +++++++++++--------------- ext/opcache/jit/zend_jit_vm_helpers.c | 14 +++++++++----- ext/opcache/jit/zend_jit_x86.dasc | 1 - 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index d17d2451d3b0a..d44aaae0e172d 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -142,7 +142,6 @@ int ZEND_FASTCALL zend_jit_check_constant(const zval *key); _(RECURSIVE_CALL, "recursive call") \ _(RECURSIVE_RET, "recursive return") \ _(RETURN, "return") \ - _(RETURN_HALT, "return from interpreter") \ _(INTERPRETER, "exit to VM interpreter") \ _(LINK, "link to another trace") \ /* compilation and linking successful */ \ @@ -163,7 +162,6 @@ int ZEND_FASTCALL zend_jit_check_constant(const zval *key); _(COMPILED_LOOP, "compiled loop") \ _(TRAMPOLINE, "trampoline call") \ _(BAD_FUNC, "bad function call") \ - _(HALT, "exit from interpreter") \ _(COMPILER_ERROR, "JIT compilation error") \ /* no recoverable error (blacklist immediately) */ \ _(NO_SHM, "insufficient shared memory") \ @@ -176,6 +174,7 @@ int ZEND_FASTCALL zend_jit_check_constant(const zval *key); typedef enum _zend_jit_trace_stop { ZEND_JIT_TRACE_STOP(ZEND_JIT_TRACE_STOP_NAME) + ZEND_JIT_TRACE_HALT = 0x40 } zend_jit_trace_stop; #define ZEND_JIT_TRACE_STOP_OK(ret) \ diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 2b407364993d1..f7f232f70821c 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -5620,8 +5620,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } else { zend_jit_trace_return(&dasm_state, 0); } - } else if (p->stop == ZEND_JIT_TRACE_STOP_RETURN - || p->stop == ZEND_JIT_TRACE_STOP_RETURN_HALT) { + } else if (p->stop == ZEND_JIT_TRACE_STOP_RETURN) { zend_jit_trace_return(&dasm_state, 0); } else { // TODO: not implemented ??? @@ -5661,7 +5660,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } } } else if (p->stop == ZEND_JIT_TRACE_STOP_LINK - || p->stop == ZEND_JIT_TRACE_STOP_RETURN_HALT || p->stop == ZEND_JIT_TRACE_STOP_INTERPRETER) { if (opline && (opline->opcode == ZEND_DO_UCALL @@ -6245,14 +6243,16 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const ZEND_OP_TRACE_INFO(opline, offset)->trace_flags & ZEND_JIT_TRACE_START_MASK, 0); JIT_G(tracing) = 0; + if (stop & ZEND_JIT_TRACE_HALT) { + ret = -1; + } + stop &= ~ZEND_JIT_TRACE_HALT; + if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { zend_jit_dump_trace(trace_buffer, NULL); } if (ZEND_JIT_TRACE_STOP_OK(stop)) { - if (stop == ZEND_JIT_TRACE_STOP_RETURN_HALT) { - ret = -1; - } if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_STOP) { if (stop == ZEND_JIT_TRACE_STOP_LINK) { uint32_t idx = trace_buffer[1].last; @@ -6277,9 +6277,6 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const goto abort; } } else { - if (stop == ZEND_JIT_TRACE_STOP_HALT) { - ret = -1; - } abort: if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_ABORT) { fprintf(stderr, "---- TRACE %d abort (%s)\n", @@ -6534,14 +6531,16 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 stop = zend_jit_trace_execute(execute_data, EX(opline), trace_buffer, ZEND_JIT_TRACE_START_SIDE, is_megamorphic); JIT_G(tracing) = 0; + if (stop & ZEND_JIT_TRACE_HALT) { + ret = -1; + } + stop &= ~ZEND_JIT_TRACE_HALT; + if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { zend_jit_dump_trace(trace_buffer, NULL); } if (ZEND_JIT_TRACE_STOP_OK(stop)) { - if (stop == ZEND_JIT_TRACE_STOP_RETURN_HALT) { - ret = -1; - } if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_STOP) { if (stop == ZEND_JIT_TRACE_STOP_LINK) { uint32_t idx = trace_buffer[1].last; @@ -6575,9 +6574,6 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 goto abort; } } else { - if (stop == ZEND_JIT_TRACE_STOP_HALT) { - ret = -1; - } abort: if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_ABORT) { fprintf(stderr, "---- TRACE %d abort (%s)\n", diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 6cb8df08d9da1..968e9c2d3c01a 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -579,6 +579,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, #endif const zend_op *orig_opline, *end_opline; zend_jit_trace_stop stop = ZEND_JIT_TRACE_STOP_ERROR; + zend_jit_trace_stop halt = 0; int level = 0; int ret_level = 0; int call_level; @@ -762,7 +763,9 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, #ifdef HAVE_GCC_GLOBAL_REGS handler(); if (UNEXPECTED(opline == zend_jit_halt_op)) { - stop = ZEND_JIT_TRACE_STOP_RETURN_HALT; + stop = ZEND_JIT_TRACE_STOP_RETURN; + opline = NULL; + halt = ZEND_JIT_TRACE_HALT; break; } if (UNEXPECTED(execute_data != prev_execute_data)) { @@ -770,7 +773,9 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, rc = handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); if (rc != 0) { if (rc < 0) { - stop = ZEND_JIT_TRACE_STOP_RETURN_HALT; + stop = ZEND_JIT_TRACE_STOP_RETURN; + opline = NULL; + halt = ZEND_JIT_TRACE_HALT; break; } else if (execute_data == EG(current_execute_data)) { /* return after interrupt handler */ @@ -1035,8 +1040,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, TRACE_END(ZEND_JIT_TRACE_END, stop, end_opline); #ifdef HAVE_GCC_GLOBAL_REGS - if (stop != ZEND_JIT_TRACE_STOP_HALT - && stop != ZEND_JIT_TRACE_STOP_RETURN_HALT) { + if (!halt) { EX(opline) = opline; } #endif @@ -1046,5 +1050,5 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, opline = save_opline; #endif - return stop; + return stop | halt; } diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index deed2c402e8ca..0aab3961cb02b 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -3532,7 +3532,6 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra } if (trace->op != ZEND_JIT_TRACE_END || (trace->stop != ZEND_JIT_TRACE_STOP_RETURN && - trace->stop != ZEND_JIT_TRACE_STOP_RETURN_HALT && trace->stop != ZEND_JIT_TRACE_STOP_INTERPRETER)) { const zend_op *next_opline = trace->opline; From 25569679aae88af948ee0d28c24aa2b2d1ec5398 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 17 Sep 2020 17:22:01 +0200 Subject: [PATCH 080/209] Promote warnings to Error in IMAP extension Drop some dependencies on argc at the same time Closes GH-6164 --- ext/imap/php_imap.c | 422 +++++++++++------- ext/imap/tests/imap_body.phpt | 23 +- ext/imap/tests/imap_close_variation4.phpt | 19 +- .../tests/imap_fetch_overview_variation3.phpt | 25 +- ext/imap/tests/imap_fetchbody_variation4.phpt | 21 +- ext/imap/tests/imap_fetchbody_variation6.phpt | 13 +- .../tests/imap_fetchheader_variation3.phpt | 20 +- .../tests/imap_fetchheader_variation5.phpt | 13 +- ext/imap/tests/imap_fetchstructure_basic.phpt | 7 +- ext/imap/tests/imap_gc_error.phpt | 11 +- ext/imap/tests/imap_open_error.phpt | 22 +- 11 files changed, 344 insertions(+), 252 deletions(-) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index d8c07a86dd778..98085884ab87e 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -141,9 +141,14 @@ ZEND_GET_MODULE(imap) /* True globals, no need for thread safety */ static int le_imap; -#define PHP_IMAP_CHECK_MSGNO(msgindex) \ - if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) { \ - php_error_docref(NULL, E_WARNING, "Bad message number"); \ +// TODO Promote to ValueError? +#define PHP_IMAP_CHECK_MSGNO(msgindex, arg_pos) \ + if (msgindex < 1) { \ + zend_argument_value_error(arg_pos, "must be greater than 0"); \ + RETURN_THROWS(); \ + } \ + if (((unsigned) msgindex) > imap_le_struct->imap_stream->nmsgs) { \ + php_error_docref(NULL, E_WARNING, "Bad message number"); \ RETURN_FALSE; \ } \ @@ -695,22 +700,31 @@ PHP_MINFO_FUNCTION(imap) } /* }}} */ -/* {{{ imap_do_open */ -static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) +/* {{{ Open an IMAP stream to a mailbox */ +PHP_FUNCTION(imap_open) { zend_string *mailbox, *user, *passwd; - zend_long retries = 0, flags = NIL, cl_flags = NIL; + zend_long retries = 0, flags = 0, cl_flags = 0; MAILSTREAM *imap_stream; pils *imap_le_struct; HashTable *params = NULL; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "PSS|llh", &mailbox, &user, - &passwd, &flags, &retries, ¶ms) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "PSS|llh", &mailbox, &user, &passwd, &flags, &retries, ¶ms) == FAILURE) { + RETURN_THROWS(); + } + + if (flags && ((flags & ~(OP_READONLY | OP_ANONYMOUS | OP_HALFOPEN | CL_EXPUNGE | OP_DEBUG | OP_SHORTCACHE + | OP_SILENT | OP_PROTOTYPE | OP_SECURE)) != 0)) { + zend_argument_value_error(4, "must be a bitmask of the OP_* constants, and CL_EXPUNGE"); RETURN_THROWS(); } - if (argc >= 4) { + if (retries < 0) { + zend_argument_value_error(5, "must be greater than or equal to 0"); + RETURN_THROWS(); + } + + if (flags) { if (flags & PHP_EXPUNGE) { cl_flags = CL_EXPUNGE; flags ^= PHP_EXPUNGE; @@ -746,16 +760,16 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) mail_parameters(NIL, DISABLE_AUTHENTICATOR, (void *)Z_STRVAL_P(z_auth_method)); } } else { - php_error_docref(NULL, E_WARNING, "Invalid argument, expect string or array of strings"); + zend_argument_type_error(6, "option \"DISABLE_AUTHENTICATOR\" must be a string or an array of strings"); + RETURN_THROWS(); } } } } break; - case IS_LONG: default: - php_error_docref(NULL, E_WARNING, "Invalid argument, expect string or array of strings"); - break; + zend_argument_type_error(6, "option \"DISABLE_AUTHENTICATOR\" must be a string or an array of strings"); + RETURN_THROWS(); } } } @@ -779,12 +793,8 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) IMAPG(imap_password) = estrndup(ZSTR_VAL(passwd), ZSTR_LEN(passwd)); #ifdef SET_MAXLOGINTRIALS - if (argc >= 5) { - if (retries < 0) { - php_error_docref(NULL, E_WARNING ,"Retries must be greater or equal to 0"); - } else { - mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) retries); - } + if (retries) { + mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) retries); } #endif @@ -805,13 +815,6 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) } /* }}} */ -/* {{{ Open an IMAP stream to a mailbox */ -PHP_FUNCTION(imap_open) -{ - php_imap_do_open(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); -} -/* }}} */ - /* {{{ Reopen an IMAP stream to a new mailbox */ PHP_FUNCTION(imap_reopen) { @@ -830,6 +833,18 @@ PHP_FUNCTION(imap_reopen) RETURN_THROWS(); } + /* TODO Verify these are the only options available as they are pulled from the php.net documentation */ + if (options && ((options & ~(OP_READONLY | OP_ANONYMOUS | OP_HALFOPEN | OP_EXPUNGE | CL_EXPUNGE)) != 0)) { + zend_argument_value_error(3, "must be a bitmask of OP_READONLY, OP_ANONYMOUS, OP_HALFOPEN, " + "OP_EXPUNGE, and CL_EXPUNGE"); + RETURN_THROWS(); + } + + if (retries < 0) { + zend_argument_value_error(4, "must be greater than or equal to 0"); + RETURN_THROWS(); + } + if (options) { flags = options; if (flags & PHP_EXPUNGE) { @@ -888,11 +903,14 @@ PHP_FUNCTION(imap_append) 0, Z_L(0), Z_L(0)); if (!Z_LVAL_P(return_value)) { + // TODO Promoto to error? php_error_docref(NULL, E_WARNING, "Internal date not correctly formatted"); internal_date = NULL; } } + /* TODO Check if flags are valid (documentation is not present on php.net so need to check this first) */ + if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { RETURN_THROWS(); } @@ -1126,17 +1144,18 @@ PHP_FUNCTION(imap_gc) RETURN_THROWS(); } - if (flags && ((flags & ~(GC_TEXTS | GC_ELT | GC_ENV)) != 0)) { - php_error_docref(NULL, E_WARNING, "Invalid value for the flags parameter"); - RETURN_FALSE; + if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { + RETURN_THROWS(); } - if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { + if (flags && ((flags & ~(GC_TEXTS | GC_ELT | GC_ENV)) != 0)) { + zend_argument_value_error(2, "must be a bitmask of IMAP_GC_TEXTS, IMAP_GC_ELT, and IMAP_GC_ENV"); RETURN_THROWS(); } mail_gc(imap_le_struct->imap_stream, flags); + // TODO Return void? RETURN_TRUE; } /* }}} */ @@ -1147,9 +1166,8 @@ PHP_FUNCTION(imap_close) zval *streamind; pils *imap_le_struct=NULL; zend_long options = 0, flags = NIL; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "r|l", &streamind, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &streamind, &options) == FAILURE) { RETURN_THROWS(); } @@ -1157,13 +1175,13 @@ PHP_FUNCTION(imap_close) RETURN_THROWS(); } - if (argc == 2) { + if (options) { flags = options; /* Check that flags is exactly equal to PHP_EXPUNGE or zero */ if (flags && ((flags & ~PHP_EXPUNGE) != 0)) { - php_error_docref(NULL, E_WARNING, "Invalid value for the flags parameter"); - RETURN_FALSE; + zend_argument_value_error(2, "must be CL_EXPUNGE or 0"); + RETURN_THROWS(); } /* Do the translation from PHP's internal PHP_EXPUNGE define to c-client's CL_EXPUNGE */ @@ -1176,6 +1194,7 @@ PHP_FUNCTION(imap_close) zend_list_close(Z_RES_P(streamind)); + // TODO Return void? RETURN_TRUE; } /* }}} */ @@ -1237,37 +1256,45 @@ PHP_FUNCTION(imap_body) zval *streamind; zend_long msgno, flags = 0; pils *imap_le_struct; - int msgindex, argc = ZEND_NUM_ARGS(); + unsigned long msgindex; char *body; unsigned long body_len = 0; - if (zend_parse_parameters(argc, "rl|l", &streamind, &msgno, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|l", &streamind, &msgno, &flags) == FAILURE) { RETURN_THROWS(); } - if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) { - php_error_docref(NULL, E_WARNING, "Invalid value for the options parameter"); - RETURN_FALSE; + if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { + RETURN_THROWS(); } - if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { + if (msgno < 1) { + zend_argument_value_error(2, "must be greater than 0"); RETURN_THROWS(); } - if ((argc == 3) && (flags & FT_UID)) { + if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) { + zend_argument_value_error(3, "must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL"); + RETURN_THROWS(); + } + + if (flags && (flags & FT_UID)) { /* This should be cached; if it causes an extra RTT to the IMAP server, then that's the price we pay for making sure we don't crash. */ msgindex = mail_msgno(imap_le_struct->imap_stream, msgno); + if (msgindex == 0) { + php_error_docref(NULL, E_WARNING, "UID does not exist"); + RETURN_FALSE; + } } else { - msgindex = msgno; - } - if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) { - php_error_docref(NULL, E_WARNING, "Bad message number"); - RETURN_FALSE; + msgindex = (unsigned long) msgno; } - body = mail_fetchtext_full (imap_le_struct->imap_stream, msgno, &body_len, (argc == 3 ? flags : NIL)); + PHP_IMAP_CHECK_MSGNO(msgindex, 2); + + /* TODO Shouldn't this pass msgindex??? */ + body = mail_fetchtext_full (imap_le_struct->imap_stream, msgno, &body_len, flags); if (body_len == 0) { RETVAL_EMPTY_STRING(); } else { @@ -1282,10 +1309,9 @@ PHP_FUNCTION(imap_mail_copy) zval *streamind; zend_long options = 0; zend_string *seq, *folder; - int argc = ZEND_NUM_ARGS(); pils *imap_le_struct; - if (zend_parse_parameters(argc, "rSS|l", &streamind, &seq, &folder, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS|l", &streamind, &seq, &folder, &options) == FAILURE) { RETURN_THROWS(); } @@ -1293,7 +1319,12 @@ PHP_FUNCTION(imap_mail_copy) RETURN_THROWS(); } - if (mail_copy_full(imap_le_struct->imap_stream, ZSTR_VAL(seq), ZSTR_VAL(folder), (argc == 4 ? options : NIL)) == T) { + if (options && ((options & ~(CP_UID | CP_MOVE)) != 0)) { + zend_argument_value_error(4, "must be a bitmask of CP_UID, and CP_MOVE"); + RETURN_THROWS(); + } + + if (mail_copy_full(imap_le_struct->imap_stream, ZSTR_VAL(seq), ZSTR_VAL(folder), options) == T) { RETURN_TRUE; } else { RETURN_FALSE; @@ -1308,9 +1339,8 @@ PHP_FUNCTION(imap_mail_move) zend_string *seq, *folder; zend_long options = 0; pils *imap_le_struct; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rSS|l", &streamind, &seq, &folder, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS|l", &streamind, &seq, &folder, &options) == FAILURE) { RETURN_THROWS(); } @@ -1318,7 +1348,15 @@ PHP_FUNCTION(imap_mail_move) RETURN_THROWS(); } - if (mail_copy_full(imap_le_struct->imap_stream, ZSTR_VAL(seq), ZSTR_VAL(folder), (argc == 4 ? (options | CP_MOVE) : CP_MOVE)) == T) { + if (options && ((options & ~CP_UID) != 0)) { + zend_argument_value_error(4, "must be CP_UID or 0"); + RETURN_THROWS(); + } + + /* Add CP_MOVE flag */ + options = (options | CP_MOVE); + + if (mail_copy_full(imap_le_struct->imap_stream, ZSTR_VAL(seq), ZSTR_VAL(folder), options) == T) { RETURN_TRUE; } else { RETURN_FALSE; @@ -1552,12 +1590,12 @@ PHP_FUNCTION(imap_check) /* {{{ Mark a message for deletion */ PHP_FUNCTION(imap_delete) { - zval *streamind, *sequence; + zval *streamind; pils *imap_le_struct; + zend_string *sequence; zend_long flags = 0; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rz|l", &streamind, &sequence, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS|l", &streamind, &sequence, &flags) == FAILURE) { RETURN_THROWS(); } @@ -1565,11 +1603,12 @@ PHP_FUNCTION(imap_delete) RETURN_THROWS(); } - if (!try_convert_to_string(sequence)) { + if (flags && ((flags & ~FT_UID) != 0)) { + zend_argument_value_error(3, "must be FT_UID or 0"); RETURN_THROWS(); } - mail_setflag_full(imap_le_struct->imap_stream, Z_STRVAL_P(sequence), "\\DELETED", (argc == 3 ? flags : NIL)); + mail_setflag_full(imap_le_struct->imap_stream, ZSTR_VAL(sequence), "\\DELETED", flags); RETVAL_TRUE; } /* }}} */ @@ -1577,12 +1616,12 @@ PHP_FUNCTION(imap_delete) /* {{{ Remove the delete flag from a message */ PHP_FUNCTION(imap_undelete) { - zval *streamind, *sequence; + zval *streamind; + zend_string *sequence; zend_long flags = 0; pils *imap_le_struct; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rz|l", &streamind, &sequence, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS|l", &streamind, &sequence, &flags) == FAILURE) { RETURN_THROWS(); } @@ -1590,11 +1629,11 @@ PHP_FUNCTION(imap_undelete) RETURN_THROWS(); } - if (!try_convert_to_string(sequence)) { - RETURN_THROWS(); - } + /* TODO Check if flags are valid (documentation is not present on php.net so need to check this first) */ + + mail_clearflag_full(imap_le_struct->imap_stream, ZSTR_VAL(sequence), "\\DELETED", flags); - mail_clearflag_full(imap_le_struct->imap_stream, Z_STRVAL_P(sequence), "\\DELETED", (argc == 3 ? flags : NIL)); + // TODO Return void? RETVAL_TRUE; } /* }}} */ @@ -1603,14 +1642,13 @@ PHP_FUNCTION(imap_undelete) PHP_FUNCTION(imap_headerinfo) { zval *streamind; - int argc = ZEND_NUM_ARGS(); - zend_long msgno, fromlength, subjectlength; + zend_long msgno, fromlength = 0, subjectlength = 0; pils *imap_le_struct; MESSAGECACHE *cache; ENVELOPE *en; char dummy[2000], fulladdress[MAILTMPLEN + 1]; - if (zend_parse_parameters(argc, "rl|ll", &streamind, &msgno, &fromlength, &subjectlength) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|ll", &streamind, &msgno, &fromlength, &subjectlength) == FAILURE) { RETURN_THROWS(); } @@ -1618,24 +1656,17 @@ PHP_FUNCTION(imap_headerinfo) RETURN_THROWS(); } - if (argc >= 3) { - if (fromlength < 0 || fromlength > MAILTMPLEN) { - php_error_docref(NULL, E_WARNING, "From length has to be between 0 and %d", MAILTMPLEN); - RETURN_FALSE; - } - } else { - fromlength = 0x00; - } - if (argc >= 4) { - if (subjectlength < 0 || subjectlength > MAILTMPLEN) { - php_error_docref(NULL, E_WARNING, "Subject length has to be between 0 and %d", MAILTMPLEN); - RETURN_FALSE; - } - } else { - subjectlength = 0x00; + PHP_IMAP_CHECK_MSGNO(msgno, 2); + + if (fromlength < 0 || fromlength > MAILTMPLEN) { + zend_argument_value_error(3, "must be between 0 and %d", MAILTMPLEN); + RETURN_THROWS(); } - PHP_IMAP_CHECK_MSGNO(msgno); + if (subjectlength < 0 || subjectlength > MAILTMPLEN) { + zend_argument_value_error(4, "must be between 0 and %d", MAILTMPLEN); + RETURN_THROWS(); + } if (mail_fetchstructure(imap_le_struct->imap_stream, msgno, NIL)) { cache = mail_elt(imap_le_struct->imap_stream, msgno); @@ -1687,13 +1718,12 @@ PHP_FUNCTION(imap_rfc822_parse_headers) { zend_string *headers, *defaulthost = NULL; ENVELOPE *en; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "S|S", &headers, &defaulthost) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|S", &headers, &defaulthost) == FAILURE) { RETURN_THROWS(); } - if (argc == 2) { + if (defaulthost) { rfc822_parse_msg(&en, NULL, ZSTR_VAL(headers), ZSTR_LEN(headers), NULL, ZSTR_VAL(defaulthost), NIL); } else { rfc822_parse_msg(&en, NULL, ZSTR_VAL(headers), ZSTR_LEN(headers), NULL, "UNKNOWN", NIL); @@ -1846,38 +1876,44 @@ PHP_FUNCTION(imap_fetchstructure) zend_long msgno, flags = 0; pils *imap_le_struct; BODY *body; - int msgindex, argc = ZEND_NUM_ARGS(); + int msgindex; - if (zend_parse_parameters(argc, "rl|l", &streamind, &msgno, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|l", &streamind, &msgno, &flags) == FAILURE) { RETURN_THROWS(); } - if (flags && ((flags & ~FT_UID) != 0)) { - php_error_docref(NULL, E_WARNING, "Invalid value for the options parameter"); - RETURN_FALSE; - } - if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { RETURN_THROWS(); } if (msgno < 1) { - RETURN_FALSE; + zend_argument_value_error(2, "must be greater than 0"); + RETURN_THROWS(); + } + + if (flags && ((flags & ~FT_UID) != 0)) { + zend_argument_value_error(3, "must be FT_UID or 0"); + RETURN_THROWS(); } object_init(return_value); - if ((argc == 3) && (flags & FT_UID)) { + if (flags & FT_UID) { /* This should be cached; if it causes an extra RTT to the IMAP server, then that's the price we pay for making sure we don't crash. */ msgindex = mail_msgno(imap_le_struct->imap_stream, msgno); + if (msgindex == 0) { + php_error_docref(NULL, E_WARNING, "UID does not exist"); + RETURN_FALSE; + } } else { msgindex = msgno; } - PHP_IMAP_CHECK_MSGNO(msgindex); + PHP_IMAP_CHECK_MSGNO(msgindex, 2); - mail_fetchstructure_full(imap_le_struct->imap_stream, msgno, &body , (argc == 3 ? flags : NIL)); + /* TODO Shouldn't this pass msgindex??? */ + mail_fetchstructure_full(imap_le_struct->imap_stream, msgno, &body , (ZEND_NUM_ARGS() == 3 ? flags : NIL)); if (!body) { php_error_docref(NULL, E_WARNING, "No body information available"); @@ -1897,27 +1933,31 @@ PHP_FUNCTION(imap_fetchbody) char *body; zend_string *sec; unsigned long len; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rlS|l", &streamind, &msgno, &sec, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlS|l", &streamind, &msgno, &sec, &flags) == FAILURE) { RETURN_THROWS(); } - if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) { - php_error_docref(NULL, E_WARNING, "Invalid value for the options parameter"); - RETURN_FALSE; + if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { + RETURN_THROWS(); } - if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { + if (msgno < 1) { + zend_argument_value_error(2, "must be greater than 0"); + RETURN_THROWS(); + } + + if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) { + zend_argument_value_error(4, "must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL"); RETURN_THROWS(); } - if (argc < 4 || !(flags & FT_UID)) { + if (!(flags & FT_UID)) { /* only perform the check if the msgno is a message number and not a UID */ - PHP_IMAP_CHECK_MSGNO(msgno); + PHP_IMAP_CHECK_MSGNO(msgno, 2); } - body = mail_fetchbody_full(imap_le_struct->imap_stream, msgno, ZSTR_VAL(sec), &len, (argc == 4 ? flags : NIL)); + body = mail_fetchbody_full(imap_le_struct->imap_stream, msgno, ZSTR_VAL(sec), &len, flags); if (!body) { php_error_docref(NULL, E_WARNING, "No body information available"); @@ -1938,27 +1978,31 @@ PHP_FUNCTION(imap_fetchmime) char *body; zend_string *sec; unsigned long len; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rlS|l", &streamind, &msgno, &sec, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlS|l", &streamind, &msgno, &sec, &flags) == FAILURE) { + RETURN_THROWS(); + } + + if (msgno < 1) { + zend_argument_value_error(2, "must be greater than 0"); RETURN_THROWS(); } if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) { - php_error_docref(NULL, E_WARNING, "Invalid value for the options parameter"); - RETURN_FALSE; + zend_argument_value_error(4, "must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL"); + RETURN_THROWS(); } if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { RETURN_THROWS(); } - if (argc < 4 || !(flags & FT_UID)) { + if (!(flags & FT_UID)) { /* only perform the check if the msgno is a message number and not a UID */ - PHP_IMAP_CHECK_MSGNO(msgno); + PHP_IMAP_CHECK_MSGNO(msgno, 2); } - body = mail_fetch_mime(imap_le_struct->imap_stream, msgno, ZSTR_VAL(sec), &len, (argc == 4 ? flags : NIL)); + body = mail_fetch_mime(imap_le_struct->imap_stream, msgno, ZSTR_VAL(sec), &len, flags); if (!body) { php_error_docref(NULL, E_WARNING, "No body MIME information available"); @@ -1973,7 +2017,7 @@ PHP_FUNCTION(imap_fetchmime) PHP_FUNCTION(imap_savebody) { zval *stream, *out; - pils *imap_ptr = NULL; + pils *imap_le_struct = NULL; php_stream *writer = NULL; zend_string *section = NULL; int close_stream = 1; @@ -1983,11 +2027,19 @@ PHP_FUNCTION(imap_savebody) RETURN_THROWS(); } - if ((imap_ptr = (pils *)zend_fetch_resource(Z_RES_P(stream), "imap", le_imap)) == NULL) { + if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(stream), "imap", le_imap)) == NULL) { RETURN_THROWS(); } - if (!imap_ptr) { + PHP_IMAP_CHECK_MSGNO(msgno, 3); + + if (flags && ((flags & ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) { + zend_argument_value_error(5, "must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL"); + RETURN_THROWS(); + } + + // TODO Drop this? + if (!imap_le_struct) { RETURN_FALSE; } @@ -2003,6 +2055,7 @@ PHP_FUNCTION(imap_savebody) if (!try_convert_to_string(out)) { RETURN_THROWS(); } + // TODO Need to check for null bytes? writer = php_stream_open_wrapper(Z_STRVAL_P(out), "wb", REPORT_ERRORS, NULL); break; } @@ -2013,7 +2066,7 @@ PHP_FUNCTION(imap_savebody) IMAPG(gets_stream) = writer; mail_parameters(NIL, SET_GETS, (void *) php_mail_gets); - mail_fetchbody_full(imap_ptr->imap_stream, msgno, section?ZSTR_VAL(section):"", NULL, flags); + mail_fetchbody_full(imap_le_struct->imap_stream, msgno, section?ZSTR_VAL(section):"", NULL, flags); mail_parameters(NIL, SET_GETS, (void *) NULL); IMAPG(gets_stream) = NULL; @@ -2606,6 +2659,11 @@ PHP_FUNCTION(imap_setflag_full) RETURN_THROWS(); } + if (flags && ((flags & ~ST_UID) != 0)) { + zend_argument_value_error(4, "must be ST_UID or 0"); + RETURN_THROWS(); + } + mail_setflag_full(imap_le_struct->imap_stream, ZSTR_VAL(sequence), ZSTR_VAL(flag), (flags ? flags : NIL)); RETURN_TRUE; } @@ -2618,9 +2676,8 @@ PHP_FUNCTION(imap_clearflag_full) zend_string *sequence, *flag; zend_long flags = 0; pils *imap_le_struct; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rSS|l", &streamind, &sequence, &flag, &flags) ==FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS|l", &streamind, &sequence, &flag, &flags) ==FAILURE) { RETURN_THROWS(); } @@ -2628,7 +2685,12 @@ PHP_FUNCTION(imap_clearflag_full) RETURN_THROWS(); } - mail_clearflag_full(imap_le_struct->imap_stream, ZSTR_VAL(sequence), ZSTR_VAL(flag), (argc == 4 ? flags : NIL)); + if (flags && ((flags & ~ST_UID) != 0)) { + zend_argument_value_error(4, "must be ST_UID or 0"); + RETURN_THROWS(); + } + + mail_clearflag_full(imap_le_struct->imap_stream, ZSTR_VAL(sequence), ZSTR_VAL(flag), flags); RETURN_TRUE; } /* }}} */ @@ -2638,14 +2700,14 @@ PHP_FUNCTION(imap_sort) { zval *streamind; zend_string *criteria = NULL, *charset = NULL; - zend_long pgm, rev, flags = 0; + zend_long sort, rev, flags = 0; pils *imap_le_struct; unsigned long *slst, *sl; char *search_criteria; SORTPGM *mypgm=NIL; SEARCHPGM *spg=NIL; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll|lS!S!", &streamind, &pgm, &rev, &flags, &criteria, &charset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll|lS!S!", &streamind, &sort, &rev, &flags, &criteria, &charset) == FAILURE) { RETURN_THROWS(); } @@ -2653,14 +2715,17 @@ PHP_FUNCTION(imap_sort) RETURN_THROWS(); } - if (pgm > SORTSIZE) { - php_error_docref(NULL, E_WARNING, "Unrecognized sort criteria"); - RETURN_FALSE; + if (!(sort == SORTDATE || sort == SORTARRIVAL || sort == SORTFROM || sort == SORTSUBJECT || sort == SORTTO || + sort == SORTCC || sort == SORTSIZE) ) { + zend_argument_value_error(2, "must be one of the SORT* constants"); + RETURN_THROWS(); } - if (flags < 0) { - php_error_docref(NULL, E_WARNING, "Search options parameter has to be greater than or equal to 0"); - RETURN_FALSE; + + if (flags && ((flags & ~(SE_UID|SE_NOPREFETCH )) != 0)) { + zend_argument_value_error(4, "must be a bitmask of SE_UID, and SE_NOPREFETCH"); + RETURN_THROWS(); } + if (criteria) { search_criteria = estrndup(ZSTR_VAL(criteria), ZSTR_LEN(criteria)); spg = mail_criteria(search_criteria); @@ -2671,7 +2736,7 @@ PHP_FUNCTION(imap_sort) mypgm = mail_newsortpgm(); mypgm->reverse = rev; - mypgm->function = (short) pgm; + mypgm->function = (short) sort; mypgm->next = NIL; slst = mail_sort(imap_le_struct->imap_stream, (charset ? ZSTR_VAL(charset) : NIL), spg, mypgm, flags); @@ -2696,33 +2761,40 @@ PHP_FUNCTION(imap_fetchheader) zval *streamind; zend_long msgno, flags = 0L; pils *imap_le_struct; - int msgindex, argc = ZEND_NUM_ARGS(); + int msgindex; - if (zend_parse_parameters(argc, "rl|l", &streamind, &msgno, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|l", &streamind, &msgno, &flags) == FAILURE) { RETURN_THROWS(); } - if (flags && ((flags & ~(FT_UID|FT_INTERNAL|FT_PREFETCHTEXT)) != 0)) { - php_error_docref(NULL, E_WARNING, "Invalid value for the options parameter"); - RETURN_FALSE; + if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { + RETURN_THROWS(); } - if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { + // TODO Check for msgno < 1 now or wait later for PHP_IMAP_CHECK_MSGNO check? + + if (flags && ((flags & ~(FT_UID|FT_INTERNAL|FT_PREFETCHTEXT)) != 0)) { + zend_argument_value_error(3, "must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL"); RETURN_THROWS(); } - if ((argc == 3) && (flags & FT_UID)) { + if (flags & FT_UID) { /* This should be cached; if it causes an extra RTT to the IMAP server, then that's the price we pay for making sure we don't crash. */ msgindex = mail_msgno(imap_le_struct->imap_stream, msgno); + if (msgindex == 0) { + php_error_docref(NULL, E_WARNING, "UID does not exist"); + RETURN_FALSE; + } } else { msgindex = msgno; } - PHP_IMAP_CHECK_MSGNO(msgindex); + PHP_IMAP_CHECK_MSGNO(msgindex, 2); - RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, msgno, NIL, NIL, (argc == 3 ? flags : NIL))); + /* TODO Check shouldn't this pass msgindex???? */ + RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, msgno, NIL, NIL, (ZEND_NUM_ARGS() == 3 ? flags : NIL))); } /* }}} */ @@ -2732,7 +2804,6 @@ PHP_FUNCTION(imap_uid) zval *streamind; zend_long msgno; pils *imap_le_struct; - int msgindex; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &streamind, &msgno) == FAILURE) { RETURN_THROWS(); @@ -2742,11 +2813,7 @@ PHP_FUNCTION(imap_uid) RETURN_THROWS(); } - msgindex = msgno; - if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) { - php_error_docref(NULL, E_WARNING, "Bad message number"); - RETURN_FALSE; - } + PHP_IMAP_CHECK_MSGNO(msgno, 2); RETURN_LONG(mail_uid(imap_le_struct->imap_stream, msgno)); } @@ -2767,6 +2834,8 @@ PHP_FUNCTION(imap_msgno) RETURN_THROWS(); } + PHP_IMAP_CHECK_MSGNO(msgno, 2); + RETURN_LONG(mail_msgno(imap_le_struct->imap_stream, msgno)); } /* }}} */ @@ -2787,6 +2856,11 @@ PHP_FUNCTION(imap_status) RETURN_THROWS(); } + if (flags && ((flags & ~(SA_MESSAGES | SA_RECENT | SA_UNSEEN | SA_UIDNEXT | SA_UIDVALIDITY /*| SA_ALL*/)) != 0)) { + zend_argument_value_error(3, "must be a bitmask of SA_* constants"); + RETURN_THROWS(); + } + object_init(return_value); if (mail_status(imap_le_struct->imap_stream, ZSTR_VAL(mbx), flags)) { @@ -2816,14 +2890,14 @@ PHP_FUNCTION(imap_status) PHP_FUNCTION(imap_bodystruct) { zval *streamind; - zend_long msg; + zend_long msgno; zend_string *section; pils *imap_le_struct; zval parametres, param, dparametres, dparam; PARAMETER *par, *dpar; BODY *body; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlS", &streamind, &msg, §ion) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlS", &streamind, &msgno, §ion) == FAILURE) { RETURN_THROWS(); } @@ -2831,13 +2905,9 @@ PHP_FUNCTION(imap_bodystruct) RETURN_THROWS(); } - if (!msg || msg < 1 || (unsigned) msg > imap_le_struct->imap_stream->nmsgs) { - php_error_docref(NULL, E_WARNING, "Bad message number"); - RETURN_FALSE; - } - + PHP_IMAP_CHECK_MSGNO(msgno, 2); - body=mail_body(imap_le_struct->imap_stream, msg, (unsigned char*)ZSTR_VAL(section)); + body=mail_body(imap_le_struct->imap_stream, msgno, (unsigned char*)ZSTR_VAL(section)); if (body == NULL) { RETURN_FALSE; } @@ -2933,15 +3003,14 @@ PHP_FUNCTION(imap_fetch_overview) zval myoverview; zend_string *address; zend_long status, flags = 0L; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "rS|l", &streamind, &sequence, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rS|l", &streamind, &sequence, &flags) == FAILURE) { RETURN_THROWS(); } if (flags && ((flags & ~FT_UID) != 0)) { - php_error_docref(NULL, E_WARNING, "Invalid value for the options parameter"); - RETURN_FALSE; + zend_argument_value_error(3, "must be FT_UID or 0"); + RETURN_THROWS(); } if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL) { @@ -3100,6 +3169,7 @@ PHP_FUNCTION(imap_mail_compose) first = 0; if (Z_TYPE_P(data) != IS_ARRAY) { + // TODO ValueError php_error_docref(NULL, E_WARNING, "body parameter must be a non-empty array"); RETURN_FALSE; } @@ -3292,6 +3362,7 @@ PHP_FUNCTION(imap_mail_compose) } ZEND_HASH_FOREACH_END(); if (first) { + // TODO ValueError php_error_docref(NULL, E_WARNING, "body parameter must be a non-empty array"); RETURN_FALSE; } @@ -3573,28 +3644,28 @@ bool _php_imap_mail(zend_string *to, zend_string *subject, zend_string *message, PHP_FUNCTION(imap_mail) { zend_string *to=NULL, *message=NULL, *headers=NULL, *subject=NULL, *cc=NULL, *bcc=NULL, *rpath=NULL; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc, "PPP|P!P!P!P!", &to, &subject, &message, + if (zend_parse_parameters(ZEND_NUM_ARGS(), "PPP|P!P!P!P!", &to, &subject, &message, &headers, &cc, &bcc, &rpath) == FAILURE) { RETURN_THROWS(); } /* To: */ - if (!ZSTR_LEN(to)) { - php_error_docref(NULL, E_WARNING, "No to field in mail command"); - RETURN_FALSE; + if (ZSTR_LEN(to) == 0) { + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); } /* Subject: */ - if (!ZSTR_LEN(subject)) { - php_error_docref(NULL, E_WARNING, "No subject field in mail command"); - RETURN_FALSE; + if (ZSTR_LEN(subject) == 0) { + zend_argument_value_error(2, "cannot be empty"); + RETURN_THROWS(); } /* message body */ - if (!ZSTR_LEN(message)) { + if (ZSTR_LEN(message) == 0) { /* this is not really an error, so it is allowed. */ + // TODO Drop warning or emit ValueError? php_error_docref(NULL, E_WARNING, "No message string in mail command"); } @@ -3626,6 +3697,12 @@ PHP_FUNCTION(imap_search) RETURN_THROWS(); } + /* TODO Update docs to allow SE_FREE as an option */ + if (flags && ((flags & ~(SE_FREE | SE_UID)) != 0)) { + zend_argument_value_error(3, "must be a bitmask of SE_FREE, and SE_UID"); + RETURN_THROWS(); + } + search_criteria = estrndup(ZSTR_VAL(criteria), ZSTR_LEN(criteria)); IMAPG(imap_messages) = IMAPG(imap_messages_tail) = NIL; @@ -4204,10 +4281,9 @@ PHP_FUNCTION(imap_thread) zend_long flags = SE_FREE; char criteria[] = "ALL"; THREADNODE *top; - int argc = ZEND_NUM_ARGS(); SEARCHPGM *pgm = NIL; - if (zend_parse_parameters(argc, "r|l", &streamind, &flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &streamind, &flags) == FAILURE) { RETURN_THROWS(); } @@ -4215,19 +4291,21 @@ PHP_FUNCTION(imap_thread) RETURN_THROWS(); } + /* TODO Check if flags are valid (documentation is not present on php.net so need to check this first) */ + pgm = mail_criteria(criteria); top = mail_thread(imap_le_struct->imap_stream, "REFERENCES", NIL, pgm, flags); if (pgm && !(flags & SE_FREE)) { mail_free_searchpgm(&pgm); } - if(top == NIL) { + if (top == NIL) { php_error_docref(NULL, E_WARNING, "Function returned an empty tree"); RETURN_FALSE; } /* Populate our return value data structure here. */ - if(build_thread_tree(top, &return_value) == FAILURE) { + if (build_thread_tree(top, &return_value) == FAILURE) { mail_free_threadnode(&top); RETURN_FALSE; } diff --git a/ext/imap/tests/imap_body.phpt b/ext/imap/tests/imap_body.phpt index 4d4133c343fc7..752ca1c39db77 100644 --- a/ext/imap/tests/imap_body.phpt +++ b/ext/imap/tests/imap_body.phpt @@ -1,5 +1,5 @@ --TEST-- -imap_body() incorrect parameter count +imap_body() ValueError --CREDITS-- Paul Sohier #phptestfest utrecht @@ -14,19 +14,26 @@ require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); -imap_body($stream_id,-1); -imap_body($stream_id,1,-1); +try { + imap_body($stream_id,-1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} +try { + imap_body($stream_id,1,-1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} //Access not existing -var_dump(imap_body($stream_id, 999, FT_UID)); +var_dump(imap_body($stream_id, 255, FT_UID)); imap_close($stream_id); ?> --EXPECTF-- -Warning: imap_body(): Bad message number in %s on line %d +imap_body(): Argument #2 ($msg_no) must be greater than 0 +imap_body(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL -Warning: imap_body(): Invalid value for the options parameter in %s on line %d - -Warning: imap_body(): Bad message number in %s on line %d +Warning: imap_body(): UID does not exist in %s on line %d bool(false) diff --git a/ext/imap/tests/imap_close_variation4.phpt b/ext/imap/tests/imap_close_variation4.phpt index c6f13678cc5b9..56e3722e9e382 100644 --- a/ext/imap/tests/imap_close_variation4.phpt +++ b/ext/imap/tests/imap_close_variation4.phpt @@ -28,7 +28,12 @@ foreach($inputs as $input) { imap_delete($stream_id, $i); } echo "\n-- Iteration $iterator --\n"; - var_dump( $check = imap_close($stream_id, $input) ); + try { + var_dump( $check = imap_close($stream_id, $input) ); + } catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; + $check = false; + } // check that imap_close was successful, if not call imap_close and explicitly set CL_EXPUNGE if(false === $check) { @@ -71,16 +76,10 @@ bool(true) CL_EXPUNGE was set -- Iteration 3 -- - -Warning: imap_close(): Invalid value for the flags parameter in %s on line %d -bool(false) +imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0 -- Iteration 4 -- - -Warning: imap_close(): Invalid value for the flags parameter in %s on line %d -bool(false) +imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0 -- Iteration 5 -- - -Warning: imap_close(): Invalid value for the flags parameter in %s on line %d -bool(false) +imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0 diff --git a/ext/imap/tests/imap_fetch_overview_variation3.phpt b/ext/imap/tests/imap_fetch_overview_variation3.phpt index 419de4c95152f..68d8d20ce4150 100644 --- a/ext/imap/tests/imap_fetch_overview_variation3.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation3.phpt @@ -25,21 +25,21 @@ $options = array ('1', true, 1.000000000000001, 0.00001e5, - PHP_INT_MAX, - -PHP_INT_MAX + 245 ); -// iterate over each element of $options array -$iterator = 1; imap_check($stream_id); foreach($options as $option) { echo "\nTesting with option value:"; var_dump($option); - $overview = imap_fetch_overview($stream_id, $msg_uid, $option); - if ($overview) { - echo "imap_fetch_overview() returns an object\n"; + try { + $overview = imap_fetch_overview($stream_id, $msg_uid, $option); + if ($overview) { + echo "imap_fetch_overview() returns an object\n"; } - $iterator++; + } catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; + } } ?> @@ -64,10 +64,5 @@ imap_fetch_overview() returns an object Testing with option value:float(1) imap_fetch_overview() returns an object -Testing with option value:int(%d) - -Warning: imap_fetch_overview(): Invalid value for the options parameter in %s on line %d - -Testing with option value:int(-%d) - -Warning: imap_fetch_overview(): Invalid value for the options parameter in %s on line %d +Testing with option value:int(245) +imap_fetch_overview(): Argument #3 ($options) must be FT_UID or 0 diff --git a/ext/imap/tests/imap_fetchbody_variation4.phpt b/ext/imap/tests/imap_fetchbody_variation4.phpt index 45158a9ed0295..510e78fd3101a 100644 --- a/ext/imap/tests/imap_fetchbody_variation4.phpt +++ b/ext/imap/tests/imap_fetchbody_variation4.phpt @@ -31,11 +31,16 @@ $iterator = 1; imap_check($stream_id); foreach($options as $option) { echo "\n-- Iteration $iterator --\n"; - if(is_string(imap_fetchbody($stream_id, $msg_uid, $section, $option))) { - echo "FT_UID valid\n"; - } else { - echo "FT_UID not valid\n"; + + try { + if(is_string(imap_fetchbody($stream_id, $msg_uid, $section, $option))) { + echo "FT_UID valid\n"; + } else { + echo "FT_UID not valid\n"; } + } catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; + } $iterator++; } @@ -62,11 +67,7 @@ FT_UID valid FT_UID valid -- Iteration 5 -- - -Warning: imap_fetchbody(): Invalid value for the options parameter in %s on line %d -FT_UID not valid +imap_fetchbody(): Argument #4 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL -- Iteration 6 -- - -Warning: imap_fetchbody(): Invalid value for the options parameter in %s on line %d -FT_UID not valid +imap_fetchbody(): Argument #4 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL diff --git a/ext/imap/tests/imap_fetchbody_variation6.phpt b/ext/imap/tests/imap_fetchbody_variation6.phpt index 75516f8381454..fd5a898b680d9 100644 --- a/ext/imap/tests/imap_fetchbody_variation6.phpt +++ b/ext/imap/tests/imap_fetchbody_variation6.phpt @@ -23,9 +23,10 @@ $sequences = [0, /* out of range */ 4, 1]; foreach($sequences as $msg_no) { echo "\n-- \$msg_no is $msg_no --\n"; - var_dump($overview = imap_fetchbody($stream_id, $msg_no, $section)); - if (!$overview) { - echo imap_last_error() . "\n"; + try { + var_dump(imap_fetchbody($stream_id, $msg_no, $section)); + } catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; } } ?> @@ -39,17 +40,13 @@ Create a temporary mailbox and add 3 msgs .. mailbox '{%s}%s' created -- $msg_no is 0 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - +imap_fetchbody(): Argument #2 ($msg_no) must be greater than 0 -- $msg_no is 4 -- Warning: imap_fetchbody(): Bad message number in %s on line %d bool(false) - -- $msg_no is 1 -- string(42) "1: this is a test message, please ignore " diff --git a/ext/imap/tests/imap_fetchheader_variation3.phpt b/ext/imap/tests/imap_fetchheader_variation3.phpt index 8f6b5b5a12191..9391393782338 100644 --- a/ext/imap/tests/imap_fetchheader_variation3.phpt +++ b/ext/imap/tests/imap_fetchheader_variation3.phpt @@ -30,11 +30,15 @@ $iterator = 1; imap_check($stream_id); foreach($options as $option) { echo "\n-- Iteration $iterator --\n"; - if(is_string(imap_fetchheader($stream_id, $msg_uid, $option))) { - echo "FT_UID valid\n"; - } else { - echo "FT_UID not valid\n"; + try { + if (is_string(imap_fetchheader($stream_id, $msg_uid, $option))) { + echo "FT_UID valid\n"; + } else { + echo "FT_UID not valid\n"; } + } catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; + } $iterator++; } ?> @@ -60,11 +64,7 @@ FT_UID valid FT_UID valid -- Iteration 5 -- - -Warning: imap_fetchheader(): Invalid value for the options parameter in %s on line %d -FT_UID not valid +imap_fetchheader(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL -- Iteration 6 -- - -Warning: imap_fetchheader(): Invalid value for the options parameter in %s on line %d -FT_UID not valid +imap_fetchheader(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL diff --git a/ext/imap/tests/imap_fetchheader_variation5.phpt b/ext/imap/tests/imap_fetchheader_variation5.phpt index 2283861df8e8a..7e45f1ba46ac9 100644 --- a/ext/imap/tests/imap_fetchheader_variation5.phpt +++ b/ext/imap/tests/imap_fetchheader_variation5.phpt @@ -21,9 +21,10 @@ $sequences = [0, /* out of range */ 4, 1]; foreach($sequences as $msg_no) { echo "\n-- \$msg_no is $msg_no --\n"; - var_dump($overview = imap_fetchheader($stream_id, $msg_no)); - if (!$overview) { - echo imap_last_error() . "\n"; + try { + var_dump(imap_fetchheader($stream_id, $msg_no)); + } catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; } } @@ -40,17 +41,13 @@ Create a temporary mailbox and add 3 msgs .. mailbox '{%s}%s' created -- $msg_no is 0 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - +imap_fetchheader(): Argument #2 ($msg_no) must be greater than 0 -- $msg_no is 4 -- Warning: imap_fetchheader(): Bad message number in %s on line %d bool(false) - -- $msg_no is 1 -- string(%d) "From: foo@anywhere.com Subject: Test msg 1 diff --git a/ext/imap/tests/imap_fetchstructure_basic.phpt b/ext/imap/tests/imap_fetchstructure_basic.phpt index 572556e6e13d1..11c1f7efb253c 100644 --- a/ext/imap/tests/imap_fetchstructure_basic.phpt +++ b/ext/imap/tests/imap_fetchstructure_basic.phpt @@ -12,7 +12,11 @@ require_once(__DIR__.'/skipif.inc'); require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 1); -imap_fetchstructure($stream_id,0); +try { + imap_fetchstructure($stream_id,0); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} $z = imap_fetchstructure($stream_id,1); @@ -39,6 +43,7 @@ require_once('clean.inc'); --EXPECTF-- Create a temporary mailbox and add 1 msgs .. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created +imap_fetchstructure(): Argument #2 ($msg_no) must be greater than 0 bool(true) bool(true) bool(true) diff --git a/ext/imap/tests/imap_gc_error.phpt b/ext/imap/tests/imap_gc_error.phpt index 072af103930cb..5b5b65d271422 100644 --- a/ext/imap/tests/imap_gc_error.phpt +++ b/ext/imap/tests/imap_gc_error.phpt @@ -13,8 +13,13 @@ require_once(__DIR__.'/skipif.inc'); require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); -imap_gc($stream_id, -1); + +try { + imap_gc($stream_id, -1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> ---EXPECTF-- -Warning: imap_gc(): Invalid value for the flags parameter in %s on line %d +--EXPECT-- +imap_gc(): Argument #2 ($flags) must be a bitmask of IMAP_GC_TEXTS, IMAP_GC_ELT, and IMAP_GC_ENV diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt index f9410519f2159..aa964c32f11c3 100644 --- a/ext/imap/tests/imap_open_error.phpt +++ b/ext/imap/tests/imap_open_error.phpt @@ -1,5 +1,5 @@ --TEST-- -imap_open() incorrect parameter count +imap_open() ValueErrors --CREDITS-- Paul Sohier #phptestfest utrecht @@ -12,19 +12,27 @@ require_once(__DIR__.'/skipif.inc'); echo "Checking with incorrect parameters\n" ; imap_open('', '', ''); -imap_open('', '', '', -1); + +try { + imap_open('', '', '', -1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} require_once(__DIR__.'/imap_include.inc'); -imap_open($default_mailbox, $username, $password, NIL, -1); + +try { + imap_open($default_mailbox, $username, $password, NIL, -1); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} ?> --EXPECTF-- Checking with incorrect parameters Warning: imap_open(): Couldn't open stream in %s on line %d - -Warning: imap_open(): Couldn't open stream in %s on line %d - -Warning: imap_open(): Retries must be greater or equal to 0 in %s on line %d +imap_open(): Argument #4 ($options) must be a bitmask of the OP_* constants, and CL_EXPUNGE +imap_open(): Argument #5 ($n_retries) must be greater than or equal to 0 Notice: Unknown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0 From 5783e611a2155ba719bc7a9f6b26a834ce78cb22 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 23 Sep 2020 23:50:44 +0300 Subject: [PATCH 081/209] Improve trace selection (avoid blacklisting of trace that may be linked). --- ext/opcache/jit/zend_jit_vm_helpers.c | 74 +++++++++++---------------- 1 file changed, 29 insertions(+), 45 deletions(-) diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 968e9c2d3c01a..49adcfb61499d 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -416,57 +416,20 @@ static int zend_jit_trace_has_recursive_ret(zend_execute_data *ex, const zend_op return 0; } -static int zend_jit_trace_bad_inner_loop(const zend_op *opline) +static uint8_t zend_jit_trace_bad_stop_event(const zend_op *opline, int count) { const zend_op **cache_opline = JIT_G(bad_root_cache_opline); uint8_t *cache_count = JIT_G(bad_root_cache_count); uint8_t *cache_stop = JIT_G(bad_root_cache_stop); uint32_t i; - for (i = 0; i < ZEND_JIT_TRACE_BAD_ROOT_SLOTS; i++) { - if (cache_opline[i] == opline) { - if ((cache_stop[i] == ZEND_JIT_TRACE_STOP_INNER_LOOP - || cache_stop[i] == ZEND_JIT_TRACE_STOP_LOOP_EXIT) - && cache_count[i] > JIT_G(blacklist_root_trace) / 2) { - return 1; - } - break; - } - } - return 0; -} - -static int zend_jit_trace_bad_compiled_loop(const zend_op *opline) -{ - const zend_op **cache_opline = JIT_G(bad_root_cache_opline); - uint8_t *cache_count = JIT_G(bad_root_cache_count); - uint8_t *cache_stop = JIT_G(bad_root_cache_stop); - uint32_t i; - - for (i = 0; i < ZEND_JIT_TRACE_BAD_ROOT_SLOTS; i++) { - if (cache_opline[i] == opline) { - if (cache_stop[i] == ZEND_JIT_TRACE_STOP_COMPILED_LOOP - && cache_count[i] >= JIT_G(blacklist_root_trace) - 1) { - return 1; - } - break; - } + if (count < 0) { + count = 0; } - return 0; -} - -static int zend_jit_trace_bad_loop_exit(const zend_op *opline) -{ - const zend_op **cache_opline = JIT_G(bad_root_cache_opline); - uint8_t *cache_count = JIT_G(bad_root_cache_count); - uint8_t *cache_stop = JIT_G(bad_root_cache_stop); - uint32_t i; - for (i = 0; i < ZEND_JIT_TRACE_BAD_ROOT_SLOTS; i++) { if (cache_opline[i] == opline) { - if (cache_stop[i] == ZEND_JIT_TRACE_STOP_LOOP_EXIT - && cache_count[i] >= JIT_G(blacklist_root_trace) - 1) { - return 1; + if (cache_count[i] >= count) { + return cache_stop[i]; } break; } @@ -590,6 +553,8 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, int idx, count; uint8_t trace_flags, op1_type, op2_type, op3_type; zend_class_entry *ce1, *ce2; + const zend_op *link_to_enter_opline = NULL; + int backtrack_link_to_enter = -1; int backtrack_recursion = -1; int backtrack_ret_recursion = -1; int backtrack_ret_recursion_level = 0; @@ -877,7 +842,8 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, idx = ret; } } else if (start & ZEND_JIT_TRACE_START_LOOP - && !zend_jit_trace_bad_loop_exit(orig_opline)) { + && zend_jit_trace_bad_stop_event(orig_opline, JIT_G(blacklist_root_trace) - 1) != + ZEND_JIT_TRACE_STOP_LOOP_EXIT) { /* Fail to try close the loop. If this doesn't work terminate it. */ stop = ZEND_JIT_TRACE_STOP_LOOP_EXIT; @@ -966,7 +932,8 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, if (trace_flags & ZEND_JIT_TRACE_START_LOOP) { if ((start & ZEND_JIT_TRACE_START_LOOP) != 0 && level + ret_level == 0 - && !zend_jit_trace_bad_compiled_loop(orig_opline)) { + && zend_jit_trace_bad_stop_event(orig_opline, JIT_G(blacklist_root_trace) - 1) != + ZEND_JIT_TRACE_STOP_COMPILED_LOOP) { /* Fail to try close outer loop through side exit. If this doesn't work just link. */ stop = ZEND_JIT_TRACE_STOP_COMPILED_LOOP; @@ -981,6 +948,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, stop = ZEND_JIT_TRACE_STOP_LINK; break; } + if (backtrack_link_to_enter < 0) { + backtrack_link_to_enter = idx; + link_to_enter_opline = opline; + } } else { stop = ZEND_JIT_TRACE_STOP_LINK; break; @@ -990,13 +961,18 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, break; } else if (trace_flags & ZEND_JIT_TRACE_START_LOOP) { if (start != ZEND_JIT_TRACE_START_SIDE) { + uint8_t bad_stop; + if (opline == orig_opline && level + ret_level == 0) { stop = ZEND_JIT_TRACE_STOP_LOOP; break; } /* Fail to try creating a trace for inner loop first. If this doesn't work try unroling loop. */ - if (!zend_jit_trace_bad_inner_loop(opline)) { + bad_stop = zend_jit_trace_bad_stop_event(opline, + JIT_G(blacklist_root_trace) / 2); + if (bad_stop != ZEND_JIT_TRACE_STOP_INNER_LOOP + && bad_stop != ZEND_JIT_TRACE_STOP_LOOP_EXIT) { stop = ZEND_JIT_TRACE_STOP_INNER_LOOP; break; } @@ -1026,6 +1002,14 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, ret_level = backtrack_ret_recursion_level; stop = ZEND_JIT_TRACE_STOP_RECURSIVE_RET; end_opline = orig_opline; + } else if (backtrack_link_to_enter > 0) { + if (stop == ZEND_JIT_TRACE_STOP_DEEP_RECURSION + && zend_jit_trace_bad_stop_event(orig_opline, JIT_G(blacklist_root_trace) / 2) == + ZEND_JIT_TRACE_STOP_DEEP_RECURSION) { + idx = backtrack_link_to_enter; + stop = ZEND_JIT_TRACE_STOP_LINK; + end_opline = link_to_enter_opline; + } } } From ffa57164a84462e33912d359bcf11f8debb1c7d8 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 23 Sep 2020 11:37:14 +0200 Subject: [PATCH 082/209] Clear error flag instead of toggling it The toggling of the `REPORT_ERRORS` looks fishy, and likely was intented as clearing. Closes GH-6190. --- main/streams/streams.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main/streams/streams.c b/main/streams/streams.c index b14c6fa3968ec..1262c874f7e88 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -2038,7 +2038,7 @@ PHPAPI php_stream *_php_stream_opendir(const char *path, int options, if (wrapper && wrapper->wops->dir_opener) { stream = wrapper->wops->dir_opener(wrapper, - path_to_open, "r", options ^ REPORT_ERRORS, NULL, + path_to_open, "r", options & ~REPORT_ERRORS, NULL, context STREAMS_REL_CC); if (stream) { @@ -2046,7 +2046,7 @@ PHPAPI php_stream *_php_stream_opendir(const char *path, int options, stream->flags |= PHP_STREAM_FLAG_NO_BUFFER | PHP_STREAM_FLAG_IS_DIR; } } else if (wrapper) { - php_stream_wrapper_log_error(wrapper, options ^ REPORT_ERRORS, "not implemented"); + php_stream_wrapper_log_error(wrapper, options & ~REPORT_ERRORS, "not implemented"); } if (stream == NULL && (options & REPORT_ERRORS)) { php_stream_display_wrapper_errors(wrapper, path, "Failed to open directory"); @@ -2115,18 +2115,18 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char *mod if (wrapper) { if (!wrapper->wops->stream_opener) { - php_stream_wrapper_log_error(wrapper, options ^ REPORT_ERRORS, + php_stream_wrapper_log_error(wrapper, options & ~REPORT_ERRORS, "wrapper does not support stream open"); } else { stream = wrapper->wops->stream_opener(wrapper, - path_to_open, mode, options ^ REPORT_ERRORS, + path_to_open, mode, options & ~REPORT_ERRORS, opened_path, context STREAMS_REL_CC); } /* if the caller asked for a persistent stream but the wrapper did not * return one, force an error here */ if (stream && (options & STREAM_OPEN_PERSISTENT) && !stream->is_persistent) { - php_stream_wrapper_log_error(wrapper, options ^ REPORT_ERRORS, + php_stream_wrapper_log_error(wrapper, options & ~REPORT_ERRORS, "wrapper does not support persistent streams"); php_stream_close(stream); stream = NULL; @@ -2183,7 +2183,7 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char *mod tmp); efree(tmp); - options ^= REPORT_ERRORS; + options &= ~REPORT_ERRORS; } } } From be4553b61a0979154928cfe87748c0620b81a2e0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Sep 2020 09:54:59 +0200 Subject: [PATCH 083/209] More precise type in mysqli_result constructor This ctor requires a mysqli object. Possibly there was some confusion with the mysqli_warning constructor here. --- ext/mysqli/mysqli.stub.php | 2 +- ext/mysqli/mysqli_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 9d557fe7462e0..78d303b4ee64c 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -301,7 +301,7 @@ public function refresh(int $options) {} class mysqli_result implements IteratorAggregate { - public function __construct(object $mysqli_link, int $result_mode = MYSQLI_STORE_RESULT) {} + public function __construct(mysqli $mysqli_link, int $result_mode = MYSQLI_STORE_RESULT) {} /** * @return void diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index a0228f56aea86..6622685fb7def 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7657a5373cc27d878b1ac1f11d371f77fe243a6a */ + * Stub hash: 20d9c5578108df89a863dd93f289e6f79d1db183 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING) ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) @@ -596,7 +596,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0) + ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_mode, IS_LONG, 0, "MYSQLI_STORE_RESULT") ZEND_END_ARG_INFO() From 450f2ff4062f1a53834f749e4f0f2a59cc2cc911 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 23 Sep 2020 17:06:28 +0200 Subject: [PATCH 084/209] Skip unnecessary unknown() frames Noticed this while working on attributes strict_types handling. We sometimes insert dummy frames internally, but I don't think these should show up in debug_backtrace output unless they're needed, either to display an include call or to preserve file/line information that would otherwise get lost. Closes GH-6195. --- Zend/zend_builtin_functions.c | 43 +++++++++++-------- .../tests/cache_list/frontcontroller29.phpt | 5 +-- ext/phar/tests/frontcontroller29.phpt | 5 +-- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index ac652b3b8a009..5ec365c920599 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1781,13 +1781,12 @@ ZEND_FUNCTION(debug_print_backtrace) } else { /* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */ zend_bool build_filename_arg = 1; + uint32_t include_kind = 0; + if (ptr->func && ZEND_USER_CODE(ptr->func->common.type) && ptr->opline->opcode == ZEND_INCLUDE_OR_EVAL) { + include_kind = ptr->opline->extended_value; + } - if (!ptr->func || !ZEND_USER_CODE(ptr->func->common.type) || ptr->opline->opcode != ZEND_INCLUDE_OR_EVAL) { - /* can happen when calling eval from a custom sapi */ - function_name = "unknown"; - build_filename_arg = 0; - } else - switch (ptr->opline->extended_value) { + switch (include_kind) { case ZEND_EVAL: function_name = "eval"; build_filename_arg = 0; @@ -1805,8 +1804,11 @@ ZEND_FUNCTION(debug_print_backtrace) function_name = "require_once"; break; default: - /* this can actually happen if you use debug_backtrace() in your error_handler and - * you're in the top-scope */ + /* Skip dummy frame unless it is needed to preserve filename/lineno info. */ + if (!filename) { + goto skip_frame; + } + function_name = "unknown"; build_filename_arg = 0; break; @@ -1857,10 +1859,12 @@ ZEND_FUNCTION(debug_print_backtrace) ZEND_PUTS(")\n"); } } + ++indent; + +skip_frame: include_filename = filename; call = skip; ptr = skip->prev_execute_data; - ++indent; } } @@ -2009,13 +2013,12 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int /* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */ zend_bool build_filename_arg = 1; zend_string *pseudo_function_name; + uint32_t include_kind = 0; + if (ptr->func && ZEND_USER_CODE(ptr->func->common.type) && ptr->opline->opcode == ZEND_INCLUDE_OR_EVAL) { + include_kind = ptr->opline->extended_value; + } - if (!ptr->func || !ZEND_USER_CODE(ptr->func->common.type) || ptr->opline->opcode != ZEND_INCLUDE_OR_EVAL) { - /* can happen when calling eval from a custom sapi */ - pseudo_function_name = ZSTR_KNOWN(ZEND_STR_UNKNOWN); - build_filename_arg = 0; - } else - switch (ptr->opline->extended_value) { + switch (include_kind) { case ZEND_EVAL: pseudo_function_name = ZSTR_KNOWN(ZEND_STR_EVAL); build_filename_arg = 0; @@ -2033,8 +2036,12 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int pseudo_function_name = ZSTR_KNOWN(ZEND_STR_REQUIRE_ONCE); break; default: - /* this can actually happen if you use debug_backtrace() in your error_handler and - * you're in the top-scope */ + /* Skip dummy frame unless it is needed to preserve filename/lineno info. */ + if (!filename) { + zval_ptr_dtor(&stack_frame); + goto skip_frame; + } + pseudo_function_name = ZSTR_KNOWN(ZEND_STR_UNKNOWN); build_filename_arg = 0; break; @@ -2060,8 +2067,8 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &stack_frame); +skip_frame: include_filename = filename; - call = skip; ptr = skip->prev_execute_data; } diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt index caaf34538e334..a3a9f4e48e89e 100644 --- a/ext/phar/tests/cache_list/frontcontroller29.phpt +++ b/ext/phar/tests/cache_list/frontcontroller29.phpt @@ -16,7 +16,6 @@ Content-type: text/html; charset=UTF-8 --EXPECTF-- Fatal error: Uncaught Error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1 Stack trace: -#0 [internal function]: unknown() -#1 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array) -#2 {main} +#0 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array) +#1 {main} thrown in phar://%sfatalerror.phps on line 1 diff --git a/ext/phar/tests/frontcontroller29.phpt b/ext/phar/tests/frontcontroller29.phpt index 5e18357b6b5d3..2a2ea8c665c01 100644 --- a/ext/phar/tests/frontcontroller29.phpt +++ b/ext/phar/tests/frontcontroller29.phpt @@ -15,7 +15,6 @@ Content-type: text/html; charset=UTF-8 --EXPECTF-- Fatal error: Uncaught Error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps:1 Stack trace: -#0 [internal function]: unknown() -#1 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array) -#2 {main} +#0 %s(%d): Phar::webPhar('whatever', 'index.php', '404.php', Array) +#1 {main} thrown in phar://%sfatalerror.phps on line 1 From c25b5c64d17f17d8af195747363586f360c2c6b3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 24 Sep 2020 11:23:20 +0200 Subject: [PATCH 085/209] Fix test for cases where data sources are available That `bool(false)` is a relict of adapting the test expectations to the warning promotions. --- ext/odbc/tests/odbc_data_source_001.phpt | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/odbc/tests/odbc_data_source_001.phpt b/ext/odbc/tests/odbc_data_source_001.phpt index d92a44252b6f4..a641d07b74131 100644 --- a/ext/odbc/tests/odbc_data_source_001.phpt +++ b/ext/odbc/tests/odbc_data_source_001.phpt @@ -24,7 +24,6 @@ var_dump(odbc_data_source($conn, SQL_FETCH_FIRST)); ?> --EXPECTF-- odbc_data_source(): Argument #2 ($fetch_type) must be either SQL_FETCH_FIRST or SQL_FETCH_NEXT -bool(false) array(%d) { %a } From 610e7d2c77f7af3cc69399e0fdcca0d99300e2ce Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 24 Sep 2020 10:30:41 +0200 Subject: [PATCH 086/209] Fix #78470: odbc_specialcolumns() no longer accepts $nullable It is mandatory to pass either `SQL_NO_NULLS` or `SQL_NULLABLE` as tenth parameter to `SQLSpecialColumns()`; otherwise the function call fails. Therefore the user must be allowed to pass the desired value as parameter to `odbc_specialcolumns()` again. Closes GH-6200. --- NEWS | 3 +++ ext/odbc/php_odbc.c | 2 +- ext/odbc/tests/bug78470.phpt | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ext/odbc/tests/bug78470.phpt diff --git a/NEWS b/NEWS index 6d8ed53499e1c..35a928af07c56 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,9 @@ PHP NEWS . Fixed bug #80107 (mysqli_query() fails for ~16 MB long query when compression is enabled). (Nikita) +- ODBC: + . Fixed bug #78470 (odbc_specialcolumns() no longer accepts $nullable). (cmb) + - OPcache: . Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data binding). (Nikita) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 4ba9aa2d74b32..c2d1a8f846f92 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -3668,7 +3668,7 @@ PHP_FUNCTION(odbc_specialcolumns) SQLUSMALLINT type, scope, nullable; RETCODE rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rls!ssl", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len, + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rls!ssll", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len, &name, &name_len, &vscope, &vnullable) == FAILURE) { return; } diff --git a/ext/odbc/tests/bug78470.phpt b/ext/odbc/tests/bug78470.phpt new file mode 100644 index 0000000000000..6910f9bbd10e3 --- /dev/null +++ b/ext/odbc/tests/bug78470.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #78470 (odbc_specialcolumns() no longer accepts $nullable) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (odbc result) From 9428e161a822177728669826e6bb1664c9d20184 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Sep 2020 15:16:07 +0200 Subject: [PATCH 087/209] Add option to print parameter name stats to gen_stub --- build/gen_stub.php | 44 +++++++++++++++++++++++++------- ext/spl/spl_fixedarray_arginfo.h | 2 +- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 6cbfb06b276b4..bd8b33759fcdb 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -12,7 +12,7 @@ error_reporting(E_ALL); -function processDirectory(string $dir, bool $forceRegeneration) { +function processDirectory(string $dir, Context $context) { $it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::LEAVES_ONLY @@ -20,12 +20,12 @@ function processDirectory(string $dir, bool $forceRegeneration) { foreach ($it as $file) { $pathName = $file->getPathName(); if (preg_match('/\.stub\.php$/', $pathName)) { - processStubFile($pathName, $forceRegeneration); + processStubFile($pathName, $context); } } } -function processStubFile(string $stubFile, bool $forceRegeneration) { +function processStubFile(string $stubFile, Context $context) { try { if (!file_exists($stubFile)) { throw new Exception("File $stubFile does not exist"); @@ -35,7 +35,7 @@ function processStubFile(string $stubFile, bool $forceRegeneration) { $stubCode = file_get_contents($stubFile); $stubHash = computeStubHash($stubCode); $oldStubHash = extractStubHash($arginfoFile); - if ($stubHash === $oldStubHash && $forceRegeneration === false) { + if ($stubHash === $oldStubHash && $context->forceRegeneration === false) { /* Stub file did not change, do not regenerate. */ return; } @@ -44,6 +44,16 @@ function processStubFile(string $stubFile, bool $forceRegeneration) { $fileInfo = parseStubFile($stubCode); $arginfoCode = generateArgInfoCode($fileInfo, $stubHash); file_put_contents($arginfoFile, $arginfoCode); + + // Collect parameter name statistics. + foreach ($fileInfo->getAllFuncInfos() as $funcInfo) { + foreach ($funcInfo->args as $argInfo) { + if (!isset($context->parameterStats[$argInfo->name])) { + $context->parameterStats[$argInfo->name] = 0; + } + $context->parameterStats[$argInfo->name]++; + } + } } catch (Exception $e) { echo "In $stubFile:\n{$e->getMessage()}\n"; exit(1); @@ -67,6 +77,13 @@ function extractStubHash(string $arginfoFile): ?string { return $matches[1]; } +class Context { + /** @var bool */ + public $forceRegeneration = false; + /** @var array */ + public $parameterStats = []; +} + class SimpleType { /** @var string */ public $name; @@ -1131,16 +1148,25 @@ function initPhpParser() { } $optind = null; -$options = getopt("f", ["force-regeneration"], $optind); -$forceRegeneration = isset($options["f"]) || isset($options["force-regeneration"]); -$location = $argv[$optind] ?? "."; +$options = getopt("f", ["force-regeneration", "parameter-stats"], $optind); + +$context = new Context; +$printParameterStats = isset($options["parameter-stats"]); +$context->forceRegeneration = + isset($options["f"]) || isset($options["force-regeneration"]) || $printParameterStats; +$location = $argv[$optind] ?? "."; if (is_file($location)) { // Generate single file. - processStubFile($location, $forceRegeneration); + processStubFile($location, $context); } else if (is_dir($location)) { - processDirectory($location, $forceRegeneration); + processDirectory($location, $context); } else { echo "$location is neither a file nor a directory.\n"; exit(1); } + +if ($printParameterStats) { + arsort($context->parameterStats); + echo json_encode($context->parameterStats, JSON_PRETTY_PRINT), "\n"; +} diff --git a/ext/spl/spl_fixedarray_arginfo.h b/ext/spl/spl_fixedarray_arginfo.h index 6817380c6bfa5..e82ea83a6a76c 100644 --- a/ext/spl/spl_fixedarray_arginfo.h +++ b/ext/spl/spl_fixedarray_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 2075619a330ed636ce7f7c85aeb208a8f9f55ca7 */ + * Stub hash: c820bad6bcfcc7c60a221464008a882515b5c05e */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFixedArray___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, size, IS_LONG, 0, "0") From ae86edefe70825b844ab2b62beb072baa207f56e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Sep 2020 17:03:53 +0200 Subject: [PATCH 088/209] Skip imap_lsub_basic.phpt under asan LeakSanitizer fails on Azure with: > Tracer caught signal 11: addr=0x0 pc=0x7f86cde7c8b0 sp=0x7f86c46bcce0 --- ext/imap/tests/imap_lsub_basic.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/imap/tests/imap_lsub_basic.phpt b/ext/imap/tests/imap_lsub_basic.phpt index 98875266d7406..3cd4722e1f6a1 100644 --- a/ext/imap/tests/imap_lsub_basic.phpt +++ b/ext/imap/tests/imap_lsub_basic.phpt @@ -5,6 +5,7 @@ Olivier Doucet --SKIPIF-- --FILE-- Date: Thu, 24 Sep 2020 17:10:09 +0200 Subject: [PATCH 089/209] Use proper skipif section The ODBC tests have to be skipped if no connection to the server can be established. --- ext/odbc/tests/bug78470.phpt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/odbc/tests/bug78470.phpt b/ext/odbc/tests/bug78470.phpt index 6910f9bbd10e3..d905b95667906 100644 --- a/ext/odbc/tests/bug78470.phpt +++ b/ext/odbc/tests/bug78470.phpt @@ -1,9 +1,7 @@ --TEST-- Bug #78470 (odbc_specialcolumns() no longer accepts $nullable) --SKIPIF-- - + --FILE-- Date: Thu, 24 Sep 2020 15:37:10 +0200 Subject: [PATCH 090/209] Update fileinfo parameter names Closes GH-6206. --- ext/fileinfo/fileinfo.stub.php | 16 ++++++++-------- ext/fileinfo/fileinfo_arginfo.h | 22 +++++++++++----------- ext/fileinfo/tests/finfo_open_001.phpt | 2 +- ext/fileinfo/tests/finfo_open_error.phpt | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ext/fileinfo/fileinfo.stub.php b/ext/fileinfo/fileinfo.stub.php index a951e573dcd07..9355a96a2b192 100644 --- a/ext/fileinfo/fileinfo.stub.php +++ b/ext/fileinfo/fileinfo.stub.php @@ -5,31 +5,31 @@ class finfo { /** @alias finfo_open */ - public function __construct(int $options = FILEINFO_NONE, string $arg = "") {} + public function __construct(int $flags = FILEINFO_NONE, string $magic_database = "") {} /** * @param resource|null $context * @return string|false * @alias finfo_file */ - public function file(string $file_name, int $options = FILEINFO_NONE, $context = null) {} + public function file(string $filename, int $flags = FILEINFO_NONE, $context = null) {} /** * @param resource|null $context * @return string|false * @alias finfo_buffer */ - public function buffer(string $string, int $options = FILEINFO_NONE, $context = null) {} + public function buffer(string $string, int $flags = FILEINFO_NONE, $context = null) {} /** * @return bool * @alias finfo_set_flags */ - public function set_flags(int $options) {} + public function set_flags(int $flags) {} } /** @return resource|false */ -function finfo_open(int $options = FILEINFO_NONE, string $arg = "") {} +function finfo_open(int $flags = FILEINFO_NONE, string $magic_database = "") {} /** * @param resource $finfo @@ -39,19 +39,19 @@ function finfo_close($finfo): bool {} /** * @param resource $finfo */ -function finfo_set_flags($finfo, int $options): bool {} +function finfo_set_flags($finfo, int $flags): bool {} /** * @param resource $finfo * @param resource|null $context */ -function finfo_file($finfo, string $file_name, int $options = FILEINFO_NONE, $context = null): string|false {} +function finfo_file($finfo, string $filename, int $flags = FILEINFO_NONE, $context = null): string|false {} /** * @param resource $finfo * @param resource|null $context */ -function finfo_buffer($finfo, string $string, int $options = FILEINFO_NONE, $context = null): string|false {} +function finfo_buffer($finfo, string $string, int $flags = FILEINFO_NONE, $context = null): string|false {} /** * @param resource|string $filename diff --git a/ext/fileinfo/fileinfo_arginfo.h b/ext/fileinfo/fileinfo_arginfo.h index 95fe4fc98bf74..80850a6502e61 100644 --- a/ext/fileinfo/fileinfo_arginfo.h +++ b/ext/fileinfo/fileinfo_arginfo.h @@ -1,9 +1,9 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b8bfd01bd5a9a181550160e39c50a8cc047f15cd */ + * Stub hash: be858509df27550b51d8a7a51a3629eceb6d0aa6 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_finfo_open, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arg, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, _IS_BOOL, 0) @@ -12,20 +12,20 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_set_flags, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, finfo) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_finfo_file, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, finfo) - ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_finfo_buffer, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, finfo) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() @@ -36,19 +36,19 @@ ZEND_END_ARG_INFO() #define arginfo_class_finfo___construct arginfo_finfo_open ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_file, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_buffer, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "FILEINFO_NONE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_set_flags, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() diff --git a/ext/fileinfo/tests/finfo_open_001.phpt b/ext/fileinfo/tests/finfo_open_001.phpt index 1b1a1a690018f..b2285dd35c4df 100644 --- a/ext/fileinfo/tests/finfo_open_001.phpt +++ b/ext/fileinfo/tests/finfo_open_001.phpt @@ -19,7 +19,7 @@ var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent')); ?> --EXPECTF-- -finfo_open(): Argument #2 ($arg) must not contain any null bytes +finfo_open(): Argument #2 ($magic_database) must not contain any null bytes resource(%d) of type (file_info) resource(%d) of type (file_info) diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index fea2c54041d2d..b079de682d80f 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -36,5 +36,5 @@ bool(false) Warning: finfo_open(): using regular magic file `%smagic' in %sfinfo_open_error.php on line %d resource(6) of type (file_info) -finfo_open(): Argument #1 ($options) must be of type int, string given -finfo::__construct(): Argument #1 ($options) must be of type int, string given +finfo_open(): Argument #1 ($flags) must be of type int, string given +finfo::__construct(): Argument #1 ($flags) must be of type int, string given From 9d9bcc2b7c01c44c5f7d7bf8a2007f2410c8ad27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 17 Sep 2020 20:39:21 +0200 Subject: [PATCH 091/209] Improve parameter names in ext/hash and ext/openssl Closes GH-6156 --- ext/hash/hash.stub.php | 30 ++++++++++++++--------------- ext/hash/hash_arginfo.h | 30 ++++++++++++++--------------- ext/hash/tests/hash_hkdf_error.phpt | 2 +- ext/openssl/openssl.stub.php | 22 ++++++++++----------- ext/openssl/openssl_arginfo.h | 30 ++++++++++++++--------------- 5 files changed, 57 insertions(+), 57 deletions(-) diff --git a/ext/hash/hash.stub.php b/ext/hash/hash.stub.php index a8f90cd5ec98c..4cce866136b4d 100644 --- a/ext/hash/hash.stub.php +++ b/ext/hash/hash.stub.php @@ -2,25 +2,25 @@ /** @generate-function-entries */ -function hash(string $algo, string $data, bool $raw_output = false): string|false {} +function hash(string $algo, string $data, bool $binary = false): string|false {} -function hash_file(string $algo, string $filename, bool $raw_output = false): string|false {} +function hash_file(string $algo, string $filename, bool $binary = false): string|false {} -function hash_hmac(string $algo, string $data, string $key, bool $raw_output = false): string|false {} +function hash_hmac(string $algo, string $data, string $key, bool $binary = false): string|false {} -function hash_hmac_file(string $algo, string $data, string $key, bool $raw_output = false): string|false {} +function hash_hmac_file(string $algo, string $data, string $key, bool $binary = false): string|false {} -function hash_init(string $algo, int $options = 0, string $key = ""): HashContext {} +function hash_init(string $algo, int $flags = 0, string $key = ""): HashContext {} function hash_update(HashContext $context, string $data): bool {} -/** @param resource $handle */ -function hash_update_stream(HashContext $context, $handle, int $length = -1): int {} +/** @param resource $stream */ +function hash_update_stream(HashContext $context, $stream, int $length = -1): int {} -/** @param resource $stream_context */ +/** @param resource|null $stream_context */ function hash_update_file(HashContext $context, string $filename, $stream_context = null): bool {} -function hash_final(HashContext $context, bool $raw_output = false): string {} +function hash_final(HashContext $context, bool $binary = false): string {} function hash_copy(HashContext $context): HashContext {} @@ -28,22 +28,22 @@ function hash_algos(): array {} function hash_hmac_algos(): array {} -function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $raw_output = false): string {} +function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string {} function hash_equals(string $known_string, string $user_string): bool {} -function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = "", string $salt = ""): string {} +function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string {} #ifdef PHP_MHASH_BC -function mhash_get_block_size(int $hash): int|false {} +function mhash_get_block_size(int $algo): int|false {} -function mhash_get_hash_name(int $hash): string|false {} +function mhash_get_hash_name(int $algo): string|false {} -function mhash_keygen_s2k(int $hash, string $input_password, string $salt, int $bytes): string|false {} +function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length): string|false {} function mhash_count(): int {} -function mhash(int $hash, string $data, ?string $key = null): string|false {} +function mhash(int $algo, string $data, ?string $key = null): string|false {} #endif final class HashContext diff --git a/ext/hash/hash_arginfo.h b/ext/hash/hash_arginfo.h index a7837b28481c3..cb8815de35123 100644 --- a/ext/hash/hash_arginfo.h +++ b/ext/hash/hash_arginfo.h @@ -1,30 +1,30 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 28ec46ceae7550c9a4103c98fd7c20364f078289 */ + * Stub hash: 5298231334ab85edd67ae46c33b7e6cffb2ecc53 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_file, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_hmac, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_hash_hmac_file arginfo_hash_hmac ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_init, 0, 1, HashContext, 0) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() @@ -35,7 +35,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update_stream, 0, 2, IS_LONG, 0) ZEND_ARG_OBJ_INFO(0, context, HashContext, 0) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() @@ -47,7 +47,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_final, 0, 1, IS_STRING, 0) ZEND_ARG_OBJ_INFO(0, context, HashContext, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_copy, 0, 1, HashContext, 0) @@ -65,7 +65,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_pbkdf2, 0, 4, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, iterations, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_equals, 0, 2, _IS_BOOL, 0) @@ -75,7 +75,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_hkdf, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, ikm, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, info, IS_STRING, 0, "\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, salt, IS_STRING, 0, "\"\"") @@ -83,22 +83,22 @@ ZEND_END_ARG_INFO() #if defined(PHP_MHASH_BC) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_get_block_size, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, hash, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0) ZEND_END_ARG_INFO() #endif #if defined(PHP_MHASH_BC) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_get_hash_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, hash, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0) ZEND_END_ARG_INFO() #endif #if defined(PHP_MHASH_BC) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_keygen_s2k, 0, 4, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, hash, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, input_password, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, bytes, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_END_ARG_INFO() #endif @@ -109,7 +109,7 @@ ZEND_END_ARG_INFO() #if defined(PHP_MHASH_BC) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, hash, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 1, "null") ZEND_END_ARG_INFO() diff --git a/ext/hash/tests/hash_hkdf_error.phpt b/ext/hash/tests/hash_hkdf_error.phpt index a478420ca46fc..60a887d003d01 100644 --- a/ext/hash/tests/hash_hkdf_error.phpt +++ b/ext/hash/tests/hash_hkdf_error.phpt @@ -61,6 +61,6 @@ trycatch_dump( [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm -- Testing hash_hkdf() function with invalid parameters -- -[ValueError] hash_hkdf(): Argument #2 ($ikm) cannot be empty +[ValueError] hash_hkdf(): Argument #2 ($key) cannot be empty [ValueError] hash_hkdf(): Argument #3 ($length) must be greater than or equal to 0 [ValueError] hash_hkdf(): Argument #3 ($length) must be less than or equal to 5100 diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php index 21bc936b08fa2..e77f4e4043a78 100644 --- a/ext/openssl/openssl.stub.php +++ b/ext/openssl/openssl.stub.php @@ -19,7 +19,7 @@ function openssl_x509_export_to_file(OpenSSLCertificate|string $certificate, str /** @param string $output */ function openssl_x509_export(OpenSSLCertificate|string $certificate, &$output, bool $no_text = true): bool {} -function openssl_x509_fingerprint(OpenSSLCertificate|string $certificate, string $digest_algorithm = "sha1", bool $raw_output = false): string|false {} +function openssl_x509_fingerprint(OpenSSLCertificate|string $certificate, string $digest_algo = "sha1", bool $binary = false): string|false {} /** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ function openssl_x509_check_private_key(OpenSSLCertificate|string $certificate, $private_key): bool {} @@ -103,12 +103,12 @@ function openssl_get_privatekey($private_key, ?string $passphrase = null): OpenS function openssl_pkey_get_details(OpenSSLAsymmetricKey $key): array|false {} -function openssl_pbkdf2(string $passphrase, string $salt, int $key_length, int $iterations, string $digest_algorithm = "sha1"): string|false {} +function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = "sha1"): string|false {} function openssl_pkcs7_verify(string $input_filename, int $flags, ?string $signers_certificates_filename = null, array $ca_info = [], ?string $untrusted_certificates_filename = null, ?string $content = null, ?string $output_filename = null): bool|int {} /** @param OpenSSLCertificate|array|string $certificate */ -function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $cipher_algorithm = OPENSSL_CIPHER_RC2_40): bool {} +function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $cipher_algo = OPENSSL_CIPHER_RC2_40): bool {} /** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ function openssl_pkcs7_sign(string $input_filename, string $output_filename, OpenSSLCertificate|string $certificate, $private_key, ?array $headers, int $flags = PKCS7_DETACHED, ?string $untrusted_certificates_filename = null): bool {} @@ -125,7 +125,7 @@ function openssl_pkcs7_read(string $input_filename, &$certificates): bool {} function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $certificates = null, array $ca_info = [], ?string $untrusted_certificates_filename = null, ?string $content = null, ?string $pk7 = null, ?string $sigfile = null, int $encoding = OPENSSL_ENCODING_SMIME): bool {} /** @param OpenSSLCertificate|array|string $certificate */ -function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algorithm = OPENSSL_CIPHER_RC2_40): bool {} +function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algo = OPENSSL_CIPHER_RC2_40): bool {} /** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ function openssl_cms_sign(string $input_filename, string $output_filename, OpenSSLCertificate|string $certificate, $private_key, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, ?string $untrusted_certificates_filename = null): bool {} @@ -179,13 +179,13 @@ function openssl_verify(string $data, string $signature, $public_key, string|int * @param array $encrypted_keys * @param string $iv */ -function openssl_seal(string $data, &$sealed_data, &$encrypted_keys, array $public_key, string $cipher_algorithm, &$iv = null): int|false {} +function openssl_seal(string $data, &$sealed_data, &$encrypted_keys, array $public_key, string $cipher_algo, &$iv = null): int|false {} /** * @param string $output * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ -function openssl_open(string $data, &$output, string $encrypted_key, $private_key, string $cipher_algorithm, ?string $iv = null): bool {} +function openssl_open(string $data, &$output, string $encrypted_key, $private_key, string $cipher_algo, ?string $iv = null): bool {} function openssl_get_md_methods(bool $aliases = false): array {} @@ -195,14 +195,14 @@ function openssl_get_cipher_methods(bool $aliases = false): array {} function openssl_get_curve_names(): array|false {} #endif -function openssl_digest(string $data, string $digest_algorithm, bool $raw_output = false): string|false {} +function openssl_digest(string $data, string $digest_algo, bool $binary = false): string|false {} /** @param string $tag */ -function openssl_encrypt(string $data, string $cipher_algorithm, string $passphrase, int $options = 0, string $iv = "", &$tag = null, string $aad = "", int $tag_length = 16): string|false {} +function openssl_encrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", &$tag = null, string $aad = "", int $tag_length = 16): string|false {} -function openssl_decrypt(string $data, string $cipher_algorithm, string $passphrase, int $options = 0, string $iv = "", string $tag = "", string $aad = ""): string|false {} +function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", string $tag = "", string $aad = ""): string|false {} -function openssl_cipher_iv_length(string $cipher_algorithm): int|false {} +function openssl_cipher_iv_length(string $cipher_algo): int|false {} function openssl_dh_compute_key(string $public_key, OpenSSLAsymmetricKey $private_key): string|false {} @@ -215,7 +215,7 @@ function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): st /** @param bool $strong_result */ function openssl_random_pseudo_bytes(int $length, &$strong_result = null): string {} -function openssl_spki_new(OpenSSLAsymmetricKey $private_key, string $challenge, int $digest_algorithm = OPENSSL_ALGO_MD5): string|false {} +function openssl_spki_new(OpenSSLAsymmetricKey $private_key, string $challenge, int $digest_algo = OPENSSL_ALGO_MD5): string|false {} function openssl_spki_verify(string $spki): bool {} diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h index 7700cba8e5480..1e30d9c2c172f 100644 --- a/ext/openssl/openssl_arginfo.h +++ b/ext/openssl/openssl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 40f9897413f966bd483d8f133f6fa3b80910e3d5 */ + * Stub hash: d4f73f86e6f16a74ab5b60bb79c4a9f29e9bc4fb */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_export_to_file, 0, 2, _IS_BOOL, 0) ZEND_ARG_OBJ_TYPE_MASK(0, certificate, OpenSSLCertificate, MAY_BE_STRING, NULL) @@ -15,8 +15,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_x509_fingerprint, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_OBJ_TYPE_MASK(0, certificate, OpenSSLCertificate, MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, digest_algorithm, IS_STRING, 0, "\"sha1\"") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, digest_algo, IS_STRING, 0, "\"sha1\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_check_private_key, 0, 2, _IS_BOOL, 0) @@ -151,11 +151,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pkey_get_details, 0, 1, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pbkdf2, 0, 4, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, passphrase, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, key_length, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, iterations, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, digest_algorithm, IS_STRING, 0, "\"sha1\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, digest_algo, IS_STRING, 0, "\"sha1\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pkcs7_verify, 0, 2, MAY_BE_BOOL|MAY_BE_LONG) @@ -174,7 +174,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkcs7_encrypt, 0, 4, _IS ZEND_ARG_INFO(0, certificate) ZEND_ARG_TYPE_INFO(0, headers, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cipher_algorithm, IS_LONG, 0, "OPENSSL_CIPHER_RC2_40") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cipher_algo, IS_LONG, 0, "OPENSSL_CIPHER_RC2_40") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkcs7_sign, 0, 5, _IS_BOOL, 0) @@ -218,7 +218,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_cms_encrypt, 0, 4, _IS_B ZEND_ARG_TYPE_INFO(0, headers, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_LONG, 0, "OPENSSL_ENCODING_SMIME") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cipher_algorithm, IS_LONG, 0, "OPENSSL_CIPHER_RC2_40") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cipher_algo, IS_LONG, 0, "OPENSSL_CIPHER_RC2_40") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_cms_sign, 0, 5, _IS_BOOL, 0) @@ -292,7 +292,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_seal, 0, 5, MAY_BE_LONG| ZEND_ARG_INFO(1, sealed_data) ZEND_ARG_INFO(1, encrypted_keys) ZEND_ARG_TYPE_INFO(0, public_key, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, cipher_algorithm, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cipher_algo, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, iv, "null") ZEND_END_ARG_INFO() @@ -301,7 +301,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_open, 0, 5, _IS_BOOL, 0) ZEND_ARG_INFO(1, output) ZEND_ARG_TYPE_INFO(0, encrypted_key, IS_STRING, 0) ZEND_ARG_INFO(0, private_key) - ZEND_ARG_TYPE_INFO(0, cipher_algorithm, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cipher_algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iv, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -318,13 +318,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_digest, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, digest_algorithm, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO(0, digest_algo, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_encrypt, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cipher_algorithm, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cipher_algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, passphrase, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iv, IS_STRING, 0, "\"\"") @@ -335,7 +335,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_decrypt, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cipher_algorithm, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cipher_algo, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, passphrase, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iv, IS_STRING, 0, "\"\"") @@ -344,7 +344,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_decrypt, 0, 3, MAY_BE_ST ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_cipher_iv_length, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, cipher_algorithm, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cipher_algo, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_dh_compute_key, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -366,7 +366,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_spki_new, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, private_key, OpenSSLAsymmetricKey, 0) ZEND_ARG_TYPE_INFO(0, challenge, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, digest_algorithm, IS_LONG, 0, "OPENSSL_ALGO_MD5") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, digest_algo, IS_LONG, 0, "OPENSSL_ALGO_MD5") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_spki_verify, 0, 1, _IS_BOOL, 0) From 9b50fd2626277296b4ad47a508fbc9015eb01d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 17 Sep 2020 19:35:40 +0200 Subject: [PATCH 092/209] Fix UNKNOWN default values in ext/odbc Closes GH-6154 --- UPGRADING | 3 ++ ext/odbc/odbc.stub.php | 24 ++++++------ ext/odbc/odbc_arginfo.h | 38 +++++++++---------- ext/odbc/php_odbc.c | 57 ++++++++++------------------ ext/odbc/tests/odbc_columns_001.phpt | 11 +++++- ext/odbc/tests/odbc_tables_001.phpt | 12 +++++- 6 files changed, 72 insertions(+), 73 deletions(-) diff --git a/UPGRADING b/UPGRADING index a0aa20841f768..26ecac9d94e42 100644 --- a/UPGRADING +++ b/UPGRADING @@ -391,6 +391,9 @@ PHP 8.0 UPGRADE NOTES . Several alias functions have been marked as deprecated. . oci_internal_debug() and its alias ociinternaldebug() have been removed. +- ODBC: + . The unused flags parameter of odbc_exec() has been removed. + - OpenSSL: . openssl_x509_read() and openssl_csr_sign() will now return an OpenSSLCertificate object rather than a resource. Return value checks using diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index 36d8ad6dc70d6..28d3d282003ab 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -17,7 +17,7 @@ function odbc_longreadlen($result_id, int $length): bool {} function odbc_prepare($connection_id, string $query) {} /** @param resource $result_id */ -function odbc_execute($result_id, array $parameters_array = UNKNOWN): bool {} +function odbc_execute($result_id, array $parameters_array = []): bool {} /** @param resource $result_id */ function odbc_cursor($result_id): string|false {} @@ -31,14 +31,14 @@ function odbc_data_source($connection_id, int $fetch_type): array|false {} * @param resource $connection_id * @return resource|false */ -function odbc_exec($connection_id, string $query, int $flags = UNKNOWN) {} +function odbc_exec($connection_id, string $query) {} /** * @param resource $connection_id * @return resource|false * @alias odbc_exec */ -function odbc_do($connection_id, string $query, int $flags = UNKNOWN) {} +function odbc_do($connection_id, string $query) {} #ifdef PHP_ODBC_HAVE_FETCH_HASH /** @param resource $result */ @@ -55,7 +55,7 @@ function odbc_fetch_array($result, int $rownumber = -1): array|false {} function odbc_fetch_into($result_id, &$result_array, int $rownumber = 0): int|false {} /** @param resource $result_id */ -function odbc_fetch_row($result_id, int $row_number = UNKNOWN): bool {} +function odbc_fetch_row($result_id, ?int $row_number = null): bool {} /** @param resource $result_id */ function odbc_result($result_id, string|int $field): string|bool|null {} @@ -116,11 +116,11 @@ function odbc_commit($connection_id): bool {} /** @param resource $connection_id */ function odbc_rollback($connection_id): bool {} -/** @param resource $connection_id */ -function odbc_error($connection_id = UNKNOWN): string {} +/** @param resource|null $connection_id */ +function odbc_error($connection_id = null): string {} -/** @param resource $connection_id */ -function odbc_errormsg($connection_id = UNKNOWN): string {} +/** @param resource|null $connection_id */ +function odbc_errormsg($connection_id = null): string {} /** @param resource $conn_id */ function odbc_setoption($conn_id, int $which, int $option, int $value): bool {} @@ -129,13 +129,13 @@ function odbc_setoption($conn_id, int $which, int $option, int $value): bool {} * @param resource $connection_id * @return resource|false */ -function odbc_tables($connection_id, ?string $qualfier = null, string $owner = UNKNOWN, string $name = UNKNOWN, string $table_types = UNKNOWN) {} +function odbc_tables($connection_id, ?string $qualfier = null, ?string $owner = null, ?string $name = null, ?string $table_types = null) {} /** * @param resource $connection_id * @return resource|false */ -function odbc_columns($connection_id, ?string $qualifier = null, string $owner = UNKNOWN, string $table_name = UNKNOWN, string $column_name = UNKNOWN) {} +function odbc_columns($connection_id, ?string $qualifier = null, ?string $owner = null, ?string $table_name = null, ?string $column_name = null) {} /** * @param resource $connection_id @@ -154,13 +154,13 @@ function odbc_primarykeys($connection_id, ?string $qualifier, string $owner, str * @param resource $connection_id * @return resource|false */ -function odbc_procedurecolumns($connection_id, ?string $qualifier = null, string $owner = UNKNOWN, string $proc = UNKNOWN, string $column = UNKNOWN) {} +function odbc_procedurecolumns($connection_id, ?string $qualifier = null, ?string $owner = null, ?string $proc = null, ?string $column = null) {} /** * @param resource $connection_id * @return resource|false */ -function odbc_procedures($connection_id, ?string $qualifier = null, string $owner = UNKNOWN, string $name = UNKNOWN) {} +function odbc_procedures($connection_id, ?string $qualifier = null, ?string $owner = null, ?string $name = null) {} /** * @param resource $connection_id diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index 738bd4488674d..ad410d609c9be 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b533372de4f1110216b2545121d7851022980650 */ + * Stub hash: 9c4eb9f1131356ac8c026b7b57c81f3b43100e1b */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -21,7 +21,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_execute, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, result_id) - ZEND_ARG_TYPE_INFO(0, parameters_array, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters_array, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_cursor, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -35,13 +35,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_data_source, 0, 2, MAY_BE_A ZEND_END_ARG_INFO() #endif -ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_exec, 0, 0, 2) - ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) -ZEND_END_ARG_INFO() +#define arginfo_odbc_exec arginfo_odbc_prepare -#define arginfo_odbc_do arginfo_odbc_exec +#define arginfo_odbc_do arginfo_odbc_prepare #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_odbc_fetch_object, 0, 1, stdClass, MAY_BE_FALSE) @@ -65,7 +61,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_fetch_row, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, result_id) - ZEND_ARG_TYPE_INFO(0, row_number, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row_number, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result, 0, 2, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL) @@ -140,7 +136,7 @@ ZEND_END_ARG_INFO() #define arginfo_odbc_rollback arginfo_odbc_commit ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_error, 0, 0, IS_STRING, 0) - ZEND_ARG_INFO(0, connection_id) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, connection_id, "null") ZEND_END_ARG_INFO() #define arginfo_odbc_errormsg arginfo_odbc_error @@ -155,17 +151,17 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_tables, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualfier, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, table_types, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owner, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table_types, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_columns, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, column_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owner, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table_name, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column_name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_gettypeinfo, 0, 0, 1) @@ -184,9 +180,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_procedurecolumns, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, proc, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, column, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owner, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, proc, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -194,8 +190,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_procedures, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owner, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 0cfa52be44058..8dc9c758444d7 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -964,7 +964,7 @@ PHP_FUNCTION(odbc_prepare) PHP_FUNCTION(odbc_execute) { zval *pv_res, *tmp; - HashTable *pv_param_ht; + HashTable *pv_param_ht = (HashTable *) &zend_empty_array; typedef struct params_t { SQLLEN vallen; int fp; @@ -974,10 +974,10 @@ PHP_FUNCTION(odbc_execute) unsigned char otype; SQLSMALLINT ctype; odbc_result *result; - int numArgs = ZEND_NUM_ARGS(), i, ne; + int i, ne; RETCODE rc; - if (zend_parse_parameters(numArgs, "r|h", &pv_res, &pv_param_ht) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|h", &pv_res, &pv_param_ht) == FAILURE) { RETURN_THROWS(); } @@ -985,15 +985,9 @@ PHP_FUNCTION(odbc_execute) RETURN_THROWS(); } - /* XXX check for already bound parameters*/ - if (result->numparams > 0 && numArgs == 1) { - php_error_docref(NULL, E_WARNING, "No parameters to SQL statement given"); - RETURN_FALSE; - } - if (result->numparams > 0) { if ((ne = zend_hash_num_elements(pv_param_ht)) < result->numparams) { - php_error_docref(NULL, E_WARNING,"Not enough parameters (%d should be %d) given", ne, result->numparams); + php_error_docref(NULL, E_WARNING, "Not enough parameters (%d should be %d) given", ne, result->numparams); RETURN_FALSE; } @@ -1294,7 +1288,6 @@ PHP_FUNCTION(odbc_data_source) PHP_FUNCTION(odbc_exec) { zval *pv_conn; - zend_long pv_flags; char *query; size_t query_len; odbc_result *result = NULL; @@ -1304,7 +1297,7 @@ PHP_FUNCTION(odbc_exec) SQLUINTEGER scrollopts; #endif - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &pv_conn, &query, &query_len, &pv_flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &pv_conn, &query, &query_len) == FAILURE) { RETURN_THROWS(); } @@ -1683,22 +1676,20 @@ PHP_FUNCTION(solid_fetch_prev) /* {{{ Fetch a row */ PHP_FUNCTION(odbc_fetch_row) { - SQLLEN rownum; odbc_result *result; RETCODE rc; zval *pv_res; - zend_long pv_row = 1; + zend_long pv_row; + zend_bool pv_row_is_null = 1; #ifdef HAVE_SQL_EXTENDED_FETCH SQLULEN crow; SQLUSMALLINT RowStatus[1]; #endif - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &pv_res, &pv_row) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l!", &pv_res, &pv_row, &pv_row_is_null) == FAILURE) { RETURN_THROWS(); } - rownum = pv_row; - if ((result = (odbc_result *)zend_fetch_resource(Z_RES_P(pv_res), "ODBC result", le_result)) == NULL) { RETURN_THROWS(); } @@ -1710,8 +1701,8 @@ PHP_FUNCTION(odbc_fetch_row) #ifdef HAVE_SQL_EXTENDED_FETCH if (result->fetch_abs) { - if (ZEND_NUM_ARGS() > 1) { - rc = SQLExtendedFetch(result->stmt,SQL_FETCH_ABSOLUTE,rownum,&crow,RowStatus); + if (!pv_row_is_null) { + rc = SQLExtendedFetch(result->stmt,SQL_FETCH_ABSOLUTE,(SQLLEN)pv_row,&crow,RowStatus); } else { rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); } @@ -1723,8 +1714,8 @@ PHP_FUNCTION(odbc_fetch_row) RETURN_FALSE; } - if (ZEND_NUM_ARGS() > 1) { - result->fetched = rownum; + if (!pv_row_is_null) { + result->fetched = (SQLLEN)pv_row; } else { result->fetched++; } @@ -2645,14 +2636,14 @@ PHP_FUNCTION(odbc_rollback) static void php_odbc_lasterror(INTERNAL_FUNCTION_PARAMETERS, int mode) { odbc_connection *conn; - zval *pv_handle; + zval *pv_handle = NULL; char *ret; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|r", &pv_handle) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|r!", &pv_handle) == FAILURE) { RETURN_THROWS(); } - if (ZEND_NUM_ARGS() == 1) { + if (pv_handle) { if (!(conn = (odbc_connection *)zend_fetch_resource2(Z_RES_P(pv_handle), "ODBC-Link", le_conn, le_pconn))) { RETURN_THROWS(); } @@ -2757,7 +2748,7 @@ PHP_FUNCTION(odbc_tables) size_t cat_len = 0, schema_len = 0, table_len = 0, type_len = 0; RETCODE rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!sss", &pv_conn, &cat, &cat_len, &schema, &schema_len, + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!s!s!", &pv_conn, &cat, &cat_len, &schema, &schema_len, &table, &table_len, &type, &type_len) == FAILURE) { RETURN_THROWS(); } @@ -2782,7 +2773,7 @@ PHP_FUNCTION(odbc_tables) } /* This hack is needed to access table information in Access databases (fmk) */ - if (table && table_len && schema && schema_len == 0) { + if (schema && schema_len == 0 && table && table_len) { schema = NULL; } @@ -2825,7 +2816,7 @@ PHP_FUNCTION(odbc_columns) size_t cat_len = 0, schema_len = 0, table_len = 0, column_len = 0; RETCODE rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!sss", &pv_conn, &cat, &cat_len, &schema, &schema_len, + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!s!s!", &pv_conn, &cat, &cat_len, &schema, &schema_len, &table, &table_len, &column, &column_len) == FAILURE) { RETURN_THROWS(); } @@ -3161,11 +3152,7 @@ PHP_FUNCTION(odbc_procedurecolumns) size_t cat_len = 0, schema_len = 0, proc_len = 0, col_len = 0; RETCODE rc; - if (ZEND_NUM_ARGS() != 1 && ZEND_NUM_ARGS() != 5) { - WRONG_PARAM_COUNT; - } - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!sss", &pv_conn, &cat, &cat_len, &schema, &schema_len, + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!s!s!", &pv_conn, &cat, &cat_len, &schema, &schema_len, &proc, &proc_len, &col, &col_len) == FAILURE) { RETURN_THROWS(); } @@ -3230,11 +3217,7 @@ PHP_FUNCTION(odbc_procedures) size_t cat_len = 0, schema_len = 0, proc_len = 0; RETCODE rc; - if (ZEND_NUM_ARGS() != 1 && ZEND_NUM_ARGS() != 4) { - WRONG_PARAM_COUNT; - } - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!ss", &pv_conn, &cat, &cat_len, &schema, &schema_len, &proc, &proc_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!s!", &pv_conn, &cat, &cat_len, &schema, &schema_len, &proc, &proc_len) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/odbc/tests/odbc_columns_001.phpt b/ext/odbc/tests/odbc_columns_001.phpt index fbbc3e2e0334a..374a9bf6ea8c7 100644 --- a/ext/odbc/tests/odbc_columns_001.phpt +++ b/ext/odbc/tests/odbc_columns_001.phpt @@ -12,8 +12,13 @@ $conn = odbc_connect($dsn, $user, $pass); var_dump($result = odbc_columns($conn, '', '', '', '')); var_dump(odbc_fetch_row($result)); +var_dump($result = odbc_columns($conn)); +var_dump(odbc_fetch_row($result)); +var_dump(odbc_free_result($result)); + var_dump($result = odbc_columns($conn, NULL, NULL, NULL, NULL)); var_dump(odbc_fetch_row($result)); +var_dump(odbc_free_result($result)); var_dump($result = odbc_columns($conn, 'FOO', 'FOO', 'FOO', 'FOO')); var_dump(odbc_fetch_row($result)); @@ -23,6 +28,10 @@ var_dump(odbc_fetch_row($result)); resource(%d) of type (odbc result) bool(false) resource(%d) of type (odbc result) -bool(false) +bool(true) +bool(true) +resource(%d) of type (odbc result) +bool(true) +bool(true) resource(%d) of type (odbc result) bool(false) diff --git a/ext/odbc/tests/odbc_tables_001.phpt b/ext/odbc/tests/odbc_tables_001.phpt index 6b922f25e6576..420c41cda882e 100644 --- a/ext/odbc/tests/odbc_tables_001.phpt +++ b/ext/odbc/tests/odbc_tables_001.phpt @@ -12,18 +12,26 @@ $conn = odbc_connect($dsn, $user, $pass); var_dump($result = odbc_tables($conn, '', '', '', '')); var_dump(odbc_fetch_row($result)); +var_dump($result = odbc_tables($conn)); +var_dump(odbc_fetch_row($result)); +var_dump(odbc_free_result($result)); + var_dump($result = odbc_tables($conn, NULL, NULL, NULL, NULL)); var_dump(odbc_fetch_row($result)); +var_dump(odbc_free_result($result)); var_dump($result = odbc_tables($conn, 'FOO', 'FOO', 'FOO', 'FOO')); var_dump(odbc_fetch_row($result)); - ?> --EXPECTF-- resource(%d) of type (odbc result) bool(false) resource(%d) of type (odbc result) -bool(false) +bool(true) +bool(true) +resource(%d) of type (odbc result) +bool(true) +bool(true) resource(%d) of type (odbc result) bool(false) From 3277cb694131cc614dc1fd8a7db08c796ab38d2c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 24 Sep 2020 23:20:29 +0200 Subject: [PATCH 093/209] Remove outdated link to bug report That bug has been fixed, so no need to keep that link any longer. --- ext/odbc/odbc.stub.php | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index 28d3d282003ab..5abf8d5d5bc69 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -170,7 +170,6 @@ function odbc_foreignkeys($connection_id, ?string $pk_qualifier, string $pk_owne #endif /** - * @see https://bugs.php.net/bug.php?id=78470 * @param resource $connection_id * @return resource|false */ From 17a789e27c31ca13ba4bab6fcfc265d2dd0589a2 Mon Sep 17 00:00:00 2001 From: Simonov Denis Date: Wed, 18 Dec 2019 20:42:07 +0100 Subject: [PATCH 094/209] Fix #64937: Firebird PDO preprocessing sql This patch fixes some problems with preprocessing SQL queries. * The new algorithm takes into account single-line and multi-line comments and ignores the ":" and "?" Parameter markers in them. * The algorithm allows the EXECUTE BLOCK statement to be processed correctly. For this statement, it is necessary to search for parameter markers between EXECUTE BLOCK and AS, the rest should be left as is. The SQL preprocessing code has been ported from Firebird to handle EXECUTE STATEMENT. Closes GH-4920. --- NEWS | 5 + ext/pdo_firebird/firebird_driver.c | 464 ++++++++++++++++-- ext/pdo_firebird/tests/execute_block.phpt | 41 ++ ext/pdo_firebird/tests/ignore_parammarks.phpt | 42 ++ 4 files changed, 517 insertions(+), 35 deletions(-) create mode 100644 ext/pdo_firebird/tests/execute_block.phpt create mode 100644 ext/pdo_firebird/tests/ignore_parammarks.phpt diff --git a/NEWS b/NEWS index 940fb2cbf82a3..25077eaf54314 100644 --- a/NEWS +++ b/NEWS @@ -4,9 +4,14 @@ PHP NEWS - CLI: . Allow debug server binding to an ephemeral port via `-S localhost:0`. (Sara) + - Core: . Fixed bug #80109 (Cannot skip arguments when extended debug is enabled). (Nikita) + +- PDO_Firebird: + . Fixed bug #64937 (Firebird PDO preprocessing sql). (Simonov Denis) + - SPL: . SplFixedArray is now IteratorAggregate rather than Iterator. (alexdowad) diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 4eb4f10ee00b2..c27a9e2ed553a 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -32,6 +32,428 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t*, const char*, size_t, XSQLDA*, isc_stmt_handle*, HashTable*); +const char CHR_LETTER = 1; +const char CHR_DIGIT = 2; +const char CHR_IDENT = 4; +const char CHR_QUOTE = 8; +const char CHR_WHITE = 16; +const char CHR_HEX = 32; +const char CHR_INTRODUCER = 64; + +static const char classes_array[] = { + /* 000 */ 0, + /* 001 */ 0, + /* 002 */ 0, + /* 003 */ 0, + /* 004 */ 0, + /* 005 */ 0, + /* 006 */ 0, + /* 007 */ 0, + /* 008 */ 0, + /* 009 */ 16, /* CHR_WHITE */ + /* 010 */ 16, /* CHR_WHITE */ + /* 011 */ 0, + /* 012 */ 0, + /* 013 */ 16, /* CHR_WHITE */ + /* 014 */ 0, + /* 015 */ 0, + /* 016 */ 0, + /* 017 */ 0, + /* 018 */ 0, + /* 019 */ 0, + /* 020 */ 0, + /* 021 */ 0, + /* 022 */ 0, + /* 023 */ 0, + /* 024 */ 0, + /* 025 */ 0, + /* 026 */ 0, + /* 027 */ 0, + /* 028 */ 0, + /* 029 */ 0, + /* 030 */ 0, + /* 031 */ 0, + /* 032 */ 16, /* CHR_WHITE */ + /* 033 ! */ 0, + /* 034 " */ 8, /* CHR_QUOTE */ + /* 035 # */ 0, + /* 036 $ */ 4, /* CHR_IDENT */ + /* 037 % */ 0, + /* 038 & */ 0, + /* 039 ' */ 8, /* CHR_QUOTE */ + /* 040 ( */ 0, + /* 041 ) */ 0, + /* 042 * */ 0, + /* 043 + */ 0, + /* 044 , */ 0, + /* 045 - */ 0, + /* 046 . */ 0, + /* 047 / */ 0, + /* 048 0 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 049 1 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 050 2 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 051 3 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 052 4 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 053 5 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 054 6 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 055 7 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 056 8 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 057 9 */ 38, /* CHR_DIGIT | CHR_IDENT | CHR_HEX */ + /* 058 : */ 0, + /* 059 ; */ 0, + /* 060 < */ 0, + /* 061 = */ 0, + /* 062 > */ 0, + /* 063 ? */ 0, + /* 064 @ */ 0, + /* 065 A */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 066 B */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 067 C */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 068 D */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 069 E */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 070 F */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 071 G */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 072 H */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 073 I */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 074 J */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 075 K */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 076 L */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 077 M */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 078 N */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 079 O */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 080 P */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 081 Q */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 082 R */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 083 S */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 084 T */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 085 U */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 086 V */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 087 W */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 088 X */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 089 Y */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 090 Z */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 091 [ */ 0, + /* 092 \ */ 0, + /* 093 ] */ 0, + /* 094 ^ */ 0, + /* 095 _ */ 65, /* CHR_IDENT | CHR_INTRODUCER */ + /* 096 ` */ 0, + /* 097 a */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 098 b */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 099 c */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 100 d */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 101 e */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 102 f */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */ + /* 103 g */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 104 h */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 105 i */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 106 j */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 107 k */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 108 l */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 109 m */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 110 n */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 111 o */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 112 p */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 113 q */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 114 r */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 115 s */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 116 t */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 117 u */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 118 v */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 119 w */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 120 x */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 121 y */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 122 z */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 123 { */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 124 | */ 0, + /* 125 } */ 5, /* CHR_LETTER | CHR_IDENT */ + /* 126 ~ */ 0, + /* 127 */ 0 +}; + +inline char classes(char idx) +{ + if (idx > 127) return 0; + return classes_array[idx]; +} + +typedef enum { + ttNone, + ttWhite, + ttComment, + ttBrokenComment, + ttString, + ttParamMark, + ttIdent, + ttOther +} FbTokenType; + +static FbTokenType getToken(const char** begin, const char* end) +{ + FbTokenType ret = ttNone; + const char* p = *begin; + + char c = *p++; + switch (c) + { + case ':': + case '?': + ret = ttParamMark; + break; + + case '\'': + case '"': + while (p < end) + { + if (*p++ == c) + { + ret = ttString; + break; + } + } + break; + + case '/': + if (p < end && *p == '*') + { + ret = ttBrokenComment; + p++; + while (p < end) + { + if (*p++ == '*' && p < end && *p == '/') + { + p++; + ret = ttComment; + break; + } + } + } + else { + ret = ttOther; + } + break; + + case '-': + if (p < end && *p == '-') + { + while (++p < end) + { + if (*p == '\r') + { + p++; + if (p < end && *p == '\n') + p++; + break; + } + else if (*p == '\n') + break; + } + + ret = ttComment; + } + else + ret = ttOther; + break; + + default: + if (classes(c) & CHR_DIGIT) + { + while (p < end && (classes(*p) & CHR_DIGIT)) + p++; + ret = ttOther; + } + else if (classes(c) & CHR_IDENT) + { + while (p < end && (classes(*p) & CHR_IDENT)) + p++; + ret = ttIdent; + } + else if (classes(c) & CHR_WHITE) + { + while (p < end && (classes(*p) & CHR_WHITE)) + p++; + ret = ttWhite; + } + else + { + while (p < end && !(classes(*p) & (CHR_DIGIT | CHR_IDENT | CHR_WHITE)) && + (*p != '/') && (*p != '-') && (*p != ':') && (*p != '?') && + (*p != '\'') && (*p != '"')) + { + p++; + } + ret = ttOther; + } + } + + *begin = p; + return ret; +} + +int preprocess(const char* sql, int sql_len, char* sql_out, HashTable* named_params) +{ + zend_bool passAsIs = 1, execBlock = 0; + zend_long pindex = -1; + char pname[254], ident[253], ident2[253]; + unsigned int l; + const char* p = sql, * end = sql + sql_len; + const char* start = p; + FbTokenType tok = getToken(&p, end); + + const char* i = start; + while (p < end && (tok == ttComment || tok == ttWhite)) + { + i = p; + tok = getToken(&p, end); + } + + if (p >= end || tok != ttIdent) + { + /* Execute statement preprocess SQL error */ + /* Statement expected */ + return 0; + } + /* skip leading comments ?? */ + start = i; + l = p - i; + /* check the length of the identifier */ + /* in Firebird 4.0 it is 63 characters, in previous versions 31 bytes */ + if (l > 252) { + return 0; + } + strncpy(ident, i, l); + ident[l] = '\0'; + if (!strcasecmp(ident, "EXECUTE")) + { + /* For EXECUTE PROCEDURE and EXECUTE BLOCK statements, named parameters must be processed. */ + /* However, in EXECUTE BLOCK this is done in a special way. */ + const char* i2 = p; + tok = getToken(&p, end); + while (p < end && (tok == ttComment || tok == ttWhite)) + { + i2 = p; + tok = getToken(&p, end); + } + if (p >= end || tok != ttIdent) + { + /* Execute statement preprocess SQL error */ + /* Statement expected */ + return 0; + } + l = p - i2; + /* check the length of the identifier */ + /* in Firebird 4.0 it is 63 characters, in previous versions 31 bytes */ + if (l > 252) { + return 0; + } + strncpy(ident2, i2, l); + ident2[l] = '\0'; + execBlock = !strcasecmp(ident2, "BLOCK"); + passAsIs = 0; + } + else + { + /* Named parameters must be processed in the INSERT, UPDATE, DELETE, MERGE statements. */ + /* If CTEs are present in the query, they begin with the WITH keyword. */ + passAsIs = strcasecmp(ident, "INSERT") && strcasecmp(ident, "UPDATE") && + strcasecmp(ident, "DELETE") && strcasecmp(ident, "MERGE") && + strcasecmp(ident, "SELECT") && strcasecmp(ident, "WITH"); + } + + if (passAsIs) + { + strcpy(sql_out, sql); + return 1; + } + + strncat(sql_out, start, p - start); + + while (p < end) + { + start = p; + tok = getToken(&p, end); + switch (tok) + { + case ttParamMark: + tok = getToken(&p, end); + if (tok == ttIdent /*|| tok == ttString*/) + { + ++pindex; + l = p - start; + /* check the length of the identifier */ + /* in Firebird 4.0 it is 63 characters, in previous versions 31 bytes */ + /* + symbol ":" */ + if (l > 253) { + return 0; + } + strncpy(pname, start, l); + pname[l] = '\0'; + + if (named_params) { + zval tmp; + ZVAL_LONG(&tmp, pindex); + zend_hash_str_update(named_params, pname, l, &tmp); + } + + strcat(sql_out, "?"); + } + else + { + if (strncmp(start, "?", 1)) { + /* Execute statement preprocess SQL error */ + /* Parameter name expected */ + return 0; + } + ++pindex; + strncat(sql_out, start, p - start); + } + break; + + case ttIdent: + if (execBlock) + { + /* In the EXECUTE BLOCK statement, processing must be */ + /* carried out up to the keyword AS. */ + l = p - start; + /* check the length of the identifier */ + /* in Firebird 4.0 it is 63 characters, in previous versions 31 bytes */ + if (l > 252) { + return 0; + } + strncpy(ident, start, l); + ident[l] = '\0'; + if (!strcasecmp(ident, "AS")) + { + strncat(sql_out, start, end - start); + return 1; + } + } + + case ttWhite: + case ttComment: + case ttString: + case ttOther: + strncat(sql_out, start, p - start); + break; + + case ttBrokenComment: + { + /* Execute statement preprocess SQL error */ + /* Unclosed comment found near ''@1'' */ + return 0; + } + break; + + + case ttNone: + /* Execute statement preprocess SQL error */ + return 0; + break; + } + } + return 1; +} + /* map driver specific error message to PDO error */ void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, zend_long line) /* {{{ */ { @@ -352,8 +774,7 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, size_t s XSQLDA *out_sqlda, isc_stmt_handle *s, HashTable *named_params) { pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; - char *c, *new_sql, in_quote, in_param, pname[64], *ppname; - zend_long l, pindex = -1; + char *new_sql; /* Firebird allows SQL statements up to 64k, so bail if it doesn't fit */ if (sql_len > 65536) { @@ -379,39 +800,12 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, size_t s /* in order to support named params, which Firebird itself doesn't, we need to replace :foo by ?, and store the name we just replaced */ - new_sql = c = emalloc(sql_len+1); - - for (l = in_quote = in_param = 0; l <= sql_len; ++l) { - if ( !(in_quote ^= (sql[l] == '\''))) { - if (!in_param) { - switch (sql[l]) { - case ':': - in_param = 1; - ppname = pname; - *ppname++ = sql[l]; - case '?': - *c++ = '?'; - ++pindex; - continue; - } - } else { - if ((in_param &= ((sql[l] >= 'A' && sql[l] <= 'Z') || (sql[l] >= 'a' && sql[l] <= 'z') - || (sql[l] >= '0' && sql[l] <= '9') || sql[l] == '_' || sql[l] == '-'))) { - - - *ppname++ = sql[l]; - continue; - } else { - *ppname++ = 0; - if (named_params) { - zval tmp; - ZVAL_LONG(&tmp, pindex); - zend_hash_str_update(named_params, pname, (unsigned int)(ppname - pname - 1), &tmp); - } - } - } - } - *c++ = sql[l]; + new_sql = emalloc(sql_len+1); + new_sql[0] = '\0'; + if (!preprocess(sql, sql_len, new_sql, named_params)) { + strcpy(dbh->error_code, "07000"); + efree(new_sql); + return 0; } /* prepare the statement */ diff --git a/ext/pdo_firebird/tests/execute_block.phpt b/ext/pdo_firebird/tests/execute_block.phpt new file mode 100644 index 0000000000000..fe01acb0a83b4 --- /dev/null +++ b/ext/pdo_firebird/tests/execute_block.phpt @@ -0,0 +1,41 @@ +--TEST-- +PDO_Firebird: support EXECUTE BLOCK +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); + + $sql = ' +execute block (a int = :e, b int = :d) +returns (N int, M int) +as +declare z int; +begin + select 10 + from rdb$database + into :z; + + n = a + b + z; + m = z * a; + suspend; +end +'; + $query = $dbh->prepare($sql); + $query->execute(['d' => 1, 'e' => 2]); + $row = $query->fetch(\PDO::FETCH_OBJ); + var_dump($row->N); + var_dump($row->M); + + unset($query); + unset($dbh); + echo "done\n"; + +?> +--EXPECT-- +int(13) +int(20) +done diff --git a/ext/pdo_firebird/tests/ignore_parammarks.phpt b/ext/pdo_firebird/tests/ignore_parammarks.phpt new file mode 100644 index 0000000000000..01764492047cd --- /dev/null +++ b/ext/pdo_firebird/tests/ignore_parammarks.phpt @@ -0,0 +1,42 @@ +--TEST-- +PDO_Firebird: ingnore parameter marks in comments +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); + + $sql = ' +select 1 as n +-- :f +from rdb$database +where 1=:d and 2=:e +'; + $query = $dbh->prepare($sql); + $query->execute(['d' => 1, 'e' => 2]); + $row = $query->fetch(\PDO::FETCH_OBJ); + var_dump($row->N); + unset($query); + + $sql = ' +select 1 as n +from rdb$database +where 1=:d /* and :f = 5 */ and 2=:e +'; + $query = $dbh->prepare($sql); + $query->execute(['d' => 1, 'e' => 2]); + $row = $query->fetch(\PDO::FETCH_OBJ); + var_dump($row->N); + unset($query); + + unset($dbh); + echo "done\n"; + +?> +--EXPECT-- +int(1) +int(1) +done From 13b791c79c3b1aa69e51b640c84829b98cd50b03 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 09:56:08 +0200 Subject: [PATCH 095/209] Normalize substr() behavior Make the behavior of substr(), mb_substr(), iconv_substr() and grapheme_substr() consistent when it comes to the handling of out of bounds offsets. substr() will now always clamp out of bounds offsets to the string boundary. Cases that previously returned false will now return an empty string. This means that substr() itself *always* returns a string now (like mb_substr() already did before.) Closes GH-6182. --- ext/iconv/iconv.c | 21 +++---- ext/iconv/tests/iconv_substr.phpt | 12 ++-- .../tests/iconv_substr_out_of_bounds.phpt | 48 +++++++++++++++ ext/intl/grapheme/grapheme_string.c | 43 +++++++------- ext/intl/grapheme/grapheme_util.c | 33 ++--------- ext/intl/tests/bug62759.phpt | 10 ++-- ext/intl/tests/grapheme.phpt | 55 ++++++++---------- ext/intl/tests/grapheme2.phpt | 48 +++++++-------- ext/intl/tests/grapheme_out_of_bounds.phpt | 39 +++++++++++-- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 4 +- ext/standard/string.c | 35 +++-------- ext/standard/tests/strings/bug40754.phpt | 2 +- ext/standard/tests/strings/substr.phpt | Bin 4058 -> 4071 bytes 14 files changed, 188 insertions(+), 164 deletions(-) create mode 100644 ext/iconv/tests/iconv_substr_out_of_bounds.phpt diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 89ae1b43a4a77..1f3a141b3e522 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -638,27 +638,22 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pretval, return err; } - if (len < 0) { - if ((len += (total_len - offset)) < 0) { - return PHP_ICONV_ERR_SUCCESS; - } - } - if (offset < 0) { if ((offset += total_len) < 0) { - return PHP_ICONV_ERR_SUCCESS; + offset = 0; } + } else if ((size_t)offset > total_len) { + offset = total_len; } - if((size_t)len > total_len) { + if (len < 0) { + if ((len += (total_len - offset)) < 0) { + len = 0; + } + } else if ((size_t)len > total_len) { len = total_len; } - - if ((size_t)offset > total_len) { - return PHP_ICONV_ERR_SUCCESS; - } - if ((size_t)(offset + len) > total_len ) { /* trying to compute the length */ len = total_len - offset; diff --git a/ext/iconv/tests/iconv_substr.phpt b/ext/iconv/tests/iconv_substr.phpt index 1d029520a47f2..3064c3a6a8d94 100644 --- a/ext/iconv/tests/iconv_substr.phpt +++ b/ext/iconv/tests/iconv_substr.phpt @@ -45,8 +45,8 @@ var_dump(iconv("ISO-2022-JP", "EUC-JP", iconv_substr(iconv("EUC-JP", "ISO-2022-J 666768696a6b6c a6a4a8a4aaa4ab a4aba4ada4afa4b1a4b3a4b5a4b7 -bool(false) -bool(false) +string(0) "" +string(0) "" string(14) "This is a test" string(14) "This is a test" string(3) "est" @@ -55,8 +55,8 @@ string(3) "est" string(3) "est" string(5) "This " string(5) "This " -bool(false) -bool(false) -bool(false) -bool(false) +string(0) "" +string(0) "" +string(0) "" +string(0) "" string(10) " ISO-2" diff --git a/ext/iconv/tests/iconv_substr_out_of_bounds.phpt b/ext/iconv/tests/iconv_substr_out_of_bounds.phpt new file mode 100644 index 0000000000000..4e3e5fae0a972 --- /dev/null +++ b/ext/iconv/tests/iconv_substr_out_of_bounds.phpt @@ -0,0 +1,48 @@ +--TEST-- +iconv_substr() with out of bounds offset +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(0) "" +string(3) "foo" +string(0) "" +string(3) "foo" +string(0) "" +string(6) "äöü" +string(0) "" +string(6) "äöü" +string(3) "foo" +string(0) "" +string(3) "foo" +string(0) "" +string(6) "äöü" +string(0) "" +string(6) "äöü" +string(0) "" +string(2) "ä" +string(4) "äö" +string(0) "" diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index c5d2c6585c679..e45330e15085e 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -371,22 +371,20 @@ PHP_FUNCTION(grapheme_substr) RETURN_THROWS(); } - if ( OUTSIDE_STRING(lstart, str_len)) { - zend_argument_value_error(2, "must be contained in argument #1 ($string)"); + if (lstart < INT32_MIN || lstart > INT32_MAX) { + zend_argument_value_error(2, "is too large"); RETURN_THROWS(); } - /* we checked that it will fit: */ start = (int32_t) lstart; - if(no_length) { + if (no_length) { length = str_len; } - if(length < INT32_MIN) { - length = INT32_MIN; - } else if(length > INT32_MAX) { - length = INT32_MAX; + if (length < INT32_MIN || length > INT32_MAX) { + zend_argument_value_error(3, "is too large"); + RETURN_THROWS(); } /* the offset is 'grapheme count offset' so it still might be invalid - we'll check it later */ @@ -451,15 +449,17 @@ PHP_FUNCTION(grapheme_substr) start += iter_val; } - if ( 0 != start || sub_str_start_pos >= ustr_len ) { - - intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "grapheme_substr: start not contained in string", 1 ); - - if (ustr) { - efree(ustr); + if (0 != start) { + if (start > 0) { + if (ustr) { + efree(ustr); + } + ubrk_close(bi); + RETURN_EMPTY_STRING(); } - ubrk_close(bi); - RETURN_FALSE; + + sub_str_start_pos = 0; + ubrk_first(bi); } /* OK to convert here since if str_len were big, convert above would fail */ @@ -526,20 +526,17 @@ PHP_FUNCTION(grapheme_substr) ubrk_close(bi); if ( UBRK_DONE == sub_str_end_pos) { - if(length < 0) { - zend_argument_value_error(3, "must be contained in argument #1 ($string)"); + if (length < 0) { efree(ustr); - RETURN_THROWS(); + RETURN_EMPTY_STRING(); } else { sub_str_end_pos = ustr_len; } } - if(sub_str_start_pos > sub_str_end_pos) { - intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "grapheme_substr: length is beyond start", 1 ); - + if (sub_str_start_pos > sub_str_end_pos) { efree(ustr); - RETURN_FALSE; + RETURN_EMPTY_STRING(); } status = U_ZERO_ERROR; diff --git a/ext/intl/grapheme/grapheme_util.c b/ext/intl/grapheme/grapheme_util.c index 44592edaaa927..8633fddf5bc10 100644 --- a/ext/intl/grapheme/grapheme_util.c +++ b/ext/intl/grapheme/grapheme_util.c @@ -57,20 +57,6 @@ void grapheme_substr_ascii(char *str, size_t str_len, int32_t f, int32_t l, char return; } - if ((l < 0 && -l > str_len2)) { - return; - } else if (l > 0 && l > str_len2) { - l = str_len2; - } - - if (f > str_len2 || (f < 0 && -f > str_len2)) { - return; - } - - if (l < 0 && str_len2 < f - l) { - return; - } - /* if "from" position is negative, count start position from the end * of the string */ @@ -79,8 +65,9 @@ void grapheme_substr_ascii(char *str, size_t str_len, int32_t f, int32_t l, char if (f < 0) { f = 0; } - } - + } else if (f > str_len2) { + f = str_len2; + } /* if "length" position is negative, set it to the length * needed to stop that many chars from the end of the string @@ -90,20 +77,12 @@ void grapheme_substr_ascii(char *str, size_t str_len, int32_t f, int32_t l, char if (l < 0) { l = 0; } - } - - if (f >= str_len2) { - return; - } - - if ((f + l) > str_len2) { - l = str_len - f; - } + } else if (l > str_len2 - f) { + l = str_len2 - f; + } *sub_str = str + f; *sub_str_len = l; - - return; } /* }}} */ diff --git a/ext/intl/tests/bug62759.phpt b/ext/intl/tests/bug62759.phpt index d4126b752fcb6..bbfb5032fc383 100644 --- a/ext/intl/tests/bug62759.phpt +++ b/ext/intl/tests/bug62759.phpt @@ -14,11 +14,11 @@ var_dump(intl_get_error_message()); var_dump(grapheme_substr('déjà', -1, 0)); ?> --EXPECT-- -bool(false) string(0) "" -bool(false) -string(61) "grapheme_substr: invalid parameters: U_ILLEGAL_ARGUMENT_ERROR" string(0) "" -bool(false) -string(65) "grapheme_substr: length is beyond start: U_ILLEGAL_ARGUMENT_ERROR" +string(0) "" +string(12) "U_ZERO_ERROR" +string(0) "" +string(0) "" +string(12) "U_ZERO_ERROR" string(0) "" diff --git a/ext/intl/tests/grapheme.phpt b/ext/intl/tests/grapheme.phpt index 3fe02fcda78d2..28234f261389f 100644 --- a/ext/intl/tests/grapheme.phpt +++ b/ext/intl/tests/grapheme.phpt @@ -325,23 +325,23 @@ function ut_main() $tests = array( - array( "abc", 3, "false" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, 5, "false" ), + array( "abc", 3, "" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, 5, "" ), array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O", 2, $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O" ), array( $char_o_diaeresis_nfd . $char_a_ring_nfd . "a" . $char_A_ring_nfd . "bc", 2, "a" . $char_A_ring_nfd . "bc" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O", 5, "O" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, 5, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, 5, "" ), array( "a" . $char_a_ring_nfd . "bc" . $char_O_diaeresis_nfd, 4, $char_O_diaeresis_nfd ), array( $char_o_diaeresis_nfd . "a" . $char_a_ring_nfd . "bc", 2, $char_a_ring_nfd . "bc" ), array( "a" . $char_A_ring_nfd . "bc", 1, $char_A_ring_nfd . "bc" ), - array( "Abc", -5, "false" ), - array( $char_a_ring_nfd . "bc", 3, "false" ), - array( "abc", 4, "false" ), + array( "Abc", -5, "Abc" ), + array( $char_a_ring_nfd . "bc", 3, "" ), + array( "abc", 4, "" ), array( "abC", 2, "C" ), array( "abc", 1, "bc" ), array( "Abc", 1, 1, "b" ), array( "abc", 0, 2, "ab" ), - array( "Abc", -4, 1, "false" ), + array( "Abc", -4, 1, "A" ), array( "ababc", 1, 2, "ba" ), array( "ababc", 0, 10, "ababc" ), @@ -350,7 +350,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -1, "Op" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -2, "O" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -3, "" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -4, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -4, "" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -1, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Op" ), @@ -361,7 +361,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -6, "a" . $char_a_ring_nfd ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -7, "a" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -8, "" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -9, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -9, "" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -7, $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), @@ -371,7 +371,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -3, "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -2, "pq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -1, "q" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -999, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -999, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 8, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 7, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Op" ), @@ -382,7 +382,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 2, "a" . $char_a_ring_nfd ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 1, "a" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 0, "" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -999, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -999, "" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -1, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Op" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -2, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O" ), @@ -392,7 +392,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -6, "a" . $char_a_ring_nfd ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -7, "a" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -8, "" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -9, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -9, "" ), ); @@ -973,26 +973,23 @@ find "a%CC%8ABca%CC%8A" in "o%CC%88a%CC%8AaA%CC%8AbCa%CC%8Adef" - grapheme_strri function grapheme_substr($string, $start, $length = -1) {} -substring of "abc" from "3" - grapheme_substr = false == false -substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false +substring of "abc" from "3" - grapheme_substr = == +substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = == substring of "aoa%CC%8Abco%CC%88O" from "2" - grapheme_substr = a%CC%8Abco%CC%88O == a%CC%8Abco%CC%88O substring of "o%CC%88a%CC%8AaA%CC%8Abc" from "2" - grapheme_substr = aA%CC%8Abc == aA%CC%8Abc substring of "aa%CC%8Abco%CC%88O" from "5" - grapheme_substr = O == O -substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false +substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = == substring of "aa%CC%8AbcO%CC%88" from "4" - grapheme_substr = O%CC%88 == O%CC%88 substring of "o%CC%88aa%CC%8Abc" from "2" - grapheme_substr = a%CC%8Abc == a%CC%8Abc substring of "aA%CC%8Abc" from "1" - grapheme_substr = A%CC%8Abc == A%CC%8Abc -substring of "Abc" from "-5" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) - = A%CC%8Abc == false **FAILED** -substring of "a%CC%8Abc" from "3" - grapheme_substr = false == false -substring of "abc" from "4" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) - = false == false +substring of "Abc" from "-5" - grapheme_substr = Abc == Abc +substring of "a%CC%8Abc" from "3" - grapheme_substr = == +substring of "abc" from "4" - grapheme_substr = == substring of "abC" from "2" - grapheme_substr = C == C substring of "abc" from "1" - grapheme_substr = bc == bc substring of "Abc" from "1" - grapheme_substr with length 1 = b == b substring of "abc" from "0" - grapheme_substr with length 2 = ab == ab -substring of "Abc" from "-4" - grapheme_substr with length 1: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) - = ab == false **FAILED** +substring of "Abc" from "-4" - grapheme_substr with length 1 = A == A substring of "ababc" from "1" - grapheme_substr with length 2 = ba == ba substring of "ababc" from "0" - grapheme_substr with length 10 = ababc == ababc substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length 10 = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq @@ -1000,7 +997,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr = Opq == Opq substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -1 = Op == Op substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -2 = O == O substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -3 = == -substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -4 = false == false +substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -4 = == substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -1 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -2 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O @@ -1010,8 +1007,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -5 = substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -6 = aa%CC%8A == aa%CC%8A substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -7 = a == a substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -8 = == -substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -9: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string) - = == false **FAILED** +substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -9 = == substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "-7" - grapheme_substr = a%CC%8Abco%CC%88Opq == a%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "-6" - grapheme_substr = bco%CC%88Opq == bco%CC%88Opq @@ -1020,8 +1016,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-4" - grapheme_substr = o%CC%88Opq == substring of "aa%CC%8Abco%CC%88Opq" from "-3" - grapheme_substr = Opq == Opq substring of "aa%CC%8Abco%CC%88Opq" from "-2" - grapheme_substr = pq == pq substring of "aa%CC%8Abco%CC%88Opq" from "-1" - grapheme_substr = q == q -substring of "aa%CC%8Abco%CC%88Opq" from "-999" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) - = q == false **FAILED** +substring of "aa%CC%8Abco%CC%88Opq" from "-999" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 8 = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 7 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 6 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O @@ -1031,8 +1026,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 3 = substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 2 = aa%CC%8A == aa%CC%8A substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 1 = a == a substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 0 = == -substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -999: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string) - = == false **FAILED** +substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -999 = == substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -1 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -2 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -3 = aa%CC%8Abco%CC%88 == aa%CC%8Abco%CC%88 @@ -1041,8 +1035,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -5 = substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -6 = aa%CC%8A == aa%CC%8A substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -7 = a == a substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -8 = == -substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -9: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string) - = == false **FAILED** +substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -9 = == function grapheme_strstr($haystack, $needle, $before_needle = FALSE) {} diff --git a/ext/intl/tests/grapheme2.phpt b/ext/intl/tests/grapheme2.phpt index 1335fcb04dd6e..dd7bac43a8d91 100644 --- a/ext/intl/tests/grapheme2.phpt +++ b/ext/intl/tests/grapheme2.phpt @@ -325,23 +325,23 @@ function ut_main() $tests = array( - array( "abc", 3, "false" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, 5, "false" ), + array( "abc", 3, "" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, 5, "" ), array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O", 2, $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O" ), array( $char_o_diaeresis_nfd . $char_a_ring_nfd . "a" . $char_A_ring_nfd . "bc", 2, "a" . $char_A_ring_nfd . "bc" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O", 5, "O" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, 5, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, 5, "" ), array( "a" . $char_a_ring_nfd . "bc" . $char_O_diaeresis_nfd, 4, $char_O_diaeresis_nfd ), array( $char_o_diaeresis_nfd . "a" . $char_a_ring_nfd . "bc", 2, $char_a_ring_nfd . "bc" ), array( "a" . $char_A_ring_nfd . "bc", 1, $char_A_ring_nfd . "bc" ), - array( "Abc", -5, "false" ), - array( $char_a_ring_nfd . "bc", 3, "false" ), - array( "abc", 4, "false" ), + array( "Abc", -5, "Abc" ), + array( $char_a_ring_nfd . "bc", 3, "" ), + array( "abc", 4, "" ), array( "abC", 2, "C" ), array( "abc", 1, "bc" ), array( "Abc", 1, 1, "b" ), array( "abc", 0, 2, "ab" ), - array( "Abc", -4, 1, "false" ), + array( "Abc", -4, 1, "A" ), array( "ababc", 1, 2, "ba" ), array( "ababc", 0, 10, "ababc" ), @@ -350,7 +350,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -1, "Op" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -2, "O" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -3, "" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -4, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 5, -4, "" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -1, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Op" ), @@ -361,7 +361,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -6, "a" . $char_a_ring_nfd ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -7, "a" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -8, "" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -9, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", 0, -9, "" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -7, $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), @@ -371,7 +371,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -3, "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -2, "pq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -1, "q" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -999, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -999, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 8, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 7, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Op" ), @@ -382,7 +382,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 2, "a" . $char_a_ring_nfd ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 1, "a" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, 0, "" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -999, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -999, "" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -1, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Op" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -2, "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O" ), @@ -392,7 +392,7 @@ function ut_main() array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -6, "a" . $char_a_ring_nfd ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -7, "a" ), array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -8, "" ), - array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -9, "false" ), + array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Opq", -8, -9, "" ), ); @@ -961,23 +961,23 @@ find "a%CC%8ABca%CC%8A" in "o%CC%88a%CC%8AaA%CC%8AbCa%CC%8Adef" - grapheme_strri function grapheme_substr($string, $start, $length = -1) {} -substring of "abc" from "3" - grapheme_substr = false == false -substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false +substring of "abc" from "3" - grapheme_substr = == +substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = == substring of "aoa%CC%8Abco%CC%88O" from "2" - grapheme_substr = a%CC%8Abco%CC%88O == a%CC%8Abco%CC%88O substring of "o%CC%88a%CC%8AaA%CC%8Abc" from "2" - grapheme_substr = aA%CC%8Abc == aA%CC%8Abc substring of "aa%CC%8Abco%CC%88O" from "5" - grapheme_substr = O == O -substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false +substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = == substring of "aa%CC%8AbcO%CC%88" from "4" - grapheme_substr = O%CC%88 == O%CC%88 substring of "o%CC%88aa%CC%8Abc" from "2" - grapheme_substr = a%CC%8Abc == a%CC%8Abc substring of "aA%CC%8Abc" from "1" - grapheme_substr = A%CC%8Abc == A%CC%8Abc -substring of "Abc" from "-5" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) -substring of "a%CC%8Abc" from "3" - grapheme_substr = false == false -substring of "abc" from "4" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) +substring of "Abc" from "-5" - grapheme_substr = Abc == Abc +substring of "a%CC%8Abc" from "3" - grapheme_substr = == +substring of "abc" from "4" - grapheme_substr = == substring of "abC" from "2" - grapheme_substr = C == C substring of "abc" from "1" - grapheme_substr = bc == bc substring of "Abc" from "1" - grapheme_substr with length 1 = b == b substring of "abc" from "0" - grapheme_substr with length 2 = ab == ab -substring of "Abc" from "-4" - grapheme_substr with length 1: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) +substring of "Abc" from "-4" - grapheme_substr with length 1 = A == A substring of "ababc" from "1" - grapheme_substr with length 2 = ba == ba substring of "ababc" from "0" - grapheme_substr with length 10 = ababc == ababc substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length 10 = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq @@ -985,7 +985,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr = Opq == Opq substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -1 = Op == Op substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -2 = O == O substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -3 = == -substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -4 = false == false +substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -4 = == substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -1 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -2 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O @@ -995,7 +995,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -5 = substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -6 = aa%CC%8A == aa%CC%8A substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -7 = a == a substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -8 = == -substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -9: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string) +substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -9 = == substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "-7" - grapheme_substr = a%CC%8Abco%CC%88Opq == a%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "-6" - grapheme_substr = bco%CC%88Opq == bco%CC%88Opq @@ -1004,7 +1004,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-4" - grapheme_substr = o%CC%88Opq == substring of "aa%CC%8Abco%CC%88Opq" from "-3" - grapheme_substr = Opq == Opq substring of "aa%CC%8Abco%CC%88Opq" from "-2" - grapheme_substr = pq == pq substring of "aa%CC%8Abco%CC%88Opq" from "-1" - grapheme_substr = q == q -substring of "aa%CC%8Abco%CC%88Opq" from "-999" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string) +substring of "aa%CC%8Abco%CC%88Opq" from "-999" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 8 = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 7 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 6 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O @@ -1014,7 +1014,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 3 = substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 2 = aa%CC%8A == aa%CC%8A substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 1 = a == a substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 0 = == -substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -999: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string) +substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -999 = == substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -1 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -2 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -3 = aa%CC%8Abco%CC%88 == aa%CC%8Abco%CC%88 @@ -1023,7 +1023,7 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -5 = substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -6 = aa%CC%8A == aa%CC%8A substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -7 = a == a substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -8 = == -substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -9: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string) +substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -9 = == function grapheme_strstr($haystack, $needle, $before_needle = FALSE) {} diff --git a/ext/intl/tests/grapheme_out_of_bounds.phpt b/ext/intl/tests/grapheme_out_of_bounds.phpt index ce74dc6dbc69f..e563096d7e87b 100644 --- a/ext/intl/tests/grapheme_out_of_bounds.phpt +++ b/ext/intl/tests/grapheme_out_of_bounds.phpt @@ -118,11 +118,25 @@ try { } echo "\n"; -// TODO: substr is special. var_dump(grapheme_substr("foo", 3)); var_dump(grapheme_substr("foo", -3)); -//var_dump(grapheme_substr("foo", 4)); -//var_dump(grapheme_substr("foo", -4)); +var_dump(grapheme_substr("foo", 4)); +var_dump(grapheme_substr("foo", -4)); +var_dump(grapheme_substr("äöü", 3)); +var_dump(grapheme_substr("äöü", -3)); +var_dump(grapheme_substr("äöü", 4)); +var_dump(grapheme_substr("äöü", -4)); +var_dump(grapheme_substr("foo", 0, 3)); +var_dump(grapheme_substr("foo", 0, -3)); +var_dump(grapheme_substr("foo", 0, 4)); +var_dump(grapheme_substr("foo", 0, -4)); +var_dump(grapheme_substr("äöü", 0, 3)); +var_dump(grapheme_substr("äöü", 0, -3)); +var_dump(grapheme_substr("äöü", 0, 4)); +var_dump(grapheme_substr("äöü", 0, -4)); +var_dump(grapheme_substr("äöü", -4, 1)); +var_dump(grapheme_substr("äöü", -4, -1)); +var_dump(grapheme_substr("äöü", 2, -2)); ?> --EXPECT-- @@ -167,5 +181,22 @@ grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($hay grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -bool(false) +string(0) "" +string(3) "foo" +string(0) "" +string(3) "foo" +string(0) "" +string(6) "äöü" +string(0) "" +string(6) "äöü" +string(3) "foo" +string(0) "" string(3) "foo" +string(0) "" +string(6) "äöü" +string(0) "" +string(6) "äöü" +string(0) "" +string(2) "ä" +string(4) "äö" +string(0) "" diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 58f09ca2a19ba..eea47c664fa46 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -607,7 +607,7 @@ function str_ends_with(string $haystack, string $needle): bool {} function chunk_split(string $str, int $chunklen = 76, string $ending = "\r\n"): string {} -function substr(string $str, int $start, ?int $length = null): string|false {} +function substr(string $str, int $start, ?int $length = null): string {} function substr_replace(array|string $str, array|string $replace, array|int $start, array|int|null $length = null): string|array {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 1c90803d96dff..e044eef24ef20 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f029ab7f1d9fa2a99a5612a928d0b731de6aaeed */ + * Stub hash: 5275c2ba801f36ecf17e6b615b19373aca34e852 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -924,7 +924,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chunk_split, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ending, IS_STRING, 0, "\"\\r\\n\"") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") diff --git a/ext/standard/string.c b/ext/standard/string.c index 35404cb3fd574..06222303bd37c 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2170,9 +2170,7 @@ PHP_FUNCTION(substr) Z_PARAM_LONG_OR_NULL(l, len_is_null) ZEND_PARSE_PARAMETERS_END(); - if (f > (zend_long)ZSTR_LEN(str)) { - RETURN_FALSE; - } else if (f < 0) { + if (f < 0) { /* if "from" position is negative, count start position from the end * of the string */ @@ -2181,41 +2179,24 @@ PHP_FUNCTION(substr) } else { f = (zend_long)ZSTR_LEN(str) + f; } - if (!len_is_null) { - if (l < 0) { - /* if "length" position is negative, set it to the length - * needed to stop that many chars from the end of the string - */ - if ((size_t)(-l) > ZSTR_LEN(str) - (size_t)f) { - if ((size_t)(-l) > ZSTR_LEN(str)) { - RETURN_FALSE; - } else { - l = 0; - } - } else { - l = (zend_long)ZSTR_LEN(str) - f + l; - } - } else if ((size_t)l > ZSTR_LEN(str) - (size_t)f) { - goto truncate_len; - } - } else { - goto truncate_len; - } - } else if (!len_is_null) { + } else if ((size_t)f > ZSTR_LEN(str)) { + RETURN_EMPTY_STRING(); + } + + if (!len_is_null) { if (l < 0) { /* if "length" position is negative, set it to the length * needed to stop that many chars from the end of the string */ if ((size_t)(-l) > ZSTR_LEN(str) - (size_t)f) { - RETURN_FALSE; + l = 0; } else { l = (zend_long)ZSTR_LEN(str) - f + l; } } else if ((size_t)l > ZSTR_LEN(str) - (size_t)f) { - goto truncate_len; + l = (zend_long)ZSTR_LEN(str) - f; } } else { -truncate_len: l = (zend_long)ZSTR_LEN(str) - f; } diff --git a/ext/standard/tests/strings/bug40754.phpt b/ext/standard/tests/strings/bug40754.phpt index 602fd28b27e04..be9d89912dc63 100644 --- a/ext/standard/tests/strings/bug40754.phpt +++ b/ext/standard/tests/strings/bug40754.phpt @@ -102,4 +102,4 @@ strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) int(2) string(8) "abcdeabc" -bool(false) +string(0) "" diff --git a/ext/standard/tests/strings/substr.phpt b/ext/standard/tests/strings/substr.phpt index 5addfdf2421c1e256e066b3250d0a89325e9797a..99dcd2bf2f0c08246eddce75d21a0e33f0960e56 100644 GIT binary patch delta 207 zcmca5|6G0pE5{^m_Q@x?g(qL&WuLsBgKe?`r`qKAoTy?jIb!KM-29U-aA?uU=*>qt Zud_`4%PTkeFCWk3xvavQZ}2fO0su^^NRa>l delta 207 zcmaDZe@lJ?D+hN{etwQdT4GLds^(-t4o77qJ{Jx)P@OcIK2-iO4l6Wys+ha^Am?)y SUSvmcO>Sh>-~5!1i4g$A21DQg From 56fb6864c68ab824a0ff25677dda04970ef06bdd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 25 Sep 2020 10:03:41 +0200 Subject: [PATCH 096/209] Unify 32-bit/64-bit str_split tests The 32-bit tests work on both 32-bit and 64-bit. I dropped the 64-bit variants as they only test one additional case that I don't think adds particular value. --- .../tests/strings/str_split_variation6.phpt | 4 - .../strings/str_split_variation6_64bit.phpt | 155 ------------------ .../tests/strings/str_split_variation7.phpt | 4 - .../strings/str_split_variation7_64bit.phpt | 133 --------------- 4 files changed, 296 deletions(-) delete mode 100644 ext/standard/tests/strings/str_split_variation6_64bit.phpt delete mode 100644 ext/standard/tests/strings/str_split_variation7_64bit.phpt diff --git a/ext/standard/tests/strings/str_split_variation6.phpt b/ext/standard/tests/strings/str_split_variation6.phpt index 21843a618a403..4fc049af969d0 100644 --- a/ext/standard/tests/strings/str_split_variation6.phpt +++ b/ext/standard/tests/strings/str_split_variation6.phpt @@ -1,9 +1,5 @@ --TEST-- Test str_split() function : usage variations - different integer values for 'split_length' argument ---SKIPIF-- - --FILE-- ---FILE-- -getMessage() . "\n"; - } -} -?> ---EXPECT-- -*** Testing str_split() : different integer values for 'split_length' *** --- Iteration 1 -- -str_split(): Argument #2 ($split_length) must be greater than 0 --- Iteration 2 -- -array(42) { - [0]=> - string(1) "T" - [1]=> - string(1) "h" - [2]=> - string(1) "i" - [3]=> - string(1) "s" - [4]=> - string(1) " " - [5]=> - string(1) "i" - [6]=> - string(1) "s" - [7]=> - string(1) " " - [8]=> - string(1) "a" - [9]=> - string(1) " " - [10]=> - string(1) "s" - [11]=> - string(1) "t" - [12]=> - string(1) "r" - [13]=> - string(1) "i" - [14]=> - string(1) "n" - [15]=> - string(1) "g" - [16]=> - string(1) " " - [17]=> - string(1) "w" - [18]=> - string(1) "i" - [19]=> - string(1) "t" - [20]=> - string(1) "h" - [21]=> - string(1) " " - [22]=> - string(1) "1" - [23]=> - string(1) "2" - [24]=> - string(1) "3" - [25]=> - string(1) " " - [26]=> - string(1) "&" - [27]=> - string(1) " " - [28]=> - string(1) "e" - [29]=> - string(1) "s" - [30]=> - string(1) "c" - [31]=> - string(1) "a" - [32]=> - string(1) "p" - [33]=> - string(1) "e" - [34]=> - string(1) " " - [35]=> - string(1) "c" - [36]=> - string(1) "h" - [37]=> - string(1) "a" - [38]=> - string(1) "r" - [39]=> - string(1) " " - [40]=> - string(1) "\" - [41]=> - string(1) "t" -} --- Iteration 3 -- -str_split(): Argument #2 ($split_length) must be greater than 0 --- Iteration 4 -- -array(1) { - [0]=> - string(42) "This is a string with 123 & escape char \t" -} --- Iteration 5 -- -array(2) { - [0]=> - string(26) "This is a string with 123 " - [1]=> - string(16) "& escape char \t" -} --- Iteration 6 -- -array(1) { - [0]=> - string(42) "This is a string with 123 & escape char \t" -} --- Iteration 7 -- -array(1) { - [0]=> - string(42) "This is a string with 123 & escape char \t" -} --- Iteration 8 -- -str_split(): Argument #2 ($split_length) must be greater than 0 diff --git a/ext/standard/tests/strings/str_split_variation7.phpt b/ext/standard/tests/strings/str_split_variation7.phpt index f38ad89c6033c..0c48596261655 100644 --- a/ext/standard/tests/strings/str_split_variation7.phpt +++ b/ext/standard/tests/strings/str_split_variation7.phpt @@ -1,9 +1,5 @@ --TEST-- Test str_split() function : usage variations - different integer values for 'split_length' with heredoc 'str' ---SKIPIF-- - --FILE-- ---FILE-- -getMessage() . "\n"; - } -} -?> ---EXPECT-- -*** Testing str_split() : different integer values for 'split_length' with heredoc 'str' *** --- Iteration 1 -- -str_split(): Argument #2 ($split_length) must be greater than 0 --- Iteration 2 -- -array(30) { - [0]=> - string(1) "s" - [1]=> - string(1) "t" - [2]=> - string(1) "r" - [3]=> - string(1) "i" - [4]=> - string(1) "n" - [5]=> - string(1) "g" - [6]=> - string(1) " " - [7]=> - string(1) "w" - [8]=> - string(1) "i" - [9]=> - string(1) "t" - [10]=> - string(1) "h" - [11]=> - string(1) " " - [12]=> - string(1) "1" - [13]=> - string(1) "2" - [14]=> - string(1) "3" - [15]=> - string(1) "," - [16]=> - string(1) "e" - [17]=> - string(1) "s" - [18]=> - string(1) "c" - [19]=> - string(1) "a" - [20]=> - string(1) "p" - [21]=> - string(1) "e" - [22]=> - string(1) " " - [23]=> - string(1) "c" - [24]=> - string(1) "h" - [25]=> - string(1) "a" - [26]=> - string(1) "r" - [27]=> - string(1) " " - [28]=> - string(1) " " - [29]=> - string(1) "." -} --- Iteration 3 -- -str_split(): Argument #2 ($split_length) must be greater than 0 --- Iteration 4 -- -array(1) { - [0]=> - string(30) "string with 123,escape char ." -} --- Iteration 5 -- -array(2) { - [0]=> - string(26) "string with 123,escape cha" - [1]=> - string(4) "r ." -} --- Iteration 6 -- -array(1) { - [0]=> - string(30) "string with 123,escape char ." -} --- Iteration 7 -- -array(1) { - [0]=> - string(30) "string with 123,escape char ." -} --- Iteration 8 -- -str_split(): Argument #2 ($split_length) must be greater than 0 From f6024a90543b52da81d710ce6e4738d057955a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 17 Sep 2020 20:15:01 +0200 Subject: [PATCH 097/209] Improve parameter names in ext/curl Closes GH-6155 --- ext/curl/curl.stub.php | 14 +++++++------- ext/curl/curl_arginfo.h | 12 ++++++------ ext/curl/curl_file.stub.php | 6 +++--- ext/curl/curl_file_arginfo.h | 10 +++++----- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ext/curl/curl.stub.php b/ext/curl/curl.stub.php index c2951b1c6aa31..2eba460d6c66a 100644 --- a/ext/curl/curl.stub.php +++ b/ext/curl/curl.stub.php @@ -33,7 +33,7 @@ function curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $va function curl_exec(CurlHandle $handle): string|bool {} -function curl_file_create(string $filename, ?string $mimetype = null, ?string $postname = null): CURLFile {} +function curl_file_create(string $filename, ?string $mime_type = null, ?string $posted_filename = null): CURLFile {} function curl_getinfo(CurlHandle $handle, ?int $option = null): mixed {} @@ -50,8 +50,8 @@ function curl_multi_exec(CurlMultiHandle $multi_handle, &$still_running): int {} function curl_multi_getcontent(CurlHandle $multi_handle): ?string {} -/** @param int|null $msgs_in_queue */ -function curl_multi_info_read(CurlMultiHandle $multi_handle, &$msgs_in_queue = null): array|false {} +/** @param int $queued_messages */ +function curl_multi_info_read(CurlMultiHandle $multi_handle, &$queued_messages = null): array|false {} function curl_multi_init(): CurlMultiHandle {} @@ -59,10 +59,10 @@ function curl_multi_remove_handle(CurlMultiHandle $multi_handle, CurlHandle $han function curl_multi_select(CurlMultiHandle $multi_handle, float $timeout = 1.0): int {} -function curl_multi_strerror(int $error_number): ?string {} +function curl_multi_strerror(int $error_code): ?string {} #if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ -function curl_pause(CurlHandle $handle, int $bitmask): int {} +function curl_pause(CurlHandle $handle, int $flags): int {} #endif function curl_reset(CurlHandle $handle): void {} @@ -79,8 +79,8 @@ function curl_share_init(): CurlShareHandle {} function curl_share_setopt(CurlShareHandle $share_handle, int $option, mixed $value): bool {} -function curl_share_strerror(int $error_number): ?string {} +function curl_share_strerror(int $error_code): ?string {} -function curl_strerror(int $error_number): ?string {} +function curl_strerror(int $error_code): ?string {} function curl_version(): array|false {} diff --git a/ext/curl/curl_arginfo.h b/ext/curl/curl_arginfo.h index 30f2e839a815a..e213f9d3184e7 100644 --- a/ext/curl/curl_arginfo.h +++ b/ext/curl/curl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: ca65615cacfe914f3511007fd393169ffededf34 */ + * Stub hash: afeae538b49eb43a661e5b491da79c17d10c6bfe */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0) ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0) @@ -42,8 +42,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_curl_file_create, 0, 1, CURLFile, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mimetype, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, postname, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mime_type, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, posted_filename, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_getinfo, 0, 1, IS_MIXED, 0) @@ -79,7 +79,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_multi_info_read, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, multi_handle, CurlMultiHandle, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, msgs_in_queue, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, queued_messages, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_curl_multi_init, 0, 0, CurlMultiHandle, 0) @@ -93,13 +93,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_select, 0, 1, IS_LONG ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_strerror, 0, 1, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, error_number, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0) ZEND_END_ARG_INFO() #if LIBCURL_VERSION_NUM >= 0x071200 /* 7.18.0 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_pause, 0, 2, IS_LONG, 0) ZEND_ARG_OBJ_INFO(0, handle, CurlHandle, 0) - ZEND_ARG_TYPE_INFO(0, bitmask, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() #endif diff --git a/ext/curl/curl_file.stub.php b/ext/curl/curl_file.stub.php index 14d775d293776..28a218c69836f 100644 --- a/ext/curl/curl_file.stub.php +++ b/ext/curl/curl_file.stub.php @@ -4,7 +4,7 @@ class CURLFile { - public function __construct(string $filename, ?string $mimetype = null, ?string $postname = null) {} + public function __construct(string $filename, ?string $mime_type = null, ?string $posted_filename = null) {} /** @return string */ public function getFilename() {} @@ -16,8 +16,8 @@ public function getMimeType() {} public function getPostFilename() {} /** @return void */ - public function setMimeType(string $mime) {} + public function setMimeType(string $mime_type) {} /** @return void */ - public function setPostFilename(string $postname) {} + public function setPostFilename(string $posted_filename) {} } diff --git a/ext/curl/curl_file_arginfo.h b/ext/curl/curl_file_arginfo.h index 526bd322f505e..c745d597dab39 100644 --- a/ext/curl/curl_file_arginfo.h +++ b/ext/curl/curl_file_arginfo.h @@ -1,10 +1,10 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 2dbca0eed1723e959b2a56d6035239b189f52495 */ + * Stub hash: a81720edab23748f6dce30306f5a5ffc9634da5d */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mimetype, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, postname, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mime_type, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, posted_filename, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_getFilename, 0, 0, 0) @@ -15,11 +15,11 @@ ZEND_END_ARG_INFO() #define arginfo_class_CURLFile_getPostFilename arginfo_class_CURLFile_getFilename ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_setMimeType, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, mime, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, mime_type, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_setPostFilename, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, postname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, posted_filename, IS_STRING, 0) ZEND_END_ARG_INFO() From 166178ae6db297e8168cbef0afc281fd1a49e93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 25 Sep 2020 11:19:50 +0200 Subject: [PATCH 098/209] Update ext/odbc stub hash --- ext/odbc/odbc_arginfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index ad410d609c9be..bcc52bdacce01 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 9c4eb9f1131356ac8c026b7b57c81f3b43100e1b */ + * Stub hash: 3e7073410f7d9d8357f2eeacd0457567901dbe08 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() From 41b096b392e551df51c80d29f6f30c163a0630ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 25 Sep 2020 10:18:12 +0200 Subject: [PATCH 099/209] Promote a few forgotten warnings to exceptions Closes GH-6211 --- ext/date/php_date.c | 4 +-- .../tests/date_sunrise_and_sunset_error.phpt | 21 ++++++++++++++++ ext/fileinfo/fileinfo.c | 8 +++--- ext/fileinfo/tests/bug61964-mb.phpt | 2 +- ext/fileinfo/tests/bug61964.phpt | 2 +- ext/fileinfo/tests/bug68996.phpt | 2 +- ext/fileinfo/tests/bug71527-mb.phpt | 2 +- ext/fileinfo/tests/bug71527.phpt | 2 +- ext/fileinfo/tests/finfo_open_001.phpt | 6 ++--- ext/fileinfo/tests/finfo_open_error.phpt | 2 +- ext/mysqli/mysqli.c | 6 +++-- ext/mysqli/mysqli_api.c | 7 +++--- ext/mysqli/tests/mysqli_commit_oo.phpt | 25 ++++++++++--------- ext/mysqli/tests/mysqli_fetch_array.phpt | 24 +++++++++--------- ext/mysqli/tests/mysqli_fetch_array_oo.phpt | 24 +++++++++--------- ext/mysqli/tests/mysqli_stmt_bind_param.phpt | 18 ++++++------- ext/mysqlnd/mysqlnd_connection.c | 2 +- ext/xsl/xsltprocessor.c | 7 +++--- 18 files changed, 92 insertions(+), 72 deletions(-) create mode 100644 ext/date/tests/date_sunrise_and_sunset_error.phpt diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 88431a22ea205..8c0f5a62b100c 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4501,8 +4501,8 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su retformat != SUNFUNCS_RET_STRING && retformat != SUNFUNCS_RET_DOUBLE) { - php_error_docref(NULL, E_WARNING, "Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE"); - RETURN_FALSE; + zend_argument_value_error(2, "must be one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, or SUNFUNCS_RET_DOUBLE"); + RETURN_THROWS(); } altitude = 90 - zenith; diff --git a/ext/date/tests/date_sunrise_and_sunset_error.phpt b/ext/date/tests/date_sunrise_and_sunset_error.phpt new file mode 100644 index 0000000000000..45054390176c6 --- /dev/null +++ b/ext/date/tests/date_sunrise_and_sunset_error.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test error condition of date_sunrise() and date_sunset() +--FILE-- +getMessage() . "\n"; +} + +try { + date_sunset(time(), 4); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} + +?> +--EXPECT-- +date_sunrise(): Argument #2 ($returnFormat) must be one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, or SUNFUNCS_RET_DOUBLE +date_sunset(): Argument #2 ($returnFormat) must be one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, or SUNFUNCS_RET_DOUBLE diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index 2538171f25bee..1b26736ad0c45 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -71,8 +71,8 @@ static inline finfo_object *php_finfo_fetch_object(zend_object *obj) { finfo_object *obj = Z_FINFO_P(object); \ finfo = obj->ptr; \ if (!finfo) { \ - php_error_docref(NULL, E_WARNING, "The invalid fileinfo object."); \ - RETURN_FALSE; \ + zend_throw_error(NULL, "Invalid finfo object"); \ + RETURN_THROWS(); \ } \ } @@ -270,7 +270,7 @@ PHP_FUNCTION(finfo_open) } if (magic_load(finfo->magic, file) == -1) { - php_error_docref(NULL, E_WARNING, "Failed to load magic database at '%s'.", file); + php_error_docref(NULL, E_WARNING, "Failed to load magic database at \"%s\"", file); magic_close(finfo->magic); efree(finfo); if (object) { @@ -382,7 +382,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime magic = magic_open(MAGIC_MIME_TYPE); if (magic_load(magic, NULL) == -1) { - php_error_docref(NULL, E_WARNING, "Failed to load magic database."); + php_error_docref(NULL, E_WARNING, "Failed to load magic database"); goto common; } } else if (object) { diff --git a/ext/fileinfo/tests/bug61964-mb.phpt b/ext/fileinfo/tests/bug61964-mb.phpt index 9187393554eb6..1142ad7eeda29 100644 --- a/ext/fileinfo/tests/bug61964-mb.phpt +++ b/ext/fileinfo/tests/bug61964-mb.phpt @@ -58,5 +58,5 @@ Warning: finfo_open(): offset `a' invalid in %sbug61964-mb.php on line %d Warning: finfo_open(): offset `b' invalid in %sbug61964-mb.php on line %d -Warning: finfo_open(): Failed to load magic database at '%sbug61964-mb'. in %sbug61964-mb.php on line %d +Warning: finfo_open(): Failed to load magic database at "%sbug61964-mb" in %sbug61964-mb.php on line %d DONE: testing dir with files diff --git a/ext/fileinfo/tests/bug61964.phpt b/ext/fileinfo/tests/bug61964.phpt index 24cf3bec8c807..ecb12fe75214d 100644 --- a/ext/fileinfo/tests/bug61964.phpt +++ b/ext/fileinfo/tests/bug61964.phpt @@ -58,5 +58,5 @@ Warning: finfo_open(): offset `a' invalid in %sbug61964.php on line %d Warning: finfo_open(): offset `b' invalid in %sbug61964.php on line %d -Warning: finfo_open(): Failed to load magic database at '%sbug61964'. in %sbug61964.php on line %d +Warning: finfo_open(): Failed to load magic database at "%sbug61964" in %sbug61964.php on line %d DONE: testing dir with files diff --git a/ext/fileinfo/tests/bug68996.phpt b/ext/fileinfo/tests/bug68996.phpt index aabd2670bdc08..2535f5e455857 100644 --- a/ext/fileinfo/tests/bug68996.phpt +++ b/ext/fileinfo/tests/bug68996.phpt @@ -14,4 +14,4 @@ finfo_open(FILEINFO_MIME_TYPE, "\xfc\x63");
Warning: finfo_open(%s�c): Failed to open stream: No such file or directory in %sbug68996.php on line %d

-Warning: finfo_open(): Failed to load magic database at '%s�c'. in %sbug68996.php on line %d
+Warning: finfo_open(): Failed to load magic database at "%s�c" in %s on line %d
diff --git a/ext/fileinfo/tests/bug71527-mb.phpt b/ext/fileinfo/tests/bug71527-mb.phpt index ea32a8122a923..0240ce3303eb9 100644 --- a/ext/fileinfo/tests/bug71527-mb.phpt +++ b/ext/fileinfo/tests/bug71527-mb.phpt @@ -12,5 +12,5 @@ USE_ZEND_ALLOC=0 var_dump($finfo); ?> --EXPECTF-- -Warning: finfo_open(): Failed to load magic database at '%sbug71527私はガラスを食べられます.magic'. in %sbug71527-mb.php on line %d +Warning: finfo_open(): Failed to load magic database at "%sbug71527私はガラスを食べられます.magic" in %sbug71527-mb.php on line %d bool(false) diff --git a/ext/fileinfo/tests/bug71527.phpt b/ext/fileinfo/tests/bug71527.phpt index 9a00c4f32b83d..3a536266fcf2a 100644 --- a/ext/fileinfo/tests/bug71527.phpt +++ b/ext/fileinfo/tests/bug71527.phpt @@ -12,5 +12,5 @@ USE_ZEND_ALLOC=0 var_dump($finfo); ?> --EXPECTF-- -Warning: finfo_open(): Failed to load magic database at '%sbug71527.magic'. in %sbug71527.php on line %d +Warning: finfo_open(): Failed to load magic database at "%sbug71527.magic" in %sbug71527.php on line %d bool(false) diff --git a/ext/fileinfo/tests/finfo_open_001.phpt b/ext/fileinfo/tests/finfo_open_001.phpt index b2285dd35c4df..ef36bc21f08e8 100644 --- a/ext/fileinfo/tests/finfo_open_001.phpt +++ b/ext/fileinfo/tests/finfo_open_001.phpt @@ -27,19 +27,19 @@ Warning: finfo_open(%s123): Failed to open stream: No such file or directory in Warning: finfo_open(%s123): Failed to open stream: No such file or directory in %s on line %d -Warning: finfo_open(): Failed to load magic database at '%s123'. in %s on line %d +Warning: finfo_open(): Failed to load magic database at "%s123" in %s on line %d bool(false) Warning: finfo_open(%s1): Failed to open stream: No such file or directory in %s on line %d Warning: finfo_open(%s1): Failed to open stream: No such file or directory in %s on line %d -Warning: finfo_open(): Failed to load magic database at '%s1'. in %s on line %d +Warning: finfo_open(): Failed to load magic database at "%s1" in %s on line %d bool(false) Warning: finfo_open(%sinexistent): Failed to open stream: No such file or directory in %s on line %d Warning: finfo_open(%sinexistent): Failed to open stream: No such file or directory in %s on line %d -Warning: finfo_open(): Failed to load magic database at '%sinexistent'. in %s on line %d +Warning: finfo_open(): Failed to load magic database at "%sinexistent" in %s on line %d bool(false) diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index b079de682d80f..881c26f664827 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -31,7 +31,7 @@ Warning: finfo_open(%sfoobarfile): Failed to open stream: No such file or direct Warning: finfo_open(%sfoobarfile): Failed to open stream: No such file or directory in %sfinfo_open_error.php on line %d -Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %sfinfo_open_error.php on line %d +Warning: finfo_open(): Failed to load magic database at "%sfoobarfile" in %sfinfo_open_error.php on line %d bool(false) Warning: finfo_open(): using regular magic file `%smagic' in %sfinfo_open_error.php on line %d diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 9eb1885ea6ffb..05ffffa926a10 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -47,6 +47,8 @@ static PHP_GINIT_FUNCTION(mysqli); } \ } +#define ERROR_ARG_POS(arg_num) (getThis() ? (arg_num-1) : (arg_num)) + static HashTable classes; static zend_object_handlers mysqli_object_handlers; static zend_object_handlers mysqli_object_driver_handlers; @@ -1168,8 +1170,8 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID); if (fetchtype < MYSQLI_ASSOC || fetchtype > MYSQLI_BOTH) { - php_error_docref(NULL, E_WARNING, "The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH"); - RETURN_FALSE; + zend_argument_value_error(ERROR_ARG_POS(2), "must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH"); + RETURN_THROWS(); } php_mysqli_fetch_into_hash_aux(return_value, result, fetchtype); diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 928031f82e78d..91915809428a0 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -93,7 +93,7 @@ mysqli_escape_string_for_tx_name_in_comment(const char * const name) { *p_copy++ = v; } else if (warned == FALSE) { - php_error_docref(NULL, E_WARNING, "Transaction name truncated. Must be only [0-9A-Za-z\\-_=]+"); + php_error_docref(NULL, E_WARNING, "Transaction name has been truncated, since it can only contain the A-Z, a-z, 0-9, \"\\\", \"-\", \"_\", and \"=\" characters"); warned = TRUE; } ++p_orig; @@ -230,7 +230,7 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int num_vars, zval *a break; default: - php_error_docref(NULL, E_WARNING, "Undefined fieldtype %c (parameter %d)", types[ofs], i + num_extra_args + 1); + zend_argument_value_error(num_extra_args, "must only contain the \"b\", \"d\", \"i\", \"s\" type specifiers"); rc = 1; goto end_1; } @@ -292,8 +292,7 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int num_vars, zval *a type = MYSQL_TYPE_VAR_STRING; break; default: - /* We count parameters from 1 */ - php_error_docref(NULL, E_WARNING, "Undefined fieldtype %c (parameter %d)", types[i], i + num_extra_args + 1); + zend_argument_value_error(num_extra_args, "must only contain the \"b\", \"d\", \"i\", \"s\" type specifiers"); ret = FAIL; mysqlnd_stmt_free_param_bind(stmt->stmt, params); goto end; diff --git a/ext/mysqli/tests/mysqli_commit_oo.phpt b/ext/mysqli/tests/mysqli_commit_oo.phpt index 6377fdf5a91c8..e4cfbe47943ad 100644 --- a/ext/mysqli/tests/mysqli_commit_oo.phpt +++ b/ext/mysqli/tests/mysqli_commit_oo.phpt @@ -76,15 +76,13 @@ if (!have_innodb($link)) if (!$mysqli->commit(0 , "tx_name0123")) { printf("[012] [%d] %s\n", $mysqli->errno, $mysqli->error); } - if (!$mysqli->commit(0 , "*/ nonsense")) { - printf("[013] [%d] %s\n", $mysqli->errno, $mysqli->error); - } - if (!$mysqli->commit(0 , "tx_name ulf вендел")) { - printf("[014] [%d] %s\n", $mysqli->errno, $mysqli->error); - } - if (!$mysqli->commit(0 , "tx_name \t\n\r\b")) { - printf("[015] [%d] %s\n", $mysqli->errno, $mysqli->error); - } + + var_dump($mysqli->commit(0 , "*/ nonsense")); + + var_dump($mysqli->commit(0 , "tx_name ulf вендел")); + + var_dump($mysqli->commit(0 , "tx_name \t\n\r\b")); + if (!$mysqli->commit(MYSQLI_TRANS_COR_AND_CHAIN | MYSQLI_TRANS_COR_NO_RELEASE , "tx_name")) { printf("[016] [%d] %s\n", $mysqli->errno, $mysqli->error); } @@ -105,10 +103,13 @@ if (!have_innodb($link)) --EXPECTF-- mysqli object is not fully initialized -Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-_=]+ in %s on line %d +Warning: mysqli::commit(): Transaction name has been truncated, since it can only contain the A-Z, a-z, 0-9, "\", "-", "_", and "=" characters in %s on line %d +bool(true) -Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-_=]+ in %s on line %d +Warning: mysqli::commit(): Transaction name has been truncated, since it can only contain the A-Z, a-z, 0-9, "\", "-", "_", and "=" characters in %s on line %d +bool(true) -Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-_=]+ in %s on line %d +Warning: mysqli::commit(): Transaction name has been truncated, since it can only contain the A-Z, a-z, 0-9, "\", "-", "_", and "=" characters in %s on line %d +bool(true) my_mysqli object is already closed done! diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt index c2046f1821e65..044ed2de0c61f 100644 --- a/ext/mysqli/tests/mysqli_fetch_array.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array.phpt @@ -48,15 +48,17 @@ require_once('skipifconnectfailure.inc'); $illegal_mode = mt_rand(-10000, 10000); } while (in_array($illegal_mode, array(MYSQLI_ASSOC, MYSQLI_NUM, MYSQLI_BOTH))); // NOTE: for BC reasons with ext/mysql, ext/mysqli accepts invalid result modes. - $tmp = mysqli_fetch_array($res, $illegal_mode); - if (false !== $tmp) - printf("[013] Expecting boolean/false although, got %s/%s. [%d] %s\n", - gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link)); + try { + mysqli_fetch_array($res, $illegal_mode); + } catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; + } - $tmp = mysqli_fetch_array($res, $illegal_mode); - if (false !== $tmp) - printf("[014] Expecting boolean/false, got %s/%s. [%d] %s\n", - gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link)); + try { + mysqli_fetch_array($res, $illegal_mode); + } catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; + } mysqli_free_result($res); @@ -357,9 +359,7 @@ array(11) { ["e"]=> string(1) "1" } - -Warning: mysqli_fetch_array(): The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in %s on line %d - -Warning: mysqli_fetch_array(): The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in %s on line %d +mysqli_fetch_array(): Argument #2 ($fetchtype) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH +mysqli_fetch_array(): Argument #2 ($fetchtype) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH mysqli_result object is already closed done! diff --git a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt index 6bf2b0f4c02df..599b9d0c9490d 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt @@ -55,15 +55,17 @@ require_once('skipifconnectfailure.inc'); $illegal_mode = mt_rand(-10000, 10000); } while (in_array($illegal_mode, array(MYSQLI_ASSOC, MYSQLI_NUM, MYSQLI_BOTH))); // NOTE: for BC reasons with ext/mysql, ext/mysqli accepts invalid result modes. - $tmp = $res->fetch_array($illegal_mode); - if (false !== $tmp) - printf("[013] Expecting boolean/false although, got %s/%s. [%d] %s\n", - gettype($tmp), $tmp, $mysqli->errno, $mysqli->error); + try { + $res->fetch_array($illegal_mode); + } catch (Error $exception) { + echo $exception->getMessage() . "\n"; + } - $tmp = $res->fetch_array($illegal_mode); - if (false !== $tmp) - printf("[014] Expecting boolean/false, got %s/%s. [%d] %s\n", - gettype($tmp), $tmp, $mysqli->errno, $mysqli->error); + try { + $res->fetch_array($illegal_mode); + } catch (Error $exception) { + echo $exception->getMessage() . "\n"; + } $res->free_result(); @@ -353,9 +355,7 @@ array(11) { ["e"]=> string(1) "1" } - -Warning: mysqli_result::fetch_array(): The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in %s on line %d - -Warning: mysqli_result::fetch_array(): The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in %s on line %d +mysqli_result::fetch_array(): Argument #1 ($result_type) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH +mysqli_result::fetch_array(): Argument #1 ($result_type) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH mysqli_result object is already closed done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt index 237b722646750..f3f11511ca181 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt @@ -83,16 +83,14 @@ require_once('skipifconnectfailure.inc'); } try { - if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "aa", $id, $label))) - printf("[006] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); - } catch (\ArgumentCountError $e) { + mysqli_stmt_bind_param($stmt, "aa", $id, $label); + } catch (ValueError $e) { echo $e->getMessage() . \PHP_EOL; } try { - if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "ia", $id, $label))) - printf("[007] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); - } catch (\ArgumentCountError $e) { + mysqli_stmt_bind_param($stmt, "ia", $id, $label); + } catch (ValueError $e) { echo $e->getMessage() . \PHP_EOL; } @@ -414,7 +412,7 @@ require_once('skipifconnectfailure.inc'); ---EXPECTF-- +--EXPECT-- The number of variables must match the number of parameters in the prepared statement mysqli_stmt_bind_param(): Argument #2 ($types) cannot be empty The number of elements in the type definition string must match the number of bind variables @@ -422,8 +420,6 @@ The number of variables must match the number of parameters in the prepared stat The number of elements in the type definition string must match the number of bind variables The number of variables must match the number of parameters in the prepared statement The number of elements in the type definition string must match the number of bind variables - -Warning: mysqli_stmt_bind_param(): Undefined fieldtype a (parameter 3) in %s on line %d - -Warning: mysqli_stmt_bind_param(): Undefined fieldtype a (parameter 4) in %s on line %d +mysqli_stmt_bind_param(): Argument #2 ($types) must only contain the "b", "d", "i", "s" type specifiers +mysqli_stmt_bind_param(): Argument #2 ($types) must only contain the "b", "d", "i", "s" type specifiers done! diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index 5915e1266e5d4..35cc3f55fc0ac 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -2054,7 +2054,7 @@ mysqlnd_escape_string_for_tx_name_in_comment(const char * const name) { *p_copy++ = v; } else if (warned == FALSE) { - php_error_docref(NULL, E_WARNING, "Transaction name truncated. Must be only [0-9A-Za-z\\-_=]+"); + php_error_docref(NULL, E_WARNING, "Transaction name has been truncated, since it can only contain the A-Z, a-z, 0-9, \"\\\", \"-\", \"_\", and \"=\" characters"); warned = TRUE; } ++p_orig; diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index deac062bfab09..d900d951033cb 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -573,9 +573,10 @@ PHP_METHOD(XSLTProcessor, transformToDoc) ce = zend_lookup_class(ret_class); if (ce == NULL || !instanceof_function(ce, curce)) { xmlFreeDoc(newdocp); - php_error_docref(NULL, E_WARNING, - "Expecting class compatible with %s, '%s' given", ZSTR_VAL(curclass_name), ZSTR_VAL(ret_class)); - RETURN_FALSE; + zend_argument_type_error(2, "must be a class name compatible with %s, \"%s\" given", + ZSTR_VAL(curclass_name), ZSTR_VAL(ret_class) + ); + RETURN_THROWS(); } object_init_ex(return_value, ce); From 43ce18f8373f2027a3173f4b99c0bd6b2609bd7a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 25 Sep 2020 12:31:05 +0200 Subject: [PATCH 100/209] Add proper count() parameter type We can make this Countable|array now. --- ext/standard/basic_functions.stub.php | 10 +++------- ext/standard/basic_functions_arginfo.h | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index eea47c664fa46..ec0e056dac9a0 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -62,14 +62,10 @@ function krsort(array &$array, int $flags = SORT_REGULAR): bool {} function ksort(array &$array, int $flags = SORT_REGULAR): bool {} -/** @param Countable|array $var */ -function count($var, int $mode = COUNT_NORMAL): int {} +function count(Countable|array $var, int $mode = COUNT_NORMAL): int {} -/** - * @param Countable|array $var - * @alias count - */ -function sizeof($var, int $mode = COUNT_NORMAL): int {} +/** @alias count */ +function sizeof(Countable|array $var, int $mode = COUNT_NORMAL): int {} function natsort(array &$array): bool {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index e044eef24ef20..5e19997bb4648 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 5275c2ba801f36ecf17e6b615b19373aca34e852 */ + * Stub hash: 97187c073137b8fdfc03bdecf72377ef73d79290 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -82,7 +82,7 @@ ZEND_END_ARG_INFO() #define arginfo_ksort arginfo_krsort ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_count, 0, 1, IS_LONG, 0) - ZEND_ARG_INFO(0, var) + ZEND_ARG_OBJ_TYPE_MASK(0, var, Countable, MAY_BE_ARRAY, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "COUNT_NORMAL") ZEND_END_ARG_INFO() From 439878c8f9d4966eacc504f6d3e35c7cb66c4251 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 24 Sep 2020 23:19:15 +0200 Subject: [PATCH 101/209] Rename $qualifier/$owner params to $catalog/$schema These have been called qualifier and owner with ODBC 2, but ODBC 3 changed that to catalog and schema, respectively. Closes GH-6210. --- ext/odbc/odbc.stub.php | 18 +++++++++--------- ext/odbc/odbc_arginfo.h | 42 ++++++++++++++++++++--------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index 5abf8d5d5bc69..667d5e88b76a2 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -129,13 +129,13 @@ function odbc_setoption($conn_id, int $which, int $option, int $value): bool {} * @param resource $connection_id * @return resource|false */ -function odbc_tables($connection_id, ?string $qualfier = null, ?string $owner = null, ?string $name = null, ?string $table_types = null) {} +function odbc_tables($connection_id, ?string $catalog = null, ?string $schema = null, ?string $name = null, ?string $table_types = null) {} /** * @param resource $connection_id * @return resource|false */ -function odbc_columns($connection_id, ?string $qualifier = null, ?string $owner = null, ?string $table_name = null, ?string $column_name = null) {} +function odbc_columns($connection_id, ?string $catalog = null, ?string $schema = null, ?string $table_name = null, ?string $column_name = null) {} /** * @param resource $connection_id @@ -147,46 +147,46 @@ function odbc_gettypeinfo($connection_id, int $data_type = 0) {} * @param resource $connection_id * @return resource|false */ -function odbc_primarykeys($connection_id, ?string $qualifier, string $owner, string $table) {} +function odbc_primarykeys($connection_id, ?string $catalog, string $schema, string $table) {} #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) /** * @param resource $connection_id * @return resource|false */ -function odbc_procedurecolumns($connection_id, ?string $qualifier = null, ?string $owner = null, ?string $proc = null, ?string $column = null) {} +function odbc_procedurecolumns($connection_id, ?string $catalog = null, ?string $schema = null, ?string $proc = null, ?string $column = null) {} /** * @param resource $connection_id * @return resource|false */ -function odbc_procedures($connection_id, ?string $qualifier = null, ?string $owner = null, ?string $name = null) {} +function odbc_procedures($connection_id, ?string $catalog = null, ?string $schema = null, ?string $name = null) {} /** * @param resource $connection_id * @return resource|false */ -function odbc_foreignkeys($connection_id, ?string $pk_qualifier, string $pk_owner, string $pk_table, string $fk_qualifier, string $fk_owner, string $fk_table) {} +function odbc_foreignkeys($connection_id, ?string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) {} #endif /** * @param resource $connection_id * @return resource|false */ -function odbc_specialcolumns($connection_id, int $type, ?string $qualifier, string $owner, string $table, int $scope, int $nullable) {} +function odbc_specialcolumns($connection_id, int $type, ?string $catalog, string $schema, string $table, int $scope, int $nullable) {} /** * @param resource $connection_id * @return resource|false */ -function odbc_statistics($connection_id, ?string $qualfier, string $owner, string $name, int $unique, int $accuracy) {} +function odbc_statistics($connection_id, ?string $catalog, string $schema, string $name, int $unique, int $accuracy) {} #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) /** * @param resource $connection_id * @return resource|false */ -function odbc_tableprivileges($connection_id, ?string $qualifier, string $owner, string $name) {} +function odbc_tableprivileges($connection_id, ?string $catalog, string $schema, string $name) {} /** * @param resource $connection_id diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index bcc52bdacce01..ad2fbf48b02a4 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3e7073410f7d9d8357f2eeacd0457567901dbe08 */ + * Stub hash: 53069f42e460cfea8e2daf499277f6ceb9c760f7 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -150,16 +150,16 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_tables, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualfier, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owner, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, catalog, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, schema, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table_types, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_columns, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owner, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, catalog, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, schema, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table_name, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column_name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -171,16 +171,16 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_primarykeys, 0, 0, 4) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0) ZEND_END_ARG_INFO() #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_procedurecolumns, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owner, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, catalog, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, schema, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, proc, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -189,8 +189,8 @@ ZEND_END_ARG_INFO() #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_procedures, 0, 0, 1) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifier, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, owner, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, catalog, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, schema, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -198,11 +198,11 @@ ZEND_END_ARG_INFO() #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_foreignkeys, 0, 0, 7) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, pk_qualifier, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, pk_owner, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, pk_catalog, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, pk_schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, pk_table, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, fk_qualifier, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, fk_owner, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, fk_catalog, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, fk_schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, fk_table, IS_STRING, 0) ZEND_END_ARG_INFO() #endif @@ -210,8 +210,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_specialcolumns, 0, 0, 7) ZEND_ARG_INFO(0, connection_id) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, scope, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, nullable, IS_LONG, 0) @@ -219,8 +219,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_statistics, 0, 0, 6) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, qualfier, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, unique, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, accuracy, IS_LONG, 0) @@ -229,8 +229,8 @@ ZEND_END_ARG_INFO() #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_tableprivileges, 0, 0, 4) ZEND_ARG_INFO(0, connection_id) - ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1) - ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, catalog, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() #endif From a49555a9e1547a513e2f22d0a2a3ef92cddbec3d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 25 Sep 2020 11:25:02 +0200 Subject: [PATCH 102/209] Fix #80147: BINARY strings may not be properly zero-terminated We have to manually ensure that all strings fetched from a data source are zero-terminated. Closes GH-6213. --- NEWS | 2 ++ ext/odbc/php_odbc.c | 1 + ext/odbc/tests/bug80147.phpt | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 ext/odbc/tests/bug80147.phpt diff --git a/NEWS b/NEWS index 35a928af07c56..21c054c981a4e 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ PHP NEWS - ODBC: . Fixed bug #78470 (odbc_specialcolumns() no longer accepts $nullable). (cmb) + . Fixed bug #80147 (BINARY strings may not be properly zero-terminated). + (cmb) - OPcache: . Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index c2d1a8f846f92..a93252f7c450a 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2221,6 +2221,7 @@ PHP_FUNCTION(odbc_result) if (rc != SQL_SUCCESS_WITH_INFO) { field_str = zend_string_truncate(field_str, result->values[field_ind].vallen, 0); } + ZSTR_VAL(field_str)[ZSTR_LEN(field_str)] = '\0'; RETURN_NEW_STR(field_str); break; diff --git a/ext/odbc/tests/bug80147.phpt b/ext/odbc/tests/bug80147.phpt new file mode 100644 index 0000000000000..26e27c534ebac --- /dev/null +++ b/ext/odbc/tests/bug80147.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #80147 (BINARY strings may not be properly zero-terminated) +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +string(8) "whatever" From 8067cf475205b4af1f703584beb4b7db4897223d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 25 Sep 2020 14:47:10 +0200 Subject: [PATCH 103/209] Use callable type in register_shutdown_function() To make things a bit less weird, split off the function name into a zval stored separately from the arguments. This allows us to use normal zpp and get standard behavior. --- ext/session/session.c | 22 +++----- ext/standard/basic_functions.c | 55 +++++++------------ ext/standard/basic_functions.h | 3 +- ext/standard/basic_functions.stub.php | 3 +- ext/standard/basic_functions_arginfo.h | 4 +- ext/standard/tests/general_functions/010.phpt | 2 +- .../tests/general_functions/bug32647.phpt | 14 ++--- 7 files changed, 42 insertions(+), 61 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index bf05a547acc35..dd57b6ad0575f 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2034,15 +2034,13 @@ PHP_FUNCTION(session_set_save_handler) if (register_shutdown) { /* create shutdown function */ php_shutdown_function_entry shutdown_function_entry; - shutdown_function_entry.arg_count = 1; - shutdown_function_entry.arguments = (zval *) safe_emalloc(sizeof(zval), 1, 0); - - ZVAL_STRING(&shutdown_function_entry.arguments[0], "session_register_shutdown"); + ZVAL_STRING(&shutdown_function_entry.function_name, "session_register_shutdown"); + shutdown_function_entry.arg_count = 0; + shutdown_function_entry.arguments = NULL; /* add shutdown function, removing the old one if it exists */ if (!register_user_shutdown_function("session_shutdown", sizeof("session_shutdown") - 1, &shutdown_function_entry)) { - zval_ptr_dtor(&shutdown_function_entry.arguments[0]); - efree(shutdown_function_entry.arguments); + zval_ptr_dtor(&shutdown_function_entry.function_name); php_error_docref(NULL, E_WARNING, "Unable to register session shutdown function"); RETURN_FALSE; } @@ -2665,14 +2663,12 @@ PHP_FUNCTION(session_register_shutdown) * the session still to be available. */ - shutdown_function_entry.arg_count = 1; - shutdown_function_entry.arguments = (zval *) safe_emalloc(sizeof(zval), 1, 0); - - ZVAL_STRING(&shutdown_function_entry.arguments[0], "session_write_close"); + ZVAL_STRING(&shutdown_function_entry.function_name, "session_write_close"); + shutdown_function_entry.arg_count = 0; + shutdown_function_entry.arguments = NULL; - if (!append_user_shutdown_function(shutdown_function_entry)) { - zval_ptr_dtor(&shutdown_function_entry.arguments[0]); - efree(shutdown_function_entry.arguments); + if (!append_user_shutdown_function(&shutdown_function_entry)) { + zval_ptr_dtor(&shutdown_function_entry.function_name); /* Unable to register shutdown function, presumably because of lack * of memory, so flush the session now. It would be done in rshutdown diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index d0c8805fe461a..8a7d9ca895bfb 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1658,6 +1658,7 @@ void user_shutdown_function_dtor(zval *zv) /* {{{ */ int i; php_shutdown_function_entry *shutdown_function_entry = Z_PTR_P(zv); + zval_ptr_dtor(&shutdown_function_entry->function_name); for (i = 0; i < shutdown_function_entry->arg_count; i++) { zval_ptr_dtor(&shutdown_function_entry->arguments[i]); } @@ -1682,18 +1683,18 @@ static int user_shutdown_function_call(zval *zv) /* {{{ */ php_shutdown_function_entry *shutdown_function_entry = Z_PTR_P(zv); zval retval; - if (!zend_is_callable(&shutdown_function_entry->arguments[0], 0, NULL)) { - zend_string *function_name = zend_get_callable_name(&shutdown_function_entry->arguments[0]); + if (!zend_is_callable(&shutdown_function_entry->function_name, 0, NULL)) { + zend_string *function_name = zend_get_callable_name(&shutdown_function_entry->function_name); zend_throw_error(NULL, "Registered shutdown function %s() cannot be called, function does not exist", ZSTR_VAL(function_name)); zend_string_release(function_name); return 0; } if (call_user_function(NULL, NULL, - &shutdown_function_entry->arguments[0], + &shutdown_function_entry->function_name, &retval, - shutdown_function_entry->arg_count - 1, - shutdown_function_entry->arguments + 1) == SUCCESS) + shutdown_function_entry->arg_count, + shutdown_function_entry->arguments) == SUCCESS) { zval_ptr_dtor(&retval); } @@ -1787,40 +1788,24 @@ PHPAPI void php_free_shutdown_functions(void) /* {{{ */ /* {{{ Register a user-level function to be called on request termination */ PHP_FUNCTION(register_shutdown_function) { - php_shutdown_function_entry shutdown_function_entry; - int i; - - shutdown_function_entry.arg_count = ZEND_NUM_ARGS(); - - if (shutdown_function_entry.arg_count < 1) { - WRONG_PARAM_COUNT; - } - - shutdown_function_entry.arguments = (zval *) safe_emalloc(sizeof(zval), shutdown_function_entry.arg_count, 0); - - if (zend_get_parameters_array(ZEND_NUM_ARGS(), shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) { - efree(shutdown_function_entry.arguments); - RETURN_FALSE; - } + php_shutdown_function_entry entry; + zend_fcall_info fci; + zend_fcall_info_cache fcc; + zval *args; + int arg_count = 0; - /* Prevent entering of anything but valid callback (syntax check only!) */ - if (!zend_is_callable(&shutdown_function_entry.arguments[0], 0, NULL)) { - zend_string *callback_name = zend_get_callable_name(&shutdown_function_entry.arguments[0]); - zend_argument_type_error(1, "must be a valid callback, function \"%s\" not found or invalid function name", ZSTR_VAL(callback_name)); - efree(shutdown_function_entry.arguments); - zend_string_release(callback_name); + if (zend_parse_parameters(ZEND_NUM_ARGS(), "f*", &fci, &fcc, &args, &arg_count) == FAILURE) { RETURN_THROWS(); } - if (!BG(user_shutdown_function_names)) { - ALLOC_HASHTABLE(BG(user_shutdown_function_names)); - zend_hash_init(BG(user_shutdown_function_names), 0, NULL, user_shutdown_function_dtor, 0); + ZVAL_COPY(&entry.function_name, &fci.function_name); + entry.arguments = (zval *) safe_emalloc(sizeof(zval), arg_count, 0); + entry.arg_count = arg_count; + for (int i = 0; i < arg_count; i++) { + ZVAL_COPY(&entry.arguments[i], &args[i]); } - for (i = 0; i < shutdown_function_entry.arg_count; i++) { - Z_TRY_ADDREF(shutdown_function_entry.arguments[i]); - } - zend_hash_next_index_insert_mem(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry)); + append_user_shutdown_function(&entry); } /* }}} */ @@ -1846,14 +1831,14 @@ PHPAPI zend_bool remove_user_shutdown_function(const char *function_name, size_t } /* }}} */ -PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry) /* {{{ */ +PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry) /* {{{ */ { if (!BG(user_shutdown_function_names)) { ALLOC_HASHTABLE(BG(user_shutdown_function_names)); zend_hash_init(BG(user_shutdown_function_names), 0, NULL, user_shutdown_function_dtor, 0); } - return zend_hash_next_index_insert_mem(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry)) != NULL; + return zend_hash_next_index_insert_mem(BG(user_shutdown_function_names), shutdown_function_entry, sizeof(php_shutdown_function_entry)) != NULL; } /* }}} */ diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 6c0eb5c59edc0..97faf50fd92e9 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -143,13 +143,14 @@ PHPAPI double php_get_nan(void); PHPAPI double php_get_inf(void); typedef struct _php_shutdown_function_entry { + zval function_name; zval *arguments; int arg_count; } php_shutdown_function_entry; PHPAPI extern zend_bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry); PHPAPI extern zend_bool remove_user_shutdown_function(const char *function_name, size_t function_len); -PHPAPI extern zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry); +PHPAPI extern zend_bool append_user_shutdown_function(php_shutdown_function_entry *shutdown_function_entry); PHPAPI void php_call_shutdown_functions(void); PHPAPI void php_free_shutdown_functions(void); diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index ec0e056dac9a0..24aa55cbd7e05 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -301,8 +301,7 @@ function forward_static_call(callable $function, mixed ...$args): mixed {} function forward_static_call_array(callable $function, array $args): mixed {} -/** @param callable $function */ -function register_shutdown_function($function, mixed ...$args): ?bool {} +function register_shutdown_function(callable $function, mixed ...$args): ?bool {} function highlight_file(string $filename, bool $return = false): string|bool {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 5e19997bb4648..6786cdb04a862 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 97187c073137b8fdfc03bdecf72377ef73d79290 */ + * Stub hash: c373aa965002f4c6a816e6574417ce59473ad7b3 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -456,7 +456,7 @@ ZEND_END_ARG_INFO() #define arginfo_forward_static_call_array arginfo_call_user_func_array ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_register_shutdown_function, 0, 1, _IS_BOOL, 1) - ZEND_ARG_INFO(0, function) + ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0) ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) ZEND_END_ARG_INFO() diff --git a/ext/standard/tests/general_functions/010.phpt b/ext/standard/tests/general_functions/010.phpt index 31b8bed9050c2..a8fefd663debd 100644 --- a/ext/standard/tests/general_functions/010.phpt +++ b/ext/standard/tests/general_functions/010.phpt @@ -20,5 +20,5 @@ try { echo "Done\n"; ?> --EXPECT-- -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "test::__call" not found or invalid function name +register_shutdown_function(): Argument #1 ($function) must be a valid callback, non-static method test::__call() cannot be called statically Done diff --git a/ext/standard/tests/general_functions/bug32647.phpt b/ext/standard/tests/general_functions/bug32647.phpt index 09735c9d86c48..a981a7f454781 100644 --- a/ext/standard/tests/general_functions/bug32647.phpt +++ b/ext/standard/tests/general_functions/bug32647.phpt @@ -73,15 +73,15 @@ register_shutdown_function(array($obj,'barfoo')); ?> --EXPECTF-- Warning: Undefined variable $obj in %s on line %d -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "Array" not found or invalid function name +register_shutdown_function(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object Warning: Undefined variable $obj in %s on line %d -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "Array" not found or invalid function name -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "Array" not found or invalid function name -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "bar::foo" not found or invalid function name -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "Array" not found or invalid function name +register_shutdown_function(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object +register_shutdown_function(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object +register_shutdown_function(): Argument #1 ($function) must be a valid callback, class bar does not have a method "foo" +register_shutdown_function(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "bar" not found or invalid function name -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "bar::barfoo" not found or invalid function name -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "bar::foobar" not found or invalid function name +register_shutdown_function(): Argument #1 ($function) must be a valid callback, non-static method bar::barfoo() cannot be called statically +register_shutdown_function(): Argument #1 ($function) must be a valid callback, class bar does not have a method "foobar" foo! bar! From 411610892a5ef48f407fae11ab371eea26b1ceb4 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 25 Sep 2020 03:55:18 +0100 Subject: [PATCH 104/209] Drop do_bind argument in do_fetch(_common)() in PDO It is always set to true by callers and therefore irrelevant. --- ext/pdo/pdo_stmt.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 945d5eb78ff64..81b30a9b2493c 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -590,7 +590,7 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ } /* }}} */ -static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset, int do_bind) /* {{{ */ +static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset) /* {{{ */ { if (!stmt->executed) { return 0; @@ -613,7 +613,7 @@ static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zen return 0; } - if (do_bind && stmt->bound_columns) { + if (stmt->bound_columns) { /* update those bound column variables now */ struct pdo_bound_param_data *param; @@ -739,9 +739,9 @@ static void do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */ } /* }}} */ -/* perform a fetch. If do_bind is true, update any bound columns. +/* perform a fetch. * If return_value is not null, store values into it according to HOW. */ -static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_fetch_type how, enum pdo_fetch_orientation ori, zend_long offset, zval *return_all) /* {{{ */ +static int do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type how, enum pdo_fetch_orientation ori, zend_long offset, zval *return_all) /* {{{ */ { int flags, idx, old_arg_count = 0; zend_class_entry *ce = NULL, *old_ce = NULL; @@ -754,7 +754,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_ flags = how & PDO_FETCH_FLAGS; how = how & ~PDO_FETCH_FLAGS; - if (!do_fetch_common(stmt, ori, offset, do_bind)) { + if (!do_fetch_common(stmt, ori, offset)) { return 0; } @@ -1182,7 +1182,7 @@ PHP_METHOD(PDOStatement, fetch) RETURN_FALSE; } - if (!do_fetch(stmt, TRUE, return_value, how, ori, off, 0)) { + if (!do_fetch(stmt, return_value, how, ori, off, 0)) { PDO_HANDLE_STMT_ERR(); RETURN_FALSE; } @@ -1232,7 +1232,7 @@ PHP_METHOD(PDOStatement, fetchObject) stmt->fetch.cls.ce = zend_standard_class_def; } - if (!do_fetch(stmt, TRUE, return_value, how, ori, off, 0)) { + if (!do_fetch(stmt, return_value, how, ori, off, 0)) { PDO_HANDLE_STMT_ERR(); RETVAL_FALSE; } @@ -1257,7 +1257,7 @@ PHP_METHOD(PDOStatement, fetchColumn) PHP_STMT_GET_OBJ; PDO_STMT_CLEAR_ERR(); - if (!do_fetch_common(stmt, PDO_FETCH_ORI_NEXT, 0, TRUE)) { + if (!do_fetch_common(stmt, PDO_FETCH_ORI_NEXT, 0)) { PDO_HANDLE_STMT_ERR(); RETURN_FALSE; } @@ -1392,20 +1392,20 @@ PHP_METHOD(PDOStatement, fetchAll) } else { return_all = 0; } - if (!do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)) { + if (!do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)) { error = 2; } } if (!error) { if ((how & PDO_FETCH_GROUP)) { - while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)); + while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)); } else if (how == PDO_FETCH_KEY_PAIR || (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR)) { - while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)); + while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)); } else { array_init(return_value); do { zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &data); - } while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, 0)); + } while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, 0)); } } @@ -2225,7 +2225,7 @@ static void pdo_stmt_iter_move_forwards(zend_object_iterator *iter) zval_ptr_dtor(&I->fetch_ahead); } - if (!do_fetch(stmt, TRUE, &I->fetch_ahead, PDO_FETCH_USE_DEFAULT, + if (!do_fetch(stmt, &I->fetch_ahead, PDO_FETCH_USE_DEFAULT, PDO_FETCH_ORI_NEXT, 0, 0)) { PDO_HANDLE_STMT_ERR(); @@ -2265,7 +2265,7 @@ zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int Z_ADDREF_P(object); ZVAL_OBJ(&I->iter.data, Z_OBJ_P(object)); - if (!do_fetch(stmt, 1, &I->fetch_ahead, PDO_FETCH_USE_DEFAULT, + if (!do_fetch(stmt, &I->fetch_ahead, PDO_FETCH_USE_DEFAULT, PDO_FETCH_ORI_NEXT, 0, 0)) { PDO_HANDLE_STMT_ERR(); I->key = (zend_ulong)-1; From 0cc7267980dae0e8902102972d55cc5479c392b7 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 25 Sep 2020 04:05:53 +0100 Subject: [PATCH 105/209] Inverse logic in do_fetch() to reduce a level of indentation --- ext/pdo/pdo_stmt.c | 546 ++++++++++++++++++++++----------------------- 1 file changed, 273 insertions(+), 273 deletions(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 81b30a9b2493c..6100f5b8454cb 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -741,12 +741,13 @@ static void do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */ /* perform a fetch. * If return_value is not null, store values into it according to HOW. */ -static int do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type how, enum pdo_fetch_orientation ori, zend_long offset, zval *return_all) /* {{{ */ +static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type how, enum pdo_fetch_orientation ori, zend_long offset, zval *return_all) /* {{{ */ { int flags, idx, old_arg_count = 0; zend_class_entry *ce = NULL, *old_ce = NULL; zval grp_val, *pgrp, retval, old_ctor_args = {{0}, {0}, {0}}; int colno; + int i = 0; if (how == PDO_FETCH_USE_DEFAULT) { how = stmt->default_fetch_type; @@ -769,341 +770,340 @@ static int do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type ho colno = stmt->fetch.column; } - if (return_value) { - int i = 0; + /* If no return value we are done */ + if (!return_value) { + return true; + } - if (how == PDO_FETCH_LAZY) { - get_lazy_object(stmt, return_value); - return 1; - } + if (how == PDO_FETCH_LAZY) { + get_lazy_object(stmt, return_value); + return 1; + } - RETVAL_FALSE; + RETVAL_FALSE; - switch (how) { - case PDO_FETCH_USE_DEFAULT: - case PDO_FETCH_ASSOC: - case PDO_FETCH_BOTH: - case PDO_FETCH_NUM: - case PDO_FETCH_NAMED: - if (!return_all) { - array_init_size(return_value, stmt->column_count); - } else { - array_init(return_value); - } - break; + switch (how) { + case PDO_FETCH_USE_DEFAULT: + case PDO_FETCH_ASSOC: + case PDO_FETCH_BOTH: + case PDO_FETCH_NUM: + case PDO_FETCH_NAMED: + if (!return_all) { + array_init_size(return_value, stmt->column_count); + } else { + array_init(return_value); + } + break; - case PDO_FETCH_KEY_PAIR: - if (stmt->column_count != 2) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain exactly 2 columns."); - return 0; + case PDO_FETCH_KEY_PAIR: + if (stmt->column_count != 2) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain exactly 2 columns."); + return 0; + } + if (!return_all) { + array_init(return_value); + } + break; + + case PDO_FETCH_COLUMN: + if (colno >= 0 && colno < stmt->column_count) { + if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { + fetch_value(stmt, return_value, 1, NULL); + } else if (flags == PDO_FETCH_GROUP && colno) { + fetch_value(stmt, return_value, 0, NULL); + } else { + fetch_value(stmt, return_value, colno, NULL); } if (!return_all) { - array_init(return_value); + return 1; + } else { + break; } - break; + } else { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid column index"); + } + return 0; - case PDO_FETCH_COLUMN: - if (colno >= 0 && colno < stmt->column_count) { - if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { - fetch_value(stmt, return_value, 1, NULL); - } else if (flags == PDO_FETCH_GROUP && colno) { - fetch_value(stmt, return_value, 0, NULL); - } else { - fetch_value(stmt, return_value, colno, NULL); + case PDO_FETCH_OBJ: + object_init_ex(return_value, ZEND_STANDARD_CLASS_DEF_PTR); + break; + + case PDO_FETCH_CLASS: + if (flags & PDO_FETCH_CLASSTYPE) { + zval val; + zend_class_entry *cep; + + old_ce = stmt->fetch.cls.ce; + ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); + old_arg_count = stmt->fetch.cls.fci.param_count; + do_fetch_opt_finish(stmt, 0); + + fetch_value(stmt, &val, i++, NULL); + if (Z_TYPE(val) != IS_NULL) { + if (!try_convert_to_string(&val)) { + return 0; } - if (!return_all) { - return 1; + if ((cep = zend_lookup_class(Z_STR(val))) == NULL) { + stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; } else { - break; + stmt->fetch.cls.ce = cep; } - } else { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid column index"); } - return 0; - - case PDO_FETCH_OBJ: - object_init_ex(return_value, ZEND_STANDARD_CLASS_DEF_PTR); - break; - - case PDO_FETCH_CLASS: - if (flags & PDO_FETCH_CLASSTYPE) { - zval val; - zend_class_entry *cep; - - old_ce = stmt->fetch.cls.ce; - ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); - old_arg_count = stmt->fetch.cls.fci.param_count; - do_fetch_opt_finish(stmt, 0); - - fetch_value(stmt, &val, i++, NULL); - if (Z_TYPE(val) != IS_NULL) { - if (!try_convert_to_string(&val)) { - return 0; - } - if ((cep = zend_lookup_class(Z_STR(val))) == NULL) { - stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; - } else { - stmt->fetch.cls.ce = cep; - } - } - do_fetch_class_prepare(stmt); - zval_ptr_dtor_str(&val); - } - ce = stmt->fetch.cls.ce; - if (!ce) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch class specified"); + do_fetch_class_prepare(stmt); + zval_ptr_dtor_str(&val); + } + ce = stmt->fetch.cls.ce; + if (!ce) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch class specified"); + return 0; + } + if ((flags & PDO_FETCH_SERIALIZE) == 0) { + if (UNEXPECTED(object_init_ex(return_value, ce) != SUCCESS)) { return 0; } - if ((flags & PDO_FETCH_SERIALIZE) == 0) { - if (UNEXPECTED(object_init_ex(return_value, ce) != SUCCESS)) { + if (!stmt->fetch.cls.fci.size) { + if (!do_fetch_class_prepare(stmt)) + { return 0; } - if (!stmt->fetch.cls.fci.size) { - if (!do_fetch_class_prepare(stmt)) - { - return 0; - } - } - if (ce->constructor && (flags & PDO_FETCH_PROPS_LATE)) { - stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); - stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); - if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor"); - return 0; - } else { - if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { - zval_ptr_dtor(&stmt->fetch.cls.retval); - ZVAL_UNDEF(&stmt->fetch.cls.retval); - } + } + if (ce->constructor && (flags & PDO_FETCH_PROPS_LATE)) { + stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); + stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); + if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor"); + return 0; + } else { + if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { + zval_ptr_dtor(&stmt->fetch.cls.retval); + ZVAL_UNDEF(&stmt->fetch.cls.retval); } } } - break; + } + break; - case PDO_FETCH_INTO: - if (Z_ISUNDEF(stmt->fetch.into)) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch-into object specified."); - return 0; - break; - } + case PDO_FETCH_INTO: + if (Z_ISUNDEF(stmt->fetch.into)) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch-into object specified."); + return 0; + break; + } - ZVAL_COPY(return_value, &stmt->fetch.into); + ZVAL_COPY(return_value, &stmt->fetch.into); - if (Z_OBJ_P(return_value)->ce == ZEND_STANDARD_CLASS_DEF_PTR) { - how = PDO_FETCH_OBJ; - } - break; + if (Z_OBJ_P(return_value)->ce == ZEND_STANDARD_CLASS_DEF_PTR) { + how = PDO_FETCH_OBJ; + } + break; - case PDO_FETCH_FUNC: - if (Z_ISUNDEF(stmt->fetch.func.function)) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch function specified"); + case PDO_FETCH_FUNC: + if (Z_ISUNDEF(stmt->fetch.func.function)) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch function specified"); + return 0; + } + if (!stmt->fetch.func.fci.size) { + if (!do_fetch_func_prepare(stmt)) + { return 0; } - if (!stmt->fetch.func.fci.size) { - if (!do_fetch_func_prepare(stmt)) - { - return 0; - } - } - break; + } + break; + default: + /* shouldn't happen */ + return 0; + } - default: - /* shouldn't happen */ - return 0; + if (return_all && how != PDO_FETCH_KEY_PAIR) { + if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { + fetch_value(stmt, &grp_val, colno, NULL); + } else { + fetch_value(stmt, &grp_val, i, NULL); } - - if (return_all && how != PDO_FETCH_KEY_PAIR) { - if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { - fetch_value(stmt, &grp_val, colno, NULL); - } else { - fetch_value(stmt, &grp_val, i, NULL); - } - convert_to_string(&grp_val); - if (how == PDO_FETCH_COLUMN) { - i = stmt->column_count; /* no more data to fetch */ - } else { - i++; - } + convert_to_string(&grp_val); + if (how == PDO_FETCH_COLUMN) { + i = stmt->column_count; /* no more data to fetch */ + } else { + i++; } + } - for (idx = 0; i < stmt->column_count; i++, idx++) { - zval val; - fetch_value(stmt, &val, i, NULL); + for (idx = 0; i < stmt->column_count; i++, idx++) { + zval val; + fetch_value(stmt, &val, i, NULL); - switch (how) { - case PDO_FETCH_ASSOC: - zend_symtable_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); - break; + switch (how) { + case PDO_FETCH_ASSOC: + zend_symtable_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); + break; - case PDO_FETCH_KEY_PAIR: - { - zval tmp; - fetch_value(stmt, &tmp, ++i, NULL); + case PDO_FETCH_KEY_PAIR: + { + zval tmp; + fetch_value(stmt, &tmp, ++i, NULL); - if (Z_TYPE(val) == IS_LONG) { - zend_hash_index_update((return_all ? Z_ARRVAL_P(return_all) : Z_ARRVAL_P(return_value)), Z_LVAL(val), &tmp); - } else { - convert_to_string(&val); - zend_symtable_update((return_all ? Z_ARRVAL_P(return_all) : Z_ARRVAL_P(return_value)), Z_STR(val), &tmp); - } - zval_ptr_dtor(&val); - return 1; + if (Z_TYPE(val) == IS_LONG) { + zend_hash_index_update((return_all ? Z_ARRVAL_P(return_all) : Z_ARRVAL_P(return_value)), Z_LVAL(val), &tmp); + } else { + convert_to_string(&val); + zend_symtable_update((return_all ? Z_ARRVAL_P(return_all) : Z_ARRVAL_P(return_value)), Z_STR(val), &tmp); } - break; + zval_ptr_dtor(&val); + return 1; + } + break; - case PDO_FETCH_USE_DEFAULT: - case PDO_FETCH_BOTH: - zend_symtable_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); - if (zend_hash_index_add(Z_ARRVAL_P(return_value), i, &val) != NULL) { - Z_TRY_ADDREF(val); - } - break; + case PDO_FETCH_USE_DEFAULT: + case PDO_FETCH_BOTH: + zend_symtable_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); + if (zend_hash_index_add(Z_ARRVAL_P(return_value), i, &val) != NULL) { + Z_TRY_ADDREF(val); + } + break; - case PDO_FETCH_NAMED: - /* already have an item with this name? */ - { - zval *curr_val; - if ((curr_val = zend_hash_find(Z_ARRVAL_P(return_value), stmt->columns[i].name))) { - zval arr; - if (Z_TYPE_P(curr_val) != IS_ARRAY) { - /* a little bit of black magic here: - * we're creating a new array and swapping it for the - * zval that's already stored in the hash under the name - * we want. We then add that zval to the array. - * This is effectively the same thing as: - * if (!is_array($hash[$name])) { - * $hash[$name] = array($hash[$name]); - * } - * */ - zval cur; - - array_init(&arr); - - ZVAL_COPY_VALUE(&cur, curr_val); - ZVAL_COPY_VALUE(curr_val, &arr); - - zend_hash_next_index_insert_new(Z_ARRVAL(arr), &cur); - } else { - ZVAL_COPY_VALUE(&arr, curr_val); - } - zend_hash_next_index_insert_new(Z_ARRVAL(arr), &val); + case PDO_FETCH_NAMED: + /* already have an item with this name? */ + { + zval *curr_val; + if ((curr_val = zend_hash_find(Z_ARRVAL_P(return_value), stmt->columns[i].name))) { + zval arr; + if (Z_TYPE_P(curr_val) != IS_ARRAY) { + /* a little bit of black magic here: + * we're creating a new array and swapping it for the + * zval that's already stored in the hash under the name + * we want. We then add that zval to the array. + * This is effectively the same thing as: + * if (!is_array($hash[$name])) { + * $hash[$name] = array($hash[$name]); + * } + * */ + zval cur; + + array_init(&arr); + + ZVAL_COPY_VALUE(&cur, curr_val); + ZVAL_COPY_VALUE(curr_val, &arr); + + zend_hash_next_index_insert_new(Z_ARRVAL(arr), &cur); } else { - zend_hash_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); + ZVAL_COPY_VALUE(&arr, curr_val); } + zend_hash_next_index_insert_new(Z_ARRVAL(arr), &val); + } else { + zend_hash_update(Z_ARRVAL_P(return_value), stmt->columns[i].name, &val); } - break; + } + break; - case PDO_FETCH_NUM: - zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &val); - break; + case PDO_FETCH_NUM: + zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &val); + break; - case PDO_FETCH_OBJ: - case PDO_FETCH_INTO: - zend_update_property_ex(NULL, Z_OBJ_P(return_value), + case PDO_FETCH_OBJ: + case PDO_FETCH_INTO: + zend_update_property_ex(NULL, Z_OBJ_P(return_value), + stmt->columns[i].name, + &val); + zval_ptr_dtor(&val); + break; + + case PDO_FETCH_CLASS: + if ((flags & PDO_FETCH_SERIALIZE) == 0 || idx) { + zend_update_property_ex(ce, Z_OBJ_P(return_value), stmt->columns[i].name, &val); zval_ptr_dtor(&val); - break; - - case PDO_FETCH_CLASS: - if ((flags & PDO_FETCH_SERIALIZE) == 0 || idx) { - zend_update_property_ex(ce, Z_OBJ_P(return_value), - stmt->columns[i].name, - &val); + } else { + if (!ce->unserialize) { zval_ptr_dtor(&val); - } else { - if (!ce->unserialize) { - zval_ptr_dtor(&val); - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class"); - return 0; - } else if (ce->unserialize(return_value, ce, (unsigned char *)(Z_TYPE(val) == IS_STRING ? Z_STRVAL(val) : ""), Z_TYPE(val) == IS_STRING ? Z_STRLEN(val) : 0, NULL) == FAILURE) { - zval_ptr_dtor(&val); - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class"); - zval_ptr_dtor(return_value); - ZVAL_NULL(return_value); - return 0; - } else { - zval_ptr_dtor(&val); - } - } - break; - - case PDO_FETCH_FUNC: - ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); - ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); - break; - - default: - zval_ptr_dtor(&val); - pdo_raise_impl_error(stmt->dbh, stmt, "22003", "mode is out of range"); - return 0; - break; - } - } - - switch (how) { - case PDO_FETCH_CLASS: - if (ce->constructor && !(flags & (PDO_FETCH_PROPS_LATE | PDO_FETCH_SERIALIZE))) { - stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); - stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); - if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor"); + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class"); + return 0; + } else if (ce->unserialize(return_value, ce, (unsigned char *)(Z_TYPE(val) == IS_STRING ? Z_STRVAL(val) : ""), Z_TYPE(val) == IS_STRING ? Z_STRLEN(val) : 0, NULL) == FAILURE) { + zval_ptr_dtor(&val); + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class"); + zval_ptr_dtor(return_value); + ZVAL_NULL(return_value); return 0; } else { - if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { - zval_ptr_dtor(&stmt->fetch.cls.retval); - } + zval_ptr_dtor(&val); } } - if (flags & PDO_FETCH_CLASSTYPE) { - do_fetch_opt_finish(stmt, 0); - stmt->fetch.cls.ce = old_ce; - ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); - stmt->fetch.cls.fci.param_count = old_arg_count; - } break; case PDO_FETCH_FUNC: - stmt->fetch.func.fci.param_count = idx; - stmt->fetch.func.fci.retval = &retval; - if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call user-supplied function"); - return 0; - } else { - if (return_all) { - zval_ptr_dtor(return_value); /* we don't need that */ - ZVAL_COPY_VALUE(return_value, &retval); - } else if (!Z_ISUNDEF(retval)) { - ZVAL_COPY_VALUE(return_value, &retval); - } - } - while (idx--) { - zval_ptr_dtor(&stmt->fetch.func.values[idx]); - } + ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); + ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); break; default: + zval_ptr_dtor(&val); + pdo_raise_impl_error(stmt->dbh, stmt, "22003", "mode is out of range"); + return 0; break; } + } - if (return_all) { - if ((flags & PDO_FETCH_UNIQUE) == PDO_FETCH_UNIQUE) { - zend_symtable_update(Z_ARRVAL_P(return_all), Z_STR(grp_val), return_value); - } else { - zval grp; - if ((pgrp = zend_symtable_find(Z_ARRVAL_P(return_all), Z_STR(grp_val))) == NULL) { - array_init(&grp); - zend_symtable_update(Z_ARRVAL_P(return_all), Z_STR(grp_val), &grp); + switch (how) { + case PDO_FETCH_CLASS: + if (ce->constructor && !(flags & (PDO_FETCH_PROPS_LATE | PDO_FETCH_SERIALIZE))) { + stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); + stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); + if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor"); + return 0; } else { - ZVAL_COPY_VALUE(&grp, pgrp); + if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { + zval_ptr_dtor(&stmt->fetch.cls.retval); + } } - zend_hash_next_index_insert(Z_ARRVAL(grp), return_value); } - zval_ptr_dtor_str(&grp_val); - } + if (flags & PDO_FETCH_CLASSTYPE) { + do_fetch_opt_finish(stmt, 0); + stmt->fetch.cls.ce = old_ce; + ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); + stmt->fetch.cls.fci.param_count = old_arg_count; + } + break; + case PDO_FETCH_FUNC: + stmt->fetch.func.fci.param_count = idx; + stmt->fetch.func.fci.retval = &retval; + if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call user-supplied function"); + return 0; + } else { + if (return_all) { + zval_ptr_dtor(return_value); /* we don't need that */ + ZVAL_COPY_VALUE(return_value, &retval); + } else if (!Z_ISUNDEF(retval)) { + ZVAL_COPY_VALUE(return_value, &retval); + } + } + while (idx--) { + zval_ptr_dtor(&stmt->fetch.func.values[idx]); + } + break; + + default: + break; + } + + if (return_all) { + if ((flags & PDO_FETCH_UNIQUE) == PDO_FETCH_UNIQUE) { + zend_symtable_update(Z_ARRVAL_P(return_all), Z_STR(grp_val), return_value); + } else { + zval grp; + if ((pgrp = zend_symtable_find(Z_ARRVAL_P(return_all), Z_STR(grp_val))) == NULL) { + array_init(&grp); + zend_symtable_update(Z_ARRVAL_P(return_all), Z_STR(grp_val), &grp); + } else { + ZVAL_COPY_VALUE(&grp, pgrp); + } + zend_hash_next_index_insert(Z_ARRVAL(grp), return_value); + } + zval_ptr_dtor_str(&grp_val); } return 1; From 4dfbf07644ba68486b66662d7c74b660a5b80572 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 25 Sep 2020 14:54:25 +0100 Subject: [PATCH 106/209] Fix logic error in PDO --- ext/pdo/pdo_stmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index f010d0453b035..a322cd57610f2 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1873,7 +1873,8 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in mode = Z_LVAL(args[skip]); flags = mode & PDO_FETCH_FLAGS; - retval = pdo_stmt_verify_mode(stmt, mode, 0); + /* pdo_stmt_verify_mode() returns a boolean value */ + retval = pdo_stmt_verify_mode(stmt, mode, 0) ? SUCCESS : FAILURE; } } From a91cb2f48c275751df1ab0a3f9e9a28c200add77 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 23 Sep 2020 17:02:43 +0100 Subject: [PATCH 107/209] Promote warning to ValueError for Spoofchecker::setRestrictionLevel() Closes GH-6197 --- ext/intl/spoofchecker/spoofchecker_main.c | 7 +++++-- .../spoofchecker_unknown_restriction_level.phpt | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 ext/intl/tests/spoofchecker_unknown_restriction_level.phpt diff --git a/ext/intl/spoofchecker/spoofchecker_main.c b/ext/intl/spoofchecker/spoofchecker_main.c index b04b69cb88cd7..0d6387713e3ca 100644 --- a/ext/intl/spoofchecker/spoofchecker_main.c +++ b/ext/intl/spoofchecker/spoofchecker_main.c @@ -125,6 +125,7 @@ PHP_METHOD(Spoofchecker, setChecks) /* }}} */ #if U_ICU_VERSION_MAJOR_NUM >= 58 +/* TODO Document this method on PHP.net */ /* {{{ Set the loosest restriction level allowed for strings. */ PHP_METHOD(Spoofchecker, setRestrictionLevel) { @@ -143,8 +144,10 @@ PHP_METHOD(Spoofchecker, setRestrictionLevel) USPOOF_MODERATELY_RESTRICTIVE != level && USPOOF_MINIMALLY_RESTRICTIVE != level && USPOOF_UNRESTRICTIVE != level) { - php_error_docref(NULL, E_WARNING, "Invalid restriction level value"); - return; + zend_argument_value_error(1, "must be one of Spoofchecker::ASCII, Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE, " + "Spoofchecker::SINGLE_HIGHLY_RESTRICTIVE, Spoofchecker::SINGLE_MODERATELY_RESTRICTIVE, " + "Spoofchecker::SINGLE_MINIMALLY_RESTRICTIVE, or Spoofchecker::UNRESTRICTIVE"); + RETURN_THROWS(); } uspoof_setRestrictionLevel(co->uspoof, (URestrictionLevel)level); diff --git a/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt b/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt new file mode 100644 index 0000000000000..e1015880e3763 --- /dev/null +++ b/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt @@ -0,0 +1,17 @@ +--TEST-- +Spoofchecker attempting to pass an unknown restriction level +--SKIPIF-- + +--FILE-- +setRestrictionLevel(Spoofchecker::SINGLE_SCRIPT); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} + +?> +--EXPECT-- +Spoofchecker::setRestrictionLevel(): Argument #1 ($level) must be one of Spoofchecker::ASCII, Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE, Spoofchecker::SINGLE_HIGHLY_RESTRICTIVE, Spoofchecker::SINGLE_MODERATELY_RESTRICTIVE, Spoofchecker::SINGLE_MINIMALLY_RESTRICTIVE, or Spoofchecker::UNRESTRICTIVE From e42abeafeca245950ebc47c7312913e68262d40e Mon Sep 17 00:00:00 2001 From: Sammy Kaye Powers Date: Thu, 24 Sep 2020 12:57:43 -0700 Subject: [PATCH 108/209] Pass zend_execute_data instead of zend_function to fcall init The motivation for this change is to prevent extensions from having to check executor globals for the current execute_data during function call init. A previous implementation of the observer API initialized the function call from runtime cache initialization before execute_data was allocated which is why zend_function was passed in. But now that the observer API is implemented via opcode specialization, it makes sense to pass in the execute_data. This also keeps the API a bit more consistent for existing extensions that already hook zend_execute_ex. Closes GH-6209 --- Zend/zend_observer.c | 7 +- Zend/zend_observer.h | 2 +- ext/zend_test/test.c | 30 ++++- .../tests/observer_backtrace_01.phpt | 106 ++++++++++++++++++ 4 files changed, 139 insertions(+), 6 deletions(-) create mode 100644 ext/zend_test/tests/observer_backtrace_01.phpt diff --git a/Zend/zend_observer.c b/Zend/zend_observer.c index 68cf43ce66248..9c2d1cdf51c4e 100644 --- a/Zend/zend_observer.c +++ b/Zend/zend_observer.c @@ -89,9 +89,10 @@ ZEND_API void zend_observer_shutdown(void) { zend_llist_destroy(&zend_observer_error_callbacks); } -static void zend_observer_fcall_install(zend_function *function) { +static void zend_observer_fcall_install(zend_execute_data *execute_data) { zend_llist_element *element; zend_llist *list = &zend_observers_fcall_list; + zend_function *function = execute_data->func; zend_op_array *op_array = &function->op_array; if (fcall_handlers_arena == NULL) { @@ -105,7 +106,7 @@ static void zend_observer_fcall_install(zend_function *function) { for (element = list->head; element; element = element->next) { zend_observer_fcall_init init; memcpy(&init, element->data, sizeof init); - zend_observer_fcall_handlers handlers = init(function); + zend_observer_fcall_handlers handlers = init(execute_data); if (handlers.begin || handlers.end) { zend_llist_add_element(&handlers_list, &handlers); } @@ -150,7 +151,7 @@ static void ZEND_FASTCALL _zend_observe_fcall_begin(zend_execute_data *execute_d fcall_data = ZEND_OBSERVER_DATA(op_array); if (!fcall_data) { - zend_observer_fcall_install((zend_function *)op_array); + zend_observer_fcall_install(execute_data); fcall_data = ZEND_OBSERVER_DATA(op_array); } diff --git a/Zend/zend_observer.h b/Zend/zend_observer.h index 246a3a61be379..1d20306a17018 100644 --- a/Zend/zend_observer.h +++ b/Zend/zend_observer.h @@ -50,7 +50,7 @@ typedef struct _zend_observer_fcall_handlers { } zend_observer_fcall_handlers; /* If the fn should not be observed then return {NULL, NULL} */ -typedef zend_observer_fcall_handlers (*zend_observer_fcall_init)(zend_function *func); +typedef zend_observer_fcall_handlers (*zend_observer_fcall_init)(zend_execute_data *execute_data); // Call during minit/startup ONLY ZEND_API void zend_observer_fcall_register(zend_observer_fcall_init); diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 4ca98a3c0831b..92b8e4cf6a815 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -36,6 +36,7 @@ ZEND_BEGIN_MODULE_GLOBALS(zend_test) int observer_observe_functions; int observer_show_return_type; int observer_show_return_value; + int observer_show_init_backtrace; int observer_nesting_depth; ZEND_END_MODULE_GLOBALS(zend_test) @@ -315,9 +316,10 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("zend_test.observer.observe_functions", "0", PHP_INI_SYSTEM, OnUpdateBool, observer_observe_functions, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.observer.show_return_type", "0", PHP_INI_SYSTEM, OnUpdateBool, observer_show_return_type, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.observer.show_return_value", "0", PHP_INI_SYSTEM, OnUpdateBool, observer_show_return_value, zend_zend_test_globals, zend_test_globals) + STD_PHP_INI_BOOLEAN("zend_test.observer.show_init_backtrace", "0", PHP_INI_SYSTEM, OnUpdateBool, observer_show_init_backtrace, zend_zend_test_globals, zend_test_globals) PHP_INI_END() -static zend_observer_fcall_handlers observer_fcall_init(zend_function *fbc); +static zend_observer_fcall_handlers observer_fcall_init(zend_execute_data *execute_data); PHP_MINIT_FUNCTION(zend_test) { @@ -498,10 +500,34 @@ static void observer_show_init(zend_function *fbc) } } -static zend_observer_fcall_handlers observer_fcall_init(zend_function *fbc) +static void observer_show_init_backtrace(zend_execute_data *execute_data) { + zend_execute_data *ex = execute_data; + php_printf("%*s\n", 2 * ZT_G(observer_nesting_depth), ""); +} + +static zend_observer_fcall_handlers observer_fcall_init(zend_execute_data *execute_data) +{ + zend_function *fbc = execute_data->func; if (ZT_G(observer_show_output)) { observer_show_init(fbc); + if (ZT_G(observer_show_init_backtrace)) { + observer_show_init_backtrace(execute_data); + } } if (ZT_G(observer_observe_all)) { diff --git a/ext/zend_test/tests/observer_backtrace_01.phpt b/ext/zend_test/tests/observer_backtrace_01.phpt new file mode 100644 index 0000000000000..7aa47c2ef2812 --- /dev/null +++ b/ext/zend_test/tests/observer_backtrace_01.phpt @@ -0,0 +1,106 @@ +--TEST-- +Observer: Show backtrace on init +--SKIPIF-- + +--INI-- +zend_test.observer.enabled=1 +zend_test.observer.observe_all=1 +zend_test.observer.show_init_backtrace=1 +--FILE-- +bar($value); + }, [40, 1335]); + } +} + +function gen() +{ + $test = new TestClass(); + yield $test->foo(); +} + +function foo() +{ + return gen()->current(); +} + +var_dump(foo()); +?> +--EXPECTF-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +array(2) { + [0]=> + int(42) + [1]=> + int(1337) +} + From 43ce7846d2378499a564fd3ffe2ffcb0ff9cb016 Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Sat, 26 Sep 2020 10:47:56 +0200 Subject: [PATCH 109/209] Skip test with ICU version < 58 --- ext/intl/tests/spoofchecker_unknown_restriction_level.phpt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt b/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt index e1015880e3763..956a718aae442 100644 --- a/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt +++ b/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt @@ -1,7 +1,11 @@ --TEST-- Spoofchecker attempting to pass an unknown restriction level --SKIPIF-- - + --FILE-- Date: Sat, 26 Sep 2020 22:08:52 -0700 Subject: [PATCH 110/209] Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) --- ext/openssl/openssl.c | 10 ++++----- ext/openssl/tests/cipher_tests.inc | 21 +++++++++++++++++ ext/openssl/tests/openssl_decrypt_ccm.phpt | 22 +++++++++++------- ext/openssl/tests/openssl_encrypt_ccm.phpt | 26 ++++++++++++++-------- 4 files changed, 57 insertions(+), 22 deletions(-) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 6c1dd9d3435d8..3eea08c649016 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -6391,11 +6391,6 @@ static int php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_requir { char *iv_new; - /* Best case scenario, user behaved */ - if (*piv_len == iv_required_len) { - return SUCCESS; - } - if (mode->is_aead) { if (EVP_CIPHER_CTX_ctrl(cipher_ctx, mode->aead_ivlen_flag, *piv_len, NULL) != 1) { php_error_docref(NULL, E_WARNING, "Setting of IV length for AEAD mode failed"); @@ -6404,6 +6399,11 @@ static int php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_requir return SUCCESS; } + /* Best case scenario, user behaved */ + if (*piv_len == iv_required_len) { + return SUCCESS; + } + iv_new = ecalloc(1, iv_required_len + 1); if (*piv_len == 0) { diff --git a/ext/openssl/tests/cipher_tests.inc b/ext/openssl/tests/cipher_tests.inc index b1e46b411e54e..779bfa8515cbd 100644 --- a/ext/openssl/tests/cipher_tests.inc +++ b/ext/openssl/tests/cipher_tests.inc @@ -1,5 +1,26 @@ array( + array( + 'key' => '404142434445464748494a4b4c4d4e4f', + 'iv' => '1011121314151617', + 'aad' => '000102030405060708090a0b0c0d0e0f', + 'tag' => '1fc64fbfaccd', + 'pt' => '202122232425262728292a2b2c2d2e2f', + 'ct' => 'd2a1f0e051ea5f62081a7792073d593d', + ), + array( + 'key' => '404142434445464748494a4b4c4d4e4f', + 'iv' => '101112131415161718191a1b', + 'aad' => '000102030405060708090a0b0c0d0e0f' . + '10111213', + 'tag' => '484392fbc1b09951', + 'pt' => '202122232425262728292a2b2c2d2e2f' . + '3031323334353637', + 'ct' => 'e3b201a9f5b71a7a9b1ceaeccd97e70b' . + '6176aad9a4428aa5', + ), + ), 'aes-256-ccm' => array( array( 'key' => '1bde3251d41a8b5ea013c195ae128b21' . diff --git a/ext/openssl/tests/openssl_decrypt_ccm.phpt b/ext/openssl/tests/openssl_decrypt_ccm.phpt index a5f01b87cea8b..08ef5bb7b7c43 100644 --- a/ext/openssl/tests/openssl_decrypt_ccm.phpt +++ b/ext/openssl/tests/openssl_decrypt_ccm.phpt @@ -10,14 +10,16 @@ if (!in_array('aes-256-ccm', openssl_get_cipher_methods())) --FILE-- $test) { - echo "TEST $idx\n"; - $pt = openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA, - $test['iv'], $test['tag'], $test['aad']); - var_dump($test['pt'] === $pt); +foreach ($methods as $method) { + $tests = openssl_get_cipher_tests($method); + foreach ($tests as $idx => $test) { + echo "$method - TEST $idx\n"; + $pt = openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA, + $test['iv'], $test['tag'], $test['aad']); + var_dump($test['pt'] === $pt); + } } // no IV @@ -32,7 +34,11 @@ var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA, ?> --EXPECTF-- -TEST 0 +aes-128-ccm - TEST 0 +bool(true) +aes-128-ccm - TEST 1 +bool(true) +aes-256-ccm - TEST 0 bool(true) Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed in %s on line %d diff --git a/ext/openssl/tests/openssl_encrypt_ccm.phpt b/ext/openssl/tests/openssl_encrypt_ccm.phpt index fb5dbbc849d06..8c4c41f81870c 100644 --- a/ext/openssl/tests/openssl_encrypt_ccm.phpt +++ b/ext/openssl/tests/openssl_encrypt_ccm.phpt @@ -10,15 +10,17 @@ if (!in_array('aes-256-ccm', openssl_get_cipher_methods())) --FILE-- $test) { - echo "TEST $idx\n"; - $ct = openssl_encrypt($test['pt'], $method, $test['key'], OPENSSL_RAW_DATA, - $test['iv'], $tag, $test['aad'], strlen($test['tag'])); - var_dump($test['ct'] === $ct); - var_dump($test['tag'] === $tag); +foreach ($methods as $method) { + $tests = openssl_get_cipher_tests($method); + foreach ($tests as $idx => $test) { + echo "$method - TEST $idx\n"; + $ct = openssl_encrypt($test['pt'], $method, $test['key'], OPENSSL_RAW_DATA, + $test['iv'], $tag, $test['aad'], strlen($test['tag'])); + var_dump($test['ct'] === $ct); + var_dump($test['tag'] === $tag); + } } // Empty IV error @@ -32,7 +34,13 @@ var_dump(strlen($tag)); var_dump(openssl_encrypt('data', $method, 'password', 0, str_repeat('x', 16), $tag, '', 1024)); ?> --EXPECTF-- -TEST 0 +aes-128-ccm - TEST 0 +bool(true) +bool(true) +aes-128-ccm - TEST 1 +bool(true) +bool(true) +aes-256-ccm - TEST 0 bool(true) bool(true) From 6559fe912661ca5ce5f0eeeb591d928451428ed0 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 20 Sep 2020 18:08:55 -0700 Subject: [PATCH 111/209] Do not decode cookie names anymore --- main/php_variables.c | 8 ++++++-- tests/basic/022.phpt | 10 +++++++--- tests/basic/023.phpt | 4 +++- tests/basic/bug79699.phpt | 22 ++++++++++++++++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 tests/basic/bug79699.phpt diff --git a/main/php_variables.c b/main/php_variables.c index 916fc1295b4c0..097c17d32afe5 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -492,7 +492,9 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data) size_t new_val_len; *val++ = '\0'; - php_url_decode(var, strlen(var)); + if (arg != PARSE_COOKIE) { + php_url_decode(var, strlen(var)); + } val_len = php_url_decode(val, strlen(val)); val = estrndup(val, val_len); if (sapi_module.input_filter(arg, var, &val, val_len, &new_val_len)) { @@ -503,7 +505,9 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data) size_t val_len; size_t new_val_len; - php_url_decode(var, strlen(var)); + if (arg != PARSE_COOKIE) { + php_url_decode(var, strlen(var)); + } val_len = 0; val = estrndup("", val_len); if (sapi_module.input_filter(arg, var, &val, val_len, &new_val_len)) { diff --git a/tests/basic/022.phpt b/tests/basic/022.phpt index 0ab70d4be7643..bd1db13701822 100644 --- a/tests/basic/022.phpt +++ b/tests/basic/022.phpt @@ -10,7 +10,7 @@ cookie1=val1 ; cookie2=val2%20; cookie3=val 3.; cookie 4= value 4 %3B; cookie1= var_dump($_COOKIE); ?> --EXPECT-- -array(10) { +array(12) { ["cookie1"]=> string(6) "val1 " ["cookie2"]=> @@ -19,11 +19,15 @@ array(10) { string(6) "val 3." ["cookie_4"]=> string(10) " value 4 ;" + ["%20cookie1"]=> + string(6) "ignore" + ["+cookie1"]=> + string(6) "ignore" ["cookie__5"]=> string(7) " value" - ["cookie_6"]=> + ["cookie%206"]=> string(3) "" - ["cookie_7"]=> + ["cookie+7"]=> string(0) "" ["$cookie_8"]=> string(0) "" diff --git a/tests/basic/023.phpt b/tests/basic/023.phpt index ca5f1dcfbb1a2..0e2e0ac669453 100644 --- a/tests/basic/023.phpt +++ b/tests/basic/023.phpt @@ -10,9 +10,11 @@ c o o k i e=value; c o o k i e= v a l u e ;;c%20o+o k+i%20e=v;name="value","valu var_dump($_COOKIE); ?> --EXPECT-- -array(3) { +array(4) { ["c_o_o_k_i_e"]=> string(5) "value" + ["c%20o+o_k+i%20e"]=> + string(1) "v" ["name"]=> string(24) ""value","value",UEhQIQ==" ["UEhQIQ"]=> diff --git a/tests/basic/bug79699.phpt b/tests/basic/bug79699.phpt new file mode 100644 index 0000000000000..fc3d3fedb08fd --- /dev/null +++ b/tests/basic/bug79699.phpt @@ -0,0 +1,22 @@ +--TEST-- +Cookies Security Bug +--INI-- +max_input_vars=1000 +filter.default=unsafe_raw +--COOKIE-- +__%48ost-evil=evil; __Host-evil=good; %66oo=baz;foo=bar +--FILE-- + +--EXPECT-- +array(4) { + ["__%48ost-evil"]=> + string(4) "evil" + ["__Host-evil"]=> + string(4) "good" + ["%66oo"]=> + string(3) "baz" + ["foo"]=> + string(3) "bar" +} From 5686c16db45dffb6e4898e0959f89f41cc7660f0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 23 Sep 2020 13:01:07 +0200 Subject: [PATCH 112/209] Honor strict_types=1 for attributes, improve backtraces Make ReflectionAttribute::newInstance() respect the strict_types=1 declaration at the attribute use-site. More generally, pretend that we are calling the attribute constructor from the place where the attribute is used, which also means that the attribute location will show up properly in backtraces and inside "called in" error information. This requires us to store the attributes strict_types scope (as flags), as well as the attribute line number. The attribute filename can be recovered from the symbol it is used on. We might want to expose the attribute line number via reflection as well. See also https://externals.io/message/111915. Closes GH-6201. --- Zend/tests/attributes/005_objects.phpt | 6 +- Zend/tests/attributes/030_strict_types.inc | 5 ++ Zend/tests/attributes/030_strict_types.phpt | 31 +++++++ Zend/tests/attributes/031_backtrace.phpt | 97 +++++++++++++++++++++ Zend/zend_attributes.c | 25 ++---- Zend/zend_attributes.h | 25 ++++-- Zend/zend_compile.c | 5 +- ext/reflection/php_reflection.c | 78 +++++++++++++---- 8 files changed, 231 insertions(+), 41 deletions(-) create mode 100644 Zend/tests/attributes/030_strict_types.inc create mode 100644 Zend/tests/attributes/030_strict_types.phpt create mode 100644 Zend/tests/attributes/031_backtrace.phpt diff --git a/Zend/tests/attributes/005_objects.phpt b/Zend/tests/attributes/005_objects.phpt index 62b14181efd2e..db0107500c8ca 100644 --- a/Zend/tests/attributes/005_objects.phpt +++ b/Zend/tests/attributes/005_objects.phpt @@ -96,16 +96,16 @@ try { } ?> ---EXPECT-- +--EXPECTF-- string(2) "A1" string(4) "test" int(50) string(7) "ERROR 1" -string(81) "Too few arguments to function A1::__construct(), 0 passed and at least 1 expected" +string(%d) "Too few arguments to function A1::__construct(), 0 passed in %s005_objects.php on line 26 and at least 1 expected" string(7) "ERROR 2" -string(74) "A1::__construct(): Argument #1 ($name) must be of type string, array given" +string(%d) "A1::__construct(): Argument #1 ($name) must be of type string, array given, called in %s005_objects.php on line 36" string(7) "ERROR 3" string(30) "Attribute class "A2" not found" diff --git a/Zend/tests/attributes/030_strict_types.inc b/Zend/tests/attributes/030_strict_types.inc new file mode 100644 index 0000000000000..d9494e4fce9fc --- /dev/null +++ b/Zend/tests/attributes/030_strict_types.inc @@ -0,0 +1,5 @@ +getAttributes()[0]->newInstance()); +var_dump((new ReflectionClass(TestStrict::class))->getAttributes()[0]->newInstance()); + +?> +--EXPECTF-- +object(MyAttribute)#1 (1) { + ["value"]=> + int(42) +} + +Fatal error: Uncaught TypeError: MyAttribute::__construct(): Argument #1 ($value) must be of type int, string given, called in %s030_strict_types.inc on line 4 and defined in %s030_strict_types.php:5 +Stack trace: +#0 %s030_strict_types.inc(4): MyAttribute->__construct('42') +#1 %s(%d): ReflectionAttribute->newInstance() +#2 {main} + thrown in %s on line %d diff --git a/Zend/tests/attributes/031_backtrace.phpt b/Zend/tests/attributes/031_backtrace.phpt new file mode 100644 index 0000000000000..b0374e67e2fc8 --- /dev/null +++ b/Zend/tests/attributes/031_backtrace.phpt @@ -0,0 +1,97 @@ +--TEST-- +Backtrace during attribute instance creation +--FILE-- +getTrace()); + } +} + +#[MyAttribute] +class Test {} + +(new ReflectionClass(Test::class))->getAttributes()[0]->newInstance(); + +?> +--EXPECTF-- +#0 MyAttribute->__construct() called at [%s031_backtrace.php:12] +#1 ReflectionAttribute->newInstance() called at [%s:%d] +array(2) { + [0]=> + array(7) { + ["file"]=> + string(%d) "%s031_backtrace.php" + ["line"]=> + int(12) + ["function"]=> + string(11) "__construct" + ["class"]=> + string(11) "MyAttribute" + ["object"]=> + object(MyAttribute)#1 (0) { + } + ["type"]=> + string(2) "->" + ["args"]=> + array(0) { + } + } + [1]=> + array(7) { + ["file"]=> + string(%d) "%s" + ["line"]=> + int(%d) + ["function"]=> + string(11) "newInstance" + ["class"]=> + string(19) "ReflectionAttribute" + ["object"]=> + object(ReflectionAttribute)#2 (0) { + } + ["type"]=> + string(2) "->" + ["args"]=> + array(0) { + } + } +} +array(2) { + [0]=> + array(6) { + ["file"]=> + string(%d) "%s031_backtrace.php" + ["line"]=> + int(12) + ["function"]=> + string(11) "__construct" + ["class"]=> + string(11) "MyAttribute" + ["type"]=> + string(2) "->" + ["args"]=> + array(0) { + } + } + [1]=> + array(6) { + ["file"]=> + string(%d) "%s" + ["line"]=> + int(%d) + ["function"]=> + string(11) "newInstance" + ["class"]=> + string(19) "ReflectionAttribute" + ["type"]=> + string(2) "->" + ["args"]=> + array(0) { + } + } +} diff --git a/Zend/zend_attributes.c b/Zend/zend_attributes.c index af5baa6ce07d1..29a2f4a732546 100644 --- a/Zend/zend_attributes.c +++ b/Zend/zend_attributes.c @@ -175,38 +175,29 @@ ZEND_API zend_bool zend_is_attribute_repeated(HashTable *attributes, zend_attrib return 0; } -static zend_always_inline void free_attribute(zend_attribute *attr, bool persistent) +static void attr_free(zval *v) { - uint32_t i; + zend_attribute *attr = Z_PTR_P(v); zend_string_release(attr->name); zend_string_release(attr->lcname); - for (i = 0; i < attr->argc; i++) { + for (uint32_t i = 0; i < attr->argc; i++) { if (attr->args[i].name) { zend_string_release(attr->args[i].name); } zval_ptr_dtor(&attr->args[i].value); } - pefree(attr, persistent); -} - -static void attr_free(zval *v) -{ - free_attribute((zend_attribute *) Z_PTR_P(v), 0); + pefree(attr, attr->flags & ZEND_ATTRIBUTE_PERSISTENT); } -static void attr_pfree(zval *v) -{ - free_attribute((zend_attribute *) Z_PTR_P(v), 1); -} - -ZEND_API zend_attribute *zend_add_attribute(HashTable **attributes, zend_bool persistent, uint32_t offset, zend_string *name, uint32_t argc) +ZEND_API zend_attribute *zend_add_attribute(HashTable **attributes, zend_string *name, uint32_t argc, uint32_t flags, uint32_t offset, uint32_t lineno) { + bool persistent = flags & ZEND_ATTRIBUTE_PERSISTENT; if (*attributes == NULL) { *attributes = pemalloc(sizeof(HashTable), persistent); - zend_hash_init(*attributes, 8, NULL, persistent ? attr_pfree : attr_free, persistent); + zend_hash_init(*attributes, 8, NULL, attr_free, persistent); } zend_attribute *attr = pemalloc(ZEND_ATTRIBUTE_SIZE(argc), persistent); @@ -218,6 +209,8 @@ ZEND_API zend_attribute *zend_add_attribute(HashTable **attributes, zend_bool pe } attr->lcname = zend_string_tolower_ex(attr->name, persistent); + attr->flags = flags; + attr->lineno = lineno; attr->offset = offset; attr->argc = argc; diff --git a/Zend/zend_attributes.h b/Zend/zend_attributes.h index 6a60b06665a8f..d19b7e470dc17 100644 --- a/Zend/zend_attributes.h +++ b/Zend/zend_attributes.h @@ -30,6 +30,10 @@ #define ZEND_ATTRIBUTE_IS_REPEATABLE (1<<6) #define ZEND_ATTRIBUTE_FLAGS ((1<<7) - 1) +/* Flags for zend_attribute.flags */ +#define ZEND_ATTRIBUTE_PERSISTENT (1<<0) +#define ZEND_ATTRIBUTE_STRICT_TYPES (1<<1) + #define ZEND_ATTRIBUTE_SIZE(argc) \ (sizeof(zend_attribute) + sizeof(zend_attribute_arg) * (argc) - sizeof(zend_attribute_arg)) @@ -45,6 +49,8 @@ typedef struct { typedef struct _zend_attribute { zend_string *name; zend_string *lcname; + uint32_t flags; + uint32_t lineno; /* Parameter offsets start at 1, everything else uses 0. */ uint32_t offset; uint32_t argc; @@ -71,33 +77,40 @@ ZEND_API zend_bool zend_is_attribute_repeated(HashTable *attributes, zend_attrib ZEND_API zend_internal_attribute *zend_internal_attribute_register(zend_class_entry *ce, uint32_t flags); ZEND_API zend_internal_attribute *zend_internal_attribute_get(zend_string *lcname); -ZEND_API zend_attribute *zend_add_attribute(HashTable **attributes, zend_bool persistent, uint32_t offset, zend_string *name, uint32_t argc); +ZEND_API zend_attribute *zend_add_attribute( + HashTable **attributes, zend_string *name, uint32_t argc, + uint32_t flags, uint32_t offset, uint32_t lineno); END_EXTERN_C() static zend_always_inline zend_attribute *zend_add_class_attribute(zend_class_entry *ce, zend_string *name, uint32_t argc) { - return zend_add_attribute(&ce->attributes, ce->type != ZEND_USER_CLASS, 0, name, argc); + uint32_t flags = ce->type != ZEND_USER_CLASS ? ZEND_ATTRIBUTE_PERSISTENT : 0; + return zend_add_attribute(&ce->attributes, name, argc, flags, 0, 0); } static zend_always_inline zend_attribute *zend_add_function_attribute(zend_function *func, zend_string *name, uint32_t argc) { - return zend_add_attribute(&func->common.attributes, func->common.type != ZEND_USER_FUNCTION, 0, name, argc); + uint32_t flags = func->common.type != ZEND_USER_FUNCTION ? ZEND_ATTRIBUTE_PERSISTENT : 0; + return zend_add_attribute(&func->common.attributes, name, argc, flags, 0, 0); } static zend_always_inline zend_attribute *zend_add_parameter_attribute(zend_function *func, uint32_t offset, zend_string *name, uint32_t argc) { - return zend_add_attribute(&func->common.attributes, func->common.type != ZEND_USER_FUNCTION, offset + 1, name, argc); + uint32_t flags = func->common.type != ZEND_USER_FUNCTION ? ZEND_ATTRIBUTE_PERSISTENT : 0; + return zend_add_attribute(&func->common.attributes, name, argc, flags, offset + 1, 0); } static zend_always_inline zend_attribute *zend_add_property_attribute(zend_class_entry *ce, zend_property_info *info, zend_string *name, uint32_t argc) { - return zend_add_attribute(&info->attributes, ce->type != ZEND_USER_CLASS, 0, name, argc); + uint32_t flags = ce->type != ZEND_USER_CLASS ? ZEND_ATTRIBUTE_PERSISTENT : 0; + return zend_add_attribute(&info->attributes, name, argc, flags, 0, 0); } static zend_always_inline zend_attribute *zend_add_class_constant_attribute(zend_class_entry *ce, zend_class_constant *c, zend_string *name, uint32_t argc) { - return zend_add_attribute(&c->attributes, ce->type != ZEND_USER_CLASS, 0, name, argc); + uint32_t flags = ce->type != ZEND_USER_CLASS ? ZEND_ATTRIBUTE_PERSISTENT : 0; + return zend_add_attribute(&c->attributes, name, argc, flags, 0, 0); } void zend_register_attribute_ce(void); diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index ba6790a042fc1..cc03a60e5ffc7 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6221,7 +6221,10 @@ static void zend_compile_attributes(HashTable **attributes, zend_ast *ast, uint3 zend_string *name = zend_resolve_class_name_ast(el->child[0]); zend_ast_list *args = el->child[1] ? zend_ast_get_list(el->child[1]) : NULL; - attr = zend_add_attribute(attributes, 0, offset, name, args ? args->children : 0); + uint32_t flags = (CG(active_op_array)->fn_flags & ZEND_ACC_STRICT_TYPES) + ? ZEND_ATTRIBUTE_STRICT_TYPES : 0; + attr = zend_add_attribute( + attributes, name, args ? args->children : 0, flags, offset, el->lineno); zend_string_release(name); /* Populate arguments */ diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 470b52e6c7b5b..d4f89be69f524 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -142,6 +142,7 @@ typedef struct _attribute_reference { HashTable *attributes; zend_attribute *data; zend_class_entry *scope; + zend_string *filename; uint32_t target; } attribute_reference; @@ -252,9 +253,14 @@ static void reflection_free_objects_storage(zend_object *object) /* {{{ */ zend_string_release_ex(prop_reference->unmangled_name, 0); efree(intern->ptr); break; - case REF_TYPE_ATTRIBUTE: + case REF_TYPE_ATTRIBUTE: { + attribute_reference *attr_ref = intern->ptr; + if (attr_ref->filename) { + zend_string_release(attr_ref->filename); + } efree(intern->ptr); break; + } case REF_TYPE_GENERATOR: case REF_TYPE_CLASS_CONSTANT: case REF_TYPE_OTHER: @@ -1084,7 +1090,7 @@ static void _extension_string(smart_str *str, zend_module_entry *module, char *i /* {{{ reflection_attribute_factory */ static void reflection_attribute_factory(zval *object, HashTable *attributes, zend_attribute *data, - zend_class_entry *scope, uint32_t target) + zend_class_entry *scope, uint32_t target, zend_string *filename) { reflection_object *intern; attribute_reference *reference; @@ -1095,6 +1101,7 @@ static void reflection_attribute_factory(zval *object, HashTable *attributes, ze reference->attributes = attributes; reference->data = data; reference->scope = scope; + reference->filename = filename ? zend_string_copy(filename) : NULL; reference->target = target; intern->ptr = reference; intern->ref_type = REF_TYPE_ATTRIBUTE; @@ -1102,7 +1109,7 @@ static void reflection_attribute_factory(zval *object, HashTable *attributes, ze /* }}} */ static int read_attributes(zval *ret, HashTable *attributes, zend_class_entry *scope, - uint32_t offset, uint32_t target, zend_string *name, zend_class_entry *base) /* {{{ */ + uint32_t offset, uint32_t target, zend_string *name, zend_class_entry *base, zend_string *filename) /* {{{ */ { ZEND_ASSERT(attributes != NULL); @@ -1115,7 +1122,7 @@ static int read_attributes(zval *ret, HashTable *attributes, zend_class_entry *s ZEND_HASH_FOREACH_PTR(attributes, attr) { if (attr->offset == offset && zend_string_equals(attr->lcname, filter)) { - reflection_attribute_factory(&tmp, attributes, attr, scope, target); + reflection_attribute_factory(&tmp, attributes, attr, scope, target, filename); add_next_index_zval(ret, &tmp); } } ZEND_HASH_FOREACH_END(); @@ -1147,7 +1154,7 @@ static int read_attributes(zval *ret, HashTable *attributes, zend_class_entry *s } } - reflection_attribute_factory(&tmp, attributes, attr, scope, target); + reflection_attribute_factory(&tmp, attributes, attr, scope, target, filename); add_next_index_zval(ret, &tmp); } ZEND_HASH_FOREACH_END(); @@ -1156,7 +1163,7 @@ static int read_attributes(zval *ret, HashTable *attributes, zend_class_entry *s /* }}} */ static void reflect_attributes(INTERNAL_FUNCTION_PARAMETERS, HashTable *attributes, - uint32_t offset, zend_class_entry *scope, uint32_t target) /* {{{ */ + uint32_t offset, zend_class_entry *scope, uint32_t target, zend_string *filename) /* {{{ */ { zend_string *name = NULL; zend_long flags = 0; @@ -1189,7 +1196,7 @@ static void reflect_attributes(INTERNAL_FUNCTION_PARAMETERS, HashTable *attribut array_init(return_value); - if (FAILURE == read_attributes(return_value, attributes, scope, offset, target, name, base)) { + if (FAILURE == read_attributes(return_value, attributes, scope, offset, target, name, base, filename)) { RETURN_THROWS(); } } @@ -1760,7 +1767,9 @@ ZEND_METHOD(ReflectionFunctionAbstract, getAttributes) target = ZEND_ATTRIBUTE_TARGET_FUNCTION; } - reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, fptr->common.attributes, 0, fptr->common.scope, target); + reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, + fptr->common.attributes, 0, fptr->common.scope, target, + fptr->type == ZEND_USER_FUNCTION ? fptr->op_array.filename : NULL); } /* }}} */ @@ -2660,7 +2669,9 @@ ZEND_METHOD(ReflectionParameter, getAttributes) HashTable *attributes = param->fptr->common.attributes; zend_class_entry *scope = param->fptr->common.scope; - reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, attributes, param->offset + 1, scope, ZEND_ATTRIBUTE_TARGET_PARAMETER); + reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, + attributes, param->offset + 1, scope, ZEND_ATTRIBUTE_TARGET_PARAMETER, + param->fptr->type == ZEND_USER_FUNCTION ? param->fptr->op_array.filename : NULL); } /* {{{ Returns whether this parameter is an optional parameter */ @@ -3679,7 +3690,9 @@ ZEND_METHOD(ReflectionClassConstant, getAttributes) GET_REFLECTION_OBJECT_PTR(ref); - reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, ref->attributes, 0, ref->ce, ZEND_ATTRIBUTE_TARGET_CLASS_CONST); + reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, + ref->attributes, 0, ref->ce, ZEND_ATTRIBUTE_TARGET_CLASS_CONST, + ref->ce->type == ZEND_USER_CLASS ? ref->ce->info.user.filename : NULL); } /* }}} */ @@ -4076,7 +4089,9 @@ ZEND_METHOD(ReflectionClass, getAttributes) GET_REFLECTION_OBJECT_PTR(ce); - reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, ce->attributes, 0, ce, ZEND_ATTRIBUTE_TARGET_CLASS); + reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, + ce->attributes, 0, ce, ZEND_ATTRIBUTE_TARGET_CLASS, + ce->type == ZEND_USER_CLASS ? ce->info.user.filename : NULL); } /* }}} */ @@ -5465,7 +5480,9 @@ ZEND_METHOD(ReflectionProperty, getAttributes) GET_REFLECTION_OBJECT_PTR(ref); - reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, ref->prop->attributes, 0, ref->prop->ce, ZEND_ATTRIBUTE_TARGET_PROPERTY); + reflect_attributes(INTERNAL_FUNCTION_PARAM_PASSTHRU, + ref->prop->attributes, 0, ref->prop->ce, ZEND_ATTRIBUTE_TARGET_PROPERTY, + ref->prop->ce->type == ZEND_USER_CLASS ? ref->prop->ce->info.user.filename : NULL); } /* }}} */ @@ -6238,9 +6255,14 @@ ZEND_METHOD(ReflectionAttribute, getArguments) } /* }}} */ -static int call_attribute_constructor(zend_class_entry *ce, zend_object *obj, zval *args, uint32_t argc, HashTable *named_params) /* {{{ */ +static int call_attribute_constructor( + zend_attribute *attr, zend_class_entry *ce, zend_object *obj, + zval *args, uint32_t argc, HashTable *named_params, zend_string *filename) { zend_function *ctor = ce->constructor; + zend_execute_data *prev_execute_data, dummy_frame; + zend_function dummy_func; + zend_op dummy_opline; ZEND_ASSERT(ctor != NULL); if (!(ctor->common.fn_flags & ZEND_ACC_PUBLIC)) { @@ -6248,8 +6270,35 @@ static int call_attribute_constructor(zend_class_entry *ce, zend_object *obj, zv return FAILURE; } + if (filename) { + /* Set up dummy call frame that makes it look like the attribute was invoked + * from where it occurs in the code. */ + memset(&dummy_frame, 0, sizeof(zend_execute_data)); + memset(&dummy_func, 0, sizeof(zend_function)); + memset(&dummy_opline, 0, sizeof(zend_op)); + + prev_execute_data = EG(current_execute_data); + dummy_frame.prev_execute_data = prev_execute_data; + dummy_frame.func = &dummy_func; + dummy_frame.opline = &dummy_opline; + + dummy_func.type = ZEND_USER_FUNCTION; + dummy_func.common.fn_flags = + attr->flags & ZEND_ATTRIBUTE_STRICT_TYPES ? ZEND_ACC_STRICT_TYPES : 0; + dummy_func.op_array.filename = filename; + + dummy_opline.opcode = ZEND_DO_FCALL; + dummy_opline.lineno = attr->lineno; + + EG(current_execute_data) = &dummy_frame; + } + zend_call_known_function(ctor, obj, obj->ce, NULL, argc, args, named_params); + if (filename) { + EG(current_execute_data) = prev_execute_data; + } + if (EG(exception)) { zend_object_store_ctor_failed(obj); return FAILURE; @@ -6257,7 +6306,6 @@ static int call_attribute_constructor(zend_class_entry *ce, zend_object *obj, zv return SUCCESS; } -/* }}} */ static void attribute_ctor_cleanup( zval *obj, zval *args, uint32_t argc, HashTable *named_params) /* {{{ */ @@ -6373,7 +6421,7 @@ ZEND_METHOD(ReflectionAttribute, newInstance) } if (ce->constructor) { - if (FAILURE == call_attribute_constructor(ce, Z_OBJ(obj), args, argc, named_params)) { + if (FAILURE == call_attribute_constructor(attr->data, ce, Z_OBJ(obj), args, argc, named_params, attr->filename)) { attribute_ctor_cleanup(&obj, args, argc, named_params); RETURN_THROWS(); } From 2772751b58ee579a8f1288a0949e5e1fcb554877 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 27 Sep 2020 11:21:52 +0200 Subject: [PATCH 113/209] Make constexpr compilation robust against multiple compilation Instead of setting the old AST type to zero, replace the AST with the compiled constexpr AST zval. This requires passing in a zend_ast** instead of a zend_ast*. This allows compiling ASTs containing constexprs multiple times -- the second time, the existing compiled representation will be resused. This means we no longer need to copy the attributes AST for promoted properties. --- Zend/tests/bug79897.phpt | 12 ++++-- Zend/zend_API.c | 4 +- Zend/zend_compile.c | 79 +++++++++++++++++----------------------- Zend/zend_compile.h | 2 +- 4 files changed, 46 insertions(+), 51 deletions(-) diff --git a/Zend/tests/bug79897.phpt b/Zend/tests/bug79897.phpt index 19869538a4652..201a89f73920d 100644 --- a/Zend/tests/bug79897.phpt +++ b/Zend/tests/bug79897.phpt @@ -12,21 +12,27 @@ class B { class A { public function __construct( - #[B(12)] public $b + #[B(12, X)] public $b ) { } } +const X = 42; + var_dump((new ReflectionParameter(['A', '__construct'], 'b'))->getAttributes()[0]->getArguments()); var_dump((new ReflectionProperty('A', 'b'))->getAttributes()[0]->getArguments()); ?> --EXPECT-- -array(1) { +array(2) { [0]=> int(12) + [1]=> + int(42) } -array(1) { +array(2) { [0]=> int(12) + [1]=> + int(42) } diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 6e89da89bbd7d..773c38f979913 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -4397,7 +4397,7 @@ static zend_result get_default_via_ast(zval *default_value_zval, const char *def } zend_ast_list *statement_list = zend_ast_get_list(ast); - zend_ast *const_expression_ast = statement_list->child[0]; + zend_ast **const_expr_ast_ptr = &statement_list->child[0]; zend_arena *original_ast_arena = CG(ast_arena); uint32_t original_compiler_options = CG(compiler_options); @@ -4406,7 +4406,7 @@ static zend_result get_default_via_ast(zval *default_value_zval, const char *def /* Disable constant substitution, to make getDefaultValueConstant() work. */ CG(compiler_options) |= ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION | ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION; zend_file_context_begin(&original_file_context); - zend_const_expr_to_zval(default_value_zval, const_expression_ast); + zend_const_expr_to_zval(default_value_zval, const_expr_ast_ptr); CG(ast_arena) = original_ast_arena; CG(compiler_options) = original_compiler_options; zend_file_context_end(&original_file_context); diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index cc03a60e5ffc7..f0019f591c974 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4596,11 +4596,11 @@ static void zend_compile_static_var_common(zend_string *var_name, zval *value, u void zend_compile_static_var(zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; - zend_ast *value_ast = ast->child[1]; + zend_ast **value_ast_ptr = &ast->child[1]; zval value_zv; - if (value_ast) { - zend_const_expr_to_zval(&value_zv, value_ast); + if (*value_ast_ptr) { + zend_const_expr_to_zval(&value_zv, value_ast_ptr); } else { ZVAL_NULL(&value_zv); } @@ -5895,16 +5895,16 @@ void zend_compile_declare(zend_ast *ast) /* {{{ */ for (i = 0; i < declares->children; ++i) { zend_ast *declare_ast = declares->child[i]; zend_ast *name_ast = declare_ast->child[0]; - zend_ast *value_ast = declare_ast->child[1]; + zend_ast **value_ast_ptr = &declare_ast->child[1]; zend_string *name = zend_ast_get_str(name_ast); - if (value_ast->kind != ZEND_AST_ZVAL) { + if ((*value_ast_ptr)->kind != ZEND_AST_ZVAL) { zend_error_noreturn(E_COMPILE_ERROR, "declare(%s) value must be a literal", ZSTR_VAL(name)); } if (zend_string_equals_literal_ci(name, "ticks")) { zval value_zv; - zend_const_expr_to_zval(&value_zv, value_ast); + zend_const_expr_to_zval(&value_zv, value_ast_ptr); FC(declarables).ticks = zval_get_long(&value_zv); zval_ptr_dtor_nogc(&value_zv); } else if (zend_string_equals_literal_ci(name, "encoding")) { @@ -5926,7 +5926,7 @@ void zend_compile_declare(zend_ast *ast) /* {{{ */ "use block mode"); } - zend_const_expr_to_zval(&value_zv, value_ast); + zend_const_expr_to_zval(&value_zv, value_ast_ptr); if (Z_TYPE(value_zv) != IS_LONG || (Z_LVAL(value_zv) != 0 && Z_LVAL(value_zv) != 1)) { zend_error_noreturn(E_COMPILE_ERROR, "strict_types declaration must have 0 or 1 as its value"); @@ -6233,7 +6233,8 @@ static void zend_compile_attributes(HashTable **attributes, zend_ast *ast, uint3 zend_bool uses_named_args = 0; for (j = 0; j < args->children; j++) { - zend_ast *arg_ast = args->child[j]; + zend_ast **arg_ast_ptr = &args->child[j]; + zend_ast *arg_ast = *arg_ast_ptr; if (arg_ast->kind == ZEND_AST_UNPACK) { zend_error_noreturn(E_COMPILE_ERROR, @@ -6242,7 +6243,7 @@ static void zend_compile_attributes(HashTable **attributes, zend_ast *ast, uint3 if (arg_ast->kind == ZEND_AST_NAMED_ARG) { attr->args[j].name = zend_string_copy(zend_ast_get_str(arg_ast->child[0])); - arg_ast = arg_ast->child[1]; + arg_ast_ptr = &arg_ast->child[1]; uses_named_args = 1; for (uint32_t k = 0; k < j; k++) { @@ -6257,7 +6258,7 @@ static void zend_compile_attributes(HashTable **attributes, zend_ast *ast, uint3 "Cannot use positional argument after named argument"); } - zend_const_expr_to_zval(&attr->args[j].value, arg_ast); + zend_const_expr_to_zval(&attr->args[j].value, arg_ast_ptr); } } } @@ -6324,7 +6325,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall zend_ast *param_ast = list->child[i]; zend_ast *type_ast = param_ast->child[0]; zend_ast *var_ast = param_ast->child[1]; - zend_ast *default_ast = param_ast->child[2]; + zend_ast **default_ast_ptr = ¶m_ast->child[2]; zend_ast *attributes_ast = param_ast->child[3]; zend_ast *doc_comment_ast = param_ast->child[4]; zend_string *name = zval_make_interned_string(zend_ast_get_zval(var_ast)); @@ -6338,12 +6339,6 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall zend_op *opline; zend_arg_info *arg_info; - zend_ast_ref *attributes_copy = NULL; - - if (visibility && attributes_ast) { - attributes_copy = zend_ast_copy(attributes_ast); - } - if (zend_is_auto_global(name)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot re-assign auto-global variable %s", ZSTR_VAL(name)); @@ -6368,17 +6363,17 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall default_node.op_type = IS_UNUSED; op_array->fn_flags |= ZEND_ACC_VARIADIC; - if (default_ast) { + if (*default_ast_ptr) { zend_error_noreturn(E_COMPILE_ERROR, "Variadic parameter cannot have a default value"); } - } else if (default_ast) { + } else if (*default_ast_ptr) { /* we cannot substitute constants here or it will break ReflectionParameter::getDefaultValueConstantName() and ReflectionParameter::isDefaultValueConstant() */ uint32_t cops = CG(compiler_options); CG(compiler_options) |= ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION | ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION; opcode = ZEND_RECV_INIT; default_node.op_type = IS_CONST; - zend_const_expr_to_zval(&default_node.u.constant, default_ast); + zend_const_expr_to_zval(&default_node.u.constant, default_ast_ptr); CG(compiler_options) = cops; if (!optional_param) { @@ -6409,7 +6404,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall } if (type_ast) { - uint32_t default_type = default_ast ? Z_TYPE(default_node.u.constant) : IS_UNDEF; + uint32_t default_type = *default_ast_ptr ? Z_TYPE(default_node.u.constant) : IS_UNDEF; zend_bool force_nullable = default_type == IS_NULL && !visibility; op_array->fn_flags |= ZEND_ACC_HAS_TYPE_HINTS; @@ -6497,8 +6492,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall scope, name, &default_value, visibility | ZEND_ACC_PROMOTED, doc_comment, type); if (attributes_ast) { zend_compile_attributes( - &prop->attributes, GC_AST(attributes_copy), 0, ZEND_ATTRIBUTE_TARGET_PROPERTY); - zend_ast_ref_destroy(attributes_copy); + &prop->attributes, attributes_ast, 0, ZEND_ATTRIBUTE_TARGET_PROPERTY); } } } @@ -7002,7 +6996,7 @@ void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t flags, z zend_property_info *info; zend_ast *prop_ast = list->child[i]; zend_ast *name_ast = prop_ast->child[0]; - zend_ast *value_ast = prop_ast->child[1]; + zend_ast **value_ast_ptr = &prop_ast->child[1]; zend_ast *doc_comment_ast = prop_ast->child[2]; zend_string *name = zval_make_interned_string(zend_ast_get_zval(name_ast)); zend_string *doc_comment = NULL; @@ -7036,8 +7030,8 @@ void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t flags, z ZSTR_VAL(ce->name), ZSTR_VAL(name)); } - if (value_ast) { - zend_const_expr_to_zval(&value_zv, value_ast); + if (*value_ast_ptr) { + zend_const_expr_to_zval(&value_zv, value_ast_ptr); if (ZEND_TYPE_IS_SET(type) && !Z_CONSTANT(value_zv) && !zend_is_valid_default_value(type, &value_zv)) { @@ -7111,7 +7105,7 @@ void zend_compile_class_const_decl(zend_ast *ast, uint32_t flags, zend_ast *attr zend_class_constant *c; zend_ast *const_ast = list->child[i]; zend_ast *name_ast = const_ast->child[0]; - zend_ast *value_ast = const_ast->child[1]; + zend_ast **value_ast_ptr = &const_ast->child[1]; zend_ast *doc_comment_ast = const_ast->child[2]; zend_string *name = zval_make_interned_string(zend_ast_get_zval(name_ast)); zend_string *doc_comment = doc_comment_ast ? zend_string_copy(zend_ast_get_str(doc_comment_ast)) : NULL; @@ -7121,7 +7115,7 @@ void zend_compile_class_const_decl(zend_ast *ast, uint32_t flags, zend_ast *attr zend_check_const_and_trait_alias_attr(flags, "constant"); } - zend_const_expr_to_zval(&value_zv, value_ast); + zend_const_expr_to_zval(&value_zv, value_ast_ptr); c = zend_declare_class_constant_ex(ce, name, &value_zv, flags, doc_comment); if (attr_ast) { @@ -7622,7 +7616,7 @@ void zend_compile_const_decl(zend_ast *ast) /* {{{ */ for (i = 0; i < list->children; ++i) { zend_ast *const_ast = list->child[i]; zend_ast *name_ast = const_ast->child[0]; - zend_ast *value_ast = const_ast->child[1]; + zend_ast **value_ast_ptr = &const_ast->child[1]; zend_string *unqualified_name = zend_ast_get_str(name_ast); zend_string *name; @@ -7630,7 +7624,7 @@ void zend_compile_const_decl(zend_ast *ast) /* {{{ */ zval *value_zv = &value_node.u.constant; value_node.op_type = IS_CONST; - zend_const_expr_to_zval(value_zv, value_ast); + zend_const_expr_to_zval(value_zv, value_ast_ptr); if (zend_get_special_const(ZSTR_VAL(unqualified_name), ZSTR_LEN(unqualified_name))) { zend_error_noreturn(E_COMPILE_ERROR, @@ -9297,23 +9291,18 @@ void zend_compile_const_expr(zend_ast **ast_ptr) /* {{{ */ } /* }}} */ -void zend_const_expr_to_zval(zval *result, zend_ast *ast) /* {{{ */ +void zend_const_expr_to_zval(zval *result, zend_ast **ast_ptr) /* {{{ */ { - zend_ast *orig_ast = ast; - zend_eval_const_expr(&ast); - zend_compile_const_expr(&ast); - if (ast->kind == ZEND_AST_ZVAL) { - ZVAL_COPY_VALUE(result, zend_ast_get_zval(ast)); - } else { - ZVAL_AST(result, zend_ast_copy(ast)); - /* destroy the ast here, it might have been replaced */ - zend_ast_destroy(ast); + zend_eval_const_expr(ast_ptr); + zend_compile_const_expr(ast_ptr); + if ((*ast_ptr)->kind != ZEND_AST_ZVAL) { + /* Replace with compiled AST zval representation. */ + zval ast_zv; + ZVAL_AST(&ast_zv, zend_ast_copy(*ast_ptr)); + zend_ast_destroy(*ast_ptr); + *ast_ptr = zend_ast_create_zval(&ast_zv); } - - /* Kill this branch of the original AST, as it was already destroyed. - * It would be nice to find a better solution to this problem in the - * future. */ - orig_ast->kind = 0; + ZVAL_COPY(result, zend_ast_get_zval(*ast_ptr)); } /* }}} */ diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index ab1e0d2401690..b4af5d9e3fa12 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -135,7 +135,7 @@ void zend_compile_stmt(zend_ast *ast); void zend_compile_expr(znode *node, zend_ast *ast); zend_op *zend_compile_var(znode *node, zend_ast *ast, uint32_t type, bool by_ref); void zend_eval_const_expr(zend_ast **ast_ptr); -void zend_const_expr_to_zval(zval *result, zend_ast *ast); +void zend_const_expr_to_zval(zval *result, zend_ast **ast_ptr); typedef int (*user_opcode_handler_t) (zend_execute_data *execute_data); From 36ed9966ce791676dd435fd3ee5fc67a17bc09b2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Sep 2020 14:44:06 +0200 Subject: [PATCH 114/209] Allow attributes to be applied to property/constant groups Remove arbitrary restriction that attributes cannot be applied to property/constant groups. The attribute applies to all elements of the group, just like modifiers and types do. See also https://externals.io/message/111914. Closes GH-6186. --- .../attributes/014_class_const_group.phpt | 32 ++++++++++++++++--- Zend/tests/attributes/015_property_group.phpt | 32 ++++++++++++++++--- Zend/zend_compile.c | 11 ------- 3 files changed, 54 insertions(+), 21 deletions(-) diff --git a/Zend/tests/attributes/014_class_const_group.phpt b/Zend/tests/attributes/014_class_const_group.phpt index 9f01d013a7de1..726483a2dcffe 100644 --- a/Zend/tests/attributes/014_class_const_group.phpt +++ b/Zend/tests/attributes/014_class_const_group.phpt @@ -1,14 +1,36 @@ --TEST-- -Attributes cannot be applied to groups of class constants. +Attributes can be applied to groups of class constants --FILE-- getAttributes()[0]; +var_dump($ra1->getName(), $ra1->getArguments()); +$rp2 = new ReflectionClassConstant('C', 'B'); +$ra2 = $rp2->getAttributes()[0]; +var_dump($ra2->getName(), $ra2->getArguments()); + ?> ---EXPECTF-- -Fatal error: Cannot apply attributes to a group of constants in %s +--EXPECT-- +string(1) "A" +array(2) { + [0]=> + int(1) + [1]=> + int(2) +} +string(1) "A" +array(2) { + [0]=> + int(1) + [1]=> + int(2) +} diff --git a/Zend/tests/attributes/015_property_group.phpt b/Zend/tests/attributes/015_property_group.phpt index b84ded8c38d6d..a448cb80d63cd 100644 --- a/Zend/tests/attributes/015_property_group.phpt +++ b/Zend/tests/attributes/015_property_group.phpt @@ -1,14 +1,36 @@ --TEST-- -Attributes cannot be applied to groups of properties. +Attributes can be applied to groups of properties --FILE-- getAttributes()[0]; +var_dump($ra1->getName(), $ra1->getArguments()); +$rp2 = new ReflectionProperty('C', 'y'); +$ra2 = $rp2->getAttributes()[0]; +var_dump($ra2->getName(), $ra2->getArguments()); + ?> ---EXPECTF-- -Fatal error: Cannot apply attributes to a group of properties in %s +--EXPECT-- +string(1) "A" +array(2) { + [0]=> + int(1) + [1]=> + int(2) +} +string(1) "A" +array(2) { + [0]=> + int(1) + [1]=> + int(2) +} diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index f0019f591c974..7debd55accf3b 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7069,11 +7069,6 @@ void zend_compile_prop_group(zend_ast *ast) /* {{{ */ zend_ast *prop_ast = ast->child[1]; zend_ast *attr_ast = ast->child[2]; - if (attr_ast && zend_ast_get_list(prop_ast)->children > 1) { - zend_error_noreturn(E_COMPILE_ERROR, "Cannot apply attributes to a group of properties"); - return; - } - zend_compile_prop_decl(prop_ast, type_ast, ast->attr, attr_ast); } /* }}} */ @@ -7130,12 +7125,6 @@ void zend_compile_class_const_group(zend_ast *ast) /* {{{ */ zend_ast *const_ast = ast->child[0]; zend_ast *attr_ast = ast->child[1]; - if (attr_ast && zend_ast_get_list(const_ast)->children > 1) { - zend_error_noreturn(E_COMPILE_ERROR, "Cannot apply attributes to a group of constants"); - - return; - } - zend_compile_class_const_decl(const_ast, ast->attr, attr_ast); } /* }}} */ From 3b34d74a45ec771898dbecae67478ed288e413e0 Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Sun, 27 Sep 2020 11:17:17 -0600 Subject: [PATCH 115/209] Clean up spl_fixedarray.c Remove inline. Remove old folding blocks. Convert an int usage to bool. Convert some uses of int and size_t into zend_long. This is incomplete because get_gc requires `int *n`, which should probably become zend_long or size_t eventually. Adds spl_fixedarray_empty to help enforce invariants. Adds spl_fixedarray_default_ctor. Documents some functions. Reworks spl_fixedarray_copy into two functions: - spl_fixedarray_copy_ctor - spl_fixedarray_copy_range I'm hoping to eventually export SplFixedArray for extensions to use directly, which is the motivation here. --- ext/spl/spl_fixedarray.c | 267 +++++++++++++++++++-------------------- 1 file changed, 129 insertions(+), 138 deletions(-) diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index b9471d07bfa71..4b0d186a78d28 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -39,13 +39,12 @@ PHPAPI zend_class_entry *spl_ce_SplFixedArray; ZEND_GET_MODULE(spl_fixedarray) #endif -typedef struct _spl_fixedarray { /* {{{ */ +typedef struct _spl_fixedarray { zend_long size; zval *elements; } spl_fixedarray; -/* }}} */ -typedef struct _spl_fixedarray_object { /* {{{ */ +typedef struct _spl_fixedarray_object { spl_fixedarray array; zend_function *fptr_offset_get; zend_function *fptr_offset_set; @@ -54,28 +53,52 @@ typedef struct _spl_fixedarray_object { /* {{{ */ zend_function *fptr_count; zend_object std; } spl_fixedarray_object; -/* }}} */ -typedef struct _spl_fixedarray_it { /* {{{ */ +typedef struct _spl_fixedarray_it { zend_object_iterator intern; - int current; + zend_long current; } spl_fixedarray_it; -/* }}} */ -static inline spl_fixedarray_object *spl_fixed_array_from_obj(zend_object *obj) /* {{{ */ { +static spl_fixedarray_object *spl_fixed_array_from_obj(zend_object *obj) +{ return (spl_fixedarray_object*)((char*)(obj) - XtOffsetOf(spl_fixedarray_object, std)); } -/* }}} */ #define Z_SPLFIXEDARRAY_P(zv) spl_fixed_array_from_obj(Z_OBJ_P((zv))) -static inline void spl_fixedarray_init_elems(spl_fixedarray *array, size_t from, size_t to) { - for (size_t i = from; i < to; i++) { - ZVAL_NULL(&array->elements[i]); +/* Helps enforce the invariants in debug mode: + * - if size == 0, then elements == NULL + * - if size > 0, then elements != NULL + * - size is not less than 0 + */ +static bool spl_fixedarray_empty(spl_fixedarray *array) +{ + if (array->elements) { + ZEND_ASSERT(array->size > 0); + return false; } + ZEND_ASSERT(array->size == 0); + return true; } -static void spl_fixedarray_init(spl_fixedarray *array, zend_long size) /* {{{ */ +static void spl_fixedarray_default_ctor(spl_fixedarray *array) +{ + array->size = 0; + array->elements = NULL; +} + +/* Initializes the range [from, to) to null. Does not dtor existing elements. */ +static void spl_fixedarray_init_elems(spl_fixedarray *array, zend_long from, zend_long to) +{ + ZEND_ASSERT(from <= to); + zval *begin = array->elements + from, *end = array->elements + to; + + while (begin != end) { + ZVAL_NULL(begin++); + } +} + +static void spl_fixedarray_init(spl_fixedarray *array, zend_long size) { if (size > 0) { array->size = 0; /* reset size in case ecalloc() fails */ @@ -83,13 +106,57 @@ static void spl_fixedarray_init(spl_fixedarray *array, zend_long size) /* {{{ */ array->size = size; spl_fixedarray_init_elems(array, 0, size); } else { - array->elements = NULL; - array->size = 0; + spl_fixedarray_default_ctor(array); + } +} + +/* Copies the range [begin, end) into the fixedarray, beginning at `offset`. + * Does not dtor the existing elements. + */ +static void spl_fixedarray_copy_range(spl_fixedarray *array, zend_long offset, zval *begin, zval *end) +{ + ZEND_ASSERT(offset >= 0); + ZEND_ASSERT(array->size - offset >= end - begin); + + zval *to = &array->elements[offset]; + while (begin != end) { + ZVAL_COPY(to++, begin++); + } +} + +static void spl_fixedarray_copy_ctor(spl_fixedarray *to, spl_fixedarray *from) +{ + zend_long size = from->size; + spl_fixedarray_init(to, size); + + zval *begin = from->elements, *end = from->elements + size; + spl_fixedarray_copy_range(to, 0, begin, end); +} + +/* Destructs the elements in the range [from, to). + * Caller is expected to bounds check. + */ +static void spl_fixedarray_dtor_range(spl_fixedarray *array, zend_long from, zend_long to) +{ + zval *begin = array->elements + from, *end = array->elements + to; + while (begin != end) { + zval_ptr_dtor(begin++); + } +} + +/* Destructs and frees contents but not the array itself. + * If you want to re-use the array then you need to re-initialize it. + */ +static void spl_fixedarray_dtor(spl_fixedarray *array) +{ + zend_long size = array->size; + if (!spl_fixedarray_empty(array)) { + spl_fixedarray_dtor_range(array, 0, size); + efree(array->elements); } } -/* }}} */ -static void spl_fixedarray_resize(spl_fixedarray *array, zend_long size) /* {{{ */ +static void spl_fixedarray_resize(spl_fixedarray *array, zend_long size) { if (size == array->size) { /* nothing to do */ @@ -104,42 +171,20 @@ static void spl_fixedarray_resize(spl_fixedarray *array, zend_long size) /* {{{ /* clearing the array */ if (size == 0) { - zend_long i; - - for (i = 0; i < array->size; i++) { - zval_ptr_dtor(&(array->elements[i])); - } - - if (array->elements) { - efree(array->elements); - array->elements = NULL; - } + spl_fixedarray_dtor(array); + array->elements = NULL; } else if (size > array->size) { array->elements = safe_erealloc(array->elements, size, sizeof(zval), 0); spl_fixedarray_init_elems(array, array->size, size); } else { /* size < array->size */ - zend_long i; - - for (i = size; i < array->size; i++) { - zval_ptr_dtor(&(array->elements[i])); - } + spl_fixedarray_dtor_range(array, size, array->size); array->elements = erealloc(array->elements, sizeof(zval) * size); } array->size = size; } -/* }}} */ -static void spl_fixedarray_copy(spl_fixedarray *to, spl_fixedarray *from) /* {{{ */ -{ - int i; - for (i = 0; i < from->size; i++) { - ZVAL_COPY(&to->elements[i], &from->elements[i]); - } -} -/* }}} */ - -static HashTable* spl_fixedarray_object_get_gc(zend_object *obj, zval **table, int *n) /* {{{{ */ +static HashTable* spl_fixedarray_object_get_gc(zend_object *obj, zval **table, int *n) { spl_fixedarray_object *intern = spl_fixed_array_from_obj(obj); HashTable *ht = zend_std_get_properties(obj); @@ -149,23 +194,21 @@ static HashTable* spl_fixedarray_object_get_gc(zend_object *obj, zval **table, i return ht; } -/* }}}} */ -static HashTable* spl_fixedarray_object_get_properties(zend_object *obj) /* {{{{ */ +static HashTable* spl_fixedarray_object_get_properties(zend_object *obj) { spl_fixedarray_object *intern = spl_fixed_array_from_obj(obj); HashTable *ht = zend_std_get_properties(obj); - zend_long i = 0; - if (intern->array.size > 0) { + if (!spl_fixedarray_empty(&intern->array)) { zend_long j = zend_hash_num_elements(ht); - for (i = 0; i < intern->array.size; i++) { + for (zend_long i = 0; i < intern->array.size; i++) { zend_hash_index_update(ht, i, &intern->array.elements[i]); Z_TRY_ADDREF(intern->array.elements[i]); } if (j > intern->array.size) { - for (i = intern->array.size; i < j; ++i) { + for (zend_long i = intern->array.size; i < j; ++i) { zend_hash_index_del(ht, i); } } @@ -173,32 +216,19 @@ static HashTable* spl_fixedarray_object_get_properties(zend_object *obj) /* {{{{ return ht; } -/* }}}} */ -static void spl_fixedarray_object_free_storage(zend_object *object) /* {{{ */ +static void spl_fixedarray_object_free_storage(zend_object *object) { spl_fixedarray_object *intern = spl_fixed_array_from_obj(object); - zend_long i; - - if (intern->array.size > 0) { - for (i = 0; i < intern->array.size; i++) { - zval_ptr_dtor(&(intern->array.elements[i])); - } - - if (intern->array.size > 0 && intern->array.elements) { - efree(intern->array.elements); - } - } - + spl_fixedarray_dtor(&intern->array); zend_object_std_dtor(&intern->std); } -/* }}} */ -static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, zend_object *orig, int clone_orig) /* {{{ */ +static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, zend_object *orig, bool clone_orig) { spl_fixedarray_object *intern; - zend_class_entry *parent = class_type; - int inherited = 0; + zend_class_entry *parent = class_type; + bool inherited = false; intern = zend_object_alloc(sizeof(spl_fixedarray_object), parent); @@ -207,8 +237,7 @@ static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, z if (orig && clone_orig) { spl_fixedarray_object *other = spl_fixed_array_from_obj(orig); - spl_fixedarray_init(&intern->array, other->array.size); - spl_fixedarray_copy(&intern->array, &other->array); + spl_fixedarray_copy_ctor(&intern->array, &other->array); } while (parent) { @@ -218,7 +247,7 @@ static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, z } parent = parent->parent; - inherited = 1; + inherited = true; } ZEND_ASSERT(parent); @@ -248,15 +277,13 @@ static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, z return &intern->std; } -/* }}} */ -static zend_object *spl_fixedarray_new(zend_class_entry *class_type) /* {{{ */ +static zend_object *spl_fixedarray_new(zend_class_entry *class_type) { return spl_fixedarray_object_new_ex(class_type, NULL, 0); } -/* }}} */ -static zend_object *spl_fixedarray_object_clone(zend_object *old_object) /* {{{ */ +static zend_object *spl_fixedarray_object_clone(zend_object *old_object) { zend_object *new_object = spl_fixedarray_object_new_ex(old_object->ce, old_object, 1); @@ -264,9 +291,8 @@ static zend_object *spl_fixedarray_object_clone(zend_object *old_object) /* {{{ return new_object; } -/* }}} */ -static inline zval *spl_fixedarray_object_read_dimension_helper(spl_fixedarray_object *intern, zval *offset) /* {{{ */ +static zval *spl_fixedarray_object_read_dimension_helper(spl_fixedarray_object *intern, zval *offset) { zend_long index; @@ -290,11 +316,10 @@ static inline zval *spl_fixedarray_object_read_dimension_helper(spl_fixedarray_o return &intern->array.elements[index]; } } -/* }}} */ static int spl_fixedarray_object_has_dimension(zend_object *object, zval *offset, int check_empty); -static zval *spl_fixedarray_object_read_dimension(zend_object *object, zval *offset, int type, zval *rv) /* {{{ */ +static zval *spl_fixedarray_object_read_dimension(zend_object *object, zval *offset, int type, zval *rv) { spl_fixedarray_object *intern; @@ -322,9 +347,8 @@ static zval *spl_fixedarray_object_read_dimension(zend_object *object, zval *off return spl_fixedarray_object_read_dimension_helper(intern, offset); } -/* }}} */ -static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_object *intern, zval *offset, zval *value) /* {{{ */ +static void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_object *intern, zval *offset, zval *value) { zend_long index; @@ -348,9 +372,8 @@ static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_o ZVAL_COPY_DEREF(&intern->array.elements[index], value); } } -/* }}} */ -static void spl_fixedarray_object_write_dimension(zend_object *object, zval *offset, zval *value) /* {{{ */ +static void spl_fixedarray_object_write_dimension(zend_object *object, zval *offset, zval *value) { spl_fixedarray_object *intern; zval tmp; @@ -373,9 +396,8 @@ static void spl_fixedarray_object_write_dimension(zend_object *object, zval *off spl_fixedarray_object_write_dimension_helper(intern, offset, value); } -/* }}} */ -static inline void spl_fixedarray_object_unset_dimension_helper(spl_fixedarray_object *intern, zval *offset) /* {{{ */ +static void spl_fixedarray_object_unset_dimension_helper(spl_fixedarray_object *intern, zval *offset) { zend_long index; @@ -393,9 +415,8 @@ static inline void spl_fixedarray_object_unset_dimension_helper(spl_fixedarray_o ZVAL_NULL(&intern->array.elements[index]); } } -/* }}} */ -static void spl_fixedarray_object_unset_dimension(zend_object *object, zval *offset) /* {{{ */ +static void spl_fixedarray_object_unset_dimension(zend_object *object, zval *offset) { spl_fixedarray_object *intern; @@ -410,9 +431,8 @@ static void spl_fixedarray_object_unset_dimension(zend_object *object, zval *off spl_fixedarray_object_unset_dimension_helper(intern, offset); } -/* }}} */ -static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_object *intern, zval *offset, int check_empty) /* {{{ */ +static int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_object *intern, zval *offset, int check_empty) { zend_long index; int retval; @@ -435,9 +455,8 @@ static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_obje return retval; } -/* }}} */ -static int spl_fixedarray_object_has_dimension(zend_object *object, zval *offset, int check_empty) /* {{{ */ +static int spl_fixedarray_object_has_dimension(zend_object *object, zval *offset, int check_empty) { spl_fixedarray_object *intern; @@ -457,9 +476,8 @@ static int spl_fixedarray_object_has_dimension(zend_object *object, zval *offset return spl_fixedarray_object_has_dimension_helper(intern, offset, check_empty); } -/* }}} */ -static int spl_fixedarray_object_count_elements(zend_object *object, zend_long *count) /* {{{ */ +static int spl_fixedarray_object_count_elements(zend_object *object, zend_long *count) { spl_fixedarray_object *intern; @@ -478,9 +496,7 @@ static int spl_fixedarray_object_count_elements(zend_object *object, zend_long * } return SUCCESS; } -/* }}} */ -/* {{{ */ PHP_METHOD(SplFixedArray, __construct) { zval *object = ZEND_THIS; @@ -498,16 +514,14 @@ PHP_METHOD(SplFixedArray, __construct) intern = Z_SPLFIXEDARRAY_P(object); - if (intern->array.size > 0) { + if (!spl_fixedarray_empty(&intern->array)) { /* called __construct() twice, bail out */ return; } spl_fixedarray_init(&intern->array, size); } -/* }}} */ -/* {{{ */ PHP_METHOD(SplFixedArray, __wakeup) { spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); @@ -534,9 +548,7 @@ PHP_METHOD(SplFixedArray, __wakeup) zend_hash_clean(intern_ht); } } -/* }}} */ -/* {{{ */ PHP_METHOD(SplFixedArray, count) { zval *object = ZEND_THIS; @@ -549,9 +561,7 @@ PHP_METHOD(SplFixedArray, count) intern = Z_SPLFIXEDARRAY_P(object); RETURN_LONG(intern->array.size); } -/* }}} */ -/* {{{ */ PHP_METHOD(SplFixedArray, toArray) { spl_fixedarray_object *intern; @@ -562,11 +572,9 @@ PHP_METHOD(SplFixedArray, toArray) intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); - if (intern->array.size > 0) { - int i = 0; - + if (!spl_fixedarray_empty(&intern->array)) { array_init(return_value); - for (; i < intern->array.size; i++) { + for (zend_long i = 0; i < intern->array.size; i++) { zend_hash_index_update(Z_ARRVAL_P(return_value), i, &intern->array.elements[i]); Z_TRY_ADDREF(intern->array.elements[i]); } @@ -574,9 +582,7 @@ PHP_METHOD(SplFixedArray, toArray) RETURN_EMPTY_ARRAY(); } } -/* }}} */ -/* {{{ */ PHP_METHOD(SplFixedArray, fromArray) { zval *data; @@ -638,9 +644,7 @@ PHP_METHOD(SplFixedArray, fromArray) intern = Z_SPLFIXEDARRAY_P(return_value); intern->array = array; } -/* }}} */ -/* {{{ */ PHP_METHOD(SplFixedArray, getSize) { zval *object = ZEND_THIS; @@ -653,9 +657,7 @@ PHP_METHOD(SplFixedArray, getSize) intern = Z_SPLFIXEDARRAY_P(object); RETURN_LONG(intern->array.size); } -/* }}} */ -/* {{{ */ PHP_METHOD(SplFixedArray, setSize) { zval *object = ZEND_THIS; @@ -676,9 +678,8 @@ PHP_METHOD(SplFixedArray, setSize) spl_fixedarray_resize(&intern->array, size); RETURN_TRUE; } -/* }}} */ -/* {{{ Returns whether the requested $index exists. */ +/* Returns whether the requested $index exists. */ PHP_METHOD(SplFixedArray, offsetExists) { zval *zindex; @@ -691,9 +692,9 @@ PHP_METHOD(SplFixedArray, offsetExists) intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); RETURN_BOOL(spl_fixedarray_object_has_dimension_helper(intern, zindex, 0)); -} /* }}} */ +} -/* {{{ Returns the value at the specified $index. */ +/* Returns the value at the specified $index. */ PHP_METHOD(SplFixedArray, offsetGet) { zval *zindex, *value; @@ -711,9 +712,9 @@ PHP_METHOD(SplFixedArray, offsetGet) } else { RETURN_NULL(); } -} /* }}} */ +} -/* {{{ Sets the value at the specified $index to $newval. */ +/* Sets the value at the specified $index to $newval. */ PHP_METHOD(SplFixedArray, offsetSet) { zval *zindex, *value; @@ -726,9 +727,9 @@ PHP_METHOD(SplFixedArray, offsetSet) intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); spl_fixedarray_object_write_dimension_helper(intern, zindex, value); -} /* }}} */ +} -/* {{{ Unsets the value at the specified $index. */ +/* Unsets the value at the specified $index. */ PHP_METHOD(SplFixedArray, offsetUnset) { zval *zindex; @@ -741,9 +742,9 @@ PHP_METHOD(SplFixedArray, offsetUnset) intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); spl_fixedarray_object_unset_dimension_helper(intern, zindex); -} /* }}} */ +} -/* {{{ Create a new iterator from a SplFixedArray instance. */ +/* Create a new iterator from a SplFixedArray instance. */ PHP_METHOD(SplFixedArray, getIterator) { if (zend_parse_parameters_none() == FAILURE) { @@ -752,21 +753,18 @@ PHP_METHOD(SplFixedArray, getIterator) zend_create_internal_iterator_zval(return_value, ZEND_THIS); } -/* }}} */ -static void spl_fixedarray_it_dtor(zend_object_iterator *iter) /* {{{ */ +static void spl_fixedarray_it_dtor(zend_object_iterator *iter) { zval_ptr_dtor(&iter->data); } -/* }}} */ -static void spl_fixedarray_it_rewind(zend_object_iterator *iter) /* {{{ */ +static void spl_fixedarray_it_rewind(zend_object_iterator *iter) { ((spl_fixedarray_it*)iter)->current = 0; } -/* }}} */ -static int spl_fixedarray_it_valid(zend_object_iterator *iter) /* {{{ */ +static int spl_fixedarray_it_valid(zend_object_iterator *iter) { spl_fixedarray_it *iterator = (spl_fixedarray_it*)iter; spl_fixedarray_object *object = Z_SPLFIXEDARRAY_P(&iter->data); @@ -777,9 +775,8 @@ static int spl_fixedarray_it_valid(zend_object_iterator *iter) /* {{{ */ return FAILURE; } -/* }}} */ -static zval *spl_fixedarray_it_get_current_data(zend_object_iterator *iter) /* {{{ */ +static zval *spl_fixedarray_it_get_current_data(zend_object_iterator *iter) { zval zindex, *data; spl_fixedarray_it *iterator = (spl_fixedarray_it*)iter; @@ -793,19 +790,16 @@ static zval *spl_fixedarray_it_get_current_data(zend_object_iterator *iter) /* { } return data; } -/* }}} */ -static void spl_fixedarray_it_get_current_key(zend_object_iterator *iter, zval *key) /* {{{ */ +static void spl_fixedarray_it_get_current_key(zend_object_iterator *iter, zval *key) { ZVAL_LONG(key, ((spl_fixedarray_it*)iter)->current); } -/* }}} */ -static void spl_fixedarray_it_move_forward(zend_object_iterator *iter) /* {{{ */ +static void spl_fixedarray_it_move_forward(zend_object_iterator *iter) { ((spl_fixedarray_it*)iter)->current++; } -/* }}} */ /* iterator handler table */ static const zend_object_iterator_funcs spl_fixedarray_it_funcs = { @@ -819,7 +813,7 @@ static const zend_object_iterator_funcs spl_fixedarray_it_funcs = { NULL, /* get_gc */ }; -zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ +zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *object, int by_ref) { spl_fixedarray_it *iterator; @@ -837,9 +831,7 @@ zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *ob return &iterator->intern; } -/* }}} */ -/* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(spl_fixedarray) { REGISTER_SPL_STD_CLASS_EX(SplFixedArray, spl_fixedarray_new, class_SplFixedArray_methods); @@ -866,4 +858,3 @@ PHP_MINIT_FUNCTION(spl_fixedarray) return SUCCESS; } -/* }}} */ From 02dc9ce6e595b15b332e2e0c6b5737fb475a9d50 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Sat, 19 Sep 2020 19:57:53 -0500 Subject: [PATCH 116/209] Rename mysqli parameters to be more logical Closes GH-6172. --- ext/mysqli/mysqli.stub.php | 254 ++++++++--------- ext/mysqli/mysqli_arginfo.h | 264 ++++++++---------- ext/mysqli/tests/mysqli_fetch_all_oo.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_array.phpt | 4 +- ext/mysqli/tests/mysqli_fetch_array_oo.phpt | 4 +- .../tests/mysqli_fetch_field_direct_oo.phpt | 4 +- ext/mysqli/tests/mysqli_fetch_object.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 2 +- ext/mysqli/tests/mysqli_field_seek.phpt | 4 +- ext/mysqli/tests/mysqli_field_tell.phpt | 4 +- ext/mysqli/tests/mysqli_kill.phpt | 6 +- ext/mysqli/tests/mysqli_poll.phpt | 4 +- ext/mysqli/tests/mysqli_report.phpt | 4 +- ext/mysqli/tests/mysqli_stmt_attr_get.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_attr_set.phpt | 8 +- .../tests/mysqli_stmt_send_long_data.phpt | 2 +- 16 files changed, 277 insertions(+), 293 deletions(-) diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 78d303b4ee64c..d3c32b61fbe19 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -10,7 +10,7 @@ class mysqli { public function __construct( ?string $host = null, - ?string $user = null, + ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, @@ -21,7 +21,7 @@ public function __construct( * @return bool * @alias mysqli_autocommit */ - public function autocommit(bool $mode) {} + public function autocommit(bool $enable) {} /** * @return bool @@ -33,7 +33,7 @@ public function begin_transaction(int $flags = 0, ?string $name = null) {} * @return bool * @alias mysqli_change_user */ - public function change_user(string $user, string $password, ?string $database) {} + public function change_user(string $username, string $password, ?string $database) {} /** * @return string|null @@ -59,7 +59,7 @@ public function commit(int $flags = -1, ?string $name = null) {} */ public function connect( ?string $host = null, - ?string $user = null, + ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, @@ -76,7 +76,7 @@ public function dump_debug_info() {} * @return bool * @alias mysqli_debug */ - public function debug(string $debug_options) {} + public function debug(string $options) {} /** * @return object|null @@ -120,7 +120,7 @@ public function init() {} * @return bool * @alias mysqli_kill */ - public function kill(int $connection_id) {} + public function kill(int $process_id) {} /** * @return bool @@ -151,7 +151,7 @@ public function ping() {} * @return int|false * @alias mysqli_poll */ - public static function poll(?array &$read, ?array &$write, array &$error, int $sec, int $usec = 0) {} + public static function poll(?array &$read, ?array &$write, array &$error, int $seconds, int $microseconds = 0) {} #endif /** @@ -172,7 +172,7 @@ public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT) {} */ public function real_connect( ?string $host = null, - ?string $user = null, + ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, @@ -184,7 +184,7 @@ public function real_connect( * @return string * @alias mysqli_real_escape_string */ - public function real_escape_string(string $string_to_escape) {} + public function real_escape_string(string $string) {} #if defined(MYSQLI_USE_MYSQLND) /** @@ -198,7 +198,7 @@ public function reap_async_query() {} * @return string * @alias mysqli_real_escape_string */ - public function escape_string(string $string_to_escape) {} + public function escape_string(string $string) {} /** * @return bool @@ -256,10 +256,10 @@ public function set_opt(int $option, $value) {} */ public function ssl_set( string $key, - string $cert, - string $certificate_authority, - string $certificate_authority_path, - string $cipher + string $certificate, + string $ca_certificate, + string $ca_path, + string $cipher_algos ) {} /** @@ -278,7 +278,7 @@ public function stmt_init() {} * @return mysqli_result|false * @alias mysqli_store_result */ - public function store_result(int $flags = 0) {} + public function store_result(int $mode = 0) {} /** * @return bool @@ -296,12 +296,12 @@ public function use_result() {} * @return bool * @alias mysqli_refresh */ - public function refresh(int $options) {} + public function refresh(int $flags) {} } class mysqli_result implements IteratorAggregate { - public function __construct(mysqli $mysqli_link, int $result_mode = MYSQLI_STORE_RESULT) {} + public function __construct(mysqli $mysql, int $result_mode = MYSQLI_STORE_RESULT) {} /** * @return void @@ -337,21 +337,21 @@ public function fetch_fields() {} * @return object|false * @alias mysqli_fetch_field_direct */ - public function fetch_field_direct(int $field_nr) {} + public function fetch_field_direct(int $index) {} #if defined(MYSQLI_USE_MYSQLND) /** * @return array|false * @alias mysqli_fetch_all */ - public function fetch_all(int $result_type = MYSQLI_NUM) {} + public function fetch_all(int $mode = MYSQLI_NUM) {} #endif /** * @return array|null|false * @alias mysqli_fetch_array */ - public function fetch_array(int $result_type = MYSQLI_BOTH) {} + public function fetch_array(int $mode = MYSQLI_BOTH) {} /** * @return array|null @@ -363,7 +363,7 @@ public function fetch_assoc() {} * @return object|null * @alias mysqli_fetch_object */ - public function fetch_object(string $class_name = "stdClass", array $params = []) {} + public function fetch_object(string $class = "stdClass", array $params = []) {} /** * @return array|null @@ -375,7 +375,7 @@ public function fetch_row() {} * @return bool * @alias mysqli_field_seek */ - public function field_seek(int $field_nr) {} + public function field_seek(int $index) {} /** * @return void @@ -388,19 +388,19 @@ public function getIterator(): Iterator; class mysqli_stmt { - public function __construct(mysqli $mysqli_link, ?string $statement = null) {} + public function __construct(mysqli $mysql, ?string $query = null) {} /** * @return int|false * @alias mysqli_stmt_attr_get */ - public function attr_get(int $attr) {} + public function attr_get(int $attribute) {} /** * @return bool * @alias mysqli_stmt_attr_set */ - public function attr_set(int $attr, int $mode_in) {} + public function attr_set(int $attribute, int $value) {} /** * @return bool @@ -474,7 +474,7 @@ public function num_rows() {} * @return bool * @alias mysqli_stmt_send_long_data */ - public function send_long_data(int $param_nr, string $data) {} + public function send_long_data(int $param_num, string $data) {} /** * @return void @@ -511,7 +511,7 @@ public function get_result() {} final class mysqli_warning { - protected function __construct(object $mysqli_link) {} + protected function __construct(object $mysql) {} public function next(): bool {} } @@ -520,23 +520,23 @@ final class mysqli_sql_exception extends RuntimeException { } -function mysqli_affected_rows(mysqli $mysql_link): int|string {} +function mysqli_affected_rows(mysqli $mysql): int|string {} -function mysqli_autocommit(mysqli $mysql_link, bool $mode): bool {} +function mysqli_autocommit(mysqli $mysql, bool $enable): bool {} -function mysqli_begin_transaction(mysqli $mysql_link, int $flags = 0, ?string $name = null): bool {} +function mysqli_begin_transaction(mysqli $mysql, int $flags = 0, ?string $name = null): bool {} -function mysqli_change_user(mysqli $mysql_link, string $user, string $password, ?string $database): bool {} +function mysqli_change_user(mysqli $mysql, string $username, string $password, ?string $database): bool {} -function mysqli_character_set_name(mysqli $mysql_link): ?string {} +function mysqli_character_set_name(mysqli $mysql): ?string {} -function mysqli_close(mysqli $mysql_link): bool {} +function mysqli_close(mysqli $mysql): bool {} -function mysqli_commit(mysqli $mysql_link, int $flags = -1, ?string $name = null): bool {} +function mysqli_commit(mysqli $mysql, int $flags = -1, ?string $name = null): bool {} function mysqli_connect( ?string $host = null, - ?string $user = null, + ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, @@ -547,112 +547,112 @@ function mysqli_connect_errno(): int {} function mysqli_connect_error(): ?string {} -function mysqli_data_seek(mysqli_result $mysql_result, int $offset): bool {} +function mysqli_data_seek(mysqli_result $result, int $offset): bool {} -function mysqli_dump_debug_info(mysqli $mysql_link): bool {} +function mysqli_dump_debug_info(mysqli $mysql): bool {} function mysqli_debug(string $debug): bool {} -function mysqli_errno(mysqli $mysql_link): int {} +function mysqli_errno(mysqli $mysql): int {} -function mysqli_error(mysqli $mysql_link): ?string {} +function mysqli_error(mysqli $mysql): ?string {} -function mysqli_error_list(mysqli $mysql_link): array {} +function mysqli_error_list(mysqli $mysql): array {} -function mysqli_stmt_execute(mysqli_stmt $mysql_stmt): bool {} +function mysqli_stmt_execute(mysqli_stmt $stmt): bool {} /** @alias mysqli_stmt_execute */ -function mysqli_execute(mysqli_stmt $mysql_stmt): bool {} +function mysqli_execute(mysqli_stmt $stmt): bool {} -function mysqli_fetch_field(mysqli_result $mysql_result): object|false {} +function mysqli_fetch_field(mysqli_result $result): object|false {} -function mysqli_fetch_fields(mysqli_result $mysql_result): array {} +function mysqli_fetch_fields(mysqli_result $result): array {} -function mysqli_fetch_field_direct(mysqli_result $mysql_result, int $offset): object|false {} +function mysqli_fetch_field_direct(mysqli_result $result, int $offset): object|false {} -function mysqli_fetch_lengths(mysqli_result $mysql_result): array|false {} +function mysqli_fetch_lengths(mysqli_result $result): array|false {} #if defined(MYSQLI_USE_MYSQLND) -function mysqli_fetch_all(mysqli_result $mysql_result, int $mode = MYSQLI_NUM): array|false {} +function mysqli_fetch_all(mysqli_result $result, int $mode = MYSQLI_NUM): array|false {} #endif -function mysqli_fetch_array(mysqli_result $mysql_result, int $fetchtype = MYSQLI_BOTH): array|null|false {} +function mysqli_fetch_array(mysqli_result $result, int $mode = MYSQLI_BOTH): array|null|false {} -function mysqli_fetch_assoc(mysqli_result $mysql_result): ?array {} +function mysqli_fetch_assoc(mysqli_result $result): ?array {} -function mysqli_fetch_object(mysqli_result $mysqli_result, string $class_name = "stdClass", array $params = []): ?object {} +function mysqli_fetch_object(mysqli_result $result, string $class = "stdClass", array $params = []): ?object {} -function mysqli_fetch_row(mysqli_result $mysqli_result): ?array {} +function mysqli_fetch_row(mysqli_result $result): ?array {} -function mysqli_field_count(mysqli $mysqli_link): int {} +function mysqli_field_count(mysqli $mysql): int {} -function mysqli_field_seek(mysqli_result $mysqli_result, int $field_nr): bool {} +function mysqli_field_seek(mysqli_result $result, int $index): bool {} -function mysqli_field_tell(mysqli_result $mysqli_result): int {} +function mysqli_field_tell(mysqli_result $result): int {} -function mysqli_free_result(mysqli_result $mysqli_result): void {} +function mysqli_free_result(mysqli_result $result): void {} #if defined(MYSQLI_USE_MYSQLND) -function mysqli_get_connection_stats(mysqli $mysqli_link): array {} +function mysqli_get_connection_stats(mysqli $mysql): array {} function mysqli_get_client_stats(): array {} #endif -function mysqli_get_charset(mysqli $mysqli_link): ?object {} +function mysqli_get_charset(mysqli $mysql): ?object {} -function mysqli_get_client_info(?mysqli $mysqli_link = null): ?string {} +function mysqli_get_client_info(?mysqli $mysql = null): ?string {} function mysqli_get_client_version(): int {} function mysqli_get_links_stats(): array {} -function mysqli_get_host_info(mysqli $mysqli_link): string {} +function mysqli_get_host_info(mysqli $mysql): string {} -function mysqli_get_proto_info(mysqli $mysqli_link): int {} +function mysqli_get_proto_info(mysqli $mysql): int {} -function mysqli_get_server_info(mysqli $mysqli_link): string {} +function mysqli_get_server_info(mysqli $mysql): string {} -function mysqli_get_server_version(mysqli $mysqli_link): int {} +function mysqli_get_server_version(mysqli $mysql): int {} -function mysqli_get_warnings(mysqli $mysqli_link): mysqli_warning|false {} +function mysqli_get_warnings(mysqli $mysql): mysqli_warning|false {} function mysqli_init(): mysqli|false {} -function mysqli_info(mysqli $mysqli_link): ?string {} +function mysqli_info(mysqli $mysql): ?string {} -function mysqli_insert_id(mysqli $mysqli_link): int|string {} +function mysqli_insert_id(mysqli $mysql): int|string {} -function mysqli_kill(mysqli $mysqli_link, int $connection_id): bool {} +function mysqli_kill(mysqli $mysql, int $process_id): bool {} -function mysqli_more_results(mysqli $mysqli_link): bool {} +function mysqli_more_results(mysqli $mysql): bool {} -function mysqli_multi_query(mysqli $mysqli_link, string $query): bool {} +function mysqli_multi_query(mysqli $mysql, string $query): bool {} -function mysqli_next_result(mysqli $mysqli_link): bool {} +function mysqli_next_result(mysqli $mysql): bool {} -function mysqli_num_fields(mysqli_result $mysql_result): int {} +function mysqli_num_fields(mysqli_result $result): int {} -function mysqli_num_rows(mysqli_result $mysqli_result): int|string {} +function mysqli_num_rows(mysqli_result $result): int|string {} /** @param string|int $value */ -function mysqli_options(mysqli $mysqli_link, int $option, $value): bool {} +function mysqli_options(mysqli $mysql, int $option, $value): bool {} -function mysqli_ping(mysqli $mysqli_link): bool {} +function mysqli_ping(mysqli $mysql): bool {} #if defined(MYSQLI_USE_MYSQLND) -function mysqli_poll(?array &$read, ?array &$write, array &$error, int $sec, int $usec = 0): int|false {} +function mysqli_poll(?array &$read, ?array &$write, array &$error, int $seconds, int $microseconds = 0): int|false {} #endif -function mysqli_prepare(mysqli $mysqli_link, string $query): mysqli_stmt|false {} +function mysqli_prepare(mysqli $mysql, string $query): mysqli_stmt|false {} function mysqli_report(int $flags): bool {} -function mysqli_query(mysqli $mysqli_link, string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {} +function mysqli_query(mysqli $mysql, string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {} function mysqli_real_connect( - mysqli $mysqli_link, + mysqli $mysql, ?string $host = null, - ?string $user = null, + ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, @@ -660,112 +660,112 @@ function mysqli_real_connect( int $flags = 0 ): bool {} -function mysqli_real_escape_string(mysqli $mysqli_link, string $string_to_escape): string {} +function mysqli_real_escape_string(mysqli $mysql, string $string): string {} -function mysqli_real_query(mysqli $mysqli_link, string $query): bool {} +function mysqli_real_query(mysqli $mysql, string $query): bool {} #if defined(MYSQLI_USE_MYSQLND) -function mysqli_reap_async_query(mysqli $mysqli_link): mysqli_result|bool {} +function mysqli_reap_async_query(mysqli $mysql): mysqli_result|bool {} #endif -function mysqli_release_savepoint(mysqli $mysqli_link, string $name): bool {} +function mysqli_release_savepoint(mysqli $mysql, string $name): bool {} -function mysqli_rollback(mysqli $mysqli_link, int $flags = 0, ?string $name = null): bool {} +function mysqli_rollback(mysqli $mysql, int $flags = 0, ?string $name = null): bool {} -function mysqli_savepoint(mysqli $mysqli_link, string $name): bool {} +function mysqli_savepoint(mysqli $mysql, string $name): bool {} -function mysqli_select_db(mysqli $mysqli_link, string $dbname): bool {} +function mysqli_select_db(mysqli $mysql, string $database): bool {} -function mysqli_set_charset(mysqli $mysqli_link, string $charset): bool {} +function mysqli_set_charset(mysqli $mysql, string $charset): bool {} -function mysqli_stmt_affected_rows(mysqli_stmt $mysql_stmt): int|string {} +function mysqli_stmt_affected_rows(mysqli_stmt $stmt): int|string {} -function mysqli_stmt_attr_get(mysqli_stmt $mysql_stmt, int $attr): int {} +function mysqli_stmt_attr_get(mysqli_stmt $stmt, int $attribute): int {} -function mysqli_stmt_attr_set(mysqli_stmt $mysql_stmt, int $attr, int $mode_in): bool {} +function mysqli_stmt_attr_set(mysqli_stmt $stmt, int $attribute, int $value): bool {} -function mysqli_stmt_bind_param(mysqli_stmt $mysql_stmt, string $types, mixed &...$vars): bool {} +function mysqli_stmt_bind_param(mysqli_stmt $stmt, string $types, mixed &...$vars): bool {} -function mysqli_stmt_bind_result(mysqli_stmt $mysql_stmt, mixed &...$vars): bool {} +function mysqli_stmt_bind_result(mysqli_stmt $stmt, mixed &...$vars): bool {} -function mysqli_stmt_close(mysqli_stmt $mysql_stmt): bool {} +function mysqli_stmt_close(mysqli_stmt $stmt): bool {} -function mysqli_stmt_data_seek(mysqli_stmt $mysql_stmt, int $offset): void {} +function mysqli_stmt_data_seek(mysqli_stmt $stmt, int $offset): void {} -function mysqli_stmt_errno(mysqli_stmt $mysql_stmt): int {} +function mysqli_stmt_errno(mysqli_stmt $stmt): int {} -function mysqli_stmt_error(mysqli_stmt $mysql_stmt): ?string {} +function mysqli_stmt_error(mysqli_stmt $stmt): ?string {} -function mysqli_stmt_error_list(mysqli_stmt $mysql_stmt): array {} +function mysqli_stmt_error_list(mysqli_stmt $stmt): array {} -function mysqli_stmt_fetch(mysqli_stmt $mysql_stmt): ?bool {} +function mysqli_stmt_fetch(mysqli_stmt $stmt): ?bool {} -function mysqli_stmt_field_count(mysqli_stmt $mysql_stmt): int {} +function mysqli_stmt_field_count(mysqli_stmt $stmt): int {} -function mysqli_stmt_free_result(mysqli_stmt $mysql_stmt): void {} +function mysqli_stmt_free_result(mysqli_stmt $stmt): void {} #if defined(MYSQLI_USE_MYSQLND) -function mysqli_stmt_get_result(mysqli_stmt $mysql_stmt): mysqli_result|false {} +function mysqli_stmt_get_result(mysqli_stmt $stmt): mysqli_result|false {} #endif -function mysqli_stmt_get_warnings(mysqli_stmt $mysql_stmt): mysqli_warning|false {} +function mysqli_stmt_get_warnings(mysqli_stmt $stmt): mysqli_warning|false {} -function mysqli_stmt_init(mysqli $mysql_link): mysqli_stmt|false {} +function mysqli_stmt_init(mysqli $mysql): mysqli_stmt|false {} -function mysqli_stmt_insert_id(mysqli_stmt $mysql_stmt): int|string {} +function mysqli_stmt_insert_id(mysqli_stmt $stmt): int|string {} #if defined(MYSQLI_USE_MYSQLND) -function mysqli_stmt_more_results(mysqli_stmt $mysql_stmt): bool {} +function mysqli_stmt_more_results(mysqli_stmt $stmt): bool {} -function mysqli_stmt_next_result(mysqli_stmt $mysql_stmt): bool {} +function mysqli_stmt_next_result(mysqli_stmt $stmt): bool {} #endif -function mysqli_stmt_num_rows(mysqli_stmt $mysql_stmt): int|string {} +function mysqli_stmt_num_rows(mysqli_stmt $stmt): int|string {} -function mysqli_stmt_param_count(mysqli_stmt $mysql_stmt): int {} +function mysqli_stmt_param_count(mysqli_stmt $stmt): int {} -function mysqli_stmt_prepare(mysqli_stmt $mysql_stmt, string $query): bool {} +function mysqli_stmt_prepare(mysqli_stmt $stmt, string $query): bool {} -function mysqli_stmt_reset(mysqli_stmt $mysql_stmt): bool {} +function mysqli_stmt_reset(mysqli_stmt $stmt): bool {} -function mysqli_stmt_result_metadata(mysqli_stmt $mysql_stmt): mysqli_result|false {} +function mysqli_stmt_result_metadata(mysqli_stmt $stmt): mysqli_result|false {} -function mysqli_stmt_send_long_data(mysqli_stmt $mysql_stmt, int $param_nr, string $data): bool {} +function mysqli_stmt_send_long_data(mysqli_stmt $stmt, int $param_num, string $data): bool {} -function mysqli_stmt_store_result(mysqli_stmt $mysql_stmt): bool {} +function mysqli_stmt_store_result(mysqli_stmt $stmt): bool {} -function mysqli_stmt_sqlstate(mysqli_stmt $mysql_stmt): ?string {} +function mysqli_stmt_sqlstate(mysqli_stmt $stmt): ?string {} -function mysqli_sqlstate(mysqli $mysqli_link): ?string {} +function mysqli_sqlstate(mysqli $mysql): ?string {} function mysqli_ssl_set( - mysqli $mysql_link, + mysqli $mysql, string $key, - string $cert, - string $certificate_authority, - string $certificate_authority_path, - string $cipher + string $certificate, + string $ca_certificate, + string $ca_path, + string $cipher_algos ): bool {} -function mysqli_stat(mysqli $mysql_link): string|false {} +function mysqli_stat(mysqli $mysql): string|false {} -function mysqli_store_result(mysqli $mysql_link, int $flags = 0): mysqli_result|false {} +function mysqli_store_result(mysqli $mysql, int $mode = 0): mysqli_result|false {} -function mysqli_thread_id(mysqli $mysql_link): int {} +function mysqli_thread_id(mysqli $mysql): int {} function mysqli_thread_safe(): bool {} -function mysqli_use_result(mysqli $mysql_link): mysqli_result|false {} +function mysqli_use_result(mysqli $mysql): mysqli_result|false {} -function mysqli_warning_count(mysqli $mysql_link): int {} +function mysqli_warning_count(mysqli $mysql): int {} -function mysqli_refresh(mysqli $mysqli_link, int $options): bool {} +function mysqli_refresh(mysqli $mysql, int $flags): bool {} /** @alias mysqli_real_escape_string */ -function mysqli_escape_string(mysqli $mysqli_link, string $string_to_escape): string {} +function mysqli_escape_string(mysqli $mysql, string $string): string {} /** * @param string|int $value * @alias mysqli_options */ -function mysqli_set_opt(mysqli $mysqli_link, int $option, $value): bool {} +function mysqli_set_opt(mysqli $mysql, int $option, $value): bool {} diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 6622685fb7def..48b07bb9374f1 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -1,45 +1,45 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 20d9c5578108df89a863dd93f289e6f79d1db183 */ + * Stub hash: 54e11efaf9b7b020e27cb0b7a30098af93e1c6f9 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_autocommit, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, mode, _IS_BOOL, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) + ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_begin_transaction, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_change_user, 0, 4, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) + ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_character_set_name, 0, 1, IS_STRING, 1) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_close, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_commit, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_connect, 0, 0, mysqli, MAY_BE_NULL|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, username, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") @@ -53,7 +53,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_connect_error, 0, 0, IS_S ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_data_seek, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -64,84 +64,80 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_debug, 0, 1, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_errno, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_error arginfo_mysqli_character_set_name ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_error_list, 0, 1, IS_ARRAY, 0) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_execute, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_execute arginfo_mysqli_stmt_execute ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_fetch_field, 0, 1, MAY_BE_OBJECT|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_fetch_fields, 0, 1, IS_ARRAY, 0) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_fetch_field_direct, 0, 2, MAY_BE_OBJECT|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_fetch_lengths, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_END_ARG_INFO() #if defined(MYSQLI_USE_MYSQLND) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_fetch_all, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MYSQLI_NUM") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_NULL|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetchtype, IS_LONG, 0, "MYSQLI_BOTH") + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MYSQLI_BOTH") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_fetch_assoc, 0, 1, IS_ARRAY, 1) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_fetch_object, 0, 1, IS_OBJECT, 1) - ZEND_ARG_OBJ_INFO(0, mysqli_result, mysqli_result, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 0, "\"stdClass\"") + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 0, "\"stdClass\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_fetch_row, 0, 1, IS_ARRAY, 1) - ZEND_ARG_OBJ_INFO(0, mysqli_result, mysqli_result, 0) -ZEND_END_ARG_INFO() +#define arginfo_mysqli_fetch_row arginfo_mysqli_fetch_assoc -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_field_count, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) -ZEND_END_ARG_INFO() +#define arginfo_mysqli_field_count arginfo_mysqli_errno ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_field_seek, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_result, mysqli_result, 0) - ZEND_ARG_TYPE_INFO(0, field_nr, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) + ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_field_tell, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_free_result, 0, 1, IS_VOID, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_END_ARG_INFO() #if defined(MYSQLI_USE_MYSQLND) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_connection_stats, 0, 1, IS_ARRAY, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() #endif @@ -151,11 +147,11 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_charset, 0, 1, IS_OBJECT, 1) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_client_info, 0, 0, IS_STRING, 1) - ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, mysqli_link, mysqli, 1, "null") + ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, mysql, mysqli, 1, "null") ZEND_END_ARG_INFO() #define arginfo_mysqli_get_client_version arginfo_mysqli_connect_errno @@ -164,74 +160,66 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_links_stats, 0, 0, IS ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_get_host_info, 0, 1, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() -#define arginfo_mysqli_get_proto_info arginfo_mysqli_field_count +#define arginfo_mysqli_get_proto_info arginfo_mysqli_errno #define arginfo_mysqli_get_server_info arginfo_mysqli_get_host_info -#define arginfo_mysqli_get_server_version arginfo_mysqli_field_count +#define arginfo_mysqli_get_server_version arginfo_mysqli_errno ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_get_warnings, 0, 1, mysqli_warning, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_init, 0, 0, mysqli, MAY_BE_FALSE) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_info, 0, 1, IS_STRING, 1) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) -ZEND_END_ARG_INFO() +#define arginfo_mysqli_info arginfo_mysqli_character_set_name -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_insert_id, 0, 1, MAY_BE_LONG|MAY_BE_STRING) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) -ZEND_END_ARG_INFO() +#define arginfo_mysqli_insert_id arginfo_mysqli_affected_rows ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_kill, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, connection_id, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) + ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_more_results, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) -ZEND_END_ARG_INFO() +#define arginfo_mysqli_more_results arginfo_mysqli_close ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_multi_query, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_mysqli_next_result arginfo_mysqli_more_results +#define arginfo_mysqli_next_result arginfo_mysqli_close -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_num_fields, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, mysql_result, mysqli_result, 0) -ZEND_END_ARG_INFO() +#define arginfo_mysqli_num_fields arginfo_mysqli_field_tell ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_num_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING) - ZEND_ARG_OBJ_INFO(0, mysqli_result, mysqli_result, 0) + ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_options, 0, 3, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -#define arginfo_mysqli_ping arginfo_mysqli_more_results +#define arginfo_mysqli_ping arginfo_mysqli_close #if defined(MYSQLI_USE_MYSQLND) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_poll, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, error, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, sec, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, usec, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_prepare, 0, 2, mysqli_stmt, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -240,15 +228,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_report, 0, 1, _IS_BOOL, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_query, 0, 2, mysqli_result, MAY_BE_BOOL) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_mode, IS_LONG, 0, "MYSQLI_STORE_RESULT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_real_connect, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, username, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") @@ -257,115 +245,111 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_real_connect, 0, 1, _IS_B ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_real_escape_string, 0, 2, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, string_to_escape, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_real_query arginfo_mysqli_multi_query #if defined(MYSQLI_USE_MYSQLND) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_reap_async_query, 0, 1, mysqli_result, MAY_BE_BOOL) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_release_savepoint, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_rollback, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") -ZEND_END_ARG_INFO() +#define arginfo_mysqli_rollback arginfo_mysqli_begin_transaction #define arginfo_mysqli_savepoint arginfo_mysqli_release_savepoint ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_select_db, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, dbname, IS_STRING, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) + ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_set_charset, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_stmt_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_attr_get, 0, 2, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) - ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) + ZEND_ARG_TYPE_INFO(0, attribute, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_attr_set, 0, 3, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) - ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, mode_in, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) + ZEND_ARG_TYPE_INFO(0, attribute, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_bind_param, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_ARG_TYPE_INFO(0, types, IS_STRING, 0) ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_bind_result, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_stmt_close arginfo_mysqli_stmt_execute ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_data_seek, 0, 2, IS_VOID, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_errno, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_error, 0, 1, IS_STRING, 1) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_error_list, 0, 1, IS_ARRAY, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_fetch, 0, 1, _IS_BOOL, 1) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_stmt_field_count arginfo_mysqli_stmt_errno ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_free_result, 0, 1, IS_VOID, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() #if defined(MYSQLI_USE_MYSQLND) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_stmt_get_result, 0, 1, mysqli_result, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_stmt_get_warnings, 0, 1, mysqli_warning, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_stmt_init, 0, 1, mysqli_stmt, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_stmt_insert_id arginfo_mysqli_stmt_affected_rows #if defined(MYSQLI_USE_MYSQLND) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_more_results, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() #endif @@ -378,19 +362,19 @@ ZEND_END_ARG_INFO() #define arginfo_mysqli_stmt_param_count arginfo_mysqli_stmt_errno ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_prepare, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_stmt_reset arginfo_mysqli_stmt_execute ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_stmt_result_metadata, 0, 1, mysqli_result, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_send_long_data, 0, 3, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0) - ZEND_ARG_TYPE_INFO(0, param_nr, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) + ZEND_ARG_TYPE_INFO(0, param_num, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -398,24 +382,24 @@ ZEND_END_ARG_INFO() #define arginfo_mysqli_stmt_sqlstate arginfo_mysqli_stmt_error -#define arginfo_mysqli_sqlstate arginfo_mysqli_info +#define arginfo_mysqli_sqlstate arginfo_mysqli_character_set_name ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_ssl_set, 0, 6, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cert, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, certificate_authority, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, certificate_authority_path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cipher, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_stat, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_store_result, 0, 1, mysqli_result, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_mysqli_thread_id arginfo_mysqli_errno @@ -424,14 +408,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_thread_safe, 0, 0, _IS_BO ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_mysqli_use_result, 0, 1, mysqli_result, MAY_BE_FALSE) - ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_warning_count arginfo_mysqli_errno ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_refresh, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_mysqli_escape_string arginfo_mysqli_real_escape_string @@ -440,7 +424,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, username, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") @@ -448,7 +432,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli___construct, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, mode, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0) @@ -457,7 +441,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_change_user, 0, 0, 3) - ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 1) ZEND_END_ARG_INFO() @@ -477,7 +461,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_dump_debug_info arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_debug, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, debug_options, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, options, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_class_mysqli_get_charset arginfo_class_mysqli_character_set_name @@ -496,7 +480,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_init arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_kill, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, connection_id, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_multi_query, 0, 0, 1) @@ -514,8 +498,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_poll, 0, 0, 4) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, error, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, sec, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, usec, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif @@ -528,7 +512,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, host, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, username, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, database, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null") @@ -537,7 +521,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_escape_string, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, string_to_escape, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() #if defined(MYSQLI_USE_MYSQLND) @@ -573,10 +557,10 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5) ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cert, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, certificate_authority, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, certificate_authority_path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, cipher, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_class_mysqli_stat arginfo_class_mysqli_character_set_name @@ -584,7 +568,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_stmt_init arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_store_result, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #define arginfo_class_mysqli_thread_safe arginfo_class_mysqli_character_set_name @@ -592,11 +576,11 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_use_result arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result___construct, 0, 0, 1) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_mode, IS_LONG, 0, "MYSQLI_STORE_RESULT") ZEND_END_ARG_INFO() @@ -613,23 +597,23 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_result_fetch_fields arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_field_direct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, field_nr, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_END_ARG_INFO() #if defined(MYSQLI_USE_MYSQLND) ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_all, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_type, IS_LONG, 0, "MYSQLI_NUM") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MYSQLI_NUM") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_array, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, result_type, IS_LONG, 0, "MYSQLI_BOTH") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MYSQLI_BOTH") ZEND_END_ARG_INFO() #define arginfo_class_mysqli_result_fetch_assoc arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_fetch_object, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 0, "\"stdClass\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 0, "\"stdClass\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() @@ -643,17 +627,17 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_mysqli_result_getIterator, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt___construct, 0, 0, 1) - ZEND_ARG_OBJ_INFO(0, mysqli_link, mysqli, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, statement, IS_STRING, 1, "null") + ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, query, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_get, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, attribute, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_set, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, mode_in, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, attribute, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_bind_param, 0, 0, 1) @@ -688,7 +672,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_stmt_num_rows arginfo_class_mysqli_character_set_name ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_send_long_data, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, param_nr, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, param_num, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -705,7 +689,7 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_warning___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, mysqli_link, IS_OBJECT, 0) + ZEND_ARG_TYPE_INFO(0, mysql, IS_OBJECT, 0) ZEND_END_ARG_INFO() #define arginfo_class_mysqli_warning_next arginfo_mysqli_thread_safe diff --git a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt index 358dc2ae8b1aa..df522f2eeb580 100644 --- a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt @@ -435,6 +435,6 @@ array(1) { string(1) "1" } } -mysqli_result::fetch_all(): Argument #1 ($result_type) must be one of MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC, or MYSQLI_FETCH_BOTH +mysqli_result::fetch_all(): Argument #1 ($mode) must be one of MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC, or MYSQLI_FETCH_BOTH mysqli_result object is already closed done! diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt index 044ed2de0c61f..c5805552606b7 100644 --- a/ext/mysqli/tests/mysqli_fetch_array.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array.phpt @@ -359,7 +359,7 @@ array(11) { ["e"]=> string(1) "1" } -mysqli_fetch_array(): Argument #2 ($fetchtype) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH -mysqli_fetch_array(): Argument #2 ($fetchtype) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH +mysqli_fetch_array(): Argument #2 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH +mysqli_fetch_array(): Argument #2 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH mysqli_result object is already closed done! diff --git a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt index 599b9d0c9490d..dad5917888c4f 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt @@ -355,7 +355,7 @@ array(11) { ["e"]=> string(1) "1" } -mysqli_result::fetch_array(): Argument #1 ($result_type) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH -mysqli_result::fetch_array(): Argument #1 ($result_type) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH +mysqli_result::fetch_array(): Argument #1 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH +mysqli_result::fetch_array(): Argument #1 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH mysqli_result object is already closed done! diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt index 1f94eefd388d5..e07ec40ad0320 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt @@ -57,7 +57,7 @@ require_once('skipifconnectfailure.inc'); ?> --EXPECTF-- mysqli object is not fully initialized -mysqli_result::fetch_field_direct(): Argument #1 ($field_nr) must be greater than or equal to 0 +mysqli_result::fetch_field_direct(): Argument #1 ($index) must be greater than or equal to 0 object(stdClass)#%d (13) { ["name"]=> string(2) "ID" @@ -86,6 +86,6 @@ object(stdClass)#%d (13) { ["decimals"]=> int(%d) } -mysqli_result::fetch_field_direct(): Argument #1 ($field_nr) must be less than the number of fields for this result set +mysqli_result::fetch_field_direct(): Argument #1 ($index) must be less than the number of fields for this result set mysqli_result object is already closed done! diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index a234aee4c8a5c..f5708ac55853d 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -148,5 +148,5 @@ NULL NULL mysqli_result object is already closed [0] mysqli_fetch_object(): Argument #3 ($params) must be of type array, string given in %s on line %d -mysqli_fetch_object(): Argument #2 ($class_name) must be a valid class name, this_class_does_not_exist given +mysqli_fetch_object(): Argument #2 ($class) must be a valid class name, this_class_does_not_exist given done! diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index b00c485950004..f402db82d87b3 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -139,5 +139,5 @@ Exception: Too few arguments to function mysqli_fetch_object_construct::__constr NULL NULL mysqli_result object is already closed -mysqli_result::fetch_object(): Argument #1 ($class_name) must be a valid class name, this_class_does_not_exist given +mysqli_result::fetch_object(): Argument #1 ($class) must be a valid class name, this_class_does_not_exist given done! diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt index 0a0b02273efc8..8b0516a6a05ff 100644 --- a/ext/mysqli/tests/mysqli_field_seek.phpt +++ b/ext/mysqli/tests/mysqli_field_seek.phpt @@ -122,7 +122,7 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECTF-- -mysqli_field_seek(): Argument #2 ($field_nr) must be greater than or equal to 0 +mysqli_field_seek(): Argument #2 ($index) must be greater than or equal to 0 object(stdClass)#%d (13) { ["name"]=> string(2) "id" @@ -210,7 +210,7 @@ object(stdClass)#%d (13) { int(0) } int(2) -mysqli_field_seek(): Argument #2 ($field_nr) must be less than the number of fields for this result set +mysqli_field_seek(): Argument #2 ($index) must be less than the number of fields for this result set bool(false) bool(true) object(stdClass)#%d (13) { diff --git a/ext/mysqli/tests/mysqli_field_tell.phpt b/ext/mysqli/tests/mysqli_field_tell.phpt index 79cfc04885191..d489e4068e863 100644 --- a/ext/mysqli/tests/mysqli_field_tell.phpt +++ b/ext/mysqli/tests/mysqli_field_tell.phpt @@ -88,9 +88,9 @@ object(stdClass)#%d (13) { } bool(false) int(1) -mysqli_field_seek(): Argument #2 ($field_nr) must be less than the number of fields for this result set +mysqli_field_seek(): Argument #2 ($index) must be less than the number of fields for this result set int(1) -mysqli_field_seek(): Argument #2 ($field_nr) must be greater than or equal to 0 +mysqli_field_seek(): Argument #2 ($index) must be greater than or equal to 0 int(1) bool(true) int(0) diff --git a/ext/mysqli/tests/mysqli_kill.phpt b/ext/mysqli/tests/mysqli_kill.phpt index 40ca9eaa1af96..bec08cc1e1d3b 100644 --- a/ext/mysqli/tests/mysqli_kill.phpt +++ b/ext/mysqli/tests/mysqli_kill.phpt @@ -80,7 +80,7 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECTF-- -mysqli_kill(): Argument #2 ($connection_id) must be greater than 0 +mysqli_kill(): Argument #2 ($process_id) must be greater than 0 string(%d) "%s" bool(false) object(mysqli)#%d (%d) { @@ -131,10 +131,10 @@ object(mysqli)#%d (%d) { ["warning_count"]=> int(0) } -mysqli_kill(): Argument #2 ($connection_id) must be greater than 0 +mysqli_kill(): Argument #2 ($process_id) must be greater than 0 array(1) { ["id"]=> string(1) "1" } -mysqli_kill(): Argument #2 ($connection_id) must be greater than 0 +mysqli_kill(): Argument #2 ($process_id) must be greater than 0 done! diff --git a/ext/mysqli/tests/mysqli_poll.phpt b/ext/mysqli/tests/mysqli_poll.phpt index c786a8166b305..7ff77f71c8e90 100644 --- a/ext/mysqli/tests/mysqli_poll.phpt +++ b/ext/mysqli/tests/mysqli_poll.phpt @@ -114,8 +114,8 @@ if (!$IS_MYSQLND) print "done!"; ?> --EXPECTF-- -mysqli_poll(): Argument #4 ($sec) must be greater than or equal to 0 -mysqli_poll(): Argument #5 ($usec) must be greater than or equal to 0 +mysqli_poll(): Argument #4 ($seconds) must be greater than or equal to 0 +mysqli_poll(): Argument #5 ($microseconds) must be greater than or equal to 0 [012 + 6] Rejecting thread %d: 0/ [013 + 6] Rejecting thread %d: 0/ [014 + 6] Rejecting thread %d: 0/ diff --git a/ext/mysqli/tests/mysqli_report.phpt b/ext/mysqli/tests/mysqli_report.phpt index 5aa695f8f2ae1..dda3c3ec734b2 100644 --- a/ext/mysqli/tests/mysqli_report.phpt +++ b/ext/mysqli/tests/mysqli_report.phpt @@ -287,12 +287,12 @@ require_once('skipifconnectfailure.inc'); Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'BAR; FOO' at line 1 in %s on line %d Warning: mysqli_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d -mysqli_kill(): Argument #2 ($connection_id) must be greater than 0 +mysqli_kill(): Argument #2 ($process_id) must be greater than 0 Warning: mysqli_prepare(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d Warning: mysqli_real_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d -mysqli_kill(): Argument #2 ($connection_id) must be greater than 0 +mysqli_kill(): Argument #2 ($process_id) must be greater than 0 Warning: mysqli_stmt_prepare(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d [013] Access denied for user '%s'@'%s' (using password: YES) diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt index aea6c91ad00de..2b35eb88c567b 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt @@ -52,7 +52,7 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECT-- -mysqli_stmt_attr_get(): Argument #2 ($attr) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE +mysqli_stmt_attr_get(): Argument #2 ($attribute) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE mysqli_stmt object is already closed mysqli_stmt object is already closed mysqli_stmt object is already closed diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt index 40018305caafd..0edbc578e8f61 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt @@ -242,9 +242,9 @@ require_once("connect.inc"); ?> --EXPECT-- Error: mysqli_stmt object is not fully initialized -mysqli_stmt_attr_set(): Argument #2 ($attr) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE -mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH +mysqli_stmt_attr_set(): Argument #2 ($attribute) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE +mysqli_stmt::attr_set(): Argument #2 ($value) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH bool(true) -mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE -mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS +mysqli_stmt::attr_set(): Argument #2 ($value) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE +mysqli_stmt::attr_set(): Argument #2 ($value) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS done! diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt index b9139cb6e1979..0fce3502fc299 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt @@ -108,5 +108,5 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECT-- -mysqli_stmt_send_long_data(): Argument #2 ($param_nr) must be greater than or equal to 0 +mysqli_stmt_send_long_data(): Argument #2 ($param_num) must be greater than or equal to 0 done! From 8138ed73d73209024ad8500a4ab565b84259a1bf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Sep 2020 16:51:47 +0200 Subject: [PATCH 117/209] Make mysqli_warning constructor private The constructor was already effectively inaccessible (protected on a final class). This just makes it more obvious and removes the implementation in favor of directly throwing. Per the removed test, this was an unfinished feature, and I don't think it makes a lot of sense to finish it -- the mysqli_stmt::get_warnings() interface makes more sense than direct construction. Closes GH-6208. --- ext/mysqli/mysqli.stub.php | 2 +- ext/mysqli/mysqli_arginfo.h | 8 +- ext/mysqli/mysqli_warning.c | 59 +------- .../tests/mysqli_class_mysqli_warning.phpt | 127 ------------------ 4 files changed, 6 insertions(+), 190 deletions(-) delete mode 100644 ext/mysqli/tests/mysqli_class_mysqli_warning.phpt diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index d3c32b61fbe19..5c7ae9bf987f3 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -511,7 +511,7 @@ public function get_result() {} final class mysqli_warning { - protected function __construct(object $mysql) {} + private function __construct() {} public function next(): bool {} } diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 48b07bb9374f1..2666df942e374 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 54e11efaf9b7b020e27cb0b7a30098af93e1c6f9 */ + * Stub hash: 7687edcf18fa03c0ae95ac4b3d32c196790ba65e */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING) ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) @@ -688,9 +688,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_mysqli_stmt_get_result arginfo_class_mysqli_get_connection_stats #endif -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_warning___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, mysql, IS_OBJECT, 0) -ZEND_END_ARG_INFO() +#define arginfo_class_mysqli_warning___construct arginfo_class_mysqli_character_set_name #define arginfo_class_mysqli_warning_next arginfo_mysqli_thread_safe @@ -1059,7 +1057,7 @@ static const zend_function_entry class_mysqli_stmt_methods[] = { static const zend_function_entry class_mysqli_warning_methods[] = { - ZEND_ME(mysqli_warning, __construct, arginfo_class_mysqli_warning___construct, ZEND_ACC_PROTECTED) + ZEND_ME(mysqli_warning, __construct, arginfo_class_mysqli_warning___construct, ZEND_ACC_PRIVATE) ZEND_ME(mysqli_warning, next, arginfo_class_mysqli_warning_next, ZEND_ACC_PUBLIC) ZEND_FE_END }; diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 16cb0ebdfb8c6..c99b3df5df894 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -254,67 +254,12 @@ static int mysqli_warning_errno(mysqli_object *obj, zval *retval, zend_bool quie } /* }}} */ -/* {{{ mysqli_warning_construct(object obj) */ PHP_METHOD(mysqli_warning, __construct) { - zval *z; - mysqli_object *obj; -#ifndef MYSQLI_USE_MYSQLND - MYSQL *hdl; -#endif - MYSQLI_WARNING *w; - MYSQLI_RESOURCE *mysqli_resource; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &z) == FAILURE) { - RETURN_THROWS(); - } - obj = Z_MYSQLI_P(z); - - if (obj->zo.ce == mysqli_link_class_entry) { - MY_MYSQL *mysql; - MYSQLI_FETCH_RESOURCE_CONN(mysql, z, MYSQLI_STATUS_VALID); - if (mysql_warning_count(mysql->mysql)) { -#ifndef MYSQLI_USE_MYSQLND - w = php_get_warnings(mysql->mysql); -#else - w = php_get_warnings(mysql->mysql->data); -#endif - } else { - php_error_docref(NULL, E_WARNING, "No warnings found"); - RETURN_FALSE; - } - } else if (obj->zo.ce == mysqli_stmt_class_entry) { - MY_STMT *stmt; - MYSQLI_FETCH_RESOURCE_STMT(stmt, z, MYSQLI_STATUS_VALID); -#ifndef MYSQLI_USE_MYSQLND - hdl = mysqli_stmt_get_connection(stmt->stmt); - if (mysql_warning_count(hdl)) { - w = php_get_warnings(hdl); -#else - if (mysqlnd_stmt_warning_count(stmt->stmt)) { - w = php_get_warnings(mysqli_stmt_get_connection(stmt->stmt)); -#endif - } else { - php_error_docref(NULL, E_WARNING, "No warnings found"); - RETURN_FALSE; - } - } else { - php_error_docref(NULL, E_WARNING, "Invalid class argument"); - RETURN_FALSE; - } - - mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE)); - mysqli_resource->ptr = mysqli_resource->info = (void *)w; - mysqli_resource->status = MYSQLI_STATUS_VALID; - - if (!getThis() || !instanceof_function(Z_OBJCE_P(getThis()), mysqli_warning_class_entry)) { - MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_warning_class_entry); - } else { - (Z_MYSQLI_P(getThis()))->ptr = mysqli_resource; - } + ZEND_PARSE_PARAMETERS_NONE(); + zend_throw_error(NULL, "Cannot directly construct mysqli_warning"); } -/* }}} */ /* {{{ mysqli_warning_property_entries */ const mysqli_property_entry mysqli_warning_property_entries[] = { diff --git a/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt b/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt deleted file mode 100644 index 045d2b18c3de9..0000000000000 --- a/ext/mysqli/tests/mysqli_class_mysqli_warning.phpt +++ /dev/null @@ -1,127 +0,0 @@ ---TEST-- -Interface of the class mysqli_warning - TODO ---SKIPIF-- - ---FILE-- -stmt_init(); - $warning = new mysqli_warning($stmt); - - $obj = new stdClass(); - $warning = new mysqli_warning($obj); - - include("table.inc"); - $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); - $res = $mysqli->query('INSERT INTO test(id, label) VALUES (1, "zz")'); - $warning = mysqli_get_warnings($mysqli); - - printf("Parent class:\n"); - var_dump(get_parent_class($warning)); - - printf("\nMethods:\n"); - $methods = get_class_methods($warning); - $expected_methods = array( - 'next' => true, - ); - - foreach ($methods as $k => $method) { - if (isset($expected_methods[$method])) { - unset($methods[$k]); - unset($expected_methods[$method]); - } - } - if (!empty($methods)) { - printf("Dumping list of unexpected methods.\n"); - var_dump($methods); - } - if (!empty($expected_methods)) { - printf("Dumping list of missing methods.\n"); - var_dump($expected_methods); - } - if (empty($methods) && empty($expected_methods)) - printf("ok\n"); - - printf("\nClass variables:\n"); - $variables = get_class_vars(get_class($mysqli)); - sort($variables); - foreach ($variables as $k => $var) - printf("%s\n", $var); - - printf("\nObject variables:\n"); - $variables = get_object_vars($mysqli); - foreach ($variables as $k => $var) - printf("%s\n", $var); - - printf("\nMagic, magic properties:\n"); - - assert('' === $warning->message); - printf("warning->message = '%s'\n", $warning->message); - - assert('' === $warning->sqlstate); - printf("warning->sqlstate= '%s'\n", $warning->sqlstate); - - assert(0 === $warning->errno); - printf("warning->errno = '%s'\n", $warning->errno); - - printf("\nAccess to undefined properties:\n"); - printf("warning->unknown = '%s'\n", @$warning->unknown); - - print "done!"; -?> ---CLEAN-- - ---EXPECTF-- -Warning: Wrong parameter count for mysqli_warning::mysqli_warning() in %s on line %d - -Warning: mysqli_warning::mysqli_warning(): Argument #1 must be of type object, null given in %s on line %d - -Warning: Wrong parameter count for mysqli_warning::mysqli_warning() in %s on line %d - -Warning: mysqli_warning::mysqli_warning(): mysqli object is already closed in %s on line %d -mysqli_stmt object is not fully initialized -mysqli_stmt object is not fully initialized - -Warning: mysqli_warning::mysqli_warning(): Invalid class argument in /home/nixnutz/php6_mysqlnd/ext/mysqli/tests/mysqli_class_mysqli_warning.php on line 19 - -Warning: mysqli_warning::mysqli_warning(): No warnings found in %s on line %d -Parent class: -bool(false) - -Methods: -ok - -Class variables: - -Object variables: - -Magic, magic properties: -warning->message = '' -warning->sqlstate= '' -warning->errno = '' - -Access to undefined properties: - -warning->unknown = '' -done! From d411ea26f18697b8fc0b4a9732290263689b43ed Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Mon, 28 Sep 2020 08:52:21 +0200 Subject: [PATCH 118/209] Fixed test for MySQL < 5.6 Refs GH-6172. --- ext/mysqli/tests/mysqli_report_wo_ps.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mysqli/tests/mysqli_report_wo_ps.phpt b/ext/mysqli/tests/mysqli_report_wo_ps.phpt index 7f0295dd44c71..c1ba3e4756cf1 100644 --- a/ext/mysqli/tests/mysqli_report_wo_ps.phpt +++ b/ext/mysqli/tests/mysqli_report_wo_ps.phpt @@ -113,10 +113,10 @@ Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; ch Warning: mysqli_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d Warning: mysqli_change_user(): (%d/%d): Access denied for user '%s'@'%s' (using password: %s) in %s on line %d -mysqli_kill(): Argument #2 ($connection_id) must be greater than 0 +mysqli_kill(): Argument #2 ($process_id) must be greater than 0 Warning: mysqli_real_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d -mysqli_kill(): Argument #2 ($connection_id) must be greater than 0 +mysqli_kill(): Argument #2 ($process_id) must be greater than 0 [011] Access denied for user '%s'@'%s' (using password: YES) [014] Access denied for user '%s'@'%s' (using password: YES) done! From cafceea7424edca6bfe969cba39068dbe6aa64ba Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Sep 2020 16:14:26 +0200 Subject: [PATCH 119/209] Update mbstring parameter names Closes GH-6207. --- ext/mbstring/mbstring.stub.php | 60 +++++++++---------- ext/mbstring/mbstring_arginfo.h | 54 ++++++++--------- ext/mbstring/tests/bug79149.phpt | 6 +- ext/mbstring/tests/mb_convert_encoding.phpt | 2 +- ..._convert_encoding_empty_encoding_list.phpt | 4 +- ...convert_variables_empty_encoding_list.phpt | 4 +- .../tests/mb_decode_numericentity.phpt | 2 +- ext/mbstring/tests/mb_detect_encoding.phpt | 2 +- ...b_detect_encoding_empty_encoding_list.phpt | 4 +- .../tests/mb_encode_numericentity.phpt | 2 +- ext/mbstring/tests/mb_ereg_search_setpos.phpt | 8 +-- .../tests/mb_send_mail_null_bytes.phpt | 2 +- .../tests/mb_str_split_error_conditions.phpt | 4 +- .../tests/mb_str_unknown_encoding.phpt | 2 +- ext/standard/basic_functions.stub.php | 6 +- ext/standard/basic_functions_arginfo.h | 8 +-- ext/standard/tests/mail/mail_null_bytes.phpt | 2 +- .../tests/strings/str_split_variation6.phpt | 6 +- .../tests/strings/str_split_variation7.phpt | 6 +- 19 files changed, 92 insertions(+), 92 deletions(-) diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index be54303896285..14bf595fcfc2d 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -17,11 +17,11 @@ function mb_substitute_character(string|int|null $substitute_character = null): function mb_preferred_mime_name(string $encoding): string|false {} /** @param array $result */ -function mb_parse_str(string $encoded_string, &$result): bool {} +function mb_parse_str(string $string, &$result): bool {} -function mb_output_handler(string $contents, int $status): string {} +function mb_output_handler(string $string, int $status): string {} -function mb_str_split(string $string, int $split_length = 1, ?string $encoding = null): array {} +function mb_str_split(string $string, int $length = 1, ?string $encoding = null): array {} function mb_strlen(string $string, ?string $encoding = null): int {} @@ -33,13 +33,13 @@ function mb_stripos(string $haystack, string $needle, int $offset = 0, ?string $ function mb_strripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {} -function mb_strstr(string $haystack, string $needle, bool $part = false, ?string $encoding = null): string|false {} +function mb_strstr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {} -function mb_strrchr(string $haystack, string $needle, bool $part = false, ?string $encoding = null): string|false {} +function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {} -function mb_stristr(string $haystack, string $needle, bool $part = false, ?string $encoding = null): string|false {} +function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {} -function mb_strrichr(string $haystack, string $needle, bool $part = false, ?string $encoding = null): string|false {} +function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {} function mb_substr_count(string $haystack, string $needle, ?string $encoding = null): int {} @@ -51,7 +51,7 @@ function mb_strwidth(string $string, ?string $encoding = null): int {} function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = "", ?string $encoding = null): string {} -function mb_convert_encoding(array|string $string, string $to, array|string|null $from = null): array|string|false {} +function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false {} function mb_convert_case(string $string, int $mode, ?string $encoding = null): string {} @@ -59,68 +59,68 @@ function mb_strtoupper(string $string, ?string $encoding = null): string {} function mb_strtolower(string $string, ?string $encoding = null): string {} -function mb_detect_encoding(string $string, array|string|null $encoding_list = null, bool $strict = false): string|false {} +function mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false {} function mb_list_encodings(): array {} function mb_encoding_aliases(string $encoding): array {} -function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer = null, string $linefeed = "\r\n", int $indent = 0): string {} +function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer_encoding = null, string $newline = "\r\n", int $indent = 0): string {} function mb_decode_mimeheader(string $string): string {} -function mb_convert_kana(string $string, string $option = "KV", ?string $encoding = null): string {} +function mb_convert_kana(string $string, string $mode = "KV", ?string $encoding = null): string {} -function mb_convert_variables(string $to, array|string $from, mixed &$var, mixed &...$vars): string|false {} +function mb_convert_variables(string $to_encoding, array|string $from_encoding, mixed &$var, mixed &...$vars): string|false {} -function mb_encode_numericentity(string $string, array $convmap, ?string $encoding = null, bool $is_hex = false): string {} +function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $hex = false): string {} -function mb_decode_numericentity(string $string, array $convmap, ?string $encoding = null): string {} +function mb_decode_numericentity(string $string, array $map, ?string $encoding = null): string {} -function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_parameters = null): bool {} +function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null): bool {} function mb_get_info(string $type = "all"): array|string|int|false {} -function mb_check_encoding(array|string|null $var = null, ?string $encoding = null): bool {} +function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool {} function mb_scrub(string $string, ?string $encoding = null): string {} function mb_ord(string $string, ?string $encoding = null): int|false {} -function mb_chr(int $cp, ?string $encoding = null): string|false {} +function mb_chr(int $codepoint, ?string $encoding = null): string|false {} #ifdef HAVE_MBREGEX function mb_regex_encoding(?string $encoding = null): string|bool {} -/** @param array $registers */ -function mb_ereg(string $pattern, string $string, &$registers = null): int|false {} +/** @param array $matches */ +function mb_ereg(string $pattern, string $string, &$matches = null): int|false {} -/** @param array $registers */ -function mb_eregi(string $pattern, string $string, &$registers = null): int|false {} +/** @param array $matches */ +function mb_eregi(string $pattern, string $string, &$matches = null): int|false {} -function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $option = null): string|false|null {} +function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {} -function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $option = null): string|false|null {} +function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {} -function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $option = null): string|false|null {} +function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null {} function mb_split(string $pattern, string $string, int $limit = -1): array|false {} -function mb_ereg_match(string $pattern, string $string, ?string $option = null): bool {} +function mb_ereg_match(string $pattern, string $string, ?string $options = null): bool {} -function mb_ereg_search(?string $pattern = null, ?string $option = null): bool {} +function mb_ereg_search(?string $pattern = null, ?string $options = null): bool {} -function mb_ereg_search_pos(?string $pattern = null, ?string $option = null): array|false {} +function mb_ereg_search_pos(?string $pattern = null, ?string $options = null): array|false {} -function mb_ereg_search_regs(?string $pattern = null, ?string $option = null): array|false {} +function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): array|false {} -function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $option = null): bool {} +function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $options = null): bool {} function mb_ereg_search_getregs(): array|false {} function mb_ereg_search_getpos(): int {} -function mb_ereg_search_setpos(int $position): bool {} +function mb_ereg_search_setpos(int $offset): bool {} function mb_regex_set_options(?string $options = null): string {} #endif diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 6e71343ce4323..ca91c5cd6fec5 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 85cabf678a06175d4da073be79a0951d4f3786ed */ + * Stub hash: 3e5b45cf71fe75bde026062816cb28eceea4aa38 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null") @@ -28,18 +28,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_preferred_mime_name, 0, 1, MA ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_parse_str, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, encoded_string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_INFO(1, result) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_output_handler, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, contents, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, status, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_str_split, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, split_length, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -64,7 +64,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, part, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, before_needle, _IS_BOOL, 0, "false") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -101,8 +101,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_encoding, 0, 2, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_MASK(0, string, MAY_BE_ARRAY|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") + ZEND_ARG_TYPE_INFO(0, to_encoding, IS_STRING, 0) + ZEND_ARG_TYPE_MASK(0, from_encoding, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_case, 0, 2, IS_STRING, 0) @@ -120,7 +120,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_detect_encoding, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, encoding_list, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") + ZEND_ARG_TYPE_MASK(0, encodings, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() @@ -134,8 +134,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_mimeheader, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, transfer, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, linefeed, IS_STRING, 0, "\"\\r\\n\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, transfer_encoding, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, newline, IS_STRING, 0, "\"\\r\\n\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, indent, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -145,27 +145,27 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_kana, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 0, "\"KV\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"KV\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_variables, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_INFO(0, to_encoding, IS_STRING, 0) + ZEND_ARG_TYPE_MASK(0, from_encoding, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(1, var, IS_MIXED, 0) ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_numericentity, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, map, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_hex, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, hex, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_decode_numericentity, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, map, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -174,7 +174,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_send_mail, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, additional_headers, MAY_BE_ARRAY|MAY_BE_STRING, "[]") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_parameters, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_params, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_get_info, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE) @@ -182,7 +182,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_get_info, 0, 0, MAY_BE_ARRAY| ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_check_encoding, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_MASK(0, var, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") + ZEND_ARG_TYPE_MASK(0, value, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -194,7 +194,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ord, 0, 1, MAY_BE_LONG|MAY_BE ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_chr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, cp, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, codepoint, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -208,7 +208,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, registers, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matches, "null") ZEND_END_ARG_INFO() #endif @@ -221,7 +221,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace, 0, 3, MAY_BE_ST ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, replacement, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -234,7 +234,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace_callback, 0, 3, ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -250,21 +250,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_match, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif #if defined(HAVE_MBREGEX) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif #if defined(HAVE_MBREGEX) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_search_pos, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -276,7 +276,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search_init, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -292,7 +292,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_MBREGEX) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search_setpos, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_END_ARG_INFO() #endif diff --git a/ext/mbstring/tests/bug79149.phpt b/ext/mbstring/tests/bug79149.phpt index c057ed0ad7d0f..b8a7bb0e3c5eb 100644 --- a/ext/mbstring/tests/bug79149.phpt +++ b/ext/mbstring/tests/bug79149.phpt @@ -24,8 +24,8 @@ try { ?> --EXPECTF-- -mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "0" +mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "0" Warning: Array to string conversion in %s on line %d -mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "Array" -mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "foo" +mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "Array" +mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "foo" diff --git a/ext/mbstring/tests/mb_convert_encoding.phpt b/ext/mbstring/tests/mb_convert_encoding.phpt index 40b1dfed882b3..1f39d21b15ca8 100644 --- a/ext/mbstring/tests/mb_convert_encoding.phpt +++ b/ext/mbstring/tests/mb_convert_encoding.phpt @@ -124,4 +124,4 @@ JIS: GyRCRnxLXDhsJUYlLSU5JUgkRyQ5ISMbKEIwMTIzNBskQiM1IzYjNyM4IzkhIxsoQg== == INVALID PARAMETER == INT: 1234 EUC-JP: -mb_convert_encoding(): Argument #2 ($to) must be a valid encoding, "BAD" given +mb_convert_encoding(): Argument #2 ($to_encoding) must be a valid encoding, "BAD" given diff --git a/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt b/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt index 7b7d8217c3b0b..6fe5adbc35f11 100644 --- a/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt +++ b/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt @@ -23,5 +23,5 @@ try { ?> --EXPECT-- -mb_convert_encoding(): Argument #3 ($from) must specify at least one encoding -mb_convert_encoding(): Argument #3 ($from) must specify at least one encoding +mb_convert_encoding(): Argument #3 ($from_encoding) must specify at least one encoding +mb_convert_encoding(): Argument #3 ($from_encoding) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt b/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt index 4dbbd9f26ffed..29807bfa384d7 100644 --- a/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt +++ b/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt @@ -22,5 +22,5 @@ try { ?> --EXPECT-- -mb_convert_variables(): Argument #2 ($from) must specify at least one encoding -mb_convert_variables(): Argument #2 ($from) must specify at least one encoding +mb_convert_variables(): Argument #2 ($from_encoding) must specify at least one encoding +mb_convert_variables(): Argument #2 ($from_encoding) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_decode_numericentity.phpt b/ext/mbstring/tests/mb_decode_numericentity.phpt index 91b324924774a..b28a875f8a77f 100644 --- a/ext/mbstring/tests/mb_decode_numericentity.phpt +++ b/ext/mbstring/tests/mb_decode_numericentity.phpt @@ -49,4 +49,4 @@ aŒbœcŠdše€fg � � föo -mb_decode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements +mb_decode_numericentity(): Argument #2 ($map) must have a multiple of 4 elements diff --git a/ext/mbstring/tests/mb_detect_encoding.phpt b/ext/mbstring/tests/mb_detect_encoding.phpt index 2134f3c8b578a..71c44c16427ce 100644 --- a/ext/mbstring/tests/mb_detect_encoding.phpt +++ b/ext/mbstring/tests/mb_detect_encoding.phpt @@ -108,4 +108,4 @@ SJIS: SJIS == INVALID PARAMETER == INT: EUC-JP EUC-JP: EUC-JP -mb_detect_encoding(): Argument #2 ($encoding_list) contains invalid encoding "BAD" +mb_detect_encoding(): Argument #2 ($encodings) contains invalid encoding "BAD" diff --git a/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt b/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt index 28dbc5baa659c..2f9e8b82ade6d 100644 --- a/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt +++ b/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt @@ -22,5 +22,5 @@ try { ?> --EXPECT-- -mb_detect_encoding(): Argument #2 ($encoding_list) must specify at least one encoding -mb_detect_encoding(): Argument #2 ($encoding_list) must specify at least one encoding +mb_detect_encoding(): Argument #2 ($encodings) must specify at least one encoding +mb_detect_encoding(): Argument #2 ($encodings) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_encode_numericentity.phpt b/ext/mbstring/tests/mb_encode_numericentity.phpt index f7e8002383a2b..417b099f65c25 100644 --- a/ext/mbstring/tests/mb_encode_numericentity.phpt +++ b/ext/mbstring/tests/mb_encode_numericentity.phpt @@ -31,4 +31,4 @@ try { ƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦ aŒbœcŠdše€fg föo -mb_encode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements +mb_encode_numericentity(): Argument #2 ($map) must have a multiple of 4 elements diff --git a/ext/mbstring/tests/mb_ereg_search_setpos.phpt b/ext/mbstring/tests/mb_ereg_search_setpos.phpt index 3b73025489fc2..94e55f1febfd7 100644 --- a/ext/mbstring/tests/mb_ereg_search_setpos.phpt +++ b/ext/mbstring/tests/mb_ereg_search_setpos.phpt @@ -36,7 +36,7 @@ foreach($positions as $pos) { ?> --EXPECT-- bool(true) -mb_ereg_search_setpos(): Argument #1 ($position) is out of range +mb_ereg_search_setpos(): Argument #1 ($offset) is out of range * Position: 5 : bool(true) @@ -47,11 +47,11 @@ bool(true) int(20) * Position: 21 : -mb_ereg_search_setpos(): Argument #1 ($position) is out of range +mb_ereg_search_setpos(): Argument #1 ($offset) is out of range int(20) * Position: 25 : -mb_ereg_search_setpos(): Argument #1 ($position) is out of range +mb_ereg_search_setpos(): Argument #1 ($offset) is out of range int(20) * Position: 0 : @@ -67,5 +67,5 @@ bool(true) int(0) * Position: -30 : -mb_ereg_search_setpos(): Argument #1 ($position) is out of range +mb_ereg_search_setpos(): Argument #1 ($offset) is out of range int(0) diff --git a/ext/mbstring/tests/mb_send_mail_null_bytes.phpt b/ext/mbstring/tests/mb_send_mail_null_bytes.phpt index 221daf68ceea8..061451e3b84a4 100644 --- a/ext/mbstring/tests/mb_send_mail_null_bytes.phpt +++ b/ext/mbstring/tests/mb_send_mail_null_bytes.phpt @@ -35,4 +35,4 @@ mb_send_mail(): Argument #1 ($to) must not contain any null bytes mb_send_mail(): Argument #2 ($subject) must not contain any null bytes mb_send_mail(): Argument #3 ($message) must not contain any null bytes mb_send_mail(): Argument #4 ($additional_headers) must not contain any null bytes -mb_send_mail(): Argument #5 ($additional_parameters) must not contain any null bytes +mb_send_mail(): Argument #5 ($additional_params) must not contain any null bytes diff --git a/ext/mbstring/tests/mb_str_split_error_conditions.phpt b/ext/mbstring/tests/mb_str_split_error_conditions.phpt index 77f04aad09cd7..b1b56672f3d01 100644 --- a/ext/mbstring/tests/mb_str_split_error_conditions.phpt +++ b/ext/mbstring/tests/mb_str_split_error_conditions.phpt @@ -28,6 +28,6 @@ try { ?> --EXPECT-- -mb_str_split(): Argument #2 ($split_length) must be greater than 0 -mb_str_split(): Argument #2 ($split_length) must be greater than 0 +mb_str_split(): Argument #2 ($length) must be greater than 0 +mb_str_split(): Argument #2 ($length) must be greater than 0 mb_str_split(): Argument #3 ($encoding) must be a valid encoding, "BAD_ENCODING" given diff --git a/ext/mbstring/tests/mb_str_unknown_encoding.phpt b/ext/mbstring/tests/mb_str_unknown_encoding.phpt index 5c07c3521cfe1..64f94871e4655 100644 --- a/ext/mbstring/tests/mb_str_unknown_encoding.phpt +++ b/ext/mbstring/tests/mb_str_unknown_encoding.phpt @@ -144,7 +144,7 @@ try { --EXPECT-- mb_chr(): Argument #2 ($encoding) must be a valid encoding, "UTF-0" given mb_convert_case(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given -mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "UTF-0" +mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "UTF-0" mb_convert_kana(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given mb_decode_numericentity(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given mb_ord(): Argument #2 ($encoding) must be a valid encoding, "UTF-0" given diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 24aa55cbd7e05..b640fce9eead6 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -652,7 +652,7 @@ function strip_tags(string $str, array|string|null $allowable_tags = null): stri function setlocale(int $category, $locales, ...$rest): string|false {} /** @param array $result */ -function parse_str(string $encoded_string, &$result): void {} +function parse_str(string $string, &$result): void {} function str_getcsv(string $string, string $delimiter = ",", string $enclosure = "\"", string $escape = '\\'): array {} @@ -678,7 +678,7 @@ function str_shuffle(string $str): string {} function str_word_count(string $str, int $format = 0, ?string $charlist = null): array|int {} -function str_split(string $str, int $split_length = 1): array {} +function str_split(string $str, int $length = 1): array {} function strpbrk(string $haystack, string $char_list): string|false {} @@ -1027,7 +1027,7 @@ function link(string $target, string $link): bool {} /* mail.c */ -function mail(string $to, string $subject, string $message, array|string $additional_headers = [], string $additional_parameters = ""): bool {} +function mail(string $to, string $subject, string $message, array|string $additional_headers = [], string $additional_params = ""): bool {} /* math.c */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 6786cdb04a862..e3f8d508e1bc8 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c373aa965002f4c6a816e6574417ce59473ad7b3 */ + * Stub hash: 5e2daf7a5fb04bafdc57b7d3668b94fe573b8b2e */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1012,7 +1012,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_setlocale, 0, 2, MAY_BE_STRING|M ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_parse_str, 0, 2, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, encoded_string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_INFO(1, result) ZEND_END_ARG_INFO() @@ -1074,7 +1074,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_split, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, split_length, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -1595,7 +1595,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mail, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, additional_headers, MAY_BE_ARRAY|MAY_BE_STRING, "[]") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_parameters, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_params, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_abs, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE) diff --git a/ext/standard/tests/mail/mail_null_bytes.phpt b/ext/standard/tests/mail/mail_null_bytes.phpt index d25757cb59fce..2254b7b8fff3a 100644 --- a/ext/standard/tests/mail/mail_null_bytes.phpt +++ b/ext/standard/tests/mail/mail_null_bytes.phpt @@ -35,4 +35,4 @@ mail(): Argument #1 ($to) must not contain any null bytes mail(): Argument #2 ($subject) must not contain any null bytes mail(): Argument #3 ($message) must not contain any null bytes mail(): Argument #4 ($additional_headers) must not contain any null bytes -mail(): Argument #5 ($additional_parameters) must not contain any null bytes +mail(): Argument #5 ($additional_params) must not contain any null bytes diff --git a/ext/standard/tests/strings/str_split_variation6.phpt b/ext/standard/tests/strings/str_split_variation6.phpt index 4fc049af969d0..a8c1bbf1a927a 100644 --- a/ext/standard/tests/strings/str_split_variation6.phpt +++ b/ext/standard/tests/strings/str_split_variation6.phpt @@ -35,7 +35,7 @@ for($count = 0; $count < count($values); $count++) { --EXPECT-- *** Testing str_split() : different integer values for 'split_length' *** -- Iteration 1 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 -- Iteration 2 -- array(42) { [0]=> @@ -124,7 +124,7 @@ array(42) { string(1) "t" } -- Iteration 3 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 -- Iteration 4 -- array(1) { [0]=> @@ -143,4 +143,4 @@ array(1) { string(42) "This is a string with 123 & escape char \t" } -- Iteration 7 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 diff --git a/ext/standard/tests/strings/str_split_variation7.phpt b/ext/standard/tests/strings/str_split_variation7.phpt index 0c48596261655..17e802b2406e7 100644 --- a/ext/standard/tests/strings/str_split_variation7.phpt +++ b/ext/standard/tests/strings/str_split_variation7.phpt @@ -37,7 +37,7 @@ for($count = 0; $count < count($values); $count++) { --EXPECT-- *** Testing str_split() : different integer values for 'split_length' with heredoc 'str' *** -- Iteration 1 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 -- Iteration 2 -- array(30) { [0]=> @@ -102,7 +102,7 @@ array(30) { string(1) "." } -- Iteration 3 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 -- Iteration 4 -- array(1) { [0]=> @@ -121,4 +121,4 @@ array(1) { string(30) "string with 123,escape char ." } -- Iteration 7 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 From 0a573f9e1c0c9677e37842252a522e873eece7ac Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 28 Sep 2020 09:54:44 +0200 Subject: [PATCH 120/209] Skip one more imap test under asan Wondering if the error just moves to a different test each time we skip one? --- ext/imap/tests/imap_open_error.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt index aa964c32f11c3..fe59a6a25e5c3 100644 --- a/ext/imap/tests/imap_open_error.phpt +++ b/ext/imap/tests/imap_open_error.phpt @@ -6,6 +6,7 @@ Paul Sohier --SKIPIF-- --FILE-- Date: Mon, 28 Sep 2020 12:51:03 +0200 Subject: [PATCH 121/209] Throw warning for invalid iconv charset --- ext/iconv/iconv.c | 4 ++-- ext/iconv/tests/iconv_strlen_error2.phpt | 2 +- ext/iconv/tests/iconv_strpos_error2.phpt | 2 +- ext/iconv/tests/iconv_strrpos_error2.phpt | 2 +- ext/iconv/tests/iconv_substr_error2.phpt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 1f3a141b3e522..3a4399d350556 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -1777,11 +1777,11 @@ static void _php_iconv_show_error(php_iconv_err_t err, const char *out_charset, break; case PHP_ICONV_ERR_CONVERTER: - php_error_docref(NULL, E_NOTICE, "Cannot open converter"); + php_error_docref(NULL, E_WARNING, "Cannot open converter"); break; case PHP_ICONV_ERR_WRONG_CHARSET: - php_error_docref(NULL, E_NOTICE, "Wrong charset, conversion from `%s' to `%s' is not allowed", + php_error_docref(NULL, E_WARNING, "Wrong charset, conversion from \"%s\" to \"%s\" is not allowed", in_charset, out_charset); break; diff --git a/ext/iconv/tests/iconv_strlen_error2.phpt b/ext/iconv/tests/iconv_strlen_error2.phpt index ea2bb430fbf2a..98c784c414233 100644 --- a/ext/iconv/tests/iconv_strlen_error2.phpt +++ b/ext/iconv/tests/iconv_strlen_error2.phpt @@ -23,5 +23,5 @@ var_dump(iconv_strlen($string, $encoding)); --EXPECTF-- *** Testing iconv_strlen() : error *** -Notice: iconv_strlen(): Wrong charset, conversion from `unknown-encoding' to `UCS-4LE' is not allowed in %s on line %d +Warning: iconv_strlen(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_strpos_error2.phpt b/ext/iconv/tests/iconv_strpos_error2.phpt index b95e1e1edc9b2..48a8eff69b3fa 100644 --- a/ext/iconv/tests/iconv_strpos_error2.phpt +++ b/ext/iconv/tests/iconv_strpos_error2.phpt @@ -24,6 +24,6 @@ echo "Done"; --EXPECTF-- *** Testing iconv_strpos() : error conditions *** -Notice: iconv_strpos(): Wrong charset, conversion from `unknown-encoding' to `UCS-4LE' is not allowed in %s on line %d +Warning: iconv_strpos(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d bool(false) Done diff --git a/ext/iconv/tests/iconv_strrpos_error2.phpt b/ext/iconv/tests/iconv_strrpos_error2.phpt index 7b0155ac4d444..4e9d925530fc0 100644 --- a/ext/iconv/tests/iconv_strrpos_error2.phpt +++ b/ext/iconv/tests/iconv_strrpos_error2.phpt @@ -25,6 +25,6 @@ echo "Done"; --EXPECTF-- *** Testing iconv_strrpos() : error conditions *** -Notice: iconv_strrpos(): Wrong charset, conversion from `unknown-encoding' to `UCS-4LE' is not allowed in %s on line %d +Warning: iconv_strrpos(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d bool(false) Done diff --git a/ext/iconv/tests/iconv_substr_error2.phpt b/ext/iconv/tests/iconv_substr_error2.phpt index 70a4e958c1806..5da2d183fd634 100644 --- a/ext/iconv/tests/iconv_substr_error2.phpt +++ b/ext/iconv/tests/iconv_substr_error2.phpt @@ -25,6 +25,6 @@ echo "Done"; --EXPECTF-- *** Testing iconv_substr() : error conditions *** -Notice: iconv_substr(): Wrong charset, conversion from `unknown-encoding' to `UCS-4LE' is not allowed in %s on line %d +Warning: iconv_substr(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d bool(false) Done From 6dd840182e8242e22fa24c4d0267fa21a021ba7b Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 28 Sep 2020 14:47:45 +0300 Subject: [PATCH 122/209] Missed opline guard --- ext/opcache/jit/zend_jit_trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index f7f232f70821c..9cfbcb0cf35be 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -5329,7 +5329,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par && (p->op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0 && ((p+1)->op == ZEND_JIT_TRACE_VM || (p+1)->op == ZEND_JIT_TRACE_END) - && TRACE_FRAME_NUM_ARGS(call) < p->op_array->num_args + && (TRACE_FRAME_NUM_ARGS(call) < 0 + || TRACE_FRAME_NUM_ARGS(call) < p->op_array->num_args) && !zend_jit_trace_opline_guard(&dasm_state, (p+1)->opline)) { goto jit_failure; } From 978a44c9c6aff5bb40067ae3c38536b5e27f195f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 28 Sep 2020 14:15:04 +0200 Subject: [PATCH 123/209] Simplify iconv_strpos implementation Use a separate "reverse" flag to determine search direction, using offset == -1 to indicate this is is confusing. I initially thought the code was trying to handle negative offsets. Also deduplicate the forward and reverse cases, they really only differ in one place. --- ext/iconv/iconv.c | 70 ++++++++++++----------------------------------- 1 file changed, 17 insertions(+), 53 deletions(-) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 3a4399d350556..89f2ffb37fdfe 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -117,8 +117,6 @@ static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_ static php_iconv_err_t _php_iconv_substr(smart_str *pretval, const char *str, size_t nbytes, zend_long offset, zend_long len, const char *enc); -static php_iconv_err_t _php_iconv_strpos(size_t *pretval, const char *haystk, size_t haystk_nbytes, const char *ndl, size_t ndl_nbytes, zend_long offset, const char *enc); - static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fname, size_t fname_nbytes, const char *fval, size_t fval_nbytes, size_t max_line_len, const char *lfchars, php_iconv_enc_scheme_t enc_scheme, const char *out_charset, const char *enc); static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *str, size_t str_nbytes, const char *enc, const char **next_pos, int mode); @@ -748,7 +746,7 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pretval, static php_iconv_err_t _php_iconv_strpos(size_t *pretval, const char *haystk, size_t haystk_nbytes, const char *ndl, size_t ndl_nbytes, - zend_long offset, const char *enc) + size_t offset, const char *enc, bool reverse) { char buf[GENERIC_SUPERSET_NBYTES]; @@ -829,49 +827,7 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval, break; } } - if (offset >= 0) { - if (cnt >= (size_t)offset) { - if (_php_iconv_memequal(buf, ndl_buf_p, sizeof(buf))) { - if (match_ofs == (size_t)-1) { - match_ofs = cnt; - } - ndl_buf_p += GENERIC_SUPERSET_NBYTES; - ndl_buf_left -= GENERIC_SUPERSET_NBYTES; - if (ndl_buf_left == 0) { - *pretval = match_ofs; - break; - } - } else { - size_t i, j, lim; - - i = 0; - j = GENERIC_SUPERSET_NBYTES; - lim = (size_t)(ndl_buf_p - ZSTR_VAL(ndl_buf)); - - while (j < lim) { - if (_php_iconv_memequal(&ZSTR_VAL(ndl_buf)[j], &ZSTR_VAL(ndl_buf)[i], - GENERIC_SUPERSET_NBYTES)) { - i += GENERIC_SUPERSET_NBYTES; - } else { - j -= i; - i = 0; - } - j += GENERIC_SUPERSET_NBYTES; - } - - if (_php_iconv_memequal(buf, &ZSTR_VAL(ndl_buf)[i], sizeof(buf))) { - match_ofs += (lim - i) / GENERIC_SUPERSET_NBYTES; - i += GENERIC_SUPERSET_NBYTES; - ndl_buf_p = &ZSTR_VAL(ndl_buf)[i]; - ndl_buf_left = ZSTR_LEN(ndl_buf) - i; - } else { - match_ofs = (size_t)-1; - ndl_buf_p = ZSTR_VAL(ndl_buf); - ndl_buf_left = ZSTR_LEN(ndl_buf); - } - } - } - } else { + if (cnt >= offset) { if (_php_iconv_memequal(buf, ndl_buf_p, sizeof(buf))) { if (match_ofs == (size_t)-1) { match_ofs = cnt; @@ -880,9 +836,15 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval, ndl_buf_left -= GENERIC_SUPERSET_NBYTES; if (ndl_buf_left == 0) { *pretval = match_ofs; - ndl_buf_p = ZSTR_VAL(ndl_buf); - ndl_buf_left = ZSTR_LEN(ndl_buf); - match_ofs = -1; + if (reverse) { + /* If searching backward, continue trying to find a later match. */ + ndl_buf_p = ZSTR_VAL(ndl_buf); + ndl_buf_left = ZSTR_LEN(ndl_buf); + match_ofs = -1; + } else { + /* If searching forward, stop at first match. */ + break; + } } } else { size_t i, j, lim; @@ -1928,8 +1890,9 @@ PHP_FUNCTION(iconv_strpos) RETURN_FALSE; } - err = _php_iconv_strpos(&retval, ZSTR_VAL(haystk), ZSTR_LEN(haystk), ZSTR_VAL(ndl), ZSTR_LEN(ndl), - offset, charset); + err = _php_iconv_strpos( + &retval, ZSTR_VAL(haystk), ZSTR_LEN(haystk), ZSTR_VAL(ndl), ZSTR_LEN(ndl), + offset, charset, /* reverse */ false); _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset); if (err == PHP_ICONV_ERR_SUCCESS && retval != (size_t)-1) { @@ -1969,8 +1932,9 @@ PHP_FUNCTION(iconv_strrpos) RETURN_FALSE; } - err = _php_iconv_strpos(&retval, ZSTR_VAL(haystk), ZSTR_LEN(haystk), ZSTR_VAL(ndl), ZSTR_LEN(ndl), - -1, charset); + err = _php_iconv_strpos( + &retval, ZSTR_VAL(haystk), ZSTR_LEN(haystk), ZSTR_VAL(ndl), ZSTR_LEN(ndl), + /* offset */ 0, charset, /* reserve */ true); _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset); if (err == PHP_ICONV_ERR_SUCCESS && retval != (size_t)-1) { From 07a2f304178269398f18e5b68c9d3e8ac1bb1b12 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Thu, 24 Sep 2020 13:28:56 +0100 Subject: [PATCH 124/209] Extensions should have the final say on their compiler flags Currently compiler flags passed by extensions using the standard ``PHP_NEW_EXTENSION`` and ``PHP_ADD_SOURCES`` m4 macros are prepended before the ones defined by ``Zend/Zend.m4``. This was not really an issue before as ``Zend.m4`` only included ``-Wall`` but since the addition of ``-Wextra`` various issue about disabling flags have been brought up. A preliminary attempt was done in commit 5c1cf7669b937dcb4589cb0c8deccd343dfd85f9 but this turns out to be more or less irrelevant. The root issue is that ``PHP_NEW_EXTENSION`` and ``PHP_ADD_SOURCES`` call the ``PHP_ADD_SOURCES_X`` macro and pass their flags as the 3rd argument which prepends the flags. There exists a 6th argument for this macro which appends them but from a cursory look at https://heap.space/search?full=PHP_ADD_SOURCES_X&project=php-src this is not used. Moreover, the comment describing this macro explicitly informs that this macro should not be used directly. As such we drop the 6th argument of ``PHP_ADD_SOURCES_X`` and move the `special-flags` argument to be appended instead of prepended. Closes GH-6204 --- UPGRADING.INTERNALS | 8 ++++++++ build/php.m4 | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index d69ca710f9ff0..c15cbef3b118c 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -440,6 +440,14 @@ PHP 8.0 INTERNALS UPGRADE NOTES 2. The PHP_CHECK_GCC_ARG() m4 macro has been removed in favor of AX_CHECK_COMPILE_FLAG(). + 3. The 6th argument of PHP_ADD_SOURCES_X has been removed. + + 4. The 'special-flags' (3rd) argument of PHP_ADD_SOURCES_X are + now appended instead of prepended to previous compiler flags. + This means compiler flags passed to PHP_NEW_EXTENSION and PHP_ADD_SOURCES + are now appended, this allows to disable compiler flags set by Zend/Zend.m4 + (e.g. disable certain compiler flags enabled by -Wextra) + c. Windows build system changes - The configuration option --enable-crt-debug has been removed. The VC diff --git a/build/php.m4 b/build/php.m4 index 1f77f38e572f2..b4cf3edcf3fda 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -218,7 +218,7 @@ ifelse($1,shared,[ ]) dnl -dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]]) +dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared]]]) dnl dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the name of the dnl array target-var directly, as well as whether shared objects will be built @@ -251,10 +251,10 @@ dnl Append to the array which has been dynamically chosen at m4 time. dnl Choose the right compiler/flags/etc. for the source-file. case $ac_src in - *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;; + *.c[)] ac_comp="$b_c_pre $ac_inc $b_c_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.s[)] ac_comp="$b_c_pre $ac_inc $b_c_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.S[)] ac_comp="$b_c_pre $ac_inc $b_c_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; + *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; esac dnl Create a rule for the object/source combo. From 42168304b58ab939634a99a678ddd56eada46e39 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 28 Sep 2020 13:11:07 +0200 Subject: [PATCH 125/209] Consistently handle out of bounds offsets in iconv_strpos() Same as in all other strpos() style functions, throw ValueError on out of bounds offset. --- ext/iconv/iconv.c | 13 +++++-- ext/iconv/php_iconv.h | 3 +- ext/iconv/tests/iconv_strpos.phpt | 17 ++++++--- ext/iconv/tests/iconv_strpos_variation5.phpt | 38 +++++++++++--------- 4 files changed, 46 insertions(+), 25 deletions(-) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 89f2ffb37fdfe..84f24baabbde7 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -884,6 +884,10 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval, iconv_close(cd); + if (err == PHP_ICONV_ERR_SUCCESS && offset > cnt) { + return PHP_ICONV_ERR_OUT_BY_BOUNDS; + } + return err; } /* }}} */ @@ -1764,6 +1768,10 @@ static void _php_iconv_show_error(php_iconv_err_t err, const char *out_charset, php_error_docref(NULL, E_WARNING, "Malformed string"); break; + case PHP_ICONV_ERR_OUT_BY_BOUNDS: + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); + break; + default: /* other error */ php_error_docref(NULL, E_NOTICE, "Unknown error (%d)", errno); @@ -1881,12 +1889,13 @@ PHP_FUNCTION(iconv_strpos) } offset += haystk_len; if (offset < 0) { /* If offset before start */ - php_error_docref(NULL, E_WARNING, "Offset not contained in string."); - RETURN_FALSE; + zend_argument_value_error(3, "must be contained in argument #1 ($haystack)"); + RETURN_THROWS(); } } if (ZSTR_LEN(ndl) < 1) { + // TODO: Support empty needles! RETURN_FALSE; } diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index 89506fab530b2..901ba440fd683 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -87,7 +87,8 @@ typedef enum _php_iconv_err_t { PHP_ICONV_ERR_ILLEGAL_CHAR = 5, PHP_ICONV_ERR_UNKNOWN = 6, PHP_ICONV_ERR_MALFORMED = 7, - PHP_ICONV_ERR_ALLOC = 8 + PHP_ICONV_ERR_ALLOC = 8, + PHP_ICONV_ERR_OUT_BY_BOUNDS = 9 } php_iconv_err_t; /* }}} */ diff --git a/ext/iconv/tests/iconv_strpos.phpt b/ext/iconv/tests/iconv_strpos.phpt index 1dafd6c06b482..df9427d2c621b 100644 --- a/ext/iconv/tests/iconv_strpos.phpt +++ b/ext/iconv/tests/iconv_strpos.phpt @@ -16,14 +16,19 @@ function foo($haystk, $needle, $offset, $to_charset = false, $from_charset = fal } catch (ValueError $exception) { echo $exception->getMessage() . "\n"; } - if ($to_charset !== false) { - var_dump(iconv_strpos($haystk, $needle, $offset, $to_charset)); - } else { - var_dump(iconv_strpos($haystk, $needle, $offset)); + try { + if ($to_charset !== false) { + var_dump(iconv_strpos($haystk, $needle, $offset, $to_charset)); + } else { + var_dump(iconv_strpos($haystk, $needle, $offset)); + } + } catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; } } foo("abecdbcdabef", "bcd", -1); foo("abecdbcdabef", "bcd", -7); +foo("abecdbcdabef", "bcd", 12); foo("abecdbcdabef", "bcd", 100000); foo("abcabcabcdabcababcdabc", "bcd", 0); foo("abcabcabcdabcababcdabc", "bcd", 10); @@ -41,8 +46,10 @@ bool(false) bool(false) int(5) int(5) -strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) bool(false) +bool(false) +strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) int(7) int(7) int(16) diff --git a/ext/iconv/tests/iconv_strpos_variation5.phpt b/ext/iconv/tests/iconv_strpos_variation5.phpt index 4feef545a4299..625c44efa7e50 100644 --- a/ext/iconv/tests/iconv_strpos_variation5.phpt +++ b/ext/iconv/tests/iconv_strpos_variation5.phpt @@ -32,25 +32,29 @@ $needle_mb = base64_decode('44CC'); for ($i = -30; $i <= 60; $i += 10) { echo "\n**-- Offset is: $i --**\n"; echo "-- ASCII String --\n"; - var_dump(iconv_strpos($string_ascii, $needle_ascii, $i)); + try { + var_dump(iconv_strpos($string_ascii, $needle_ascii, $i)); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } echo "--Multibyte String --\n"; - var_dump(iconv_strpos($string_mb, $needle_mb, $i, 'UTF-8')); + try { + var_dump(iconv_strpos($string_mb, $needle_mb, $i, 'UTF-8')); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } } echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing iconv_strpos() : usage variations *** **-- Offset is: -30 --** -- ASCII String -- - -Warning: iconv_strpos(): Offset not contained in string. in %s on line %d -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- - -Warning: iconv_strpos(): Offset not contained in string. in %s on line %d -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: -20 --** -- ASCII String -- @@ -84,25 +88,25 @@ int(20) **-- Offset is: 30 --** -- ASCII String -- -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 40 --** -- ASCII String -- -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 50 --** -- ASCII String -- -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) **-- Offset is: 60 --** -- ASCII String -- -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) --Multibyte String -- -bool(false) +iconv_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) Done From d1ddccdc194887373aaede37b7edc4ff166f0580 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 28 Sep 2020 16:18:06 +0300 Subject: [PATCH 126/209] Fixed usage of invalid frame for exit point --- ext/opcache/jit/zend_jit_trace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 9cfbcb0cf35be..9b01a0fcca228 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -5322,6 +5322,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par while (prev_opline->opcode == ZEND_EXT_FCALL_BEGIN || prev_opline->opcode == ZEND_TICKS) { prev_opline--; } + JIT_G(current_frame) = call; if ((prev_opline->opcode == ZEND_SEND_ARRAY || prev_opline->opcode == ZEND_SEND_UNPACK || prev_opline->opcode == ZEND_CHECK_UNDEF_ARGS) @@ -5334,6 +5335,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par && !zend_jit_trace_opline_guard(&dasm_state, (p+1)->opline)) { goto jit_failure; } + JIT_G(current_frame) = frame; } } From 1efbc2cf584287346c3e28955fae3c4891d4e9c4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 28 Sep 2020 15:41:31 +0200 Subject: [PATCH 127/209] Remove unused XSL_DOMOBJ_NEW() macro And inline the XSL_REGISTER_CLASS() macro. --- ext/xsl/php_xsl.c | 6 ++++-- ext/xsl/php_xsl.h | 13 ------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index 44debcaca744e..300b196d03c69 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -111,7 +111,6 @@ zend_object *xsl_objects_new(zend_class_entry *class_type) /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(xsl) { - zend_class_entry ce; memcpy(&xsl_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); @@ -119,7 +118,10 @@ PHP_MINIT_FUNCTION(xsl) xsl_object_handlers.clone_obj = NULL; xsl_object_handlers.free_obj = xsl_objects_free_storage; - REGISTER_XSL_CLASS(ce, "XSLTProcessor", NULL, class_XSLTProcessor_methods, xsl_xsltprocessor_class_entry); + INIT_CLASS_ENTRY(ce, "XSLTProcessor", class_XSLTProcessor_methods); + ce.create_object = xsl_objects_new; + xsl_xsltprocessor_class_entry = zend_register_internal_class(&ce); + #ifdef HAVE_XSL_EXSLT exsltRegisterAll(); #endif diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index 6085925024396..41e2c0b4e6169 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -80,19 +80,6 @@ void php_xsl_create_object(xsltStylesheetPtr obj, zval *wrapper_in, zval *return void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs); void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs); -#define REGISTER_XSL_CLASS(ce, name, parent_ce, funcs, entry) \ -INIT_CLASS_ENTRY(ce, name, funcs); \ -ce.create_object = xsl_objects_new; \ -entry = zend_register_internal_class_ex(&ce, parent_ce); - -#define XSL_DOMOBJ_NEW(zval, obj, ret) \ - zval = php_xsl_create_object(obj, ret, zval, return_value); \ - if (ZVAL_IS_NULL(zval)) { \ - php_error_docref(NULL, E_WARNING, "Cannot create required DOM object"); \ - RETURN_FALSE; \ - } - - PHP_MINIT_FUNCTION(xsl); PHP_MSHUTDOWN_FUNCTION(xsl); PHP_RINIT_FUNCTION(xsl); From 2f601d84cdeeca5c5d15672acbb12166c7440200 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 28 Sep 2020 15:55:22 +0200 Subject: [PATCH 128/209] Promote warnings in ext/xsl --- ...ocessor_importStylesheet-invalidparam.phpt | 11 +++-- ...rocessor_transformToDoc_no_stylesheet.phpt | 17 +++++++ ext/xsl/xsltprocessor.c | 45 +++++++++---------- 3 files changed, 46 insertions(+), 27 deletions(-) create mode 100644 ext/xsl/tests/xsltprocessor_transformToDoc_no_stylesheet.phpt diff --git a/ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt b/ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt index 91bd07cf8a121..3849f69428aff 100644 --- a/ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt +++ b/ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt @@ -11,9 +11,12 @@ if (!extension_loaded('xsl')) { $xslt = new XSLTProcessor(); $dummy = new stdClass(); -var_dump($xslt->importStylesheet($dummy)); +try { + var_dump($xslt->importStylesheet($dummy)); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} ?> ---EXPECTF-- -Warning: Invalid Document in %s on line %d -bool(false) +--EXPECT-- +XSLTProcessor::importStylesheet(): Argument #1 ($stylesheet) must be a valid XML node diff --git a/ext/xsl/tests/xsltprocessor_transformToDoc_no_stylesheet.phpt b/ext/xsl/tests/xsltprocessor_transformToDoc_no_stylesheet.phpt new file mode 100644 index 0000000000000..c590b694fa005 --- /dev/null +++ b/ext/xsl/tests/xsltprocessor_transformToDoc_no_stylesheet.phpt @@ -0,0 +1,17 @@ +--TEST-- +Calling XSLTProcessor::transformToDoc() without stylesheet +--FILE-- +transformToDoc($doc); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +XSLTProcessor::transformToDoc() can only be called after a stylesheet has been imported diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index d900d951033cb..9498ba576c6e2 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -66,27 +66,22 @@ static char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params) memset((char *)params, 0, parsize); ZEND_HASH_FOREACH_STR_KEY_VAL(parht, string_key, value) { - if (string_key == NULL) { - php_error_docref(NULL, E_WARNING, "Invalid argument or parameter array"); - efree(params); - return NULL; - } else { - if (Z_TYPE_P(value) != IS_STRING) { - if (!try_convert_to_string(value)) { - efree(params); - return NULL; - } + ZEND_ASSERT(string_key != NULL); + if (Z_TYPE_P(value) != IS_STRING) { + if (!try_convert_to_string(value)) { + efree(params); + return NULL; } + } - if (!xpath_params) { - xpath_expr = php_xsl_xslt_string_to_xpathexpr(Z_STRVAL_P(value)); - } else { - xpath_expr = estrndup(Z_STRVAL_P(value), Z_STRLEN_P(value)); - } - if (xpath_expr) { - params[i++] = estrndup(ZSTR_VAL(string_key), ZSTR_LEN(string_key)); - params[i++] = xpath_expr; - } + if (!xpath_params) { + xpath_expr = php_xsl_xslt_string_to_xpathexpr(Z_STRVAL_P(value)); + } else { + xpath_expr = estrndup(Z_STRVAL_P(value), Z_STRLEN_P(value)); + } + if (xpath_expr) { + params[i++] = estrndup(ZSTR_VAL(string_key), ZSTR_LEN(string_key)); + params[i++] = xpath_expr; } } ZEND_HASH_FOREACH_END(); @@ -336,8 +331,8 @@ PHP_METHOD(XSLTProcessor, importStylesheet) doc = nodep->doc; } if (doc == NULL) { - php_error(E_WARNING, "Invalid Document"); - RETURN_FALSE; + zend_argument_value_error(1, "must be a valid XML node"); + RETURN_THROWS(); } /* libxslt uses _private, so we must copy the imported @@ -417,13 +412,17 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl if (node) { doc = node->doc; } + if (doc == NULL) { - php_error_docref(NULL, E_WARNING, "Invalid Document"); + zend_argument_value_error(1, "must be a valid XML node"); return NULL; } if (style == NULL) { - php_error_docref(NULL, E_WARNING, "No stylesheet associated to this object"); + zend_string *name = get_active_function_or_method_name(); + zend_throw_error(NULL, "%s() can only be called after a stylesheet has been imported", + ZSTR_VAL(name)); + zend_string_release(name); return NULL; } From 2a71cb3ce16678c79b4294ba748b6eaab45c9961 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 28 Sep 2020 17:04:34 +0300 Subject: [PATCH 129/209] Improved trace selection rules --- ext/opcache/jit/zend_jit_trace.c | 46 +++++++++++++++++++++++- ext/opcache/jit/zend_jit_vm_helpers.c | 50 +++++++++++++++++++++++---- 2 files changed, 88 insertions(+), 8 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 9b01a0fcca228..2d010abea0014 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -6251,6 +6251,28 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const } stop &= ~ZEND_JIT_TRACE_HALT; + if (UNEXPECTED(trace_buffer[1].opline != orig_opline)) { + orig_opline = trace_buffer[1].opline; + op_array = (zend_op_array*)trace_buffer[0].op_array; + jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); + offset = jit_extension->offset; + if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { + const zend_op_array *op_array = trace_buffer[0].op_array; + const zend_op *opline = trace_buffer[1].opline; + zend_jit_op_array_trace_extension *jit_extension = + (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); + size_t offset = jit_extension->offset; + + fprintf(stderr, "---- TRACE %d start (%s) %s() %s:%d\n", + trace_num, + zend_jit_trace_star_desc(ZEND_OP_TRACE_INFO(opline, offset)->trace_flags), + op_array->function_name ? + ZSTR_VAL(op_array->function_name) : "$main", + ZSTR_VAL(op_array->filename), + opline->lineno); + } + } + if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { zend_jit_dump_trace(trace_buffer, NULL); } @@ -6539,6 +6561,24 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 } stop &= ~ZEND_JIT_TRACE_HALT; + if (UNEXPECTED(trace_buffer->start != ZEND_JIT_TRACE_START_SIDE)) { + if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { + const zend_op_array *op_array = trace_buffer[0].op_array; + const zend_op *opline = trace_buffer[1].opline; + zend_jit_op_array_trace_extension *jit_extension = + (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); + size_t offset = jit_extension->offset; + + fprintf(stderr, "---- TRACE %d start (%s) %s() %s:%d\n", + trace_num, + zend_jit_trace_star_desc(ZEND_OP_TRACE_INFO(opline, offset)->trace_flags), + op_array->function_name ? + ZSTR_VAL(op_array->function_name) : "$main", + ZSTR_VAL(op_array->filename), + opline->lineno); + } + } + if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { zend_jit_dump_trace(trace_buffer, NULL); } @@ -6557,7 +6597,7 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 zend_jit_trace_stop_description[stop]); } } - if (EXPECTED(stop != ZEND_JIT_TRACE_STOP_LOOP)) { + if (EXPECTED(trace_buffer->start == ZEND_JIT_TRACE_START_SIDE)) { stop = zend_jit_compile_side_trace(trace_buffer, parent_num, exit_num, polymorphism); } else { const zend_op_array *op_array = trace_buffer[0].op_array; @@ -6591,6 +6631,10 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 parent_num, exit_num); } } + if (ZEND_JIT_TRACE_STOP_REPEAT(stop)) { + execute_data = EG(current_execute_data); + return zend_jit_trace_hot_root(execute_data, EX(opline)); + } } if (JIT_G(debug) & (ZEND_JIT_DEBUG_TRACE_STOP|ZEND_JIT_DEBUG_TRACE_ABORT|ZEND_JIT_DEBUG_TRACE_COMPILED|ZEND_JIT_DEBUG_TRACE_BLACKLIST)) { diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 49adcfb61499d..5ca1fb25aa618 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -503,6 +503,15 @@ static int zend_jit_trace_call_level(const zend_execute_data *call) return call_level; } +static int zend_jit_trace_subtrace(zend_jit_trace_rec *trace_buffer, int start, int end, uint8_t event, const zend_op_array *op_array, const zend_op *opline) +{ + int idx; + + TRACE_START(ZEND_JIT_TRACE_START, event, op_array, opline); + memmove(trace_buffer + idx, trace_buffer + start, (end - start) * sizeof(zend_jit_trace_rec)); + return idx + (end - start); +} + /* * Trace Linking Rules * =================== @@ -559,6 +568,9 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, int backtrack_ret_recursion = -1; int backtrack_ret_recursion_level = 0; int loop_unroll_limit = 0; + int last_loop = -1; + int last_loop_level = -1; + const zend_op *last_loop_opline = NULL; uint32_t megamorphic = 0; const zend_op_array *unrolled_calls[ZEND_JIT_TRACE_MAX_CALL_DEPTH + ZEND_JIT_TRACE_MAX_RET_DEPTH]; #ifdef HAVE_GCC_GLOBAL_REGS @@ -832,6 +844,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, unrolled_calls[ret_level] = &EX(func)->op_array; ret_level++; + last_loop_opline = NULL; if (prev_call) { int ret = zend_jit_trace_record_fake_init_call(prev_call, trace_buffer, idx, 0, &megamorphic, ret_level + level); @@ -854,6 +867,9 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, } } else { level--; + if (level < last_loop_level) { + last_loop_opline = NULL; + } TRACE_RECORD(ZEND_JIT_TRACE_BACK, 0, op_array); } } @@ -960,24 +976,44 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, stop = ZEND_JIT_TRACE_STOP_BLACK_LIST; break; } else if (trace_flags & ZEND_JIT_TRACE_START_LOOP) { - if (start != ZEND_JIT_TRACE_START_SIDE) { - uint8_t bad_stop; + uint8_t bad_stop; + if (start != ZEND_JIT_TRACE_START_SIDE) { if (opline == orig_opline && level + ret_level == 0) { stop = ZEND_JIT_TRACE_STOP_LOOP; break; } - /* Fail to try creating a trace for inner loop first. - If this doesn't work try unroling loop. */ + } + + if (start != ZEND_JIT_TRACE_START_SIDE + || level + ret_level != 0) { + /* First try creating a trace for inner loop. + If this doesn't work try loop unroling. */ bad_stop = zend_jit_trace_bad_stop_event(opline, JIT_G(blacklist_root_trace) / 2); if (bad_stop != ZEND_JIT_TRACE_STOP_INNER_LOOP && bad_stop != ZEND_JIT_TRACE_STOP_LOOP_EXIT) { - stop = ZEND_JIT_TRACE_STOP_INNER_LOOP; - break; + if (start == ZEND_JIT_TRACE_START_SIDE + || zend_jit_trace_bad_stop_event(orig_opline, + JIT_G(blacklist_root_trace) / 2) != ZEND_JIT_TRACE_STOP_INNER_LOOP) { + stop = ZEND_JIT_TRACE_STOP_INNER_LOOP; + break; + } } } - if (loop_unroll_limit < JIT_G(max_loops_unroll)) { + + if (opline == last_loop_opline + && level == last_loop_level) { + idx = zend_jit_trace_subtrace(trace_buffer, + last_loop, idx, ZEND_JIT_TRACE_START_LOOP, op_array, opline); + start = ZEND_JIT_TRACE_START_LOOP; + stop = ZEND_JIT_TRACE_STOP_LOOP; + ret_level = 0; + break; + } else if (loop_unroll_limit < JIT_G(max_loops_unroll)) { + last_loop = idx; + last_loop_opline = opline; + last_loop_level = level; loop_unroll_limit++; } else { stop = ZEND_JIT_TRACE_STOP_LOOP_UNROLL; From 189751cbebdc77f7e2eb18db1bba3c3cfc6738ed Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 28 Sep 2020 15:14:44 +0100 Subject: [PATCH 130/209] Promote notice to ValueError for invalid hint key --- ext/sockets/sockets.c | 5 ++-- ext/sockets/tests/socket_addrinfo_lookup.phpt | 24 +++++++++---------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 729477ab59f3e..0b21c4f6843ff 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2315,8 +2315,9 @@ PHP_FUNCTION(socket_addrinfo_lookup) } else if (zend_string_equals_literal(key, "ai_family")) { hints.ai_family = zval_get_long(hint); } else { - /* TODO Promote to warning/error? */ - php_error_docref(NULL, E_NOTICE, "Unknown hint %s", ZSTR_VAL(key)); + zend_argument_value_error(3, "must only contain array keys \"ai_flags\", \"ai_socktype\", " + "\"ai_protocol\", or \"ai_family\""); + RETURN_THROWS(); } } } ZEND_HASH_FOREACH_END(); diff --git a/ext/sockets/tests/socket_addrinfo_lookup.phpt b/ext/sockets/tests/socket_addrinfo_lookup.phpt index 2d9ef391969c1..d85fef519e216 100644 --- a/ext/sockets/tests/socket_addrinfo_lookup.phpt +++ b/ext/sockets/tests/socket_addrinfo_lookup.phpt @@ -7,16 +7,16 @@ if (!extension_loaded('sockets')) { } --FILE-- AF_INET, - 'ai_socktype' => SOCK_DGRAM, - 'invalid' => null, -)); -var_dump($addrinfo[0]); -echo "Done"; -?> ---EXPECTF-- -Notice: socket_addrinfo_lookup(): Unknown hint invalid in %ssocket_addrinfo_lookup.php on line %d -object(AddressInfo)#%d (0) { +try { + $addrinfo = socket_addrinfo_lookup('127.0.0.1', 2000, array( + 'ai_family' => AF_INET, + 'ai_socktype' => SOCK_DGRAM, + 'invalid' => null, + )); + var_dump($addrinfo[0]); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; } -Done +?> +--EXPECT-- +socket_addrinfo_lookup(): Argument #3 ($hints) must only contain array keys "ai_flags", "ai_socktype", "ai_protocol", or "ai_family" From c3206c28d7bf637eaf340a36ef2fd21165e260f2 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 28 Sep 2020 20:29:46 +0300 Subject: [PATCH 131/209] Dump class names --- ext/opcache/jit/zend_jit_trace.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 2d010abea0014..102d6a52f66f7 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2027,18 +2027,22 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_TSSA)) { if (parent_trace) { - fprintf(stderr, "---- TRACE %d TSSA start (side trace %d/%d) %s() %s:%d\n", + fprintf(stderr, "---- TRACE %d TSSA start (side trace %d/%d) %s%s%s() %s:%d\n", ZEND_JIT_TRACE_NUM, parent_trace, exit_num, + trace_buffer->op_array->scope ? ZSTR_VAL(trace_buffer->op_array->scope->name) : "", + trace_buffer->op_array->scope ? "::" : "", trace_buffer->op_array->function_name ? ZSTR_VAL(trace_buffer->op_array->function_name) : "$main", ZSTR_VAL(trace_buffer->op_array->filename), trace_buffer[1].opline->lineno); } else { - fprintf(stderr, "---- TRACE %d TSSA start (%s) %s() %s:%d\n", + fprintf(stderr, "---- TRACE %d TSSA start (%s) %s%s%s() %s:%d\n", ZEND_JIT_TRACE_NUM, zend_jit_trace_star_desc(trace_buffer->start), + trace_buffer->op_array->scope ? ZSTR_VAL(trace_buffer->op_array->scope->name) : "", + trace_buffer->op_array->scope ? "::" : "", trace_buffer->op_array->function_name ? ZSTR_VAL(trace_buffer->op_array->function_name) : "$main", ZSTR_VAL(trace_buffer->op_array->filename), @@ -6227,9 +6231,11 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const } if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { - fprintf(stderr, "---- TRACE %d start (%s) %s() %s:%d\n", + fprintf(stderr, "---- TRACE %d start (%s) %s%s%s() %s:%d\n", trace_num, zend_jit_trace_star_desc(ZEND_OP_TRACE_INFO(opline, offset)->trace_flags), + EX(func)->op_array.scope ? ZSTR_VAL(EX(func)->op_array.scope->name) : "", + EX(func)->op_array.scope ? "::" : "", EX(func)->op_array.function_name ? ZSTR_VAL(EX(func)->op_array.function_name) : "$main", ZSTR_VAL(EX(func)->op_array.filename), @@ -6263,9 +6269,11 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); size_t offset = jit_extension->offset; - fprintf(stderr, "---- TRACE %d start (%s) %s() %s:%d\n", + fprintf(stderr, "---- TRACE %d start (%s) %s%s%s() %s:%d\n", trace_num, zend_jit_trace_star_desc(ZEND_OP_TRACE_INFO(opline, offset)->trace_flags), + op_array->scope ? ZSTR_VAL(op_array->scope->name) : "", + op_array->scope ? "::" : "", op_array->function_name ? ZSTR_VAL(op_array->function_name) : "$main", ZSTR_VAL(op_array->filename), @@ -6519,8 +6527,10 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 } if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { - fprintf(stderr, "---- TRACE %d start (side trace %d/%d) %s() %s:%d\n", + fprintf(stderr, "---- TRACE %d start (side trace %d/%d) %s%s%s() %s:%d\n", trace_num, parent_num, exit_num, + EX(func)->op_array.scope ? ZSTR_VAL(EX(func)->op_array.scope->name) : "", + EX(func)->op_array.scope ? "::" : "", EX(func)->op_array.function_name ? ZSTR_VAL(EX(func)->op_array.function_name) : "$main", ZSTR_VAL(EX(func)->op_array.filename), @@ -6569,9 +6579,11 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); size_t offset = jit_extension->offset; - fprintf(stderr, "---- TRACE %d start (%s) %s() %s:%d\n", + fprintf(stderr, "---- TRACE %d start (%s) %s%s%s() %s:%d\n", trace_num, zend_jit_trace_star_desc(ZEND_OP_TRACE_INFO(opline, offset)->trace_flags), + op_array->scope ? ZSTR_VAL(op_array->scope->name) : "", + op_array->scope ? "::" : "", op_array->function_name ? ZSTR_VAL(op_array->function_name) : "$main", ZSTR_VAL(op_array->filename), @@ -6706,9 +6718,11 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf if (UNEXPECTED(Z_TYPE_P(val) == IS_UNDEF)) { /* Undefined array index or property */ if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_EXIT) { - fprintf(stderr, " TRACE %d exit %d %s() %s:%d\n", + fprintf(stderr, " TRACE %d exit %d %s%s%s() %s:%d\n", trace_num, exit_num, + EX(func)->op_array.scope ? ZSTR_VAL(EX(func)->op_array.scope->name) : "", + EX(func)->op_array.scope ? "::" : "", EX(func)->op_array.function_name ? ZSTR_VAL(EX(func)->op_array.function_name) : "$main", ZSTR_VAL(EX(func)->op_array.filename), @@ -6768,9 +6782,11 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf EX(opline) < EX(func)->op_array.opcodes + EX(func)->op_array.last); if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_EXIT) { - fprintf(stderr, " TRACE %d exit %d %s() %s:%d\n", + fprintf(stderr, " TRACE %d exit %d %s%s%s() %s:%d\n", trace_num, exit_num, + EX(func)->op_array.scope ? ZSTR_VAL(EX(func)->op_array.scope->name) : "", + EX(func)->op_array.scope ? "::" : "", EX(func)->op_array.function_name ? ZSTR_VAL(EX(func)->op_array.function_name) : "$main", ZSTR_VAL(EX(func)->op_array.filename), From 9fab1b90abfe9a2b25e4b1c88a232746c7a66031 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 25 Sep 2020 02:43:44 +0100 Subject: [PATCH 132/209] Drop ZPP check in PDO MySQLi test This test is marked as XFAIL so it doesn't get looked at. It checks that the method is called without arguments which is a ZPP concern --- ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt index c8f188a738908..eac4b9e4d80af 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt @@ -33,10 +33,6 @@ if (!MySQLPDOTest::isPDOMySQLnd()) if (false !== ($tmp = $stmt->nextRowSet())) printf("[002] Expecting false got %s\n", var_export($tmp, true)); - // TODO: should give a warning, but its PDO, let's ignore the missing warning for now - if (false !== ($tmp = $stmt->nextRowSet(1))) - printf("[003] Expecting false got %s\n", var_export($tmp, true)); - function test_proc1($db) { $stmt = $db->query('SELECT @VERSION as _version'); From 24e2ba26b457da2c93aae75c7193c519b5a0aed9 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 28 Sep 2020 17:44:13 +0100 Subject: [PATCH 133/209] Do not register quoter handler in ODBC This functionallity is not (yet) implemented and therefore gives a bogus error while using PDO --- ext/pdo_odbc/odbc_driver.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index 5b35455ede1b3..5631da7a36e50 100644 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -257,12 +257,14 @@ static zend_long odbc_handle_doer(pdo_dbh_t *dbh, const char *sql, size_t sql_le return row_count; } +/* TODO: Do ODBC quoter static int odbc_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unquotedlen, char **quoted, size_t *quotedlen, enum pdo_param_type param_type ) { - /* pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data; */ - /* TODO: figure it out */ + // pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data; + // TODO: figure it out return 0; } +*/ static int odbc_handle_begin(pdo_dbh_t *dbh) { @@ -373,7 +375,7 @@ static const struct pdo_dbh_methods odbc_methods = { odbc_handle_closer, odbc_handle_preparer, odbc_handle_doer, - odbc_handle_quoter, + NULL, /* quoter */ odbc_handle_begin, odbc_handle_commit, odbc_handle_rollback, From a5cf82802d097f7c327ee7e4eafe2224a5c9f78b Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 25 Sep 2020 00:41:21 +0100 Subject: [PATCH 134/209] Make various failure conditions in PDO unconditional errors This includes TypeErrors, ValueErrors, Error for uninitialized objects and invalid user classes/callable instanciation Closes GH-6212 --- ext/pdo/pdo_dbh.c | 150 ++--- ext/pdo/pdo_stmt.c | 562 ++++++++++-------- ext/pdo/pdo_stmt.stub.php | 14 +- ext/pdo/pdo_stmt_arginfo.h | 6 +- ext/pdo/php_pdo.h | 10 +- ext/pdo/php_pdo_int.h | 3 +- ext/pdo/tests/bug_44159.phpt | 63 +- ext/pdo/tests/bug_44173.phpt | 61 +- ext/pdo/tests/pdo_038.phpt | 21 +- ext/pdo/tests/pdo_quote_empty_string.phpt | 31 + .../tests/pdo_mysql_attr_errmode.phpt | 48 +- .../tests/pdo_mysql_attr_oracle_nulls.phpt | 30 +- .../tests/pdo_mysql_attr_statement_class.phpt | 57 +- .../tests/pdo_mysql_prepare_emulated.phpt | 9 +- .../tests/pdo_mysql_prepare_native.phpt | 9 +- .../tests/pdo_mysql_stmt_getcolumnmeta.phpt | 8 +- .../tests/bug_44159_sqlite_version.phpt | 22 + ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt | 112 ++-- 18 files changed, 674 insertions(+), 542 deletions(-) create mode 100644 ext/pdo/tests/pdo_quote_empty_string.phpt create mode 100644 ext/pdo_sqlite/tests/bug_44159_sqlite_version.phpt diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 780de94707b1e..0f5eaab2e6e62 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -425,12 +425,10 @@ PHP_METHOD(PDO, __construct) static zval *pdo_stmt_instantiate(pdo_dbh_t *dbh, zval *object, zend_class_entry *dbstmt_ce, zval *ctor_args) /* {{{ */ { if (!Z_ISUNDEF_P(ctor_args)) { - if (Z_TYPE_P(ctor_args) != IS_ARRAY) { - pdo_raise_impl_error(dbh, NULL, "HY000", "constructor arguments must be passed as an array"); - return NULL; - } + /* This implies an error within PDO if this does not hold */ + ZEND_ASSERT(Z_TYPE_P(ctor_args) == IS_ARRAY); if (!dbstmt_ce->constructor) { - pdo_raise_impl_error(dbh, NULL, "HY000", "user-supplied statement does not accept constructor arguments"); + zend_throw_error(NULL, "User-supplied statement does not accept constructor arguments"); return NULL; } } @@ -487,7 +485,7 @@ PHP_METHOD(PDO, prepare) pdo_stmt_t *stmt; char *statement; size_t statement_len; - zval *options = NULL, *opt, *item, ctor_args; + zval *options = NULL, *value, *item, ctor_args; zend_class_entry *dbstmt_ce, *pce; pdo_dbh_object_t *dbh_obj = Z_PDO_OBJECT_P(ZEND_THIS); pdo_dbh_t *dbh = dbh_obj->inner; @@ -498,42 +496,44 @@ PHP_METHOD(PDO, prepare) Z_PARAM_ARRAY(options) ZEND_PARSE_PARAMETERS_END(); - PDO_DBH_CLEAR_ERR(); PDO_CONSTRUCT_CHECK; - if (ZEND_NUM_ARGS() > 1 && (opt = zend_hash_index_find(Z_ARRVAL_P(options), PDO_ATTR_STATEMENT_CLASS)) != NULL) { - if (Z_TYPE_P(opt) != IS_ARRAY || (item = zend_hash_index_find(Z_ARRVAL_P(opt), 0)) == NULL - || Z_TYPE_P(item) != IS_STRING - || (pce = zend_lookup_class(Z_STR_P(item))) == NULL - ) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); " - "the classname must be a string specifying an existing class" - ); - PDO_HANDLE_DBH_ERR(); - RETURN_FALSE; + if (statement_len == 0) { + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); + } + + PDO_DBH_CLEAR_ERR(); + + if (options && (value = zend_hash_index_find(Z_ARRVAL_P(options), PDO_ATTR_STATEMENT_CLASS)) != NULL) { + if (Z_TYPE_P(value) != IS_ARRAY) { + zend_type_error("PDO::ATTR_STATEMENT_CLASS value must be of type array, %s given", + zend_zval_type_name(value)); + RETURN_THROWS(); + } + if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 0)) == NULL) { + zend_value_error("PDO::ATTR_STATEMENT_CLASS value must be an array with the format " + "array(classname, array(ctor_args))"); + RETURN_THROWS(); + } + if (Z_TYPE_P(item) != IS_STRING || (pce = zend_lookup_class(Z_STR_P(item))) == NULL) { + zend_type_error("PDO::ATTR_STATEMENT_CLASS class must be a valid class"); + RETURN_THROWS(); } dbstmt_ce = pce; if (!instanceof_function(dbstmt_ce, pdo_dbstmt_ce)) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "user-supplied statement class must be derived from PDOStatement"); - PDO_HANDLE_DBH_ERR(); - RETURN_FALSE; + zend_type_error("PDO::ATTR_STATEMENT_CLASS class must be derived from PDOStatement"); + RETURN_THROWS(); } if (dbstmt_ce->constructor && !(dbstmt_ce->constructor->common.fn_flags & (ZEND_ACC_PRIVATE|ZEND_ACC_PROTECTED))) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "user-supplied statement class cannot have a public constructor"); - PDO_HANDLE_DBH_ERR(); - RETURN_FALSE; + zend_type_error("User-supplied statement class cannot have a public constructor"); + RETURN_THROWS(); } - if ((item = zend_hash_index_find(Z_ARRVAL_P(opt), 1)) != NULL) { + if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 1)) != NULL) { if (Z_TYPE_P(item) != IS_ARRAY) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "PDO::ATTR_STATEMENT_CLASS requires format array(classname, ctor_args); " - "ctor_args must be an array" - ); - PDO_HANDLE_DBH_ERR(); - RETURN_FALSE; + zend_type_error("PDO::ATTR_STATEMENT_CLASS ctor_args must be of type ?array, %s given", + zend_zval_type_name(value)); + RETURN_THROWS(); } ZVAL_COPY_VALUE(&ctor_args, item); } else { @@ -544,11 +544,10 @@ PHP_METHOD(PDO, prepare) ZVAL_COPY_VALUE(&ctor_args, &dbh->def_stmt_ctor_args); } + /* Need to check if pdo_stmt_instantiate() throws an exception unconditionally to see if can change the RETURN_FALSE; */ if (!pdo_stmt_instantiate(dbh, return_value, dbstmt_ce, &ctor_args)) { if (EXPECTED(!EG(exception))) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "failed to instantiate user-supplied statement class" - ); + zend_throw_error(NULL, "Cannot instantiate user-supplied statement class"); } PDO_HANDLE_DBH_ERR(); RETURN_FALSE; @@ -679,10 +678,10 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* { zend_long lval; +/* TODO: Make distinction between numeric and non-numeric strings */ #define PDO_LONG_PARAM_CHECK \ if (Z_TYPE_P(value) != IS_LONG && Z_TYPE_P(value) != IS_STRING && Z_TYPE_P(value) != IS_FALSE && Z_TYPE_P(value) != IS_TRUE) { \ - pdo_raise_impl_error(dbh, NULL, "HY000", "attribute value must be an integer"); \ - PDO_HANDLE_DBH_ERR(); \ + zend_type_error("Attribute value must be of type int for selected attribute, %s given", zend_zval_type_name(value)); \ return FAILURE; \ } \ @@ -697,8 +696,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* dbh->error_mode = lval; return SUCCESS; default: - pdo_raise_impl_error(dbh, NULL, "HY000", "invalid error mode"); - PDO_HANDLE_DBH_ERR(); + zend_value_error("Error mode must be one of the PDO::ERRMODE_* constants"); return FAILURE; } return FAILURE; @@ -713,8 +711,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* dbh->desired_case = lval; return SUCCESS; default: - pdo_raise_impl_error(dbh, NULL, "HY000", "invalid case folding mode"); - PDO_HANDLE_DBH_ERR(); + zend_value_error("Case folding mode must be one of the PDO::CASE_* constants"); return FAILURE; } return FAILURE; @@ -729,7 +726,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* zval *tmp; if ((tmp = zend_hash_index_find(Z_ARRVAL_P(value), 0)) != NULL && Z_TYPE_P(tmp) == IS_LONG) { if (Z_LVAL_P(tmp) == PDO_FETCH_INTO || Z_LVAL_P(tmp) == PDO_FETCH_CLASS) { - pdo_raise_impl_error(dbh, NULL, "HY000", "FETCH_INTO and FETCH_CLASS are not yet supported as default fetch modes"); + zend_value_error("PDO::FETCH_INTO and PDO::FETCH_CLASS cannot be set as the default fetch mode"); return FAILURE; } } @@ -738,7 +735,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* } lval = zval_get_long(value); if (lval == PDO_FETCH_USE_DEFAULT) { - pdo_raise_impl_error(dbh, NULL, "HY000", "invalid fetch mode type"); + zend_value_error("Fetch mode must be a bitmask of PDO::FETCH_* constants"); return FAILURE; } dbh->default_fetch_type = lval; @@ -761,28 +758,26 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* PDO_HANDLE_DBH_ERR(); return FAILURE; } - if (Z_TYPE_P(value) != IS_ARRAY - || (item = zend_hash_index_find(Z_ARRVAL_P(value), 0)) == NULL - || Z_TYPE_P(item) != IS_STRING - || (pce = zend_lookup_class(Z_STR_P(item))) == NULL - ) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); " - "the classname must be a string specifying an existing class" - ); - PDO_HANDLE_DBH_ERR(); + if (Z_TYPE_P(value) != IS_ARRAY) { + zend_type_error("PDO::ATTR_STATEMENT_CLASS value must be of type array, %s given", + zend_zval_type_name(value)); + return FAILURE; + } + if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 0)) == NULL) { + zend_value_error("PDO::ATTR_STATEMENT_CLASS value must be an array with the format " + "array(classname, array(ctor_args))"); + return FAILURE; + } + if (Z_TYPE_P(item) != IS_STRING || (pce = zend_lookup_class(Z_STR_P(item))) == NULL) { + zend_type_error("PDO::ATTR_STATEMENT_CLASS class must be a valid class"); return FAILURE; } if (!instanceof_function(pce, pdo_dbstmt_ce)) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "user-supplied statement class must be derived from PDOStatement"); - PDO_HANDLE_DBH_ERR(); + zend_type_error("PDO::ATTR_STATEMENT_CLASS class must be derived from PDOStatement"); return FAILURE; } if (pce->constructor && !(pce->constructor->common.fn_flags & (ZEND_ACC_PRIVATE|ZEND_ACC_PROTECTED))) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "user-supplied statement class cannot have a public constructor"); - PDO_HANDLE_DBH_ERR(); + zend_type_error("User-supplied statement class cannot have a public constructor"); return FAILURE; } dbh->def_stmt_ce = pce; @@ -792,11 +787,8 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* } if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 1)) != NULL) { if (Z_TYPE_P(item) != IS_ARRAY) { - pdo_raise_impl_error(dbh, NULL, "HY000", - "PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); " - "ctor_args must be an array" - ); - PDO_HANDLE_DBH_ERR(); + zend_type_error("PDO::ATTR_STATEMENT_CLASS ctor_args must be of type ?array, %s given", + zend_zval_type_name(value)); return FAILURE; } ZVAL_COPY(&dbh->def_stmt_ctor_args, item); @@ -927,10 +919,11 @@ PHP_METHOD(PDO, exec) Z_PARAM_STRING(statement, statement_len) ZEND_PARSE_PARAMETERS_END(); - if (!statement_len) { - pdo_raise_impl_error(dbh, NULL, "HY000", "trying to execute an empty query"); - RETURN_FALSE; + if (statement_len == 0) { + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); } + PDO_DBH_CLEAR_ERR(); PDO_CONSTRUCT_CHECK; ret = dbh->methods->doer(dbh, statement, statement_len); @@ -955,8 +948,10 @@ PHP_METHOD(PDO, lastInsertId) Z_PARAM_STRING_OR_NULL(name, namelen) ZEND_PARSE_PARAMETERS_END(); - PDO_DBH_CLEAR_ERR(); PDO_CONSTRUCT_CHECK; + + PDO_DBH_CLEAR_ERR(); + if (!dbh->methods->last_id) { pdo_raise_impl_error(dbh, NULL, "IM001", "driver does not support lastInsertId()"); RETURN_FALSE; @@ -1060,13 +1055,20 @@ PHP_METHOD(PDO, query) pdo_dbh_object_t *dbh_obj = Z_PDO_OBJECT_P(ZEND_THIS); pdo_dbh_t *dbh = dbh_obj->inner; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|l!*", &statement, &statement_len, &fetch_mode, &fetch_mode_is_null, &args, &num_args)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|l!*", &statement, &statement_len, + &fetch_mode, &fetch_mode_is_null, &args, &num_args)) { RETURN_THROWS(); } - PDO_DBH_CLEAR_ERR(); PDO_CONSTRUCT_CHECK; + if (statement_len == 0) { + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); + } + + PDO_DBH_CLEAR_ERR(); + if (!pdo_stmt_instantiate(dbh, return_value, dbh->def_stmt_ce, &dbh->def_stmt_ctor_args)) { if (EXPECTED(!EG(exception))) { pdo_raise_impl_error(dbh, NULL, "HY000", "failed to instantiate user supplied statement class"); @@ -1090,8 +1092,7 @@ PHP_METHOD(PDO, query) if (dbh->methods->preparer(dbh, statement, statement_len, stmt, NULL)) { PDO_STMT_CLEAR_ERR(); - if (fetch_mode_is_null || SUCCESS == pdo_stmt_setup_fetch_mode(stmt, fetch_mode, args, num_args)) { - + if (fetch_mode_is_null || pdo_stmt_setup_fetch_mode(stmt, fetch_mode, 2, args, num_args)) { /* now execute the statement */ PDO_STMT_CLEAR_ERR(); if (stmt->methods->executer(stmt)) { @@ -1139,8 +1140,9 @@ PHP_METHOD(PDO, quote) Z_PARAM_LONG(paramtype) ZEND_PARSE_PARAMETERS_END(); - PDO_DBH_CLEAR_ERR(); PDO_CONSTRUCT_CHECK; + + PDO_DBH_CLEAR_ERR(); if (!dbh->methods->quoter) { pdo_raise_impl_error(dbh, NULL, "IM001", "driver does not support quoting"); RETURN_FALSE; diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 8ed0a77636e8b..0cec5d9955c53 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -34,11 +34,12 @@ #include "php_memory_streams.h" #include "pdo_stmt_arginfo.h" -#define PHP_STMT_GET_OBJ \ - pdo_stmt_t *stmt = Z_PDO_STMT_P(ZEND_THIS); \ - if (!stmt->dbh) { \ - RETURN_FALSE; \ - } \ +#define PHP_STMT_GET_OBJ \ + pdo_stmt_t *stmt = Z_PDO_STMT_P(ZEND_THIS); \ + if (!stmt->dbh) { \ + zend_throw_error(NULL, "PDO object is uninitialized"); \ + RETURN_THROWS(); \ + } \ static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_param_data *param) /* {{{ */ { @@ -62,6 +63,7 @@ static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_pa param->name = zend_string_init(name, strlen(name), 0); return 1; } + /* TODO Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined"); return 0; } @@ -72,12 +74,14 @@ static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_pa continue; } if (param->paramno >= 0) { + /* TODO Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "PDO refuses to handle repeating the same :named parameter for multiple positions with this driver, as it might be unsafe to do so. Consider using a separate name for each parameter instead"); return -1; } param->paramno = position; return 1; } ZEND_HASH_FOREACH_END(); + /* TODO Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined"); return 0; } @@ -256,7 +260,7 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s for (i = 0; i < stmt->column_count; i++) { if (ZSTR_LEN(stmt->columns[i].name) == ZSTR_LEN(param->name) && - strncmp(ZSTR_VAL(stmt->columns[i].name), ZSTR_VAL(param->name), ZSTR_LEN(param->name) + 1) == 0) { + strncmp(ZSTR_VAL(stmt->columns[i].name), ZSTR_VAL(param->name), ZSTR_LEN(param->name) + 1) == 0) { param->paramno = i; break; } @@ -265,7 +269,9 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s /* if you prepare and then execute passing an array of params keyed by names, * then this will trigger, and we don't want that */ if (param->paramno == -1) { + /* Should this always be an Error? */ char *tmp; + /* TODO Error? */ spprintf(&tmp, 0, "Did not find column name '%s' in the defined columns; it will not be bound", ZSTR_VAL(param->name)); pdo_raise_impl_error(stmt->dbh, stmt, "HY000", tmp); efree(tmp); @@ -398,9 +404,9 @@ PHP_METHOD(PDOStatement, execute) if (PDO_PLACEHOLDER_NONE == stmt->supports_placeholders) { /* handle the emulated parameter binding, - * stmt->active_query_string holds the query with binds expanded and + * stmt->active_query_string holds the query with binds expanded and * quoted. - */ + */ /* string is leftover from previous calls so PDOStatement::debugDumpParams() can access */ if (stmt->active_query_string && stmt->active_query_string != stmt->query_string) { @@ -457,10 +463,15 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ int caller_frees = 0; int type, new_type; - if (colno < 0 || colno >= stmt->column_count) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid column index"); - ZVAL_FALSE(dest); + if (colno < 0) { + zend_value_error("Column index must be greater than or equal to 0"); + ZVAL_NULL(dest); + return; + } + if (colno >= stmt->column_count) { + zend_value_error("Invalid column index"); + ZVAL_NULL(dest); return; } @@ -666,6 +677,7 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */ fcc->called_scope = ce; return 1; } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { + /* TODO Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied class does not have a constructor, use NULL for the ctor_params parameter, or simply omit it"); return 0; } else { @@ -680,12 +692,12 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * if (zend_fcall_info_init(callable, 0, fci, fcc, NULL, &is_callable_error) == FAILURE) { if (is_callable_error) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", is_callable_error); + zend_type_error("%s", is_callable_error); efree(is_callable_error); } else { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied function must be a valid callback"); + zend_type_error("User-supplied function must be a valid callback"); } - return 0; + return false; } if (is_callable_error) { /* Possible error message */ @@ -695,20 +707,20 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * fci->param_count = num_args; /* probably less */ fci->params = safe_emalloc(sizeof(zval), num_args, 0); - return 1; + return true; } /* }}} */ -static int do_fetch_func_prepare(pdo_stmt_t *stmt) /* {{{ */ +static bool do_fetch_func_prepare(pdo_stmt_t *stmt) /* {{{ */ { zend_fcall_info *fci = &stmt->fetch.cls.fci; zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; if (!make_callable_ex(stmt, &stmt->fetch.func.function, fci, fcc, stmt->column_count)) { - return 0; + return false; } else { stmt->fetch.func.values = safe_emalloc(sizeof(zval), stmt->column_count, 0); - return 1; + return true; } } /* }}} */ @@ -718,7 +730,7 @@ static void do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */ /* fci.size is used to check if it is valid */ if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { - /* Added to free constructor arguments */ + /* Added to free constructor arguments */ zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); } else { efree(stmt->fetch.cls.fci.params); @@ -806,23 +818,27 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h break; case PDO_FETCH_COLUMN: - if (colno >= 0 && colno < stmt->column_count) { - if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { - fetch_value(stmt, return_value, 1, NULL); - } else if (flags == PDO_FETCH_GROUP && colno) { - fetch_value(stmt, return_value, 0, NULL); - } else { - fetch_value(stmt, return_value, colno, NULL); - } - if (!return_all) { - return 1; - } else { - break; - } + if (colno < 0 ) { + zend_value_error("Column index must be greater than or equal to 0"); + return false; + } + + if (colno >= stmt->column_count) { + zend_value_error("Invalid column index"); + return false; + } + + if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { + fetch_value(stmt, return_value, 1, NULL); + } else if (flags == PDO_FETCH_GROUP && colno) { + fetch_value(stmt, return_value, 0, NULL); } else { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid column index"); + fetch_value(stmt, return_value, colno, NULL); } - return 0; + if (!return_all) { + return 1; + } + break; case PDO_FETCH_OBJ: object_init_ex(return_value, ZEND_STANDARD_CLASS_DEF_PTR); @@ -854,7 +870,9 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h zval_ptr_dtor_str(&val); } ce = stmt->fetch.cls.ce; + /* TODO: Make this an assertion and ensure this is true higher up? */ if (!ce) { + /* TODO Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch class specified"); return 0; } @@ -872,6 +890,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { + /* TODO Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor"); return 0; } else { @@ -886,6 +905,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h case PDO_FETCH_INTO: if (Z_ISUNDEF(stmt->fetch.into)) { + /* TODO ArgumentCountError? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch-into object specified."); return 0; break; @@ -900,6 +920,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h case PDO_FETCH_FUNC: if (Z_ISUNDEF(stmt->fetch.func.function)) { + /* TODO ArgumentCountError? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch function specified"); return 0; } @@ -910,10 +931,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h } } break; - - default: - /* shouldn't happen */ - return 0; + EMPTY_SWITCH_DEFAULT_CASE(); } if (return_all && how != PDO_FETCH_KEY_PAIR) { @@ -1039,9 +1057,8 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h default: zval_ptr_dtor(&val); - pdo_raise_impl_error(stmt->dbh, stmt, "22003", "mode is out of range"); + zend_value_error("Fetch mode must be a bitmask of PDO::FETCH_* constants"); return 0; - break; } } @@ -1051,6 +1068,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { + /* TODO Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor"); return 0; } else { @@ -1071,6 +1089,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h stmt->fetch.func.fci.param_count = idx; stmt->fetch.func.fci.retval = &retval; if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { + /* TODO Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call user-supplied function"); return 0; } else { @@ -1110,14 +1129,14 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h } /* }}} */ -static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, int fetch_all) /* {{{ */ +static bool pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_arg_num, bool fetch_all) /* {{{ */ { int flags = mode & PDO_FETCH_FLAGS; mode = mode & ~PDO_FETCH_FLAGS; if (mode < 0 || mode > PDO_FETCH__MAX) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "invalid fetch mode"); + zend_argument_value_error(mode_arg_num, "must be a bitmask of PDO::FETCH_* constants"); return 0; } @@ -1129,28 +1148,28 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, int fetch_all) switch(mode) { case PDO_FETCH_FUNC: if (!fetch_all) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_FUNC is only allowed in PDOStatement::fetchAll()"); + zend_value_error("Can only use PDO::FETCH_FUNC in PDOStatement::fetchAll()"); return 0; } return 1; case PDO_FETCH_LAZY: if (fetch_all) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_LAZY can't be used with PDOStatement::fetchAll()"); + zend_argument_value_error(mode_arg_num, "cannot be PDO::FETCH_LAZY in PDOStatement::fetchAll()"); return 0; } /* fall through */ default: if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_SERIALIZE can only be used together with PDO::FETCH_CLASS"); + zend_argument_value_error(mode_arg_num, "must use PDO::FETCH_SERIALIZE with PDO::FETCH_CLASS"); return 0; } if ((flags & PDO_FETCH_CLASSTYPE) == PDO_FETCH_CLASSTYPE) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_CLASSTYPE can only be used together with PDO::FETCH_CLASS"); + zend_argument_value_error(mode_arg_num, "must use PDO::FETCH_CLASSTYPE with PDO::FETCH_CLASS"); return 0; } if (mode >= PDO_FETCH__MAX) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "invalid fetch mode"); + zend_argument_value_error(mode_arg_num, "must be a bitmask of PDO::FETCH_* constants"); return 0; } /* no break; */ @@ -1175,14 +1194,14 @@ PHP_METHOD(PDOStatement, fetch) Z_PARAM_LONG(off) ZEND_PARSE_PARAMETERS_END(); - PHP_STMT_GET_OBJ; + PHP_STMT_GET_OBJ; PDO_STMT_CLEAR_ERR(); - if (!pdo_stmt_verify_mode(stmt, how, 0)) { - RETURN_FALSE; + if (!pdo_stmt_verify_mode(stmt, how, 1, false)) { + RETURN_THROWS(); } - if (!do_fetch(stmt, return_value, how, ori, off, 0)) { + if (!do_fetch(stmt, return_value, how, ori, off, NULL)) { PDO_HANDLE_STMT_ERR(); RETURN_FALSE; } @@ -1192,9 +1211,6 @@ PHP_METHOD(PDOStatement, fetch) /* {{{ Fetches the next row and returns it as an object. */ PHP_METHOD(PDOStatement, fetchObject) { - zend_long how = PDO_FETCH_CLASS; - zend_long ori = PDO_FETCH_ORI_NEXT; - zend_long off = 0; zend_class_entry *ce = NULL; zend_class_entry *old_ce; zval old_ctor_args, *ctor_args = NULL; @@ -1209,10 +1225,6 @@ PHP_METHOD(PDOStatement, fetchObject) PHP_STMT_GET_OBJ; PDO_STMT_CLEAR_ERR(); - if (!pdo_stmt_verify_mode(stmt, how, 0)) { - RETURN_FALSE; - } - old_ce = stmt->fetch.cls.ce; ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); old_arg_count = stmt->fetch.cls.fci.param_count; @@ -1232,7 +1244,7 @@ PHP_METHOD(PDOStatement, fetchObject) stmt->fetch.cls.ce = zend_standard_class_def; } - if (!do_fetch(stmt, return_value, how, ori, off, 0)) { + if (!do_fetch(stmt, return_value, PDO_FETCH_CLASS, PDO_FETCH_ORI_NEXT, /* offset */ 0, NULL)) { PDO_HANDLE_STMT_ERR(); RETVAL_FALSE; } @@ -1270,22 +1282,23 @@ PHP_METHOD(PDOStatement, fetchColumn) PHP_METHOD(PDOStatement, fetchAll) { zend_long how = PDO_FETCH_USE_DEFAULT; - zval data, *return_all; + zval data, *return_all = NULL; zval *arg2 = NULL; zend_class_entry *old_ce; zval old_ctor_args, *ctor_args = NULL; - int error = 0, flags, old_arg_count; + bool error = false; + int flags, old_arg_count; ZEND_PARSE_PARAMETERS_START(0, 3) Z_PARAM_OPTIONAL Z_PARAM_LONG(how) - Z_PARAM_ZVAL(arg2) - Z_PARAM_ZVAL(ctor_args) + Z_PARAM_ZVAL_OR_NULL(arg2) + Z_PARAM_ARRAY_OR_NULL(ctor_args) ZEND_PARSE_PARAMETERS_END(); PHP_STMT_GET_OBJ; - if (!pdo_stmt_verify_mode(stmt, how, 1)) { - RETURN_FALSE; + if (!pdo_stmt_verify_mode(stmt, how, 1, true)) { + RETURN_THROWS(); } old_ce = stmt->fetch.cls.ce; @@ -1294,85 +1307,88 @@ PHP_METHOD(PDOStatement, fetchAll) do_fetch_opt_finish(stmt, 0); - switch(how & ~PDO_FETCH_FLAGS) { - case PDO_FETCH_CLASS: - switch(ZEND_NUM_ARGS()) { - case 0: - case 1: - stmt->fetch.cls.ce = zend_standard_class_def; - break; - case 3: - if (Z_TYPE_P(ctor_args) != IS_NULL && Z_TYPE_P(ctor_args) != IS_ARRAY) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "ctor_args must be either NULL or an array"); - error = 1; - break; - } - if (Z_TYPE_P(ctor_args) != IS_ARRAY || !zend_hash_num_elements(Z_ARRVAL_P(ctor_args))) { - ctor_args = NULL; + /* TODO Would be good to reuse part of pdo_stmt_setup_fetch_mode() in some way */ + + switch (how & ~PDO_FETCH_FLAGS) { + case PDO_FETCH_CLASS: + /* Figure out correct class */ + if (arg2) { + if (Z_TYPE_P(arg2) != IS_STRING) { + zend_argument_type_error(2, "must be of type string, %s given", zend_zval_type_name(arg2)); + RETURN_THROWS(); + } + stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); + if (!stmt->fetch.cls.ce) { + zend_argument_type_error(2, "must be a valid class"); + RETURN_THROWS(); + } + } else { + stmt->fetch.cls.ce = zend_standard_class_def; } - /* no break */ - case 2: - if (ctor_args) { + + if (ctor_args && zend_hash_num_elements(Z_ARRVAL_P(ctor_args)) > 0) { ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ } else { ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); } - if (Z_TYPE_P(arg2) != IS_STRING) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Invalid class name (should be a string)"); - error = 1; - break; - } else { - stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); - if (!stmt->fetch.cls.ce) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not find user-specified class"); - error = 1; - break; - } - } - } - if (!error) { + do_fetch_class_prepare(stmt); - } - break; - - case PDO_FETCH_FUNC: - switch (ZEND_NUM_ARGS()) { - case 0: - case 1: - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "no fetch function specified"); - error = 1; - break; - case 3: - case 2: - ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); - if (do_fetch_func_prepare(stmt) == 0) { - error = 1; - } - break; - } - break; + break; - case PDO_FETCH_COLUMN: - switch(ZEND_NUM_ARGS()) { - case 0: - case 1: - stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; + case PDO_FETCH_FUNC: /* Cannot be a default fetch mode */ + if (ZEND_NUM_ARGS() != 2) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects exactly 2 argument for PDO::FETCH_FUNC, %d given", + ZSTR_VAL(func), ZEND_NUM_ARGS()); + zend_string_release(func); + RETURN_THROWS(); + } + if (arg2 == NULL) { + /* TODO use "must be of type callable" format? */ + zend_argument_type_error(2, "must be a callable, null given"); + RETURN_THROWS(); + } + /* TODO Check it is a callable? */ + ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); + if (do_fetch_func_prepare(stmt) == false) { + RETURN_THROWS(); + } break; - case 2: - convert_to_long(arg2); - stmt->fetch.column = Z_LVAL_P(arg2); + + case PDO_FETCH_COLUMN: + if (ZEND_NUM_ARGS() > 2) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects at most 2 argument for the fetch mode provided, %d given", + ZSTR_VAL(func), ZEND_NUM_ARGS()); + zend_string_release(func); + RETURN_THROWS(); + } + /* Is column index passed? */ + if (arg2) { + // Reuse convert_to_long(arg2); ? + if (Z_TYPE_P(arg2) != IS_LONG) { + zend_argument_type_error(2, "must be of type int, %s given", zend_zval_type_name(arg2)); + RETURN_THROWS(); + } + if (Z_LVAL_P(arg2) < 0) { + zend_argument_value_error(2, "must be greater than or equal to 0"); + RETURN_THROWS(); + } + stmt->fetch.column = Z_LVAL_P(arg2); + } else { + stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; + } break; - case 3: - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Third parameter not allowed for PDO::FETCH_COLUMN"); - error = 1; - } - break; - default: - if (ZEND_NUM_ARGS() > 1) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Extraneous additional parameters"); - error = 1; - } + default: + /* No support for PDO_FETCH_INTO which takes 2 args??? */ + if (ZEND_NUM_ARGS() > 1) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects exactly 1 argument for the fetch mode provided, %d given", + ZSTR_VAL(func), ZEND_NUM_ARGS()); + zend_string_release(func); + RETURN_THROWS(); + } } flags = how & PDO_FETCH_FLAGS; @@ -1382,48 +1398,42 @@ PHP_METHOD(PDOStatement, fetchAll) how |= stmt->default_fetch_type & ~PDO_FETCH_FLAGS; } - if (!error) { - PDO_STMT_CLEAR_ERR(); - if ((how & PDO_FETCH_GROUP) || how == PDO_FETCH_KEY_PAIR || - (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR) - ) { - array_init(return_value); - return_all = return_value; - } else { - return_all = 0; - } - if (!do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)) { - error = 2; - } + PDO_STMT_CLEAR_ERR(); + if ((how & PDO_FETCH_GROUP) || how == PDO_FETCH_KEY_PAIR || + (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR) + ) { + array_init(return_value); + return_all = return_value; + } + if (!do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, /* offset */ 0, return_all)) { + error = true; } + if (!error) { if ((how & PDO_FETCH_GROUP)) { - while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)); + while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, /* offset */ 0, return_all)); } else if (how == PDO_FETCH_KEY_PAIR || (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR)) { - while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all)); + while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, /* offset */ 0, return_all)); } else { array_init(return_value); do { zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &data); - } while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, 0)); + } while (do_fetch(stmt, &data, how | flags, PDO_FETCH_ORI_NEXT, /* offset */ 0, NULL)); } } do_fetch_opt_finish(stmt, 0); + /* Restore defaults which were changed by PDO_FETCH_CLASS mode */ stmt->fetch.cls.ce = old_ce; ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); stmt->fetch.cls.fci.param_count = old_arg_count; + /* on no results, return an empty array */ if (error) { PDO_HANDLE_STMT_ERR(); - if (error != 2) { - RETURN_FALSE; - } else { /* on no results, return an empty array */ - if (Z_TYPE_P(return_value) != IS_ARRAY) { - array_init(return_value); - } - return; + if (Z_TYPE_P(return_value) != IS_ARRAY) { + array_init(return_value); } } } @@ -1451,12 +1461,16 @@ static void register_bound_param(INTERNAL_FUNCTION_PARAMETERS, int is_param) /* param.param_type = (int) param_type; if (param.name) { + if (ZSTR_LEN(param.name) == 0) { + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); + } param.paramno = -1; } else if (param.paramno > 0) { --param.paramno; /* make it zero-based internally */ } else { - pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "Columns/Parameters are 1-based"); - RETURN_FALSE; + zend_argument_value_error(1, "must be greater than or equal to 1"); + RETURN_THROWS(); } if (driver_params) { @@ -1495,12 +1509,16 @@ PHP_METHOD(PDOStatement, bindValue) param.param_type = (int) param_type; if (param.name) { + if (ZSTR_LEN(param.name) == 0) { + zend_argument_value_error(1, "cannot be empty"); + RETURN_THROWS(); + } param.paramno = -1; } else if (param.paramno > 0) { --param.paramno; /* make it zero-based internally */ } else { - pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "Columns/Parameters are 1-based"); - RETURN_FALSE; + zend_argument_value_error(1, "must be greater than or equal to 1"); + RETURN_THROWS(); } ZVAL_COPY(¶m.parameter, parameter); @@ -1557,7 +1575,7 @@ PHP_METHOD(PDOStatement, errorCode) PHP_METHOD(PDOStatement, errorInfo) { int error_count; - int error_count_diff = 0; + int error_count_diff = 0; int error_expected_count = 3; ZEND_PARSE_PARAMETERS_NONE(); @@ -1595,8 +1613,11 @@ PHP_METHOD(PDOStatement, setAttribute) ZEND_PARSE_PARAMETERS_END(); PHP_STMT_GET_OBJ; + + /* Driver hasn't registered a function for setting attributes */ if (!stmt->methods->set_attribute) { - goto fail; + pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "This driver doesn't support setting attributes"); + RETURN_FALSE; } PDO_STMT_CLEAR_ERR(); @@ -1604,12 +1625,8 @@ PHP_METHOD(PDOStatement, setAttribute) RETURN_TRUE; } -fail: - if (!stmt->methods->set_attribute) { - pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "This driver doesn't support setting attributes"); - } else { - PDO_HANDLE_STMT_ERR(); - } + /* Error while setting attribute */ + PDO_HANDLE_STMT_ERR(); RETURN_FALSE; } /* }}} */ @@ -1686,9 +1703,9 @@ PHP_METHOD(PDOStatement, getColumnMeta) ZEND_PARSE_PARAMETERS_END(); PHP_STMT_GET_OBJ; - if(colno < 0) { - pdo_raise_impl_error(stmt->dbh, stmt, "42P10", "column number must be non-negative"); - RETURN_FALSE; + if (colno < 0) { + zend_argument_value_error(1, "must be greater than or equal to 0"); + RETURN_THROWS(); } if (!stmt->methods->get_column_meta) { @@ -1716,13 +1733,13 @@ PHP_METHOD(PDOStatement, getColumnMeta) /* {{{ Changes the default fetch mode for subsequent fetches (params have different meaning for different fetch modes) */ -int pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, zval *args, uint32_t num_args) +bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_arg_num, + zval *args, uint32_t variadic_num_args) { int flags = 0; - zend_class_entry *cep; - int retval; - - do_fetch_opt_finish(stmt, 1); + uint32_t arg1_arg_num = mode_arg_num + 1; + uint32_t constructor_arg_num = mode_arg_num + 2; + uint32_t total_num_args = mode_arg_num + variadic_num_args; switch (stmt->default_fetch_type) { case PDO_FETCH_INTO: @@ -1739,12 +1756,10 @@ int pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, zval *args, uint flags = mode & PDO_FETCH_FLAGS; - if (!pdo_stmt_verify_mode(stmt, mode, 0)) { - PDO_STMT_CLEAR_ERR(); - return FAILURE; + if (!pdo_stmt_verify_mode(stmt, mode, mode_arg_num, false)) { + return false; } - retval = FAILURE; switch (mode & ~PDO_FETCH_FLAGS) { case PDO_FETCH_USE_DEFAULT: case PDO_FETCH_LAZY: @@ -1755,100 +1770,120 @@ int pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, zval *args, uint case PDO_FETCH_BOUND: case PDO_FETCH_NAMED: case PDO_FETCH_KEY_PAIR: - if (num_args != 0) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode doesn't allow any extra arguments"); - } else { - retval = SUCCESS; + if (variadic_num_args != 0) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects exactly %d arguments for the fetch mode provided, %d given", + ZSTR_VAL(func), mode_arg_num, total_num_args); + zend_string_release(func); + return false; } break; case PDO_FETCH_COLUMN: - if (num_args != 1) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode requires the colno argument"); - } else if (Z_TYPE(args[0]) != IS_LONG) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "colno must be an integer"); - } else { - stmt->fetch.column = Z_LVAL(args[0]); - retval = SUCCESS; - } + if (variadic_num_args != 1) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects exactly %d arguments for the fetch mode provided, %d given", + ZSTR_VAL(func), arg1_arg_num, total_num_args); + zend_string_release(func); + return false; + } + if (Z_TYPE(args[0]) != IS_LONG) { + zend_argument_type_error(arg1_arg_num, "must be of type int, %s given", zend_zval_type_name(&args[0])); + return false; + } + if (Z_LVAL(args[0]) < 0) { + zend_argument_value_error(arg1_arg_num, "must be greater than or equal to 0"); + return false; + } + stmt->fetch.column = Z_LVAL(args[0]); break; - case PDO_FETCH_CLASS: + case PDO_FETCH_CLASS: { + HashTable *constructor_args = NULL; + /* Undef constructor arguments */ + ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); /* Gets its class name from 1st column */ if ((flags & PDO_FETCH_CLASSTYPE) == PDO_FETCH_CLASSTYPE) { - if (num_args != 0) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode doesn't allow any extra arguments"); - } else { - stmt->fetch.cls.ce = NULL; - retval = SUCCESS; + if (variadic_num_args != 0) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects exactly %d arguments for the fetch mode provided, %d given", + ZSTR_VAL(func), mode_arg_num, total_num_args); + zend_string_release(func); + return false; } + stmt->fetch.cls.ce = NULL; } else { - if (num_args < 1) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode requires the classname argument"); - } else if (num_args > 2) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "too many arguments"); - } else if (Z_TYPE(args[0]) != IS_STRING) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "classname must be a string"); - } else { - cep = zend_lookup_class(Z_STR(args[0])); - if (cep) { - retval = SUCCESS; - stmt->fetch.cls.ce = cep; - } + zend_class_entry *cep; + if (variadic_num_args == 0) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects at least %d arguments for the fetch mode provided, %d given", + ZSTR_VAL(func), arg1_arg_num, total_num_args); + zend_string_release(func); + return false; } - } - - if (SUCCESS == retval) { - ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); - if (num_args == 2) { + /* constructor_arguments can be null/not passed */ + if (variadic_num_args > 2) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects at most %d arguments for the fetch mode provided, %d given", + ZSTR_VAL(func), constructor_arg_num, total_num_args); + zend_string_release(func); + return false; + } + if (Z_TYPE(args[0]) != IS_STRING) { + zend_argument_type_error(arg1_arg_num, "must be of type string, %s given", zend_zval_type_name(&args[0])); + return false; + } + cep = zend_lookup_class(Z_STR(args[0])); + if (!cep) { + zend_argument_type_error(arg1_arg_num, "must be a valid class"); + return false; + } + /* Verify constructor_args (args[1]) is ?array */ + /* TODO: Improve logic? */ + if (variadic_num_args == 2) { if (Z_TYPE(args[1]) != IS_NULL && Z_TYPE(args[1]) != IS_ARRAY) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "ctor_args must be either NULL or an array"); - retval = FAILURE; - } else if (Z_TYPE(args[1]) == IS_ARRAY && zend_hash_num_elements(Z_ARRVAL(args[1]))) { - ZVAL_ARR(&stmt->fetch.cls.ctor_args, zend_array_dup(Z_ARRVAL(args[1]))); + zend_argument_type_error(constructor_arg_num, "must be of type ?array, %s given", + zend_zval_type_name(&args[1])); + return false; + } + if (Z_TYPE(args[1]) == IS_ARRAY && zend_hash_num_elements(Z_ARRVAL(args[1]))) { + constructor_args = Z_ARRVAL(args[1]); } } + stmt->fetch.cls.ce = cep; - if (SUCCESS == retval) { - do_fetch_class_prepare(stmt); + /* If constructor arguments are present and not empty */ + if (constructor_args) { + ZVAL_ARR(&stmt->fetch.cls.ctor_args, zend_array_dup(constructor_args)); } } + do_fetch_class_prepare(stmt); break; - + } case PDO_FETCH_INTO: - if (num_args != 1) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "fetch mode requires the object parameter"); - } else if (Z_TYPE(args[0]) != IS_OBJECT) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "object must be an object"); - } else { - retval = SUCCESS; + if (total_num_args != arg1_arg_num) { + zend_string *func = get_active_function_or_method_name(); + zend_argument_count_error("%s() expects exactly %d arguments for the fetch mode provided, %d given", + ZSTR_VAL(func), arg1_arg_num, total_num_args); + zend_string_release(func); + return false; } - - if (SUCCESS == retval) { - ZVAL_COPY(&stmt->fetch.into, &args[0]); + if (Z_TYPE(args[0]) != IS_OBJECT) { + zend_argument_type_error(arg1_arg_num, "must be of type object, %s given", zend_zval_type_name(&args[0])); + return false; } + ZVAL_COPY(&stmt->fetch.into, &args[0]); break; - default: - pdo_raise_impl_error(stmt->dbh, stmt, "22003", "Invalid fetch mode specified"); + zend_argument_value_error(mode_arg_num, "must be one of the PDO::FETCH_* constants"); + return false; } - if (SUCCESS == retval) { - stmt->default_fetch_type = mode; - } - - /* - * PDO error (if any) has already been raised at this point. - * - * The error_code is cleared, otherwise the caller will read the - * last error message from the driver. - * - */ - PDO_STMT_CLEAR_ERR(); + stmt->default_fetch_type = mode; - return retval; + return true; } PHP_METHOD(PDOStatement, setFetchMode) @@ -1862,13 +1897,21 @@ PHP_METHOD(PDOStatement, setFetchMode) } PHP_STMT_GET_OBJ; - RETVAL_BOOL(pdo_stmt_setup_fetch_mode(stmt, fetch_mode, args, num_args) == SUCCESS); + + do_fetch_opt_finish(stmt, 1); + + if (!pdo_stmt_setup_fetch_mode(stmt, fetch_mode, 1, args, num_args)) { + RETURN_THROWS(); + } + + // TODO Void return? + RETURN_TRUE; } /* }}} */ /* {{{ Advances to the next rowset in a multi-rowset statement handle. Returns true if it succeeded, false otherwise */ -static int pdo_stmt_do_next_rowset(pdo_stmt_t *stmt) +static bool pdo_stmt_do_next_rowset(pdo_stmt_t *stmt) { /* un-describe */ if (stmt->columns) { @@ -1963,6 +2006,7 @@ PHP_METHOD(PDOStatement, debugDumpParams) ZEND_PARSE_PARAMETERS_NONE(); PHP_STMT_GET_OBJ; + if (out == NULL) { RETURN_FALSE; } @@ -2024,10 +2068,8 @@ PHP_METHOD(PDOStatement, getIterator) /* {{{ overloaded handlers for PDOStatement class */ static zval *dbstmt_prop_write(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object); - if (strcmp(ZSTR_VAL(name), "queryString") == 0) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "property queryString is read only"); + zend_throw_error(NULL, "Property queryString is read only"); return value; } else { return zend_std_write_property(object, name, value, cache_slot); @@ -2036,10 +2078,8 @@ static zval *dbstmt_prop_write(zend_object *object, zend_string *name, zval *val static void dbstmt_prop_delete(zend_object *object, zend_string *name, void **cache_slot) { - pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object); - if (strcmp(ZSTR_VAL(name), "queryString") == 0) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "property queryString is read only"); + zend_throw_error(NULL, "Property queryString is read only"); } else { zend_std_unset_property(object, name, cache_slot); } @@ -2225,7 +2265,7 @@ static void pdo_stmt_iter_move_forwards(zend_object_iterator *iter) } if (!do_fetch(stmt, &I->fetch_ahead, PDO_FETCH_USE_DEFAULT, - PDO_FETCH_ORI_NEXT, 0, 0)) { + PDO_FETCH_ORI_NEXT, /* offset */ 0, NULL)) { PDO_HANDLE_STMT_ERR(); I->key = (zend_ulong)-1; @@ -2265,7 +2305,7 @@ zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int ZVAL_OBJ(&I->iter.data, Z_OBJ_P(object)); if (!do_fetch(stmt, &I->fetch_ahead, PDO_FETCH_USE_DEFAULT, - PDO_FETCH_ORI_NEXT, 0, 0)) { + PDO_FETCH_ORI_NEXT, /* offset */ 0, NULL)) { PDO_HANDLE_STMT_ERR(); I->key = (zend_ulong)-1; ZVAL_UNDEF(&I->fetch_ahead); @@ -2296,7 +2336,7 @@ static zval *row_prop_read(zend_object *object, zend_string *name, int type, voi * numbers */ for (colno = 0; colno < stmt->column_count; colno++) { if (ZSTR_LEN(stmt->columns[colno].name) == ZSTR_LEN(name) && - strncmp(ZSTR_VAL(stmt->columns[colno].name), ZSTR_VAL(name), ZSTR_LEN(name)) == 0) { + strncmp(ZSTR_VAL(stmt->columns[colno].name), ZSTR_VAL(name), ZSTR_LEN(name)) == 0) { fetch_value(stmt, rv, colno, NULL); return rv; } @@ -2338,7 +2378,7 @@ static zval *row_dim_read(zend_object *object, zval *member, int type, zval *rv) * numbers */ for (colno = 0; colno < stmt->column_count; colno++) { if (ZSTR_LEN(stmt->columns[colno].name) == Z_STRLEN_P(member) && - strncmp(ZSTR_VAL(stmt->columns[colno].name), Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) { + strncmp(ZSTR_VAL(stmt->columns[colno].name), Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) { fetch_value(stmt, rv, colno, NULL); return rv; } @@ -2380,7 +2420,7 @@ static int row_prop_exists(zend_object *object, zend_string *name, int check_emp * numbers */ for (colno = 0; colno < stmt->column_count; colno++) { if (ZSTR_LEN(stmt->columns[colno].name) == ZSTR_LEN(name) && - strncmp(ZSTR_VAL(stmt->columns[colno].name), ZSTR_VAL(name), ZSTR_LEN(name)) == 0) { + strncmp(ZSTR_VAL(stmt->columns[colno].name), ZSTR_VAL(name), ZSTR_LEN(name)) == 0) { int res; zval val; @@ -2420,7 +2460,7 @@ static int row_dim_exists(zend_object *object, zval *member, int check_empty) * numbers */ for (colno = 0; colno < stmt->column_count; colno++) { if (ZSTR_LEN(stmt->columns[colno].name) == Z_STRLEN_P(member) && - strncmp(ZSTR_VAL(stmt->columns[colno].name), Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) { + strncmp(ZSTR_VAL(stmt->columns[colno].name), Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) { int res; zval val; diff --git a/ext/pdo/pdo_stmt.stub.php b/ext/pdo/pdo_stmt.stub.php index b280f73ffdb3d..2732c8a71da56 100644 --- a/ext/pdo/pdo_stmt.stub.php +++ b/ext/pdo/pdo_stmt.stub.php @@ -16,16 +16,16 @@ public function bindValue(string|int $parameter, mixed $value, int $type = PDO:: /** @return bool */ public function closeCursor() {} - /** @return int|false */ + /** @return int */ public function columnCount() {} /** @return bool|null */ public function debugDumpParams() {} - /** @return string|false|null */ + /** @return string|null */ public function errorCode() {} - /** @return array|false */ + /** @return array */ public function errorInfo() {} /** @return bool */ @@ -34,8 +34,8 @@ public function execute(?array $input_parameters = null) {} /** @return mixed */ public function fetch(int $fetch_style = PDO::FETCH_BOTH, int $cursor_orientation = PDO::FETCH_ORI_NEXT, int $cursor_offset = 0) {} - /** @return array|false */ - public function fetchAll(int $fetch_style = PDO::FETCH_BOTH, mixed ...$fetch_args) {} + /** @return array */ + public function fetchAll(int $fetch_style = PDO::FETCH_BOTH, mixed ...$fetch_mode_args) {} /** @return mixed */ public function fetchColumn(int $column_number = 0) {} @@ -52,14 +52,14 @@ public function getColumnMeta(int $column) {} /** @return bool */ public function nextRowset() {} - /** @return int|false */ + /** @return int */ public function rowCount() {} /** @return bool */ public function setAttribute(int $attribute, mixed $value) {} /** @return bool */ - public function setFetchMode(int $mode, mixed ...$params) {} + public function setFetchMode(int $mode, mixed ...$fetch_mode_args) {} public function getIterator(): Iterator {} } diff --git a/ext/pdo/pdo_stmt_arginfo.h b/ext/pdo/pdo_stmt_arginfo.h index 116449ad3aefe..157507a852ded 100644 --- a/ext/pdo/pdo_stmt_arginfo.h +++ b/ext/pdo/pdo_stmt_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a35e66ccff5e569f07ae8372e661e005943dfbc7 */ + * Stub hash: c12bc1c5d1e3dbd8cce67e50c974b20ec5564e67 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindColumn, 0, 0, 2) ZEND_ARG_TYPE_MASK(0, column, MAY_BE_STRING|MAY_BE_LONG, NULL) @@ -46,7 +46,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchAll, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_style, IS_LONG, 0, "PDO::FETCH_BOTH") - ZEND_ARG_VARIADIC_TYPE_INFO(0, fetch_args, IS_MIXED, 0) + ZEND_ARG_VARIADIC_TYPE_INFO(0, fetch_mode_args, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchColumn, 0, 0, 0) @@ -77,7 +77,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_setFetchMode, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) - ZEND_ARG_VARIADIC_TYPE_INFO(0, params, IS_MIXED, 0) + ZEND_ARG_VARIADIC_TYPE_INFO(0, fetch_mode_args, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_PDOStatement_getIterator, 0, 0, Iterator, 0) diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h index 9d9e73915dfc6..89cd22c8e8baf 100644 --- a/ext/pdo/php_pdo.h +++ b/ext/pdo/php_pdo.h @@ -53,11 +53,11 @@ PHP_MINFO_FUNCTION(pdo); #define REGISTER_PDO_CLASS_CONST_STRING(const_name, value) \ zend_declare_class_constant_stringl(php_pdo_get_dbh_ce(), const_name, sizeof(const_name)-1, value, sizeof(value)-1); -#define PDO_CONSTRUCT_CHECK \ - if (!dbh->driver) { \ - pdo_raise_impl_error(dbh, NULL, "00000", "PDO constructor was not called"); \ - return; \ - } \ +#define PDO_CONSTRUCT_CHECK \ + if (!dbh->driver) { \ + zend_throw_error(NULL, "PDO object is not initialized, constructor was not called"); \ + RETURN_THROWS(); \ + } \ #endif /* PHP_PDO_H */ diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h index 7fe3bfc85023f..7f992a5fd0de2 100644 --- a/ext/pdo/php_pdo_int.h +++ b/ext/pdo/php_pdo_int.h @@ -40,7 +40,8 @@ void pdo_dbstmt_free_storage(zend_object *std); zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int by_ref); extern zend_object_handlers pdo_dbstmt_object_handlers; int pdo_stmt_describe_columns(pdo_stmt_t *stmt); -int pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long fetch_mode, zval *args, uint32_t num_args); +bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_arg_num, + zval *args, uint32_t variadic_num_args); extern zend_object *pdo_row_new(zend_class_entry *ce); extern const zend_function_entry pdo_row_functions[]; diff --git a/ext/pdo/tests/bug_44159.phpt b/ext/pdo/tests/bug_44159.phpt index 0e1116d58863e..b5601eed41c47 100644 --- a/ext/pdo/tests/bug_44159.phpt +++ b/ext/pdo/tests/bug_44159.phpt @@ -2,51 +2,46 @@ PDO Common: Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)) --SKIPIF-- --FILE-- setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); -$attrs = array(PDO::ATTR_STATEMENT_CLASS, PDO::ATTR_STRINGIFY_FETCHES, PDO::NULL_TO_STRING); +$attrs = array(PDO::ATTR_STATEMENT_CLASS, PDO::ATTR_STRINGIFY_FETCHES); foreach ($attrs as $attr) { - var_dump($pdo->setAttribute($attr, NULL)); - var_dump($pdo->setAttribute($attr, 1)); - var_dump($pdo->setAttribute($attr, 'nonsense')); + try { + var_dump($pdo->setAttribute($attr, NULL)); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } + try { + var_dump($pdo->setAttribute($attr, 1)); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } + try { + var_dump($pdo->setAttribute($attr, 'nonsense')); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } } @unlink(__DIR__."/foo.db"); ?> ---EXPECTF-- -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: attribute value must be an integer in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) -bool(true) -bool(true) -bool(true) +--EXPECT-- +TypeError: PDO::ATTR_STATEMENT_CLASS value must be of type array, null given +TypeError: PDO::ATTR_STATEMENT_CLASS value must be of type array, int given +TypeError: PDO::ATTR_STATEMENT_CLASS value must be of type array, string given +TypeError: Attribute value must be of type int for selected attribute, null given bool(true) bool(true) diff --git a/ext/pdo/tests/bug_44173.phpt b/ext/pdo/tests/bug_44173.phpt index df98f332fe188..0baa7973e5a70 100644 --- a/ext/pdo/tests/bug_44173.phpt +++ b/ext/pdo/tests/bug_44173.phpt @@ -19,8 +19,12 @@ $db->exec("INSERT INTO test VALUES (1)"); // Bug entry [2] -- 1 is PDO::FETCH_LAZY -$stmt = $db->query("SELECT * FROM test", PDO::FETCH_LAZY, 0, 0); -var_dump($stmt); +try { + $stmt = $db->query("SELECT * FROM test", PDO::FETCH_LAZY, 0, []); + var_dump($stmt); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} // Bug entry [3] @@ -31,39 +35,46 @@ try { } // Bug entry [4] -$stmt = $db->query("SELECT * FROM test", PDO::FETCH_CLASS, 0, 0, 0); -var_dump($stmt); +try { + $stmt = $db->query("SELECT * FROM test", PDO::FETCH_CLASS, 0, 0, 0); + var_dump($stmt); +} catch (\ArgumentCountError $e) { + echo $e->getMessage(), \PHP_EOL; +} // Bug entry [5] -$stmt = $db->query("SELECT * FROM test", PDO::FETCH_INTO); -var_dump($stmt); +try { + $stmt = $db->query("SELECT * FROM test", PDO::FETCH_INTO); + var_dump($stmt); +} catch (\ArgumentCountError $e) { + echo $e->getMessage(), \PHP_EOL; +} // Bug entry [6] -$stmt = $db->query("SELECT * FROM test", PDO::FETCH_COLUMN); -var_dump($stmt); +try { + $stmt = $db->query("SELECT * FROM test", PDO::FETCH_COLUMN); + var_dump($stmt); +} catch (\ArgumentCountError $e) { + echo $e->getMessage(), \PHP_EOL; +} // Bug entry [7] -$stmt = $db->query("SELECT * FROM test", PDO::FETCH_CLASS); -var_dump($stmt); +try { + $stmt = $db->query("SELECT * FROM test", PDO::FETCH_CLASS); + var_dump($stmt); +} catch (\ArgumentCountError $e) { + echo $e->getMessage(), \PHP_EOL; +} ?> ---EXPECTF-- -Warning: PDO::query(): SQLSTATE[HY000]: General error: fetch mode doesn't allow any extra arguments in %s -bool(false) +--EXPECT-- +PDO::query() expects exactly 2 arguments for the fetch mode provided, 4 given PDO::query(): Argument #2 ($fetch_mode) must be of type ?int, string given - -Warning: PDO::query(): SQLSTATE[HY000]: General error: too many arguments in %s -bool(false) - -Warning: PDO::query(): SQLSTATE[HY000]: General error: fetch mode requires the object parameter in %s -bool(false) - -Warning: PDO::query(): SQLSTATE[HY000]: General error: fetch mode requires the colno argument in %s -bool(false) - -Warning: PDO::query(): SQLSTATE[HY000]: General error: fetch mode requires the classname argument in %s -bool(false) +PDO::query() expects at most 4 arguments for the fetch mode provided, 5 given +PDO::query() expects exactly 3 arguments for the fetch mode provided, 2 given +PDO::query() expects exactly 3 arguments for the fetch mode provided, 2 given +PDO::query() expects at least 3 arguments for the fetch mode provided, 2 given diff --git a/ext/pdo/tests/pdo_038.phpt b/ext/pdo/tests/pdo_038.phpt index 3ff2d090a8580..a2887f35dbf89 100644 --- a/ext/pdo/tests/pdo_038.phpt +++ b/ext/pdo/tests/pdo_038.phpt @@ -32,14 +32,19 @@ switch ($conn->getAttribute(PDO::ATTR_DRIVER_NAME)) { $stmt = $conn->prepare($query); -var_dump(fetchColumn($stmt, -1)); +try { + var_dump(fetchColumn($stmt, -1)); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} var_dump(fetchColumn($stmt, 0)); -var_dump(fetchColumn($stmt, 1)); +try { + var_dump(fetchColumn($stmt, 1)); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} ?> ---EXPECTF-- -Warning: PDOStatement::fetchColumn(): SQLSTATE[HY000]: General error: Invalid column index in %s -bool(false) +--EXPECT-- +Column index must be greater than or equal to 0 string(1) "1" - -Warning: PDOStatement::fetchColumn(): SQLSTATE[HY000]: General error: Invalid column index in %s -bool(false) +Invalid column index diff --git a/ext/pdo/tests/pdo_quote_empty_string.phpt b/ext/pdo/tests/pdo_quote_empty_string.phpt new file mode 100644 index 0000000000000..214d1014b9713 --- /dev/null +++ b/ext/pdo/tests/pdo_quote_empty_string.phpt @@ -0,0 +1,31 @@ +--TEST-- +PDO::quote() must accept empty string for drivers which support this feature +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + +try { + $result = $pdo->quote(''); + if (!is_string($result)) { + var_dump($result); + } +} catch (\PDOException) { + // Do nothing as quoting is not supported with this driver +} +?> +DONE + +--EXPECT-- +DONE diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_errmode.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_errmode.phpt index 0d6cee356ebbd..d6ebd87f60327 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_errmode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_errmode.phpt @@ -14,29 +14,27 @@ error_reporting=E_ALL require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); - $valid = array(PDO::ERRMODE_SILENT, PDO::ERRMODE_WARNING, PDO::ERRMODE_EXCEPTION); - do { - $invalid = mt_rand(-1000, 1000); - } while (in_array($invalid, $valid)); - - - $tmp = array(); - if (false != @$db->setAttribute(PDO::ATTR_ERRMODE, $tmp)) - printf("[001] Maybe PDO could indicate that this is not a proper way of setting the ERRMODE...\n"); - - $tmp = new stdClass(); - $ret = @$db->setAttribute(PDO::ATTR_ERRMODE, $tmp); - if (false != $ret) - printf("[002] Maybe PDO could indicate that this is not a proper way of setting the ERRMODE...%s\n", - var_export($ret, true)); - - $ret = @$db->setAttribute(PDO::ATTR_ERRMODE, 'pdo'); - if (false != $ret) - printf("[003] Maybe PDO could indicate that this is not a proper way of setting the ERRMODE...%s\n", - var_export($ret, true)); - - if (false != @$db->setAttribute(PDO::ATTR_ERRMODE, $invalid)) - printf("[004] Invalid ERRMODE should be rejected\n"); + try { + $db->setAttribute(PDO::ATTR_ERRMODE, []); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } + try { + $db->setAttribute(PDO::ATTR_ERRMODE, new stdClass()); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } + try { + /* This currently passes */ + $db->setAttribute(PDO::ATTR_ERRMODE, 'pdo'); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } + try { + $db->setAttribute(PDO::ATTR_ERRMODE, 1000); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); // no message for any PDO call but... @@ -160,7 +158,9 @@ error_reporting=E_ALL print "done!\n"; ?> --EXPECTF-- -[003] Maybe PDO could indicate that this is not a proper way of setting the ERRMODE...true +TypeError: Attribute value must be of type int for selected attribute, array given +TypeError: Attribute value must be of type int for selected attribute, stdClass given +ValueError: Error mode must be one of the PDO::ERRMODE_* constants Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: %d You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '%s' at line %d in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_oracle_nulls.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_oracle_nulls.phpt index 694a0394415ca..6d922a037def8 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_oracle_nulls.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_oracle_nulls.phpt @@ -12,16 +12,22 @@ MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); - $tmp = array(); - if (false !== @$db->setAttribute(PDO::ATTR_ORACLE_NULLS, $tmp)) - printf("[001] Maybe PDO could indicate that this is not a proper way of setting ATTR_ORACLE_NULLS...\n"); - - $tmp = new stdClass(); - if (false !== @$db->setAttribute(PDO::ATTR_ORACLE_NULLS, $tmp)); - printf("[002] Maybe PDO could indicate that this is not a proper way of setting ATTR_ORACLE_NULLS...\n"); - - if (false !== @$db->setAttribute(PDO::ATTR_ORACLE_NULLS, 'pdo')) - printf("[003] Maybe PDO could indicate that this is not a proper way of setting ATTR_ORACLE_NULLS...\n"); + try { + $db->setAttribute(PDO::ATTR_ORACLE_NULLS, []); + } catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; + } + try { + $db->setAttribute(PDO::ATTR_ORACLE_NULLS, new stdClass()); + } catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; + } + try { + /* Currently passes... */ + $db->setAttribute(PDO::ATTR_ORACLE_NULLS, 'pdo'); + } catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; + } $db->setAttribute(PDO::ATTR_ORACLE_NULLS, 1); $stmt = $db->query("SELECT NULL AS z, '' AS a, ' ' AS b, TRIM(' ') as c, ' d' AS d, '" . chr(0) . " e' AS e"); @@ -82,8 +88,8 @@ MySQLPDOTest::skip(); print "done!"; ?> --EXPECTF-- -[002] Maybe PDO could indicate that this is not a proper way of setting ATTR_ORACLE_NULLS... -[003] Maybe PDO could indicate that this is not a proper way of setting ATTR_ORACLE_NULLS... +Attribute value must be of type int for selected attribute, array given +Attribute value must be of type int for selected attribute, stdClass given array(1) { [0]=> array(6) { diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt index 66df0cda459a1..6d536f9deddd2 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt @@ -16,15 +16,22 @@ $db = MySQLPDOTest::factory(); $default = $db->getAttribute(PDO::ATTR_STATEMENT_CLASS); var_dump($default); - if (false !== ($tmp = @$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, 'foo'))) - printf("[002] Expecting boolean/false got %s\n", var_export($tmp, true)); - - if (false !== ($tmp = @$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('classname')))) - printf("[003] Expecting boolean/false got %s\n", var_export($tmp, true)); - + try { + $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, 'foo'); + } catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; + } + try { + $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['classname']); + } catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; + } // unknown class - if (false !== ($tmp = $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('classname', array())))) - printf("[004] Expecting boolean/false got %s\n", var_export($tmp, true)); + try { + $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['classname', []]); + } catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; + } // class not derived from PDOStatement class myclass { @@ -32,8 +39,12 @@ $db = MySQLPDOTest::factory(); printf("myclass\n"); } } - if (false !== ($tmp = $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('myclass', array())))) - printf("[005] Expecting boolean/false got %s\n", var_export($tmp, true)); + + try { + $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['myclass', []]); + } catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; + } // public constructor not allowed class mystatement extends PDOStatement { @@ -42,8 +53,13 @@ $db = MySQLPDOTest::factory(); } } - if (false !== ($tmp = $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('mystatement', array())))) - printf("[006] Expecting boolean/false got %s\n", var_export($tmp, true)); + try { + if (false !== ($tmp = $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['mystatement', []]))) + printf("[006] Expecting boolean/false got %s\n", var_export($tmp, true)); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } + // ... but a public destructor is allowed class mystatement2 extends PDOStatement { @@ -109,18 +125,11 @@ array(1) { [0]=> string(12) "PDOStatement" } - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: user-supplied statement class must be derived from PDOStatement in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: user-supplied statement class cannot have a public constructor in %s on line %d - -Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error in %s on line %d +PDO::ATTR_STATEMENT_CLASS value must be of type array, string given +PDO::ATTR_STATEMENT_CLASS class must be a valid class +PDO::ATTR_STATEMENT_CLASS class must be a valid class +PDO::ATTR_STATEMENT_CLASS class must be derived from PDOStatement +TypeError: User-supplied statement class cannot have a public constructor array(2) { [0]=> string(12) "mystatement4" diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt index 6fe2ff20ba616..6afd57420f9f4 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt @@ -88,9 +88,11 @@ $db = MySQLPDOTest::factory(); if (1 != $db->getAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY)) printf("[002] Unable to switch to emulated prepared statements, test will fail\n"); - // TODO - that's PDO - you can prepare empty statements! - prepex(3, $db, '', - array(), array('execute' => array('sqlstate' => '42000'))); + try { + prepex(3, $db, '', [], ['execute' => ['sqlstate' => '42000']]); + } catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; + } // lets be fair and do the most simple SELECT first $stmt = prepex(4, $db, 'SELECT 1 as "one"'); @@ -328,6 +330,7 @@ $db->exec('DROP TABLE IF EXISTS test'); PDO's PS parser has some problems with invalid SQL and crashes from time to time (check with valgrind...) --EXPECT-- +PDO::prepare(): Argument #1 ($statement) cannot be empty array(1) { ["one"]=> string(1) "1" diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt index 5ea3e94c1e138..839fc43c15db4 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt @@ -99,9 +99,11 @@ $db = MySQLPDOTest::factory(); if (0 != $db->getAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY)) printf("[002] Unable to turn off emulated prepared statements\n"); - // TODO - that's PDO - you can prepare empty statements! - prepex(3, $db, '', - array(), array('prepare' => array('sqlstate' => '42000'))); + try { + prepex(3, $db, '', [], ['prepare' => ['sqlstate' => '42000']]); + } catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; + } // lets be fair and do the most simple SELECT first $stmt = prepex(4, $db, 'SELECT 1 as "one"'); @@ -342,6 +344,7 @@ $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> --EXPECT-- +PDO::prepare(): Argument #1 ($statement) cannot be empty array(1) { [0]=> array(1) { diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt index 44f0a0ebb18d2..b5b0275f04f7d 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt @@ -32,8 +32,11 @@ try { $stmt->execute(); // invalid offset - if (false !== ($tmp = @$stmt->getColumnMeta(-1))) - printf("[004] Expecting false got %s\n", var_export($tmp, true)); + try { + $stmt->getColumnMeta(-1); + } catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; + } $emulated = $stmt->getColumnMeta(0); @@ -299,5 +302,6 @@ $db->exec('DROP TABLE IF EXISTS test'); print "done!"; ?> --EXPECT-- +PDOStatement::getColumnMeta(): Argument #1 ($column) must be greater than or equal to 0 Testing native PS... done! diff --git a/ext/pdo_sqlite/tests/bug_44159_sqlite_version.phpt b/ext/pdo_sqlite/tests/bug_44159_sqlite_version.phpt new file mode 100644 index 0000000000000..fc30f1d21cc23 --- /dev/null +++ b/ext/pdo_sqlite/tests/bug_44159_sqlite_version.phpt @@ -0,0 +1,22 @@ +--TEST-- +PDO Common: Bug #44159: SQLite variant +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); + +var_dump($pdo->setAttribute(PDO::NULL_TO_STRING, NULL)); +var_dump($pdo->setAttribute(PDO::NULL_TO_STRING, 1)); +var_dump($pdo->setAttribute(PDO::NULL_TO_STRING, 'nonsense')); + +@unlink(__DIR__."/foo.db"); + +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) diff --git a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt index 4600b7935be09..814a01a6472d6 100644 --- a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt +++ b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt @@ -20,20 +20,40 @@ $st->fetchAll(PDO::FETCH_FUNC, function($x, $y) use ($st) { var_dump($st); print $st = $db->query('SELECT name FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, 'strtoupper')); -$st = $db->query('SELECT * FROM testing'); -var_dump($st->fetchAll(PDO::FETCH_FUNC, 'nothing')); +try { + $st = $db->query('SELECT * FROM testing'); + var_dump($st->fetchAll(PDO::FETCH_FUNC, 'nothing')); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} -$st = $db->query('SELECT * FROM testing'); -var_dump($st->fetchAll(PDO::FETCH_FUNC, '')); +try { + $st = $db->query('SELECT * FROM testing'); + var_dump($st->fetchAll(PDO::FETCH_FUNC, '')); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} -$st = $db->query('SELECT * FROM testing'); -var_dump($st->fetchAll(PDO::FETCH_FUNC, NULL)); +try { + $st = $db->query('SELECT * FROM testing'); + var_dump($st->fetchAll(PDO::FETCH_FUNC, NULL)); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} -$st = $db->query('SELECT * FROM testing'); -var_dump($st->fetchAll(PDO::FETCH_FUNC, 1)); +try { + $st = $db->query('SELECT * FROM testing'); + var_dump($st->fetchAll(PDO::FETCH_FUNC, 1)); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} -$st = $db->query('SELECT * FROM testing'); -var_dump($st->fetchAll(PDO::FETCH_FUNC, array('self', 'foo'))); +try { + $st = $db->query('SELECT * FROM testing'); + var_dump($st->fetchAll(PDO::FETCH_FUNC, array('self', 'foo'))); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} class foo { public function method($x) { @@ -64,14 +84,26 @@ new bar($db); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test'))); -$st = $db->query('SELECT * FROM testing'); -var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test2'))); +try { + $st = $db->query('SELECT * FROM testing'); + var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test2'))); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} -$st = $db->query('SELECT * FROM testing'); -var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test3'))); +try { + $st = $db->query('SELECT * FROM testing'); + var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test3'))); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} -$st = $db->query('SELECT * FROM testing'); -var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'inexistent'))); +try { + $st = $db->query('SELECT * FROM testing'); + var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'inexistent'))); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} ?> --EXPECTF-- @@ -91,31 +123,11 @@ array(2) { [1]=> string(0) "" } - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function "nothing" not found or invalid function name in %s on line %d - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function "" not found or invalid function name in %s on line %d - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: no array or string given in %s on line %d - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: no array or string given in %s on line %d - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: cannot access "self" when no class scope is active in %s on line %d - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) +function "nothing" not found or invalid function name +function "" not found or invalid function name +PDOStatement::fetchAll(): Argument #2 must be a callable, null given +no array or string given +cannot access "self" when no class scope is active array(2) { [0]=> string(9) "--- 1 ---" @@ -128,18 +140,6 @@ array(2) { [1]=> string(4) "2---" } - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: non-static method bar::test2() cannot be called statically in %s on line %d - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: non-static method bar::test3() cannot be called statically in %s on line %d - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class bar does not have a method "inexistent" in %s on line %d - -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d -bool(false) +non-static method bar::test2() cannot be called statically +non-static method bar::test3() cannot be called statically +class bar does not have a method "inexistent" From 7553c696c306d48499c71e4f165b0c93699c7b4a Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 28 Sep 2020 19:35:31 +0100 Subject: [PATCH 135/209] Another pass making some failure states unconditional erros in PDO Also make internal function return type more accurate to inform usage --- ext/pdo/pdo_dbh.c | 21 ++++++-------- ext/pdo/pdo_stmt.c | 29 +++++++++---------- .../tests/pdo_mysql_attr_statement_class.phpt | 19 +++++------- 3 files changed, 30 insertions(+), 39 deletions(-) diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 0f5eaab2e6e62..2e81db2bbf52d 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -34,7 +34,7 @@ #include "zend_interfaces.h" #include "pdo_dbh_arginfo.h" -static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value); +static zend_result pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value); void pdo_throw_exception(unsigned int driver_errcode, char *driver_errmsg, pdo_error_type *pdo_error) { @@ -405,6 +405,7 @@ PHP_METHOD(PDO, __construct) continue; } ZVAL_DEREF(attr_value); + /* TODO: Check that this doesn't fail? */ pdo_dbh_attribute_set(dbh, long_key, attr_value); } ZEND_HASH_FOREACH_END(); } @@ -434,6 +435,9 @@ static zval *pdo_stmt_instantiate(pdo_dbh_t *dbh, zval *object, zend_class_entry } if (UNEXPECTED(object_init_ex(object, dbstmt_ce) != SUCCESS)) { + if (EXPECTED(!EG(exception))) { + zend_throw_error(NULL, "Cannot instantiate user-supplied statement class"); + } return NULL; } @@ -544,13 +548,8 @@ PHP_METHOD(PDO, prepare) ZVAL_COPY_VALUE(&ctor_args, &dbh->def_stmt_ctor_args); } - /* Need to check if pdo_stmt_instantiate() throws an exception unconditionally to see if can change the RETURN_FALSE; */ if (!pdo_stmt_instantiate(dbh, return_value, dbstmt_ce, &ctor_args)) { - if (EXPECTED(!EG(exception))) { - zend_throw_error(NULL, "Cannot instantiate user-supplied statement class"); - } - PDO_HANDLE_DBH_ERR(); - RETURN_FALSE; + RETURN_THROWS(); } stmt = Z_PDO_STMT_P(return_value); @@ -674,7 +673,7 @@ PHP_METHOD(PDO, inTransaction) } /* }}} */ -static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* {{{ */ +static zend_result pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* {{{ */ { zend_long lval; @@ -752,6 +751,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* zval *item; if (dbh->is_persistent) { + /* TODO: ValueError/ PDOException? */ pdo_raise_impl_error(dbh, NULL, "HY000", "PDO::ATTR_STATEMENT_CLASS cannot be used with persistent PDO instances" ); @@ -1070,10 +1070,7 @@ PHP_METHOD(PDO, query) PDO_DBH_CLEAR_ERR(); if (!pdo_stmt_instantiate(dbh, return_value, dbh->def_stmt_ce, &dbh->def_stmt_ctor_args)) { - if (EXPECTED(!EG(exception))) { - pdo_raise_impl_error(dbh, NULL, "HY000", "failed to instantiate user supplied statement class"); - } - return; + RETURN_THROWS(); } stmt = Z_PDO_STMT_P(return_value); diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 0cec5d9955c53..3222a617f07e9 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -41,7 +41,7 @@ RETURN_THROWS(); \ } \ -static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_param_data *param) /* {{{ */ +static inline bool rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_param_data *param) /* {{{ */ { if (stmt->bound_param_map) { /* rewriting :name to ? style. @@ -90,9 +90,9 @@ static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_pa /* }}} */ /* trigger callback hook for parameters */ -static int dispatch_param_event(pdo_stmt_t *stmt, enum pdo_param_event event_type) /* {{{ */ +static bool dispatch_param_event(pdo_stmt_t *stmt, enum pdo_param_event event_type) /* {{{ */ { - int ret = 1, is_param = 1; + bool ret = 1, is_param = 1; struct pdo_bound_param_data *param; HashTable *ht; @@ -212,7 +212,7 @@ static void param_dtor(zval *el) /* {{{ */ } /* }}} */ -static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_stmt_t *stmt, int is_param) /* {{{ */ +static bool really_register_bound_param(struct pdo_bound_param_data *param, pdo_stmt_t *stmt, bool is_param) /* {{{ */ { HashTable *hash; zval *parameter; @@ -381,12 +381,7 @@ PHP_METHOD(PDOStatement, execute) param.paramno = -1; } else { /* we're okay to be zero based here */ - /* num_index is unsignend - if (num_index < 0) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY093", NULL); - RETURN_FALSE; - } - */ + /* num_index is unsignend */ param.paramno = num_index; } @@ -601,7 +596,7 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ } /* }}} */ -static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset) /* {{{ */ +static bool do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset) /* {{{ */ { if (!stmt->executed) { return 0; @@ -652,7 +647,7 @@ static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zen } /* }}} */ -static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */ +static bool do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */ { zend_class_entry *ce = stmt->fetch.cls.ce; zend_fcall_info *fci = &stmt->fetch.cls.fci; @@ -677,8 +672,7 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */ fcc->called_scope = ce; return 1; } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { - /* TODO Error? */ - pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied class does not have a constructor, use NULL for the ctor_params parameter, or simply omit it"); + zend_throw_error(NULL, "User-supplied statement does not accept constructor arguments"); return 0; } else { return 1; /* no ctor no args is also ok */ @@ -686,7 +680,7 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */ } /* }}} */ -static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * fci, zend_fcall_info_cache * fcc, int num_args) /* {{{ */ +static bool make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * fci, zend_fcall_info_cache * fcc, int num_args) /* {{{ */ { char *is_callable_error = NULL; @@ -809,6 +803,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h case PDO_FETCH_KEY_PAIR: if (stmt->column_count != 2) { + /* TODO: Error? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_KEY_PAIR fetch mode requires the result set to contain exactly 2 columns."); return 0; } @@ -904,6 +899,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h break; case PDO_FETCH_INTO: + /* TODO: Make this an assertion and ensure this is true higher up? */ if (Z_ISUNDEF(stmt->fetch.into)) { /* TODO ArgumentCountError? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch-into object specified."); @@ -919,6 +915,7 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h break; case PDO_FETCH_FUNC: + /* TODO: Make this an assertion and ensure this is true higher up? */ if (Z_ISUNDEF(stmt->fetch.func.function)) { /* TODO ArgumentCountError? */ pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch function specified"); @@ -1633,7 +1630,7 @@ PHP_METHOD(PDOStatement, setAttribute) /* {{{ Get an attribute */ -static int generic_stmt_attr_get(pdo_stmt_t *stmt, zval *return_value, zend_long attr) +static bool generic_stmt_attr_get(pdo_stmt_t *stmt, zval *return_value, zend_long attr) { switch (attr) { case PDO_ATTR_EMULATE_PREPARES: diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt index 6d536f9deddd2..77f231d28fa65 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt @@ -114,13 +114,15 @@ $db = MySQLPDOTest::factory(); // Yes, this is a fatal error and I want it to fail. abstract class mystatement6 extends mystatement5 { } - if (true !== ($tmp = $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('mystatement6', array('mystatement6'))))) - printf("[011] Expecting boolean/true got %s\n", var_export($tmp, true)); - $stmt = $db->query('SELECT id, label FROM test ORDER BY id ASC LIMIT 1'); + try { + $db->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['mystatement6', ['mystatement6']]); + $stmt = $db->query('SELECT id, label FROM test ORDER BY id ASC LIMIT 1'); + } catch (\Error $e) { + echo get_class($e), ': ', $e->getMessage(), \PHP_EOL; + } - print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { [0]=> string(12) "PDOStatement" @@ -157,9 +159,4 @@ array(1) { string(1) "a" } } - -Fatal error: Uncaught Error: Cannot instantiate abstract class mystatement6 in %s:%d -Stack trace: -#0 %s(%d): PDO->query('SELECT id, labe...') -#1 {main} - thrown in %s on line %d +Error: Cannot instantiate abstract class mystatement6 From f722512c4ad02cb0696ea8ea776aef5a709dcdbb Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 28 Sep 2020 23:54:28 +0300 Subject: [PATCH 136/209] Move invariant type guard out of loop --- ext/opcache/jit/zend_jit_trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 102d6a52f66f7..8057e8131b9f4 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -2005,7 +2005,8 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin ssa_var_info[phi->ssa_var].type = t & ~MAY_BE_GUARD; } } else if ((t1 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) == (t & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF))) { - if (!(t1 & MAY_BE_GUARD)) { + if (!(t1 & MAY_BE_GUARD) + || is_checked_guard(tssa, ssa_opcodes, phi->sources[1], phi->ssa_var)) { ssa_var_info[phi->ssa_var].type = t & ~MAY_BE_GUARD; ssa_var_info[phi->sources[0]].type = t | MAY_BE_GUARD; } From 6acfb79276809d70bafe91a45267c8a307ca900d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 28 Sep 2020 17:05:17 +0200 Subject: [PATCH 137/209] Fix #67465: NULL Pointer dereference in odbc_handle_preparer We have to initialize `stmt->driver_data` before we use it. Closes GH-6225. --- NEWS | 3 +++ ext/pdo_odbc/odbc_driver.c | 3 ++- ext/pdo_odbc/tests/bug67465.phpt | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ext/pdo_odbc/tests/bug67465.phpt diff --git a/NEWS b/NEWS index 21c054c981a4e..538e121a5a537 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ PHP NEWS . Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data binding). (Nikita) +- PDO_ODBC: + . Fixed bug #67465 (NULL Pointer dereference in odbc_handle_preparer). (cmb) + - Standard: . Fixed bug #80114 (parse_url does not accept URLs with port 0). (cmb, twosee) . Fixed bug #76943 (Inconsistent stream_wrapper_restore() errors). (cmb) diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index 7b857b80774ad..d0d51ad0649ef 100644 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -179,6 +179,8 @@ static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, return 0; } + stmt->driver_data = S; + cursor_type = pdo_attr_lval(driver_options, PDO_ATTR_CURSOR, PDO_CURSOR_FWDONLY); if (cursor_type != PDO_CURSOR_FWDONLY) { rc = SQLSetStmtAttr(S->stmt, SQL_ATTR_CURSOR_SCROLLABLE, (void*)SQL_SCROLLABLE, 0); @@ -197,7 +199,6 @@ static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len, efree(nsql); } - stmt->driver_data = S; stmt->methods = &odbc_stmt_methods; if (rc != SQL_SUCCESS) { diff --git a/ext/pdo_odbc/tests/bug67465.phpt b/ext/pdo_odbc/tests/bug67465.phpt new file mode 100644 index 0000000000000..872ca45c505c1 --- /dev/null +++ b/ext/pdo_odbc/tests/bug67465.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #67465 (NULL Pointer dereference in odbc_handle_preparer) +--SKIPIF-- + +--FILE-- +prepare("SELECT 1", [PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL]); +echo "done\n"; +?> +--EXPECT-- +done From ea03cbebbcebf3988a2274cf916e3f12a1dbea73 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Sat, 26 Sep 2020 10:41:20 -0500 Subject: [PATCH 138/209] Update PDO parameters for named arguments. Closes GH-6220 --- Zend/tests/bug70914.phpt | 2 +- ext/pdo/pdo_dbh.stub.php | 8 ++--- ext/pdo/pdo_dbh_arginfo.h | 10 +++--- ext/pdo/pdo_stmt.stub.php | 18 +++++------ ext/pdo/pdo_stmt_arginfo.h | 32 +++++++++---------- ext/pdo_mysql/tests/bug_37445.phpt | 2 +- .../tests/pdo_mysql_prepare_native.phpt | 2 +- .../tests/pdo_mysql_stmt_fetchobject.phpt | 2 +- .../tests/pdo_mysql_stmt_getcolumnmeta.phpt | 2 +- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Zend/tests/bug70914.phpt b/Zend/tests/bug70914.phpt index b8a1c91d36338..d1f42793129c0 100644 --- a/Zend/tests/bug70914.phpt +++ b/Zend/tests/bug70914.phpt @@ -18,4 +18,4 @@ try { } ?> --EXPECT-- -PDOStatement::fetchObject(): Argument #1 ($class_name) must be a valid class name, %Z given +PDOStatement::fetchObject(): Argument #1 ($class) must be a valid class name, %Z given diff --git a/ext/pdo/pdo_dbh.stub.php b/ext/pdo/pdo_dbh.stub.php index 2348abf048d86..a30d89890c330 100644 --- a/ext/pdo/pdo_dbh.stub.php +++ b/ext/pdo/pdo_dbh.stub.php @@ -4,7 +4,7 @@ class PDO { - public function __construct(string $dsn, ?string $username = null, ?string $passwd = null, ?array $options = null) {} + public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null) {} /** @return bool */ public function beginTransaction() {} @@ -34,13 +34,13 @@ public function inTransaction() {} public function lastInsertId(?string $name = null) {} /** @return PDOStatement|false */ - public function prepare(string $statement, array $driver_options = []) {} + public function prepare(string $query, array $driver_options = []) {} /** @return PDOStatement|false */ - public function query(string $statement, ?int $fetch_mode = null, mixed ...$fetch_mode_args) {} + public function query(string $query, ?int $fetch_mode = null, mixed ...$fetch_mode_args) {} /** @return string|false */ - public function quote(string $string, int $parameter_type = PDO::PARAM_STR) {} + public function quote(string $string, int $type = PDO::PARAM_STR) {} /** @return bool */ public function rollBack() {} diff --git a/ext/pdo/pdo_dbh_arginfo.h b/ext/pdo/pdo_dbh_arginfo.h index a3ab1994ed67d..ffeb1c9eeb01a 100644 --- a/ext/pdo/pdo_dbh_arginfo.h +++ b/ext/pdo/pdo_dbh_arginfo.h @@ -1,10 +1,10 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 0c7acc78768ad1fb77a09a24ebd4d4e660b350c9 */ + * Stub hash: 2bee02a9952faf3f768873bafe1be9ef89086029 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, dsn, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, username, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, passwd, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() @@ -34,19 +34,19 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_lastInsertId, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_prepare, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driver_options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_query, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, statement, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_mode, IS_LONG, 1, "null") ZEND_ARG_VARIADIC_TYPE_INFO(0, fetch_mode_args, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_quote, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameter_type, IS_LONG, 0, "PDO::PARAM_STR") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "PDO::PARAM_STR") ZEND_END_ARG_INFO() #define arginfo_class_PDO_rollBack arginfo_class_PDO_beginTransaction diff --git a/ext/pdo/pdo_stmt.stub.php b/ext/pdo/pdo_stmt.stub.php index 2732c8a71da56..eccd22d7d9541 100644 --- a/ext/pdo/pdo_stmt.stub.php +++ b/ext/pdo/pdo_stmt.stub.php @@ -5,13 +5,13 @@ class PDOStatement implements IteratorAggregate { /** @return bool */ - public function bindColumn(string|int $column, mixed &$param, int $type = 0, int $maxlen = 0, mixed $driverdata = null) {} + public function bindColumn(string|int $column, mixed &$param, int $type = 0, int $max_length = 0, mixed $driver_options = null) {} /** @return bool */ - public function bindParam(string|int $parameter, mixed &$param, int $type = PDO::PARAM_STR, int $maxlen = 0, mixed $driverdata = null) {} + public function bindParam(string|int $param, mixed &$bind_var, int $type = PDO::PARAM_STR, int $max_length = 0, mixed $driver_options = null) {} /** @return bool */ - public function bindValue(string|int $parameter, mixed $value, int $type = PDO::PARAM_STR) {} + public function bindValue(string|int $param, mixed $value, int $type = PDO::PARAM_STR) {} /** @return bool */ public function closeCursor() {} @@ -32,22 +32,22 @@ public function errorInfo() {} public function execute(?array $input_parameters = null) {} /** @return mixed */ - public function fetch(int $fetch_style = PDO::FETCH_BOTH, int $cursor_orientation = PDO::FETCH_ORI_NEXT, int $cursor_offset = 0) {} + public function fetch(int $mode = PDO::FETCH_BOTH, int $cursor_orientation = PDO::FETCH_ORI_NEXT, int $cursor_offset = 0) {} /** @return array */ - public function fetchAll(int $fetch_style = PDO::FETCH_BOTH, mixed ...$fetch_mode_args) {} + public function fetchAll(int $mode = PDO::FETCH_BOTH, mixed ...$args) {} /** @return mixed */ - public function fetchColumn(int $column_number = 0) {} + public function fetchColumn(int $index = 0) {} /** @return mixed */ - public function fetchObject(?string $class_name = "stdClass", ?array $ctor_args = null) {} + public function fetchObject(?string $class = "stdClass", ?array $constructor_args = null) {} /** @return mixed */ - public function getAttribute(int $attribute) {} + public function getAttribute(int $name) {} /** @return array|false */ - public function getColumnMeta(int $column) {} + public function getColumnMeta(int $index) {} /** @return bool */ public function nextRowset() {} diff --git a/ext/pdo/pdo_stmt_arginfo.h b/ext/pdo/pdo_stmt_arginfo.h index 157507a852ded..f55c1ea848d19 100644 --- a/ext/pdo/pdo_stmt_arginfo.h +++ b/ext/pdo/pdo_stmt_arginfo.h @@ -1,24 +1,24 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c12bc1c5d1e3dbd8cce67e50c974b20ec5564e67 */ + * Stub hash: b3338fc077eab1280da093f059fac14dd7f19678 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindColumn, 0, 0, 2) ZEND_ARG_TYPE_MASK(0, column, MAY_BE_STRING|MAY_BE_LONG, NULL) ZEND_ARG_TYPE_INFO(1, param, IS_MIXED, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driverdata, IS_MIXED, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driver_options, IS_MIXED, 0, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindParam, 0, 0, 2) - ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_STRING|MAY_BE_LONG, NULL) - ZEND_ARG_TYPE_INFO(1, param, IS_MIXED, 0) + ZEND_ARG_TYPE_MASK(0, param, MAY_BE_STRING|MAY_BE_LONG, NULL) + ZEND_ARG_TYPE_INFO(1, bind_var, IS_MIXED, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "PDO::PARAM_STR") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driverdata, IS_MIXED, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driver_options, IS_MIXED, 0, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindValue, 0, 0, 2) - ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_STRING|MAY_BE_LONG, NULL) + ZEND_ARG_TYPE_MASK(0, param, MAY_BE_STRING|MAY_BE_LONG, NULL) ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "PDO::PARAM_STR") ZEND_END_ARG_INFO() @@ -39,31 +39,31 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_execute, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetch, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_style, IS_LONG, 0, "PDO::FETCH_BOTH") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PDO::FETCH_BOTH") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cursor_orientation, IS_LONG, 0, "PDO::FETCH_ORI_NEXT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cursor_offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchAll, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_style, IS_LONG, 0, "PDO::FETCH_BOTH") - ZEND_ARG_VARIADIC_TYPE_INFO(0, fetch_mode_args, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PDO::FETCH_BOTH") + ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchColumn, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column_number, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, index, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchObject, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "\"stdClass\"") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ctor_args, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 1, "\"stdClass\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, constructor_args, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_getAttribute, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, attribute, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_getColumnMeta, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, column, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_class_PDOStatement_nextRowset arginfo_class_PDOStatement_closeCursor diff --git a/ext/pdo_mysql/tests/bug_37445.phpt b/ext/pdo_mysql/tests/bug_37445.phpt index b3251e335a953..ca321443e3d78 100644 --- a/ext/pdo_mysql/tests/bug_37445.phpt +++ b/ext/pdo_mysql/tests/bug_37445.phpt @@ -17,7 +17,7 @@ $stmt = $db->prepare("SELECT 1"); $stmt->bindParam(':a', 'b'); ?> --EXPECTF-- -Fatal error: Uncaught Error: PDOStatement::bindParam(): Argument #2 ($param) cannot be passed by reference in %sbug_37445.php:%d +Fatal error: Uncaught Error: PDOStatement::bindParam(): Argument #2 ($bind_var) cannot be passed by reference in %sbug_37445.php:%d Stack trace: #0 {main} thrown in %sbug_37445.php on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt index 839fc43c15db4..13534f0a1e49f 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt @@ -344,7 +344,7 @@ $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> --EXPECT-- -PDO::prepare(): Argument #1 ($statement) cannot be empty +PDO::prepare(): Argument #1 ($query) cannot be empty array(1) { [0]=> array(1) { diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt index 8e9e60b99e3a6..e83a99f5290b5 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt @@ -111,5 +111,5 @@ object(myclass)#%d (4) { ["null"]=> NULL } -PDOStatement::fetchObject(): Argument #1 ($class_name) must be a valid class name, class_does_not_exist given +PDOStatement::fetchObject(): Argument #1 ($class) must be a valid class name, class_does_not_exist given done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt index b5b0275f04f7d..61734061d9109 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt @@ -302,6 +302,6 @@ $db->exec('DROP TABLE IF EXISTS test'); print "done!"; ?> --EXPECT-- -PDOStatement::getColumnMeta(): Argument #1 ($column) must be greater than or equal to 0 +PDOStatement::getColumnMeta(): Argument #1 ($index) must be greater than or equal to 0 Testing native PS... done! From 7bc112a142720fdbd553e5bcdbbe98c10d10928a Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 28 Sep 2020 21:34:52 -0700 Subject: [PATCH 139/209] Update NEWS & UPGRADING --- NEWS | 7 +++++++ UPGRADING | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index d69ca63874e59..596c970821fec 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,13 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.2.34 +- Core: + . Fixed bug ##79699 (PHP parses encoded cookie names so malicious `__Host-` + cookies can be sent). (CVE-2020-7070) (Stas) + +- OpenSSL: + . Fixed bug ##79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 + bytes IV). (CVE-2020-7069) (Jakub Zelenka) 06 Aug 2020, PHP 7.2.33 diff --git a/UPGRADING b/UPGRADING index 52968a3857500..c40fa8973e316 100644 --- a/UPGRADING +++ b/UPGRADING @@ -52,11 +52,16 @@ PHP 7.2 UPGRADE NOTES . The hash_hmac(), hash_hmac_file(), hash_pbkdf2() and hash_init() (with HASH_HMAC) functions no longer accept non-cryptographic hashes. -- JSON +- JSON: . The json_decode() option JSON_OBJECT_AS_ARRAY is used if the second parameter (assoc) is null. Previously JSON_OBJECT_AS_ARRAY was always ignored. +- SAPI: + . Starting with 7.2.34, incoming cookie names are not url-decoded. This was never + required by the standard, outgoing cookie names aren't encoded and this leads + to security issues (CVE-2020-7070). + - Session: . Removed register_globals related code and "!" can be used as $_SESSION key name. . Session is made to manage session status correctly and prevents invalid operations. @@ -69,7 +74,7 @@ PHP 7.2 UPGRADE NOTES session_unset(), session_write_close()/session_commit(), session_abort(), session_reset() . Functions prohibit invalid operations with regard to session status and - HTTP header status, returns correct bool return value. + HTTP header status, return correct bool return value. session_start(), session_set_cookie_params(), session_name(), session_module_name(), session_set_save_handler(), session_regenerate_id(), session_cache_limiter(), session_cache_expire(), session_unset(), session_destroy(), @@ -88,7 +93,7 @@ PHP 7.2 UPGRADE NOTES session_start() . When headers are already sent and try to set new INI values, session_name(), session_module_name(), session_save_path(), session_cache_limiter() and - session_cache_expire() are no longer works. Older PHPs accepts new values even + session_cache_expire() no longer work. Older PHPs accept new values even if new values will not be effective. This new corrected behavior may affect command line mode CLI scripts that manage sessions. Use output buffer just like web applications to resolve problems on From 311922ddbe091afbbf63a344ec7b96e224ecf238 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 28 Sep 2020 21:38:58 -0700 Subject: [PATCH 140/209] Update UPGRADING --- UPGRADING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPGRADING b/UPGRADING index 7944087c4374e..2e8d358075f2b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -151,6 +151,11 @@ Reflection: . Reflection export to string now uses `int` and `bool` instead of `integer` and `boolean`. +- SAPI: + . Starting with 7.3.24, incoming cookie names are not url-decoded. This was never + required by the standard, outgoing cookie names aren't encoded and this leads + to security issues (CVE-2020-7070). + SPL: . If an SPL autoloader throws an exception, following autoloaders will not be executed. Previously all autoloaders were executed and exceptions were From 626705fb9de6211ee912b737e7a00bfe63fdea63 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 28 Sep 2020 21:39:20 -0700 Subject: [PATCH 141/209] Update UPGRADING --- UPGRADING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPGRADING b/UPGRADING index 3dfaad6d90765..40a768d6ba6f3 100644 --- a/UPGRADING +++ b/UPGRADING @@ -125,6 +125,11 @@ DOM: After: ReflectionMethod::getClosure($object = null) The new signature is also (LSP) compatible with older PHP versions. +- SAPI: + . Starting with 7.4.12, incoming cookie names are not url-decoded. This was never + required by the standard, outgoing cookie names aren't encoded and this leads + to security issues (CVE-2020-7070). + - SPL: . Calling get_object_vars() on an ArrayObject instance will now always return the properties of the ArrayObject itself (or a subclass). Previously it From 2f5cb702ffc31c8d88ff95a226723aeac0dec8be Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sat, 26 Sep 2020 22:08:52 -0700 Subject: [PATCH 142/209] Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) --- ext/openssl/openssl.c | 10 ++++----- ext/openssl/tests/cipher_tests.inc | 21 +++++++++++++++++ ext/openssl/tests/openssl_decrypt_ccm.phpt | 22 +++++++++++------- ext/openssl/tests/openssl_encrypt_ccm.phpt | 26 ++++++++++++++-------- 4 files changed, 57 insertions(+), 22 deletions(-) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 7e935ae8ec42d..2dc8eb3333970 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -6441,11 +6441,6 @@ static int php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_requir { char *iv_new; - /* Best case scenario, user behaved */ - if (*piv_len == iv_required_len) { - return SUCCESS; - } - if (mode->is_aead) { if (EVP_CIPHER_CTX_ctrl(cipher_ctx, mode->aead_ivlen_flag, *piv_len, NULL) != 1) { php_error_docref(NULL, E_WARNING, "Setting of IV length for AEAD mode failed"); @@ -6454,6 +6449,11 @@ static int php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_requir return SUCCESS; } + /* Best case scenario, user behaved */ + if (*piv_len == iv_required_len) { + return SUCCESS; + } + iv_new = ecalloc(1, iv_required_len + 1); if (*piv_len == 0) { diff --git a/ext/openssl/tests/cipher_tests.inc b/ext/openssl/tests/cipher_tests.inc index b1e46b411e54e..779bfa8515cbd 100644 --- a/ext/openssl/tests/cipher_tests.inc +++ b/ext/openssl/tests/cipher_tests.inc @@ -1,5 +1,26 @@ array( + array( + 'key' => '404142434445464748494a4b4c4d4e4f', + 'iv' => '1011121314151617', + 'aad' => '000102030405060708090a0b0c0d0e0f', + 'tag' => '1fc64fbfaccd', + 'pt' => '202122232425262728292a2b2c2d2e2f', + 'ct' => 'd2a1f0e051ea5f62081a7792073d593d', + ), + array( + 'key' => '404142434445464748494a4b4c4d4e4f', + 'iv' => '101112131415161718191a1b', + 'aad' => '000102030405060708090a0b0c0d0e0f' . + '10111213', + 'tag' => '484392fbc1b09951', + 'pt' => '202122232425262728292a2b2c2d2e2f' . + '3031323334353637', + 'ct' => 'e3b201a9f5b71a7a9b1ceaeccd97e70b' . + '6176aad9a4428aa5', + ), + ), 'aes-256-ccm' => array( array( 'key' => '1bde3251d41a8b5ea013c195ae128b21' . diff --git a/ext/openssl/tests/openssl_decrypt_ccm.phpt b/ext/openssl/tests/openssl_decrypt_ccm.phpt index a5f01b87cea8b..08ef5bb7b7c43 100644 --- a/ext/openssl/tests/openssl_decrypt_ccm.phpt +++ b/ext/openssl/tests/openssl_decrypt_ccm.phpt @@ -10,14 +10,16 @@ if (!in_array('aes-256-ccm', openssl_get_cipher_methods())) --FILE-- $test) { - echo "TEST $idx\n"; - $pt = openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA, - $test['iv'], $test['tag'], $test['aad']); - var_dump($test['pt'] === $pt); +foreach ($methods as $method) { + $tests = openssl_get_cipher_tests($method); + foreach ($tests as $idx => $test) { + echo "$method - TEST $idx\n"; + $pt = openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA, + $test['iv'], $test['tag'], $test['aad']); + var_dump($test['pt'] === $pt); + } } // no IV @@ -32,7 +34,11 @@ var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA, ?> --EXPECTF-- -TEST 0 +aes-128-ccm - TEST 0 +bool(true) +aes-128-ccm - TEST 1 +bool(true) +aes-256-ccm - TEST 0 bool(true) Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed in %s on line %d diff --git a/ext/openssl/tests/openssl_encrypt_ccm.phpt b/ext/openssl/tests/openssl_encrypt_ccm.phpt index fb5dbbc849d06..8c4c41f81870c 100644 --- a/ext/openssl/tests/openssl_encrypt_ccm.phpt +++ b/ext/openssl/tests/openssl_encrypt_ccm.phpt @@ -10,15 +10,17 @@ if (!in_array('aes-256-ccm', openssl_get_cipher_methods())) --FILE-- $test) { - echo "TEST $idx\n"; - $ct = openssl_encrypt($test['pt'], $method, $test['key'], OPENSSL_RAW_DATA, - $test['iv'], $tag, $test['aad'], strlen($test['tag'])); - var_dump($test['ct'] === $ct); - var_dump($test['tag'] === $tag); +foreach ($methods as $method) { + $tests = openssl_get_cipher_tests($method); + foreach ($tests as $idx => $test) { + echo "$method - TEST $idx\n"; + $ct = openssl_encrypt($test['pt'], $method, $test['key'], OPENSSL_RAW_DATA, + $test['iv'], $tag, $test['aad'], strlen($test['tag'])); + var_dump($test['ct'] === $ct); + var_dump($test['tag'] === $tag); + } } // Empty IV error @@ -32,7 +34,13 @@ var_dump(strlen($tag)); var_dump(openssl_encrypt('data', $method, 'password', 0, str_repeat('x', 16), $tag, '', 1024)); ?> --EXPECTF-- -TEST 0 +aes-128-ccm - TEST 0 +bool(true) +bool(true) +aes-128-ccm - TEST 1 +bool(true) +bool(true) +aes-256-ccm - TEST 0 bool(true) bool(true) From 95e1a415a50b6bdcf031915f3bb3d7dffa1718b8 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 20 Sep 2020 18:08:55 -0700 Subject: [PATCH 143/209] Do not decode cookie names anymore --- main/php_variables.c | 8 ++++++-- tests/basic/022.phpt | 10 +++++++--- tests/basic/023.phpt | 4 +++- tests/basic/bug79699.phpt | 22 ++++++++++++++++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 tests/basic/bug79699.phpt diff --git a/main/php_variables.c b/main/php_variables.c index d804a3860f4e0..ca015352d20a9 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -501,7 +501,9 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data) size_t new_val_len; *val++ = '\0'; - php_url_decode(var, strlen(var)); + if (arg != PARSE_COOKIE) { + php_url_decode(var, strlen(var)); + } val_len = php_url_decode(val, strlen(val)); val = estrndup(val, val_len); if (sapi_module.input_filter(arg, var, &val, val_len, &new_val_len)) { @@ -512,7 +514,9 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data) size_t val_len; size_t new_val_len; - php_url_decode(var, strlen(var)); + if (arg != PARSE_COOKIE) { + php_url_decode(var, strlen(var)); + } val_len = 0; val = estrndup("", val_len); if (sapi_module.input_filter(arg, var, &val, val_len, &new_val_len)) { diff --git a/tests/basic/022.phpt b/tests/basic/022.phpt index 0ab70d4be7643..bd1db13701822 100644 --- a/tests/basic/022.phpt +++ b/tests/basic/022.phpt @@ -10,7 +10,7 @@ cookie1=val1 ; cookie2=val2%20; cookie3=val 3.; cookie 4= value 4 %3B; cookie1= var_dump($_COOKIE); ?> --EXPECT-- -array(10) { +array(12) { ["cookie1"]=> string(6) "val1 " ["cookie2"]=> @@ -19,11 +19,15 @@ array(10) { string(6) "val 3." ["cookie_4"]=> string(10) " value 4 ;" + ["%20cookie1"]=> + string(6) "ignore" + ["+cookie1"]=> + string(6) "ignore" ["cookie__5"]=> string(7) " value" - ["cookie_6"]=> + ["cookie%206"]=> string(3) "" - ["cookie_7"]=> + ["cookie+7"]=> string(0) "" ["$cookie_8"]=> string(0) "" diff --git a/tests/basic/023.phpt b/tests/basic/023.phpt index ca5f1dcfbb1a2..0e2e0ac669453 100644 --- a/tests/basic/023.phpt +++ b/tests/basic/023.phpt @@ -10,9 +10,11 @@ c o o k i e=value; c o o k i e= v a l u e ;;c%20o+o k+i%20e=v;name="value","valu var_dump($_COOKIE); ?> --EXPECT-- -array(3) { +array(4) { ["c_o_o_k_i_e"]=> string(5) "value" + ["c%20o+o_k+i%20e"]=> + string(1) "v" ["name"]=> string(24) ""value","value",UEhQIQ==" ["UEhQIQ"]=> diff --git a/tests/basic/bug79699.phpt b/tests/basic/bug79699.phpt new file mode 100644 index 0000000000000..fc3d3fedb08fd --- /dev/null +++ b/tests/basic/bug79699.phpt @@ -0,0 +1,22 @@ +--TEST-- +Cookies Security Bug +--INI-- +max_input_vars=1000 +filter.default=unsafe_raw +--COOKIE-- +__%48ost-evil=evil; __Host-evil=good; %66oo=baz;foo=bar +--FILE-- + +--EXPECT-- +array(4) { + ["__%48ost-evil"]=> + string(4) "evil" + ["__Host-evil"]=> + string(4) "good" + ["%66oo"]=> + string(3) "baz" + ["foo"]=> + string(3) "bar" +} From af500b8685c3b2552c13b6c1a2d721d6b027585f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 29 Sep 2020 08:49:56 +0200 Subject: [PATCH 144/209] [ci skip] typo --- NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 596c970821fec..55a384dba700f 100644 --- a/NEWS +++ b/NEWS @@ -3,11 +3,11 @@ PHP NEWS ?? ??? ????, PHP 7.2.34 - Core: - . Fixed bug ##79699 (PHP parses encoded cookie names so malicious `__Host-` + . Fixed bug #79699 (PHP parses encoded cookie names so malicious `__Host-` cookies can be sent). (CVE-2020-7070) (Stas) - OpenSSL: - . Fixed bug ##79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 + . Fixed bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV). (CVE-2020-7069) (Jakub Zelenka) 06 Aug 2020, PHP 7.2.33 From 060fde43777e342514857db696618cc4e59c0ba9 Mon Sep 17 00:00:00 2001 From: zeriyoshi Date: Sat, 26 Sep 2020 06:58:03 +0900 Subject: [PATCH 145/209] Add call_user_func_array() backward incompatible change Closes GH-6218. [ci skip] --- UPGRADING | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UPGRADING b/UPGRADING index 26ecac9d94e42..e77c98d61697f 100644 --- a/UPGRADING +++ b/UPGRADING @@ -254,6 +254,8 @@ PHP 8.0 UPGRADE NOTES __wakeup(): void RFC: https://wiki.php.net/rfc/magic-methods-signature + . call_user_func_array() array keys will now be interpreted as parameter names, + instead of being silently ignored. - COM: . Removed the ability to import case-insensitive constants from type From 205556c1913e8774c037f9335a908c328eabc56e Mon Sep 17 00:00:00 2001 From: Giovanni Giacobbi Date: Tue, 29 Sep 2020 00:43:23 +0200 Subject: [PATCH 146/209] Synchronize php.ini-development and php.ini-production Closes GH-6231. --- php.ini-development | 10 ++++++---- php.ini-production | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/php.ini-development b/php.ini-development index 2c39ece23ca29..ea687bea15d1a 100644 --- a/php.ini-development +++ b/php.ini-development @@ -361,7 +361,9 @@ zend.enable_gc = On ; Default: "" ;zend.script_encoding = -; Allows to include or exclude arguments from stack traces generated for exceptions +; Allows to include or exclude arguments from stack traces generated for exceptions. +; In production, it is recommended to turn this setting on to prohibit the output +; of sensitive information in stack traces ; Default: Off zend.exception_ignore_args = Off @@ -525,7 +527,9 @@ report_memleaks = On ; This setting is on by default. ;report_zend_debug = 0 -; Store the last error/warning message in $php_errormsg (boolean). +; Store the last error/warning message in $php_errormsg (boolean). Setting this value +; to On can assist in debugging and is appropriate for development servers. It should +; however be disabled on production servers. ; This directive is DEPRECATED. ; Default Value: Off ; Development Value: Off @@ -1586,8 +1590,6 @@ zend.assertions = 1 ; http://php.net/assert.quiet-eval ;assert.quiet_eval = 0 - - [COM] ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs ; http://php.net/com.typelib-file diff --git a/php.ini-production b/php.ini-production index 4e946c83221c2..8d54423003f3f 100644 --- a/php.ini-production +++ b/php.ini-production @@ -361,10 +361,10 @@ zend.enable_gc = On ; Default: "" ;zend.script_encoding = -; Allows to include or exclude arguments from stack traces generated for exceptions -; Default: Off +; Allows to include or exclude arguments from stack traces generated for exceptions. ; In production, it is recommended to turn this setting on to prohibit the output ; of sensitive information in stack traces +; Default: Off zend.exception_ignore_args = On ;;;;;;;;;;;;;;;;; From 28991373917da1964d457994245eb0a7c83ca19e Mon Sep 17 00:00:00 2001 From: Matthias Karbe Date: Wed, 23 Sep 2020 14:25:30 +0200 Subject: [PATCH 147/209] Fix bug #80138 Skip getservbyname() and getservbyport() tests on *nix if there is no /etc/services file. Closes GH-6191. --- .../tests/general_functions/getservbyname_basic.phpt | 6 ++++++ .../tests/general_functions/getservbyport_basic.phpt | 6 ++++++ .../tests/general_functions/getservbyport_variation1.phpt | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/ext/standard/tests/general_functions/getservbyname_basic.phpt b/ext/standard/tests/general_functions/getservbyname_basic.phpt index adaa7afb43999..42504fc497037 100644 --- a/ext/standard/tests/general_functions/getservbyname_basic.phpt +++ b/ext/standard/tests/general_functions/getservbyname_basic.phpt @@ -5,6 +5,12 @@ Italian PHP TestFest 2009 Cesena 19-20-21 june Fabio Fabbrucci (fabbrucci@grupporetina.com) Michele Orselli (mo@ideato.it) Simone Gentili (sensorario@gmail.com) +--SKIPIF-- + --FILE-- --FILE-- --FILE-- Date: Wed, 23 Sep 2020 14:54:25 +0200 Subject: [PATCH 148/209] Fix bug #80137 Skip getprotobyname() and getprotobynumber() tests on *nix if there is no /etc/protocols file. Closes GH-6193. --- ext/standard/tests/network/getprotobyname_basic.phpt | 6 ++++++ ext/standard/tests/network/getprotobynumber_basic.phpt | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/ext/standard/tests/network/getprotobyname_basic.phpt b/ext/standard/tests/network/getprotobyname_basic.phpt index 37cc26aa2b165..76ce3a6e99dd4 100644 --- a/ext/standard/tests/network/getprotobyname_basic.phpt +++ b/ext/standard/tests/network/getprotobyname_basic.phpt @@ -2,6 +2,12 @@ getprotobyname function basic test --CREDITS-- edgarsandi - +--SKIPIF-- + --FILE-- +--SKIPIF-- + --FILE-- Date: Fri, 25 Sep 2020 17:27:41 +0200 Subject: [PATCH 149/209] Fix #80150: Failure to fetch error message In case of statement related errors, we need to pass the respective statement handle to `SQLError()`. Closes GH-6217. --- NEWS | 1 + ext/odbc/php_odbc.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 538e121a5a537..923d95cd5cf30 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ PHP NEWS . Fixed bug #78470 (odbc_specialcolumns() no longer accepts $nullable). (cmb) . Fixed bug #80147 (BINARY strings may not be properly zero-terminated). (cmb) + . Fixed bug #80150 (Failure to fetch error message). (cmb) - OPcache: . Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index a93252f7c450a..e26368dfebabb 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -3156,7 +3156,7 @@ PHP_FUNCTION(odbc_tables) type, SAFE_SQL_NTS(type)); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLTables"); + odbc_sql_error(conn, result->stmt, "SQLTables"); efree(result); RETURN_FALSE; } @@ -3227,7 +3227,7 @@ PHP_FUNCTION(odbc_columns) column, (SQLSMALLINT) column_len); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLColumns"); + odbc_sql_error(conn, result->stmt, "SQLColumns"); efree(result); RETURN_FALSE; } @@ -3292,7 +3292,7 @@ PHP_FUNCTION(odbc_columnprivileges) column, SAFE_SQL_NTS(column)); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLColumnPrivileges"); + odbc_sql_error(conn, result->stmt, "SQLColumnPrivileges"); efree(result); RETURN_FALSE; } @@ -3372,7 +3372,7 @@ PHP_FUNCTION(odbc_foreignkeys) ftable, SAFE_SQL_NTS(ftable) ); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLForeignKeys"); + odbc_sql_error(conn, result->stmt, "SQLForeignKeys"); efree(result); RETURN_FALSE; } @@ -3434,7 +3434,7 @@ PHP_FUNCTION(odbc_gettypeinfo) rc = SQLGetTypeInfo(result->stmt, data_type ); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLGetTypeInfo"); + odbc_sql_error(conn, result->stmt, "SQLGetTypeInfo"); efree(result); RETURN_FALSE; } @@ -3496,7 +3496,7 @@ PHP_FUNCTION(odbc_primarykeys) table, SAFE_SQL_NTS(table) ); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLPrimaryKeys"); + odbc_sql_error(conn, result->stmt, "SQLPrimaryKeys"); efree(result); RETURN_FALSE; } @@ -3565,7 +3565,7 @@ PHP_FUNCTION(odbc_procedurecolumns) col, SAFE_SQL_NTS(col) ); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLProcedureColumns"); + odbc_sql_error(conn, result->stmt, "SQLProcedureColumns"); efree(result); RETURN_FALSE; } @@ -3633,7 +3633,7 @@ PHP_FUNCTION(odbc_procedures) proc, SAFE_SQL_NTS(proc) ); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLProcedures"); + odbc_sql_error(conn, result->stmt, "SQLProcedures"); efree(result); RETURN_FALSE; } @@ -3706,7 +3706,7 @@ PHP_FUNCTION(odbc_specialcolumns) nullable); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLSpecialColumns"); + odbc_sql_error(conn, result->stmt, "SQLSpecialColumns"); efree(result); RETURN_FALSE; } @@ -3776,7 +3776,7 @@ PHP_FUNCTION(odbc_statistics) reserved); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLStatistics"); + odbc_sql_error(conn, result->stmt, "SQLStatistics"); efree(result); RETURN_FALSE; } @@ -3839,7 +3839,7 @@ PHP_FUNCTION(odbc_tableprivileges) table, SAFE_SQL_NTS(table)); if (rc == SQL_ERROR) { - odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLTablePrivileges"); + odbc_sql_error(conn, result->stmt, "SQLTablePrivileges"); efree(result); RETURN_FALSE; } From 7aa2d3519b09d37c908bce080f68bfb4d064bbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 28 Sep 2020 22:19:20 +0200 Subject: [PATCH 150/209] Zend parameter renames amendment Closes GH-6228 --- Zend/tests/015.phpt | 4 ++-- Zend/tests/exception_handler_004.phpt | 4 ++-- Zend/zend_builtin_functions.stub.php | 8 ++++---- Zend/zend_builtin_functions_arginfo.h | 10 +++++----- Zend/zend_closures.stub.php | 2 +- Zend/zend_closures_arginfo.h | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Zend/tests/015.phpt b/Zend/tests/015.phpt index 8c4dd62d397a3..d492590bcd920 100644 --- a/Zend/tests/015.phpt +++ b/Zend/tests/015.phpt @@ -23,8 +23,8 @@ var_dump(trigger_error("error", E_USER_DEPRECATED)); --EXPECTF-- Notice: error in %s on line %d bool(true) -trigger_error(): Argument #2 ($error_type) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED -trigger_error(): Argument #2 ($error_type) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED +trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED +trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED Warning: error in %s on line %d bool(true) diff --git a/Zend/tests/exception_handler_004.phpt b/Zend/tests/exception_handler_004.phpt index 9b2ae6933ac0c..a9f9e77a59d90 100644 --- a/Zend/tests/exception_handler_004.phpt +++ b/Zend/tests/exception_handler_004.phpt @@ -16,5 +16,5 @@ try { ?> --EXPECT-- -set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback or null, function "fo" not found or invalid function name -set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback or null, class "" not found +set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, function "fo" not found or invalid function name +set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, class "" not found diff --git a/Zend/zend_builtin_functions.stub.php b/Zend/zend_builtin_functions.stub.php index eaf2ac490a422..6209967b235e8 100644 --- a/Zend/zend_builtin_functions.stub.php +++ b/Zend/zend_builtin_functions.stub.php @@ -68,18 +68,18 @@ function get_included_files(): array {} /** @alias get_included_files */ function get_required_files(): array {} -function trigger_error(string $message, int $error_type = E_USER_NOTICE): bool {} +function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool {} /** @alias trigger_error */ -function user_error(string $message, int $error_type = E_USER_NOTICE): bool {} +function user_error(string $message, int $error_level = E_USER_NOTICE): bool {} /** @return string|array|object|null */ -function set_error_handler(?callable $error_handler, int $error_types = E_ALL) {} +function set_error_handler(?callable $callback, int $error_levels = E_ALL) {} function restore_error_handler(): bool {} /** @return string|array|object|null */ -function set_exception_handler(?callable $exception_handler) {} +function set_exception_handler(?callable $callback) {} function restore_exception_handler(): bool {} diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h index d10e2c3d68824..d5d2fb9113559 100644 --- a/Zend/zend_builtin_functions_arginfo.h +++ b/Zend/zend_builtin_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: fed3b572fbcae7bda87efc377b56e027da12b511 */ + * Stub hash: 9a77101b93e8584315bf43305830e129d359b033 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -124,21 +124,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_trigger_error, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_type, IS_LONG, 0, "E_USER_NOTICE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_level, IS_LONG, 0, "E_USER_NOTICE") ZEND_END_ARG_INFO() #define arginfo_user_error arginfo_trigger_error ZEND_BEGIN_ARG_INFO_EX(arginfo_set_error_handler, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, error_handler, IS_CALLABLE, 1) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_types, IS_LONG, 0, "E_ALL") + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_levels, IS_LONG, 0, "E_ALL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_restore_error_handler, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_set_exception_handler, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, exception_handler, IS_CALLABLE, 1) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1) ZEND_END_ARG_INFO() #define arginfo_restore_exception_handler arginfo_restore_error_handler diff --git a/Zend/zend_closures.stub.php b/Zend/zend_closures.stub.php index 875ee6920350d..906dedc5cfe9e 100644 --- a/Zend/zend_closures.stub.php +++ b/Zend/zend_closures.stub.php @@ -14,7 +14,7 @@ public static function bind( public function bindTo(?object $newThis, object|string|null $newScope = "static"): ?Closure {} - public function call(object $newThis, mixed ...$arguments): mixed {} + public function call(object $newThis, mixed ...$args): mixed {} public static function fromCallable(callable $callback): Closure {} } diff --git a/Zend/zend_closures_arginfo.h b/Zend/zend_closures_arginfo.h index 1a01ab2810771..1ccde0d6dd648 100644 --- a/Zend/zend_closures_arginfo.h +++ b/Zend/zend_closures_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 6c9840dd5c2e4c597cd0133bf2d0b523c272d3fe */ + * Stub hash: 0a2dd53716d30893aa5dd92a9907b2298abb3f70 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure___construct, 0, 0, 0) ZEND_END_ARG_INFO() @@ -17,7 +17,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Closure_call, 0, 1, IS_MIXED, 0) ZEND_ARG_TYPE_INFO(0, newThis, IS_OBJECT, 0) - ZEND_ARG_VARIADIC_TYPE_INFO(0, arguments, IS_MIXED, 0) + ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Closure_fromCallable, 0, 1, Closure, 0) From 0ec6452024dbb165c44c4feb642d16fe69ded590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 28 Sep 2020 22:48:34 +0200 Subject: [PATCH 151/209] Rename a few parameters in ext/filter Closes GH-6229 --- ext/filter/filter.stub.php | 10 +++++----- ext/filter/filter_arginfo.h | 14 +++++++------- ext/filter/tests/040.phpt | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ext/filter/filter.stub.php b/ext/filter/filter.stub.php index 56f926b913f3c..de92b935192a7 100644 --- a/ext/filter/filter.stub.php +++ b/ext/filter/filter.stub.php @@ -2,16 +2,16 @@ /** @generate-function-entries */ -function filter_has_var(int $type, string $variable_name): bool {} +function filter_has_var(int $input_type, string $var_name): bool {} -function filter_input(int $type, string $variable_name, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {} +function filter_input(int $type, string $var_name, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {} -function filter_var(mixed $variable, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {} +function filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {} function filter_input_array(int $type, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {} -function filter_var_array(array $data, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {} +function filter_var_array(array $array, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {} function filter_list(): array {} -function filter_id(string $filtername): int|false {} +function filter_id(string $name): int|false {} diff --git a/ext/filter/filter_arginfo.h b/ext/filter/filter_arginfo.h index bb3ab54666c5b..c4e4479e792a9 100644 --- a/ext/filter/filter_arginfo.h +++ b/ext/filter/filter_arginfo.h @@ -1,20 +1,20 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: dae0cf8beeb47a996123cffd3b429482047d42c1 */ + * Stub hash: b5f2e4a79eb6f30fe143b3086845435d0a0a6ef0 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_has_var, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, variable_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, input_type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, var_name, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_input, 0, 2, IS_MIXED, 0) ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, variable_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, var_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filter, IS_LONG, 0, "FILTER_DEFAULT") ZEND_ARG_TYPE_MASK(0, options, MAY_BE_ARRAY|MAY_BE_LONG, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_var, 0, 1, IS_MIXED, 0) - ZEND_ARG_TYPE_INFO(0, variable, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filter, IS_LONG, 0, "FILTER_DEFAULT") ZEND_ARG_TYPE_MASK(0, options, MAY_BE_ARRAY|MAY_BE_LONG, "0") ZEND_END_ARG_INFO() @@ -26,7 +26,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_filter_input_array, 0, 1, MAY_BE ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_filter_var_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE|MAY_BE_NULL) - ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) ZEND_ARG_TYPE_MASK(0, options, MAY_BE_ARRAY|MAY_BE_LONG, "FILTER_DEFAULT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, add_empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() @@ -35,7 +35,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_list, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_filter_id, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, filtername, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() diff --git a/ext/filter/tests/040.phpt b/ext/filter/tests/040.phpt index 6f0a79199f2ef..1d742c89a49b1 100644 --- a/ext/filter/tests/040.phpt +++ b/ext/filter/tests/040.phpt @@ -34,6 +34,6 @@ bool(true) bool(true) bool(false) bool(false) -filter_has_var(): Argument #1 ($type) must be an INPUT_* constant +filter_has_var(): Argument #1 ($input_type) must be an INPUT_* constant bool(false) Done From e19599287eb7c41f9cb7ecbff8f3a363b15971e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 28 Sep 2020 23:02:42 +0200 Subject: [PATCH 152/209] Reflection param renames amendment Closes GH-6230 --- ext/reflection/php_reflection.stub.php | 8 ++++---- ext/reflection/php_reflection_arginfo.h | 10 ++++------ ext/reflection/tests/parameters_001.phpt | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index b150d1831ded5..bd0a6fe0a1779 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -194,7 +194,7 @@ public function getDeclaringClass() {} public function getPrototype() {} /** @return void */ - public function setAccessible(bool $isAccessible) {} + public function setAccessible(bool $accessible) {} } class ReflectionClass implements Reflector @@ -364,7 +364,7 @@ public function getAttributes(?string $name = null, int $flags = 0): array {} class ReflectionObject extends ReflectionClass { - public function __construct(object $argument) {} + public function __construct(object $object) {} } class ReflectionProperty implements Reflector @@ -415,7 +415,7 @@ public function getDeclaringClass() {} public function getDocComment() {} /** @return void */ - public function setAccessible(bool $isAccessible) {} + public function setAccessible(bool $accessible) {} /** @return ReflectionType|null */ public function getType() {} @@ -475,7 +475,7 @@ class ReflectionParameter implements Reflector final private function __clone() {} /** @param string|array|object $function */ - public function __construct($function, int|string $parameter) {} + public function __construct($function, int|string $param) {} public function __toString(): string {} diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 5457b14d47003..bd90c8cb68806 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 35e17de0cdf6c11a315f6d10fd711492d1da567c */ + * Stub hash: f5f4cfeab0e81c2b51bf11dde7b7d40fc87d9cbc */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) @@ -144,7 +144,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionMethod_getPrototype arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_setAccessible, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, isAccessible, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, accessible, _IS_BOOL, 0) ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass___clone arginfo_class_ReflectionFunctionAbstract___clone @@ -277,9 +277,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_getAttributes arginfo_class_ReflectionFunctionAbstract_getAttributes -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionObject___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, argument, IS_OBJECT, 0) -ZEND_END_ARG_INFO() +#define arginfo_class_ReflectionObject___construct arginfo_class_ReflectionClass_isInstance #define arginfo_class_ReflectionProperty___clone arginfo_class_ReflectionFunctionAbstract___clone @@ -363,7 +361,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter___construct, 0, 0, 2) ZEND_ARG_INFO(0, function) - ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_MASK(0, param, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_class_ReflectionParameter___toString arginfo_class_ReflectionFunction___toString diff --git a/ext/reflection/tests/parameters_001.phpt b/ext/reflection/tests/parameters_001.phpt index 8299a63bf9d69..d50d1a1e720ff 100644 --- a/ext/reflection/tests/parameters_001.phpt +++ b/ext/reflection/tests/parameters_001.phpt @@ -39,4 +39,4 @@ int(1) bool(false) bool(true) string(54) "The parameter specified by its name could not be found" -string(95) "ReflectionParameter::__construct(): Argument #2 ($parameter) must be greater than or equal to 0" +string(91) "ReflectionParameter::__construct(): Argument #2 ($param) must be greater than or equal to 0" From 351776eae583d3dc352a4b3e8f4e4a639f8c59ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 29 Sep 2020 09:19:45 +0200 Subject: [PATCH 153/209] Make the $filter parameter of ReflectionClass::get*Constants() nullable --- ext/reflection/php_reflection.c | 22 ++++++++++++++----- ext/reflection/php_reflection.stub.php | 4 ++-- ext/reflection/php_reflection_arginfo.h | 8 +++---- .../tests/ReflectionClass_toString_001.phpt | 4 ++-- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index d4f89be69f524..7b9c37d1eb51e 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4190,7 +4190,7 @@ ZEND_METHOD(ReflectionClass, getMethods) reflection_object *intern; zend_class_entry *ce; zend_function *mptr; - zend_long filter = 0; + zend_long filter; zend_bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { @@ -4366,7 +4366,7 @@ ZEND_METHOD(ReflectionClass, getProperties) zend_class_entry *ce; zend_string *key; zend_property_info *prop_info; - zend_long filter = 0; + zend_long filter; zend_bool filter_is_null = 1; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { @@ -4422,12 +4422,17 @@ ZEND_METHOD(ReflectionClass, getConstants) zend_string *key; zend_class_constant *constant; zval val; - zend_long filter = ZEND_ACC_PPP_MASK; + zend_long filter; + zend_bool filter_is_null = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); } + if (filter_is_null) { + filter = ZEND_ACC_PPP_MASK; + } + GET_REFLECTION_OBJECT_PTR(ce); array_init(return_value); @@ -4452,12 +4457,17 @@ ZEND_METHOD(ReflectionClass, getReflectionConstants) zend_class_entry *ce; zend_string *name; zend_class_constant *constant; - zend_long filter = ZEND_ACC_PPP_MASK; + zend_long filter; + zend_bool filter_is_null = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { RETURN_THROWS(); } + if (filter_is_null) { + filter = ZEND_ACC_PPP_MASK; + } + GET_REFLECTION_OBJECT_PTR(ce); array_init(return_value); diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index bd0a6fe0a1779..cf6613c3a32ed 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -260,10 +260,10 @@ public function getProperties(?int $filter = null) {} public function hasConstant(string $name) {} /** @return array|null */ - public function getConstants(int $filter = ReflectionClassConstant::IS_PUBLIC | ReflectionClassConstant::IS_PROTECTED | ReflectionClassConstant::IS_PRIVATE) {} + public function getConstants(?int $filter = null) {} /** @return ReflectionClassConstant[] */ - public function getReflectionConstants(int $filter = ReflectionClassConstant::IS_PUBLIC | ReflectionClassConstant::IS_PROTECTED | ReflectionClassConstant::IS_PRIVATE) {} + public function getReflectionConstants(?int $filter = null) {} /** @return mixed */ public function getConstant(string $name) {} diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index bd90c8cb68806..6044f7f2434cd 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f5f4cfeab0e81c2b51bf11dde7b7d40fc87d9cbc */ + * Stub hash: 4429ea0f96f81c3dbfb2a7e6e00ce49aea4bfeb1 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) @@ -195,11 +195,9 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_hasConstant arginfo_class_ReflectionClass_hasMethod -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_getConstants, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filter, IS_LONG, 0, "ReflectionClassConstant::IS_PUBLIC | ReflectionClassConstant::IS_PROTECTED | ReflectionClassConstant::IS_PRIVATE") -ZEND_END_ARG_INFO() +#define arginfo_class_ReflectionClass_getConstants arginfo_class_ReflectionClass_getMethods -#define arginfo_class_ReflectionClass_getReflectionConstants arginfo_class_ReflectionClass_getConstants +#define arginfo_class_ReflectionClass_getReflectionConstants arginfo_class_ReflectionClass_getMethods #define arginfo_class_ReflectionClass_getConstant arginfo_class_ReflectionClass_hasMethod diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index 00e41bfcc9f68..13b6130a407e2 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -166,14 +166,14 @@ Class [ class ReflectionClass implements Reflector, String Method [ public method getConstants ] { - Parameters [1] { - Parameter #0 [ int $filter = ReflectionClassConstant::IS_PUBLIC | ReflectionClassConstant::IS_PROTECTED | ReflectionClassConstant::IS_PRIVATE ] + Parameter #0 [ ?int $filter = null ] } } Method [ public method getReflectionConstants ] { - Parameters [1] { - Parameter #0 [ int $filter = ReflectionClassConstant::IS_PUBLIC | ReflectionClassConstant::IS_PROTECTED | ReflectionClassConstant::IS_PRIVATE ] + Parameter #0 [ ?int $filter = null ] } } From 3928b6b435f6c7c818e8211b2ecdeeb7191310d1 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 29 Sep 2020 12:11:01 +0300 Subject: [PATCH 154/209] Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf459 --- ext/opcache/ZendAccelerator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index b9a0946a5632e..3da1a5492ec9b 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4078,6 +4078,7 @@ static void preload_fix_trait_methods(zend_class_entry *ce) static int preload_optimize(zend_persistent_script *script) { zend_class_entry *ce; + zend_persistent_script *tmp_script; zend_shared_alloc_init_xlat_table(); @@ -4087,8 +4088,8 @@ static int preload_optimize(zend_persistent_script *script) } } ZEND_HASH_FOREACH_END(); - ZEND_HASH_FOREACH_PTR(preload_scripts, script) { - ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) { + ZEND_HASH_FOREACH_PTR(preload_scripts, tmp_script) { + ZEND_HASH_FOREACH_PTR(&tmp_script->script.class_table, ce) { if (ce->ce_flags & ZEND_ACC_TRAIT) { preload_register_trait_methods(ce); } From 9f5a77188c71bada8175dc48dd20847760bb7b10 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 27 Sep 2020 23:11:56 +0200 Subject: [PATCH 155/209] Fix #22986: odbc_connect() may reuse persistent connection `odbc_connect()` should not reuse persistent connections, since that prohibits multiple concurrent connections, which are occasionally desireable. We fix that by no longer looking for already cached connections when `odbc_connect()` is called, and instead creating a new connection instead. Closes GH-6223. --- NEWS | 3 +++ UPGRADING | 1 + ext/odbc/php_odbc.c | 58 ++++++++------------------------------------- 3 files changed, 14 insertions(+), 48 deletions(-) diff --git a/NEWS b/NEWS index 25077eaf54314..d9b7b57cfd0ff 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ PHP NEWS . Fixed bug #80109 (Cannot skip arguments when extended debug is enabled). (Nikita) +- ODBC: + . Fixed bug #22986 (odbc_connect() may reuse persistent connection). (cmb) + - PDO_Firebird: . Fixed bug #64937 (Firebird PDO preprocessing sql). (Simonov Denis) diff --git a/UPGRADING b/UPGRADING index e77c98d61697f..9fdfe5b6bb035 100644 --- a/UPGRADING +++ b/UPGRADING @@ -394,6 +394,7 @@ PHP 8.0 UPGRADE NOTES . oci_internal_debug() and its alias ociinternaldebug() have been removed. - ODBC: + . odbc_connect() no longer reuses persistent connections. . The unused flags parameter of odbc_exec() has been removed. - OpenSSL: diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 60f5a80f9494f..8bffa2949a9e4 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2167,15 +2167,7 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int /* Persistent connections: two list-types le_pconn, le_conn and a plist * where hashed connection info is stored together with index pointer to * the actual link of type le_pconn in the list. Only persistent - * connections get hashed up. Normal connections use existing pconnections. - * Maybe this has to change with regard to transactions on pconnections? - * Possibly set autocommit to on on request shutdown. - * - * We do have to hash non-persistent connections, and reuse connections. - * In the case where two connects were being made, without closing the first - * connect, access violations were occurring. This is because some of the - * "globals" in this module should actually be per-connection variables. I - * simply fixed things to get them working for now. Shane + * connections get hashed up. */ /* {{{ odbc_do_connect */ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) @@ -2184,8 +2176,7 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) size_t db_len, uid_len, pwd_len; zend_long pv_opt = SQL_CUR_DEFAULT; odbc_connection *db_conn; - char *hashed_details; - int hashed_len, cur_opt; + int cur_opt; /* Now an optional 4th parameter specifying the cursor type * defaulting to the cursors default @@ -2212,20 +2203,15 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) persistent = 0; } - hashed_len = spprintf(&hashed_details, 0, "%s_%s_%s_%s_%d", ODBC_TYPE, db, uid, pwd, cur_opt); - - /* FIXME the idea of checking to see if our connection is already persistent - is good, but it adds a lot of overhead to non-persistent connections. We - should look and see if we can fix that somehow */ - /* try to find if we already have this link in our persistent list, - * no matter if it is to be persistent or not - */ - try_and_get_another_connection: if (persistent) { + char *hashed_details; + int hashed_len; zend_resource *le; + hashed_len = spprintf(&hashed_details, 0, "%s_%s_%s_%s_%d", ODBC_TYPE, db, uid, pwd, cur_opt); + /* the link is not in the persistent list */ if ((le = zend_hash_str_find_ptr(&EG(persistent_list), hashed_details, hashed_len)) == NULL) { if (ODBCG(max_links) != -1 && ODBCG(num_links) >= ODBCG(max_links)) { @@ -2254,9 +2240,8 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) db_conn->res = zend_register_resource(db_conn, le_pconn); RETVAL_RES(db_conn->res); } else { /* found connection */ - if (le->type != le_pconn) { - RETURN_FALSE; - } + ZEND_ASSERT(le->type == le_pconn); + /* * check to see if the connection is still valid */ @@ -2287,38 +2272,18 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } } } + efree(hashed_details); db_conn->res = zend_register_resource(db_conn, le_pconn); RETVAL_RES(db_conn->res); } else { /* non persistent */ - zend_resource *index_ptr, new_index_ptr; - - if ((index_ptr = zend_hash_str_find_ptr(&EG(regular_list), hashed_details, hashed_len)) != NULL) { - zend_ulong conn_id; - zend_resource *p; + zend_resource new_index_ptr; - if (index_ptr->type != le_index_ptr) { - RETURN_FALSE; - } - conn_id = (zend_ulong)index_ptr->ptr; - p = zend_hash_index_find_ptr(&EG(regular_list), conn_id); /* check if the connection is still there */ - - if (p && p->ptr && (p->type == le_conn || p->type == le_pconn)) { - GC_ADDREF(p); - RETVAL_RES(p); - efree(hashed_details); - return; - } else { - zend_hash_str_del(&EG(regular_list), hashed_details, hashed_len); - } - } if (ODBCG(max_links) != -1 && ODBCG(num_links) >= ODBCG(max_links)) { php_error_docref(NULL, E_WARNING,"Too many open connections (%ld)",ODBCG(num_links)); - efree(hashed_details); RETURN_FALSE; } if (!odbc_sqlconnect(&db_conn, db, uid, pwd, cur_opt, 0)) { - efree(hashed_details); RETURN_FALSE; } db_conn->res = zend_register_resource(db_conn, le_conn); @@ -2326,11 +2291,8 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) new_index_ptr.ptr = (void *)(zend_uintptr_t)Z_RES_HANDLE_P(return_value); new_index_ptr.type = le_index_ptr; - zend_hash_str_update_mem(&EG(regular_list), hashed_details, hashed_len, (void *) &new_index_ptr, - sizeof(zend_resource)); ODBCG(num_links)++; } - efree(hashed_details); } /* }}} */ From 47a166c8378e8e670994f272c7f948b67014c619 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 23 Sep 2020 23:52:27 +0200 Subject: [PATCH 156/209] Fix #78792: zlib.output_compression disabled by Content-Type: image/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disabling output compression for images has served to fix bug #16109, where zlib compressed images apparently have caused issues with Navigator 4. This shouldn't be an issue with somewhat contemporary browsers. Other than that, this is an arbitrary restriction – why don't we disable the compression for some other media types as well (e.g. video/* and audio/*)? All in all, we should leave that decision to userland. Closes GH-6198. --- NEWS | 4 ++++ UPGRADING | 2 ++ main/SAPI.c | 7 ------- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index d9b7b57cfd0ff..f91bd85e71cd5 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,10 @@ PHP NEWS - SPL: . SplFixedArray is now IteratorAggregate rather than Iterator. (alexdowad) +- Zlib: + . Fixed bug #78792 (zlib.output_compression disabled by Content-Type: image/). + (cmb) + 17 Sep 2020, PHP 8.0.0beta4 - Core: diff --git a/UPGRADING b/UPGRADING index 9fdfe5b6bb035..c2e425ef116b9 100644 --- a/UPGRADING +++ b/UPGRADING @@ -662,6 +662,8 @@ PHP 8.0 UPGRADE NOTES . deflate_init() will now return a DeflateContext object rather than a resource. Return value checks using is_resource() should be replaced with checks for `false`. + . zlib.output_compression is no longer automatically disabled for + Content-Type: image/*. ======================================== 2. New Features diff --git a/main/SAPI.c b/main/SAPI.c index 01ec31f72218f..0a7f219e847e5 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -762,13 +762,6 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg) len--; } - /* Disable possible output compression for images */ - if (!strncmp(ptr, "image/", sizeof("image/")-1)) { - zend_string *key = zend_string_init("zlib.output_compression", sizeof("zlib.output_compression")-1, 0); - zend_alter_ini_entry_chars(key, "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); - zend_string_release_ex(key, 0); - } - mimetype = estrdup(ptr); newlen = sapi_apply_default_charset(&mimetype, len); if (!SG(sapi_headers).mimetype){ From bf5f07cc8b99db53457afb87ee3e996a40a80d24 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 26 Sep 2020 13:14:40 +0200 Subject: [PATCH 157/209] Fix #80152: odbc_execute() moves internal pointer of $params As least intrusive fix, we separate the passed array argument. Closes GH-6219. --- NEWS | 1 + ext/odbc/php_odbc.c | 2 +- ext/odbc/tests/bug80152.phpt | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ext/odbc/tests/bug80152.phpt diff --git a/NEWS b/NEWS index 923d95cd5cf30..a090a64eee819 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ PHP NEWS . Fixed bug #80147 (BINARY strings may not be properly zero-terminated). (cmb) . Fixed bug #80150 (Failure to fetch error message). (cmb) + . Fixed bug #80152 (odbc_execute() moves internal pointer of $params). (cmb) - OPcache: . Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index e26368dfebabb..0722a91e3449e 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1309,7 +1309,7 @@ PHP_FUNCTION(odbc_execute) int numArgs = ZEND_NUM_ARGS(), i, ne; RETCODE rc; - if (zend_parse_parameters(numArgs, "r|a", &pv_res, &pv_param_arr) == FAILURE) { + if (zend_parse_parameters(numArgs, "r|a/", &pv_res, &pv_param_arr) == FAILURE) { return; } diff --git a/ext/odbc/tests/bug80152.phpt b/ext/odbc/tests/bug80152.phpt new file mode 100644 index 0000000000000..719ec3a516864 --- /dev/null +++ b/ext/odbc/tests/bug80152.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #80152 (odbc_execute() moves internal pointer of $params) +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +int(0) +int(0) From a6ecafece90909d74a578e09f626e875d3035eab Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 29 Sep 2020 11:41:17 +0200 Subject: [PATCH 158/209] Use external iterator instead of via the internal pointer --- ext/odbc/php_odbc.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 09c71b97cf489..a64501c3ef3fb 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -977,7 +977,7 @@ PHP_FUNCTION(odbc_execute) int i, ne; RETCODE rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|h/", &pv_res, &pv_param_ht) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|h", &pv_res, &pv_param_ht) == FAILURE) { RETURN_THROWS(); } @@ -991,25 +991,13 @@ PHP_FUNCTION(odbc_execute) RETURN_FALSE; } - zend_hash_internal_pointer_reset(pv_param_ht); params = (params_t *)safe_emalloc(sizeof(params_t), result->numparams, 0); for(i = 0; i < result->numparams; i++) { params[i].fp = -1; } - for(i = 1; i <= result->numparams; i++) { - if ((tmp = zend_hash_get_current_data(pv_param_ht)) == NULL) { - php_error_docref(NULL, E_WARNING,"Error getting parameter"); - SQLFreeStmt(result->stmt,SQL_RESET_PARAMS); - for (i = 0; i < result->numparams; i++) { - if (params[i].fp != -1) { - close(params[i].fp); - } - } - efree(params); - RETURN_FALSE; - } - + i = 1; + ZEND_HASH_FOREACH_VAL(pv_param_ht, tmp) { otype = Z_TYPE_P(tmp); if (!try_convert_to_string(tmp)) { SQLFreeStmt(result->stmt, SQL_RESET_PARAMS); @@ -1099,8 +1087,8 @@ PHP_FUNCTION(odbc_execute) efree(params); RETURN_FALSE; } - zend_hash_move_forward(pv_param_ht); - } + if (i++ > result->numparams) break; + } ZEND_HASH_FOREACH_END(); } /* Close cursor, needed for doing multiple selects */ rc = SQLFreeStmt(result->stmt, SQL_CLOSE); From dddb40313bf8acdf0294deb3b41fbe94de2806e6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 29 Sep 2020 13:05:24 +0300 Subject: [PATCH 159/209] Keep track information about used JIT trigger in ZEND_FUNC_INFO(op_array)->func_info.flags --- ext/opcache/Optimizer/zend_func_info.h | 6 ++++++ ext/opcache/jit/zend_jit.c | 10 +++++++++- ext/opcache/jit/zend_jit_trace.c | 15 +++++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/ext/opcache/Optimizer/zend_func_info.h b/ext/opcache/Optimizer/zend_func_info.h index 97f60ad37e60f..13dd2e3127c38 100644 --- a/ext/opcache/Optimizer/zend_func_info.h +++ b/ext/opcache/Optimizer/zend_func_info.h @@ -35,6 +35,12 @@ #define ZEND_FUNC_HAS_EXTENDED_STMT (1<<11) #define ZEND_SSA_TSSA (1<<12) /* used by tracing JIT */ +#define ZEND_FUNC_JIT_ON_FIRST_EXEC (1<<13) /* used by JIT */ +#define ZEND_FUNC_JIT_ON_PROF_REQUEST (1<<14) /* used by JIT */ +#define ZEND_FUNC_JIT_ON_HOT_COUNTERS (1<<15) /* used by JIT */ +#define ZEND_FUNC_JIT_ON_HOT_TRACE (1<<16) /* used by JIT */ + + typedef struct _zend_func_info zend_func_info; typedef struct _zend_call_info zend_call_info; diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 348f15c4fccdf..3d46fcc8b5ff8 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -3452,7 +3452,12 @@ static void zend_jit_cleanup_func_info(zend_op_array *op_array) if (JIT_G(trigger) == ZEND_JIT_ON_FIRST_EXEC || JIT_G(trigger) == ZEND_JIT_ON_PROF_REQUEST || JIT_G(trigger) == ZEND_JIT_ON_HOT_COUNTERS) { - memset(func_info, 0, sizeof(zend_func_info)); + func_info->num = 0; + func_info->flags &= ZEND_FUNC_JIT_ON_FIRST_EXEC + | ZEND_FUNC_JIT_ON_PROF_REQUEST + | ZEND_FUNC_JIT_ON_HOT_COUNTERS + | ZEND_FUNC_JIT_ON_HOT_TRACE; + memset(&func_info->ssa, 0, sizeof(zend_func_info) - offsetof(zend_func_info, ssa)); } else { ZEND_SET_FUNC_INFO(op_array, NULL); } @@ -3637,6 +3642,7 @@ static int zend_jit_setup_hot_counters(zend_op_array *op_array) jit_extension = (zend_jit_op_array_hot_extension*)zend_shared_alloc(sizeof(zend_jit_op_array_hot_extension) + (op_array->last - 1) * sizeof(void*)); memset(&jit_extension->func_info, 0, sizeof(zend_func_info)); + jit_extension->func_info.flags = ZEND_FUNC_JIT_ON_HOT_COUNTERS; jit_extension->counter = &zend_jit_hot_counters[zend_jit_op_array_hash(op_array) & (ZEND_HOT_COUNTERS_COUNT - 1)]; for (i = 0; i < op_array->last; i++) { jit_extension->orig_handlers[i] = op_array->opcodes[i].handler; @@ -3689,6 +3695,7 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script) } jit_extension = (zend_jit_op_array_extension*)zend_shared_alloc(sizeof(zend_jit_op_array_extension)); memset(&jit_extension->func_info, 0, sizeof(zend_func_info)); + jit_extension->func_info.flags = ZEND_FUNC_JIT_ON_FIRST_EXEC; jit_extension->orig_handler = (void*)opline->handler; ZEND_SET_FUNC_INFO(op_array, (void*)jit_extension); opline->handler = (const void*)zend_jit_runtime_jit_handler; @@ -3708,6 +3715,7 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script) } jit_extension = (zend_jit_op_array_extension*)zend_shared_alloc(sizeof(zend_jit_op_array_extension)); memset(&jit_extension->func_info, 0, sizeof(zend_func_info)); + jit_extension->func_info.flags = ZEND_FUNC_JIT_ON_PROF_REQUEST; jit_extension->orig_handler = (void*)opline->handler; ZEND_SET_FUNC_INFO(op_array, (void*)jit_extension); opline->handler = (const void*)zend_jit_profile_jit_handler; diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 8057e8131b9f4..cc42fcb51bc4c 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -486,7 +486,12 @@ static zend_ssa *zend_jit_trace_build_ssa(const zend_op_array *op_array, zend_sc jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); - memset(&jit_extension->func_info, 0, sizeof(jit_extension->func_info)); + jit_extension->func_info.num = 0; + jit_extension->func_info.flags &= ZEND_FUNC_JIT_ON_FIRST_EXEC + | ZEND_FUNC_JIT_ON_PROF_REQUEST + | ZEND_FUNC_JIT_ON_HOT_COUNTERS + | ZEND_FUNC_JIT_ON_HOT_TRACE; + memset(&jit_extension->func_info.ssa, 0, sizeof(zend_func_info) - offsetof(zend_func_info, ssa)); ssa = &jit_extension->func_info.ssa; if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_OPT_FUNC) { @@ -5708,7 +5713,12 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); - memset(&jit_extension->func_info, 0, sizeof(jit_extension->func_info)); + jit_extension->func_info.num = 0; + jit_extension->func_info.flags &= ZEND_FUNC_JIT_ON_FIRST_EXEC + | ZEND_FUNC_JIT_ON_PROF_REQUEST + | ZEND_FUNC_JIT_ON_HOT_COUNTERS + | ZEND_FUNC_JIT_ON_HOT_TRACE; + memset(&jit_extension->func_info.ssa, 0, sizeof(zend_func_info) - offsetof(zend_func_info, ssa)); } zend_arena_release(&CG(arena), checkpoint); @@ -6833,6 +6843,7 @@ static int zend_jit_setup_hot_trace_counters(zend_op_array *op_array) jit_extension = (zend_jit_op_array_trace_extension*)zend_shared_alloc(sizeof(zend_jit_op_array_trace_extension) + (op_array->last - 1) * sizeof(zend_op_trace_info)); memset(&jit_extension->func_info, 0, sizeof(zend_func_info)); + jit_extension->func_info.flags = ZEND_FUNC_JIT_ON_HOT_TRACE; jit_extension->op_array = op_array; jit_extension->offset = (char*)jit_extension->trace_info - (char*)op_array->opcodes; for (i = 0; i < op_array->last; i++) { From b5cb999e7fc7d669c6a0c5d28c549f7862c9f41d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 29 Sep 2020 12:10:36 +0200 Subject: [PATCH 160/209] [ci skip] Fix version --- UPGRADING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index 2e8d358075f2b..6f9b87c660fe2 100644 --- a/UPGRADING +++ b/UPGRADING @@ -152,7 +152,7 @@ Reflection: and `boolean`. - SAPI: - . Starting with 7.3.24, incoming cookie names are not url-decoded. This was never + . Starting with 7.3.23, incoming cookie names are not url-decoded. This was never required by the standard, outgoing cookie names aren't encoded and this leads to security issues (CVE-2020-7070). From 2519827732d82d13e0e58b1997dcd43eadb4c826 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Sep 2020 15:28:36 +0200 Subject: [PATCH 161/209] Update gmp+bcmath parameter names Closes GH-6205. --- ext/bcmath/bcmath.stub.php | 18 ++--- ext/bcmath/bcmath_arginfo.h | 24 +++---- ext/bcmath/tests/bcsqrt_error1.phpt | 2 +- ext/bcmath/tests/bug75178.phpt | 2 +- ext/gmp/gmp.stub.php | 96 +++++++++++++-------------- ext/gmp/gmp_arginfo.h | 86 ++++++++++++------------ ext/gmp/tests/003.phpt | 2 +- ext/gmp/tests/bug66872.phpt | 2 +- ext/gmp/tests/gmp_abs.phpt | 10 +-- ext/gmp/tests/gmp_and.phpt | 8 +-- ext/gmp/tests/gmp_binomial.phpt | 2 +- ext/gmp/tests/gmp_clrbit.phpt | 2 +- ext/gmp/tests/gmp_cmp.phpt | 2 +- ext/gmp/tests/gmp_com.phpt | 4 +- ext/gmp/tests/gmp_div_q.phpt | 6 +- ext/gmp/tests/gmp_div_qr.phpt | 6 +- ext/gmp/tests/gmp_div_r.phpt | 6 +- ext/gmp/tests/gmp_export.phpt | 4 +- ext/gmp/tests/gmp_fact.phpt | 10 +-- ext/gmp/tests/gmp_gcdext.phpt | 4 +- ext/gmp/tests/gmp_hamdist.phpt | 6 +- ext/gmp/tests/gmp_import.phpt | 4 +- ext/gmp/tests/gmp_init.phpt | 6 +- ext/gmp/tests/gmp_intval.phpt | 8 +-- ext/gmp/tests/gmp_invert.phpt | 6 +- ext/gmp/tests/gmp_jacobi.phpt | 6 +- ext/gmp/tests/gmp_legendre.phpt | 6 +- ext/gmp/tests/gmp_mod.phpt | 4 +- ext/gmp/tests/gmp_neg.phpt | 4 +- ext/gmp/tests/gmp_nextprime.phpt | 6 +- ext/gmp/tests/gmp_or.phpt | 8 +-- ext/gmp/tests/gmp_perfect_square.phpt | 2 +- ext/gmp/tests/gmp_popcount.phpt | 2 +- ext/gmp/tests/gmp_pow.phpt | 8 +-- ext/gmp/tests/gmp_pown.phpt | 10 +-- ext/gmp/tests/gmp_prob_prime.phpt | 2 +- ext/gmp/tests/gmp_scan0.phpt | 2 +- ext/gmp/tests/gmp_scan1.phpt | 2 +- ext/gmp/tests/gmp_setbit.phpt | 4 +- ext/gmp/tests/gmp_sign.phpt | 6 +- ext/gmp/tests/gmp_sqrt.phpt | 8 +-- ext/gmp/tests/gmp_sqrtrem.phpt | 6 +- ext/gmp/tests/gmp_strict_types.phpt | 10 +-- ext/gmp/tests/gmp_strval.phpt | 8 +-- ext/gmp/tests/gmp_sub.phpt | 8 +-- ext/gmp/tests/gmp_xor.phpt | 8 +-- 46 files changed, 220 insertions(+), 226 deletions(-) diff --git a/ext/bcmath/bcmath.stub.php b/ext/bcmath/bcmath.stub.php index 97232b0ed7121..acd63f000e79c 100644 --- a/ext/bcmath/bcmath.stub.php +++ b/ext/bcmath/bcmath.stub.php @@ -2,22 +2,22 @@ /** @generate-function-entries */ -function bcadd(string $left_operand, string $right_operand, ?int $scale = null): string {} +function bcadd(string $num1, string $num2, ?int $scale = null): string {} -function bcsub(string $left_operand, string $right_operand, ?int $scale = null): string {} +function bcsub(string $num1, string $num2, ?int $scale = null): string {} -function bcmul(string $left_operand, string $right_operand, ?int $scale = null): string {} +function bcmul(string $num1, string $num2, ?int $scale = null): string {} -function bcdiv(string $dividend, string $divisor, ?int $scale = null): string {} +function bcdiv(string $num1, string $num2, ?int $scale = null): string {} -function bcmod(string $dividend, string $divisor, ?int $scale = null): string {} +function bcmod(string $num1, string $num2, ?int $scale = null): string {} -function bcpowmod(string $base, string $exponent, string $modulus, ?int $scale = null): string {} +function bcpowmod(string $num, string $exponent, string $modulus, ?int $scale = null): string {} -function bcpow(string $base, string $exponent, ?int $scale = null): string {} +function bcpow(string $num, string $exponent, ?int $scale = null): string {} -function bcsqrt(string $operand, ?int $scale = null): string {} +function bcsqrt(string $num, ?int $scale = null): string {} -function bccomp(string $left_operand, string $right_operand, ?int $scale = null): int {} +function bccomp(string $num1, string $num2, ?int $scale = null): int {} function bcscale(?int $scale = null): int {} diff --git a/ext/bcmath/bcmath_arginfo.h b/ext/bcmath/bcmath_arginfo.h index 83956366a2822..3e0104e04c358 100644 --- a/ext/bcmath/bcmath_arginfo.h +++ b/ext/bcmath/bcmath_arginfo.h @@ -1,9 +1,9 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a1e223f29a06a2292a88c0e90e104cb956f80500 */ + * Stub hash: 0c1e2a6163a5fc0f42bf79bbc530af7c5fd77074 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcadd, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, left_operand, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, right_operand, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, num1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, num2, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null") ZEND_END_ARG_INFO() @@ -11,35 +11,31 @@ ZEND_END_ARG_INFO() #define arginfo_bcmul arginfo_bcadd -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcdiv, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, dividend, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, divisor, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null") -ZEND_END_ARG_INFO() +#define arginfo_bcdiv arginfo_bcadd -#define arginfo_bcmod arginfo_bcdiv +#define arginfo_bcmod arginfo_bcadd ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcpowmod, 0, 3, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, base, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, exponent, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, modulus, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcpow, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, base, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, exponent, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bcsqrt, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, operand, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bccomp, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, left_operand, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, right_operand, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, num1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, num2, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, scale, IS_LONG, 1, "null") ZEND_END_ARG_INFO() diff --git a/ext/bcmath/tests/bcsqrt_error1.phpt b/ext/bcmath/tests/bcsqrt_error1.phpt index 83c85183f4080..bdc850f979627 100644 --- a/ext/bcmath/tests/bcsqrt_error1.phpt +++ b/ext/bcmath/tests/bcsqrt_error1.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -bcsqrt(): Argument #1 ($operand) must be greater than or equal to 0 +bcsqrt(): Argument #1 ($num) must be greater than or equal to 0 diff --git a/ext/bcmath/tests/bug75178.phpt b/ext/bcmath/tests/bug75178.phpt index 48044523840cf..9025e61c73bf7 100644 --- a/ext/bcmath/tests/bug75178.phpt +++ b/ext/bcmath/tests/bug75178.phpt @@ -18,5 +18,5 @@ try { } ?> --EXPECT-- -bcpowmod(): Argument #1 ($base) cannot have a fractional part +bcpowmod(): Argument #1 ($num) cannot have a fractional part bcpowmod(): Argument #3 ($modulus) cannot have a fractional part diff --git a/ext/gmp/gmp.stub.php b/ext/gmp/gmp.stub.php index 8f2c6ed944fd2..729ae37245aa6 100644 --- a/ext/gmp/gmp.stub.php +++ b/ext/gmp/gmp.stub.php @@ -6,76 +6,76 @@ class GMP { } -function gmp_init(int|string $number, int $base = 0): GMP {} +function gmp_init(int|string $num, int $base = 0): GMP {} -function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP {} +function gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP {} -function gmp_export(GMP|int|string $gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string {} +function gmp_export(GMP|int|string $num, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string {} -function gmp_intval(GMP|int|string $gmpnumber): int {} +function gmp_intval(GMP|int|string $num): int {} -function gmp_strval(GMP|int|string $gmpnumber, int $base = 10): string {} +function gmp_strval(GMP|int|string $num, int $base = 10): string {} -function gmp_add(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_add(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_sub(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_sub(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_mul(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_mul(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_div_qr(GMP|int|string $a, GMP|int|string $b, int $round = GMP_ROUND_ZERO): array {} +function gmp_div_qr(GMP|int|string $num1, GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO): array {} -function gmp_div_q(GMP|int|string $a, GMP|int|string $b, int $round = GMP_ROUND_ZERO): GMP {} +function gmp_div_q(GMP|int|string $num1, GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {} -function gmp_div_r(GMP|int|string $a, GMP|int|string $b, int $round = GMP_ROUND_ZERO): GMP {} +function gmp_div_r(GMP|int|string $num1, GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {} /** @alias gmp_div_q */ -function gmp_div(GMP|int|string $a, GMP|int|string $b, int $round = GMP_ROUND_ZERO): GMP {} +function gmp_div(GMP|int|string $num1, GMP|int|string $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {} -function gmp_mod(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_mod(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_divexact(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_divexact(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_neg(GMP|int|string $a): GMP {} +function gmp_neg(GMP|int|string $num): GMP {} -function gmp_abs(GMP|int|string $a): GMP {} +function gmp_abs(GMP|int|string $num): GMP {} -function gmp_fact(GMP|int|string $a): GMP {} +function gmp_fact(GMP|int|string $num): GMP {} -function gmp_sqrt(GMP|int|string $a): GMP {} +function gmp_sqrt(GMP|int|string $num): GMP {} -function gmp_sqrtrem(GMP|int|string $a): array {} +function gmp_sqrtrem(GMP|int|string $num): array {} -function gmp_root(GMP|int|string $a, int $nth): GMP {} +function gmp_root(GMP|int|string $num, int $nth): GMP {} -function gmp_rootrem(GMP|int|string $a, int $nth): array {} +function gmp_rootrem(GMP|int|string $num, int $nth): array {} -function gmp_pow(GMP|int|string $base, int $exp): GMP {} +function gmp_pow(GMP|int|string $num, int $exponent): GMP {} -function gmp_powm(GMP|int|string $base, GMP|int|string $exp, GMP|int|string $mod): GMP {} +function gmp_powm(GMP|int|string $num, GMP|int|string $exponent, GMP|int|string $modulus): GMP {} -function gmp_perfect_square(GMP|int|string $a): bool {} +function gmp_perfect_square(GMP|int|string $num): bool {} -function gmp_perfect_power(GMP|int|string $a): bool {} +function gmp_perfect_power(GMP|int|string $num): bool {} -function gmp_prob_prime(GMP|int|string $a, int $reps = 10): int {} +function gmp_prob_prime(GMP|int|string $num, int $repetitions = 10): int {} -function gmp_gcd(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_gcd(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_gcdext(GMP|int|string $a, GMP|int|string $b): array {} +function gmp_gcdext(GMP|int|string $num1, GMP|int|string $num2): array {} -function gmp_lcm(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_lcm(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_invert(GMP|int|string $a, GMP|int|string $b): GMP|false {} +function gmp_invert(GMP|int|string $num1, GMP|int|string $num2): GMP|false {} -function gmp_jacobi(GMP|int|string $a, GMP|int|string $b): int {} +function gmp_jacobi(GMP|int|string $num1, GMP|int|string $num2): int {} -function gmp_legendre(GMP|int|string $a, GMP|int|string $b): int {} +function gmp_legendre(GMP|int|string $num1, GMP|int|string $num2): int {} -function gmp_kronecker(GMP|int|string $a, GMP|int|string $b): int {} +function gmp_kronecker(GMP|int|string $num1, GMP|int|string $num2): int {} -function gmp_cmp(GMP|int|string $a, GMP|int|string $b): int {} +function gmp_cmp(GMP|int|string $num1, GMP|int|string $num2): int {} -function gmp_sign(GMP|int|string $a): int {} +function gmp_sign(GMP|int|string $num): int {} function gmp_random_seed(GMP|int|string $seed): void {} @@ -83,28 +83,28 @@ function gmp_random_bits(int $bits): GMP {} function gmp_random_range(GMP|int|string $min, GMP|int|string $max): GMP {} -function gmp_and(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_and(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_or(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_or(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_com(GMP|int|string $a): GMP {} +function gmp_com(GMP|int|string $num): GMP {} -function gmp_xor(GMP|int|string $a, GMP|int|string $b): GMP {} +function gmp_xor(GMP|int|string $num1, GMP|int|string $num2): GMP {} -function gmp_setbit(GMP $a, int $index, bool $set_clear = true): void {} +function gmp_setbit(GMP $num, int $index, bool $value = true): void {} -function gmp_clrbit(GMP $a, int $index): void {} +function gmp_clrbit(GMP $num, int $index): void {} -function gmp_testbit(GMP|int|string $a, int $index): bool {} +function gmp_testbit(GMP|int|string $num, int $index): bool {} -function gmp_scan0(GMP|int|string $a, int $start): int {} +function gmp_scan0(GMP|int|string $num1, int $start): int {} -function gmp_scan1(GMP|int|string $a, int $start): int {} +function gmp_scan1(GMP|int|string $num1, int $start): int {} -function gmp_popcount(GMP|int|string $a): int {} +function gmp_popcount(GMP|int|string $num): int {} -function gmp_hamdist(GMP|int|string $a, GMP|int|string $b): int {} +function gmp_hamdist(GMP|int|string $num1, GMP|int|string $num2): int {} -function gmp_nextprime(GMP|int|string $a): GMP {} +function gmp_nextprime(GMP|int|string $num): GMP {} -function gmp_binomial(GMP|int|string $a, int $b): GMP {} +function gmp_binomial(GMP|int|string $n, int $k): GMP {} diff --git a/ext/gmp/gmp_arginfo.h b/ext/gmp/gmp_arginfo.h index 9f4a44f6d7954..fd341edbb565d 100644 --- a/ext/gmp/gmp_arginfo.h +++ b/ext/gmp/gmp_arginfo.h @@ -1,35 +1,35 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: fe4ff47c3359705bf2b1a64a882659fabd370bab */ + * Stub hash: a1eb4fd58c0b2155692611386c77035f1ef11c2c */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_init, 0, 1, GMP, 0) - ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_import, 0, 1, GMP, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, word_size, IS_LONG, 0, "1") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "GMP_MSW_FIRST | GMP_NATIVE_ENDIAN") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "GMP_MSW_FIRST | GMP_NATIVE_ENDIAN") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_export, 0, 1, IS_STRING, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, gmpnumber, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, word_size, IS_LONG, 0, "1") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "GMP_MSW_FIRST | GMP_NATIVE_ENDIAN") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "GMP_MSW_FIRST | GMP_NATIVE_ENDIAN") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_intval, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, gmpnumber, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_strval, 0, 1, IS_STRING, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, gmpnumber, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_LONG, 0, "10") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_add, 0, 2, GMP, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_OBJ_TYPE_MASK(0, b, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num1, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num2, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_gmp_sub arginfo_gmp_add @@ -37,15 +37,15 @@ ZEND_END_ARG_INFO() #define arginfo_gmp_mul arginfo_gmp_add ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_div_qr, 0, 2, IS_ARRAY, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_OBJ_TYPE_MASK(0, b, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, round, IS_LONG, 0, "GMP_ROUND_ZERO") + ZEND_ARG_OBJ_TYPE_MASK(0, num1, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num2, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rounding_mode, IS_LONG, 0, "GMP_ROUND_ZERO") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_div_q, 0, 2, GMP, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_OBJ_TYPE_MASK(0, b, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, round, IS_LONG, 0, "GMP_ROUND_ZERO") + ZEND_ARG_OBJ_TYPE_MASK(0, num1, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num2, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rounding_mode, IS_LONG, 0, "GMP_ROUND_ZERO") ZEND_END_ARG_INFO() #define arginfo_gmp_div_r arginfo_gmp_div_q @@ -57,7 +57,7 @@ ZEND_END_ARG_INFO() #define arginfo_gmp_divexact arginfo_gmp_add ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_neg, 0, 1, GMP, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_gmp_abs arginfo_gmp_neg @@ -67,58 +67,58 @@ ZEND_END_ARG_INFO() #define arginfo_gmp_sqrt arginfo_gmp_neg ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_sqrtrem, 0, 1, IS_ARRAY, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_root, 0, 2, GMP, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, nth, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_rootrem, 0, 2, IS_ARRAY, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, nth, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_pow, 0, 2, GMP, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, base, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO(0, exp, IS_LONG, 0) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_INFO(0, exponent, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_powm, 0, 3, GMP, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, base, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_OBJ_TYPE_MASK(0, exp, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_OBJ_TYPE_MASK(0, mod, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, exponent, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, modulus, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_perfect_square, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_gmp_perfect_power arginfo_gmp_perfect_square ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_prob_prime, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reps, IS_LONG, 0, "10") + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, repetitions, IS_LONG, 0, "10") ZEND_END_ARG_INFO() #define arginfo_gmp_gcd arginfo_gmp_add ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_gcdext, 0, 2, IS_ARRAY, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_OBJ_TYPE_MASK(0, b, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num1, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num2, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_gmp_lcm arginfo_gmp_add ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_invert, 0, 2, GMP, MAY_BE_FALSE) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_OBJ_TYPE_MASK(0, b, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num1, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num2, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_jacobi, 0, 2, IS_LONG, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_OBJ_TYPE_MASK(0, b, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num1, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num2, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_gmp_legendre arginfo_gmp_jacobi @@ -127,9 +127,7 @@ ZEND_END_ARG_INFO() #define arginfo_gmp_cmp arginfo_gmp_jacobi -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_sign, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) -ZEND_END_ARG_INFO() +#define arginfo_gmp_sign arginfo_gmp_intval ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_random_seed, 0, 1, IS_VOID, 0) ZEND_ARG_OBJ_TYPE_MASK(0, seed, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) @@ -153,37 +151,37 @@ ZEND_END_ARG_INFO() #define arginfo_gmp_xor arginfo_gmp_add ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_setbit, 0, 2, IS_VOID, 0) - ZEND_ARG_OBJ_INFO(0, a, GMP, 0) + ZEND_ARG_OBJ_INFO(0, num, GMP, 0) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, set_clear, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_clrbit, 0, 2, IS_VOID, 0) - ZEND_ARG_OBJ_INFO(0, a, GMP, 0) + ZEND_ARG_OBJ_INFO(0, num, GMP, 0) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_testbit, 0, 2, _IS_BOOL, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_scan0, 0, 2, IS_LONG, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, num1, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_gmp_scan1 arginfo_gmp_scan0 -#define arginfo_gmp_popcount arginfo_gmp_sign +#define arginfo_gmp_popcount arginfo_gmp_intval #define arginfo_gmp_hamdist arginfo_gmp_jacobi #define arginfo_gmp_nextprime arginfo_gmp_neg ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_binomial, 0, 2, GMP, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, a, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO(0, b, IS_LONG, 0) + ZEND_ARG_OBJ_TYPE_MASK(0, n, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_INFO(0, k, IS_LONG, 0) ZEND_END_ARG_INFO() diff --git a/ext/gmp/tests/003.phpt b/ext/gmp/tests/003.phpt index 7a84d3f8d0151..70613eb94b046 100644 --- a/ext/gmp/tests/003.phpt +++ b/ext/gmp/tests/003.phpt @@ -35,7 +35,7 @@ Check for number base recognition } ?> --EXPECT-- -gmp_init(): Argument #1 ($number) is not an integer string +gmp_init(): Argument #1 ($num) is not an integer string 1234 1234 10011010010 diff --git a/ext/gmp/tests/bug66872.phpt b/ext/gmp/tests/bug66872.phpt index c44d4c807e8a0..e4090176de538 100644 --- a/ext/gmp/tests/bug66872.phpt +++ b/ext/gmp/tests/bug66872.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -gmp_testbit(): Argument #1 ($a) is not an integer string +gmp_testbit(): Argument #1 ($num) is not an integer string diff --git a/ext/gmp/tests/gmp_abs.phpt b/ext/gmp/tests/gmp_abs.phpt index 0fb8ba5f1a291..57b0dde25c821 100644 --- a/ext/gmp/tests/gmp_abs.phpt +++ b/ext/gmp/tests/gmp_abs.phpt @@ -44,14 +44,14 @@ try { echo "Done\n"; ?> --EXPECT-- -gmp_abs(): Argument #1 ($a) is not an integer string +gmp_abs(): Argument #1 ($num) is not an integer string string(1) "0" string(1) "0" -gmp_abs(): Argument #1 ($a) must be of type GMP|string|int, float given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, float given string(21) "111111111111111111111" string(21) "111111111111111111111" string(1) "0" -gmp_abs(): Argument #1 ($a) is not an integer string -gmp_abs(): Argument #1 ($a) is not an integer string -gmp_abs(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_abs(): Argument #1 ($num) is not an integer string +gmp_abs(): Argument #1 ($num) is not an integer string +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_and.phpt b/ext/gmp/tests/gmp_and.phpt index 26ed3dda3761b..aa40a12aa4b54 100644 --- a/ext/gmp/tests/gmp_and.phpt +++ b/ext/gmp/tests/gmp_and.phpt @@ -47,10 +47,10 @@ string(5) "40994" string(3) "515" string(4) "3333" string(4) "4544" -gmp_and(): Argument #1 ($a) is not an integer string +gmp_and(): Argument #1 ($num1) is not an integer string string(4) "1536" string(15) "424703623692768" -gmp_and(): Argument #1 ($a) must be of type GMP|string|int, array given -gmp_and(): Argument #2 ($b) must be of type GMP|string|int, array given -gmp_and(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_and(): Argument #1 ($num1) must be of type GMP|string|int, array given +gmp_and(): Argument #2 ($num2) must be of type GMP|string|int, array given +gmp_and(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_binomial.phpt b/ext/gmp/tests/gmp_binomial.phpt index b6db19c35cc7c..eadf175ac9e0a 100644 --- a/ext/gmp/tests/gmp_binomial.phpt +++ b/ext/gmp/tests/gmp_binomial.phpt @@ -67,4 +67,4 @@ object(GMP)#2 (1) { ["num"]=> string(1) "7" } -gmp_binomial(): Argument #2 ($b) must be greater than or equal to 0 +gmp_binomial(): Argument #2 ($k) must be greater than or equal to 0 diff --git a/ext/gmp/tests/gmp_clrbit.phpt b/ext/gmp/tests/gmp_clrbit.phpt index 5dc0ff4dbb8d9..7bcf6969e9df3 100644 --- a/ext/gmp/tests/gmp_clrbit.phpt +++ b/ext/gmp/tests/gmp_clrbit.phpt @@ -52,5 +52,5 @@ gmp_clrbit(): Argument #2 ($index) must be greater than or equal to 0 string(7) "1000000" string(7) "1000000" string(30) "238462734628347239571822592658" -gmp_clrbit(): Argument #1 ($a) must be of type GMP, array given +gmp_clrbit(): Argument #1 ($num) must be of type GMP, array given Done diff --git a/ext/gmp/tests/gmp_cmp.phpt b/ext/gmp/tests/gmp_cmp.phpt index 35c2796ffaae2..45ca865dc6344 100644 --- a/ext/gmp/tests/gmp_cmp.phpt +++ b/ext/gmp/tests/gmp_cmp.phpt @@ -34,5 +34,5 @@ int(1) int(-1) bool(true) int(0) -gmp_cmp(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_cmp(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_com.phpt b/ext/gmp/tests/gmp_com.phpt index 71f9f39e96a40..1cc0aae428e4a 100644 --- a/ext/gmp/tests/gmp_com.phpt +++ b/ext/gmp/tests/gmp_com.phpt @@ -33,12 +33,12 @@ echo "Done\n"; --EXPECT-- string(2) "-1" string(2) "-1" -gmp_com(): Argument #1 ($a) is not an integer string +gmp_com(): Argument #1 ($num) is not an integer string string(14) "-2394876545679" string(3) "110" string(7) "-874654" string(4) "9875" string(9) "-98765468" string(12) "-98765463338" -gmp_com(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_com(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_div_q.phpt b/ext/gmp/tests/gmp_div_q.phpt index 08d82c6132c62..a9adeab24ce7d 100644 --- a/ext/gmp/tests/gmp_div_q.phpt +++ b/ext/gmp/tests/gmp_div_q.phpt @@ -51,7 +51,7 @@ object(GMP)#2 (1) { ["num"]=> string(1) "0" } -gmp_div_q(): Argument #3 ($round) must be one of GMP_ROUND_ZERO, GMP_ROUND_PLUSINF, or GMP_ROUND_MINUSINF +gmp_div_q(): Argument #3 ($rounding_mode) must be one of GMP_ROUND_ZERO, GMP_ROUND_PLUSINF, or GMP_ROUND_MINUSINF object(GMP)#1 (1) { ["num"]=> string(4) "9131" @@ -76,6 +76,6 @@ object(GMP)#1 (1) { ["num"]=> string(4) "9131" } -gmp_div_q(): Argument #1 ($a) must be of type GMP|string|int, resource given -gmp_div_q(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_div_q(): Argument #1 ($num1) must be of type GMP|string|int, resource given +gmp_div_q(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_div_qr.phpt b/ext/gmp/tests/gmp_div_qr.phpt index 03c5facac2a48..a31c39c731cf5 100644 --- a/ext/gmp/tests/gmp_div_qr.phpt +++ b/ext/gmp/tests/gmp_div_qr.phpt @@ -74,7 +74,7 @@ array(2) { string(5) "12653" } } -gmp_div_qr(): Argument #3 ($round) must be one of GMP_ROUND_ZERO, GMP_ROUND_PLUSINF, or GMP_ROUND_MINUSINF +gmp_div_qr(): Argument #3 ($rounding_mode) must be one of GMP_ROUND_ZERO, GMP_ROUND_PLUSINF, or GMP_ROUND_MINUSINF array(2) { [0]=> object(GMP)#4 (1) { @@ -159,6 +159,6 @@ array(2) { string(2) "10" } } -gmp_div_qr(): Argument #1 ($a) must be of type GMP|string|int, resource given -gmp_div_qr(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_div_qr(): Argument #1 ($num1) must be of type GMP|string|int, resource given +gmp_div_qr(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_div_r.phpt b/ext/gmp/tests/gmp_div_r.phpt index eab9286fe763b..2372474bc89cd 100644 --- a/ext/gmp/tests/gmp_div_r.phpt +++ b/ext/gmp/tests/gmp_div_r.phpt @@ -51,7 +51,7 @@ object(GMP)#3 (1) { ["num"]=> string(5) "12653" } -gmp_div_r(): Argument #3 ($round) must be one of GMP_ROUND_ZERO, GMP_ROUND_PLUSINF, or GMP_ROUND_MINUSINF +gmp_div_r(): Argument #3 ($rounding_mode) must be one of GMP_ROUND_ZERO, GMP_ROUND_PLUSINF, or GMP_ROUND_MINUSINF object(GMP)#2 (1) { ["num"]=> string(2) "10" @@ -76,6 +76,6 @@ object(GMP)#3 (1) { ["num"]=> string(2) "10" } -gmp_div_r(): Argument #1 ($a) must be of type GMP|string|int, resource given -gmp_div_r(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_div_r(): Argument #1 ($num1) must be of type GMP|string|int, resource given +gmp_div_r(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_export.phpt b/ext/gmp/tests/gmp_export.phpt index d3ccfb3b1e5fb..6877e5624d680 100644 --- a/ext/gmp/tests/gmp_export.phpt +++ b/ext/gmp/tests/gmp_export.phpt @@ -78,5 +78,5 @@ try { bool(true) gmp_export(): Argument #2 ($word_size) must be greater than or equal to 1 gmp_export(): Argument #2 ($word_size) must be greater than or equal to 1 -gmp_export(): Argument #3 ($options) cannot use multiple word order options -gmp_export(): Argument #3 ($options) cannot use multiple endian options +gmp_export(): Argument #3 ($flags) cannot use multiple word order options +gmp_export(): Argument #3 ($flags) cannot use multiple endian options diff --git a/ext/gmp/tests/gmp_fact.phpt b/ext/gmp/tests/gmp_fact.phpt index 81f16019f0928..d2b98f78c28c9 100644 --- a/ext/gmp/tests/gmp_fact.phpt +++ b/ext/gmp/tests/gmp_fact.phpt @@ -48,16 +48,16 @@ echo "Done\n"; ?> --EXPECT-- string(1) "1" -gmp_fact(): Argument #1 ($a) is not an integer string +gmp_fact(): Argument #1 ($num) is not an integer string string(1) "1" -gmp_fact(): Argument #1 ($a) must be greater than or equal to 0 -gmp_fact(): Argument #1 ($a) must be greater than or equal to 0 +gmp_fact(): Argument #1 ($num) must be greater than or equal to 0 +gmp_fact(): Argument #1 ($num) must be greater than or equal to 0 string(1) "1" string(19) "2432902008176640000" string(65) "30414093201713378043612608166064768844377641568960512000000000000" string(7) "3628800" string(1) "1" string(9) "479001600" -gmp_fact(): Argument #1 ($a) must be greater than or equal to 0 -gmp_fact(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_fact(): Argument #1 ($num) must be greater than or equal to 0 +gmp_fact(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_gcdext.phpt b/ext/gmp/tests/gmp_gcdext.phpt index abab8cdfdcd83..0f4b23af7d9f9 100644 --- a/ext/gmp/tests/gmp_gcdext.phpt +++ b/ext/gmp/tests/gmp_gcdext.phpt @@ -63,6 +63,6 @@ string(1) "1" string(1) "1" string(3) "195" string(3) "195" -gmp_gcdext(): Argument #2 ($b) must be of type GMP|string|int, array given -gmp_gcdext(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_gcdext(): Argument #2 ($num2) must be of type GMP|string|int, array given +gmp_gcdext(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_hamdist.phpt b/ext/gmp/tests/gmp_hamdist.phpt index c4b28949411fd..8e216e39a080b 100644 --- a/ext/gmp/tests/gmp_hamdist.phpt +++ b/ext/gmp/tests/gmp_hamdist.phpt @@ -42,7 +42,7 @@ int(-1) int(43) int(0) int(26) -gmp_hamdist(): Argument #2 ($b) must be of type GMP|string|int, array given -gmp_hamdist(): Argument #1 ($a) must be of type GMP|string|int, array given -gmp_hamdist(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_hamdist(): Argument #2 ($num2) must be of type GMP|string|int, array given +gmp_hamdist(): Argument #1 ($num1) must be of type GMP|string|int, array given +gmp_hamdist(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_import.phpt b/ext/gmp/tests/gmp_import.phpt index 59bf652a1f3cf..026ab079d5637 100644 --- a/ext/gmp/tests/gmp_import.phpt +++ b/ext/gmp/tests/gmp_import.phpt @@ -95,5 +95,5 @@ gmp_import(): Argument #2 ($word_size) must be greater than or equal to 1 gmp_import(): Argument #1 ($data) must be a multiple of argument #2 ($word_size) gmp_import(): Argument #1 ($data) must be a multiple of argument #2 ($word_size) gmp_import(): Argument #1 ($data) must be a multiple of argument #2 ($word_size) -gmp_import(): Argument #3 ($options) cannot use multiple word order options -gmp_import(): Argument #3 ($options) cannot use multiple endian options +gmp_import(): Argument #3 ($flags) cannot use multiple word order options +gmp_import(): Argument #3 ($flags) cannot use multiple endian options diff --git a/ext/gmp/tests/gmp_init.phpt b/ext/gmp/tests/gmp_init.phpt index b600a020ec7f9..045ddc668e38e 100644 --- a/ext/gmp/tests/gmp_init.phpt +++ b/ext/gmp/tests/gmp_init.phpt @@ -38,7 +38,7 @@ object(GMP)#1 (1) { } string(8) "98765678" gmp_init(): Argument #2 ($base) must be between 2 and 62 -gmp_init(): Argument #1 ($number) is not an integer string -gmp_init(): Argument #1 ($number) is not an integer string -gmp_init(): Argument #1 ($number) is not an integer string +gmp_init(): Argument #1 ($num) is not an integer string +gmp_init(): Argument #1 ($num) is not an integer string +gmp_init(): Argument #1 ($num) is not an integer string Done diff --git a/ext/gmp/tests/gmp_intval.phpt b/ext/gmp/tests/gmp_intval.phpt index 9540f7a432ca1..4642d9ec5229e 100644 --- a/ext/gmp/tests/gmp_intval.phpt +++ b/ext/gmp/tests/gmp_intval.phpt @@ -44,8 +44,8 @@ int(-2349828) int(2342344) int(1) int(12345678) -gmp_intval(): Argument #1 ($gmpnumber) is not an integer string -gmp_intval(): Argument #1 ($gmpnumber) must be of type GMP|string|int, stdClass given -gmp_intval(): Argument #1 ($gmpnumber) must be of type GMP|string|int, array given -gmp_intval(): Argument #1 ($gmpnumber) is not an integer string +gmp_intval(): Argument #1 ($num) is not an integer string +gmp_intval(): Argument #1 ($num) must be of type GMP|string|int, stdClass given +gmp_intval(): Argument #1 ($num) must be of type GMP|string|int, array given +gmp_intval(): Argument #1 ($num) is not an integer string Done diff --git a/ext/gmp/tests/gmp_invert.phpt b/ext/gmp/tests/gmp_invert.phpt index b5ab666061a25..888802f25dd65 100644 --- a/ext/gmp/tests/gmp_invert.phpt +++ b/ext/gmp/tests/gmp_invert.phpt @@ -53,7 +53,7 @@ string(1) "0" string(1) "0" string(22) "3498273496234234523441" string(1) "1" -gmp_invert(): Argument #1 ($a) must be of type GMP|string|int, array given -gmp_invert(): Argument #2 ($b) must be of type GMP|string|int, array given -gmp_invert(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_invert(): Argument #1 ($num1) must be of type GMP|string|int, array given +gmp_invert(): Argument #2 ($num2) must be of type GMP|string|int, array given +gmp_invert(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_jacobi.phpt b/ext/gmp/tests/gmp_jacobi.phpt index 116442457819b..da95b805facec 100644 --- a/ext/gmp/tests/gmp_jacobi.phpt +++ b/ext/gmp/tests/gmp_jacobi.phpt @@ -56,7 +56,7 @@ string(1) "0" string(2) "-1" string(1) "0" string(2) "-1" -gmp_jacobi(): Argument #2 ($b) must be of type GMP|string|int, array given -gmp_jacobi(): Argument #1 ($a) must be of type GMP|string|int, array given -gmp_jacobi(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_jacobi(): Argument #2 ($num2) must be of type GMP|string|int, array given +gmp_jacobi(): Argument #1 ($num1) must be of type GMP|string|int, array given +gmp_jacobi(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_legendre.phpt b/ext/gmp/tests/gmp_legendre.phpt index 258e453e4de18..fb8ad08423811 100644 --- a/ext/gmp/tests/gmp_legendre.phpt +++ b/ext/gmp/tests/gmp_legendre.phpt @@ -56,7 +56,7 @@ string(1) "0" string(2) "-1" string(1) "0" string(2) "-1" -gmp_legendre(): Argument #2 ($b) must be of type GMP|string|int, array given -gmp_legendre(): Argument #1 ($a) must be of type GMP|string|int, array given -gmp_legendre(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_legendre(): Argument #2 ($num2) must be of type GMP|string|int, array given +gmp_legendre(): Argument #1 ($num1) must be of type GMP|string|int, array given +gmp_legendre(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_mod.phpt b/ext/gmp/tests/gmp_mod.phpt index 90868ab9d99da..a20f871df9561 100644 --- a/ext/gmp/tests/gmp_mod.phpt +++ b/ext/gmp/tests/gmp_mod.phpt @@ -33,7 +33,7 @@ var_dump(gmp_mod($a, $b)); echo "Done\n"; ?> --EXPECT-- -gmp_mod(): Argument #1 ($a) is not an integer string +gmp_mod(): Argument #1 ($num1) is not an integer string object(GMP)#2 (1) { ["num"]=> string(1) "0" @@ -43,7 +43,7 @@ object(GMP)#2 (1) { string(1) "0" } Modulo by zero -gmp_mod(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_mod(): Argument #1 ($num1) must be of type GMP|string|int, array given object(GMP)#4 (1) { ["num"]=> string(5) "31161" diff --git a/ext/gmp/tests/gmp_neg.phpt b/ext/gmp/tests/gmp_neg.phpt index 5d8e80cd5b620..bed25722bb52e 100644 --- a/ext/gmp/tests/gmp_neg.phpt +++ b/ext/gmp/tests/gmp_neg.phpt @@ -36,9 +36,9 @@ int(0) int(-1) int(1) int(1) -gmp_neg(): Argument #1 ($a) is not an integer string +gmp_neg(): Argument #1 ($num) is not an integer string int(0) int(0) string(21) "-12345678901234567890" -gmp_neg(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_neg(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_nextprime.phpt b/ext/gmp/tests/gmp_nextprime.phpt index e2fa2703cbbc8..7d252aee65985 100644 --- a/ext/gmp/tests/gmp_nextprime.phpt +++ b/ext/gmp/tests/gmp_nextprime.phpt @@ -43,7 +43,7 @@ string(1) "2" string(1) "2" string(4) "1009" string(6) "100003" -gmp_nextprime(): Argument #1 ($a) must be of type GMP|string|int, array given -gmp_nextprime(): Argument #1 ($a) is not an integer string -gmp_nextprime(): Argument #1 ($a) must be of type GMP|string|int, stdClass given +gmp_nextprime(): Argument #1 ($num) must be of type GMP|string|int, array given +gmp_nextprime(): Argument #1 ($num) is not an integer string +gmp_nextprime(): Argument #1 ($num) must be of type GMP|string|int, stdClass given Done diff --git a/ext/gmp/tests/gmp_or.phpt b/ext/gmp/tests/gmp_or.phpt index 5a34a82addf91..75f631e326817 100644 --- a/ext/gmp/tests/gmp_or.phpt +++ b/ext/gmp/tests/gmp_or.phpt @@ -46,10 +46,10 @@ string(6) "517363" string(10) "2342341163" string(2) "-1" string(3) "-19" -gmp_or(): Argument #1 ($a) is not an integer string +gmp_or(): Argument #1 ($num1) is not an integer string string(15) "987657876576252" string(21) "987658441719689394144" -gmp_or(): Argument #1 ($a) must be of type GMP|string|int, array given -gmp_or(): Argument #2 ($b) must be of type GMP|string|int, array given -gmp_or(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_or(): Argument #1 ($num1) must be of type GMP|string|int, array given +gmp_or(): Argument #2 ($num2) must be of type GMP|string|int, array given +gmp_or(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_perfect_square.phpt b/ext/gmp/tests/gmp_perfect_square.phpt index d6cd09e40ef49..f96f39091f3de 100644 --- a/ext/gmp/tests/gmp_perfect_square.phpt +++ b/ext/gmp/tests/gmp_perfect_square.phpt @@ -41,5 +41,5 @@ bool(false) bool(false) bool(true) bool(false) -gmp_perfect_square(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_perfect_square(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_popcount.phpt b/ext/gmp/tests/gmp_popcount.phpt index fa1a6172d4fb6..ddd1c2434c20a 100644 --- a/ext/gmp/tests/gmp_popcount.phpt +++ b/ext/gmp/tests/gmp_popcount.phpt @@ -28,5 +28,5 @@ int(10) int(31) int(-1) int(20) -gmp_popcount(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_popcount(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_pow.phpt b/ext/gmp/tests/gmp_pow.phpt index d4d20f2ce796a..ab87e7f093309 100644 --- a/ext/gmp/tests/gmp_pow.phpt +++ b/ext/gmp/tests/gmp_pow.phpt @@ -49,13 +49,13 @@ string(4) "1024" string(5) "-2048" string(4) "1024" string(1) "1" -gmp_pow(): Argument #2 ($exp) must be greater than or equal to 0 +gmp_pow(): Argument #2 ($exponent) must be greater than or equal to 0 string(4) "1024" string(14) "10240000000000" string(17) "97656250000000000" -gmp_pow(): Argument #2 ($exp) must be greater than or equal to 0 +gmp_pow(): Argument #2 ($exponent) must be greater than or equal to 0 string(14) "10240000000000" string(14) "10240000000000" -gmp_pow(): Argument #2 ($exp) must be of type int, array given -gmp_pow(): Argument #1 ($base) must be of type GMP|string|int, array given +gmp_pow(): Argument #2 ($exponent) must be of type int, array given +gmp_pow(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_pown.phpt b/ext/gmp/tests/gmp_pown.phpt index 76d5576e47581..49bc308e156dc 100644 --- a/ext/gmp/tests/gmp_pown.phpt +++ b/ext/gmp/tests/gmp_pown.phpt @@ -75,11 +75,11 @@ string(3) "171" string(3) "371" Modulo by zero Modulo by zero -gmp_powm(): Argument #1 ($base) must be of type GMP|string|int, array given -gmp_powm(): Argument #2 ($exp) must be of type GMP|string|int, array given -gmp_powm(): Argument #2 ($exp) must be of type GMP|string|int, TypeError given -gmp_powm(): Argument #1 ($base) must be of type GMP|string|int, array given -gmp_powm(): Argument #2 ($exp) must be greater than or equal to 0 +gmp_powm(): Argument #1 ($num) must be of type GMP|string|int, array given +gmp_powm(): Argument #2 ($exponent) must be of type GMP|string|int, array given +gmp_powm(): Argument #2 ($exponent) must be of type GMP|string|int, TypeError given +gmp_powm(): Argument #1 ($num) must be of type GMP|string|int, array given +gmp_powm(): Argument #2 ($exponent) must be greater than or equal to 0 object(GMP)#6 (1) { ["num"]=> string(1) "1" diff --git a/ext/gmp/tests/gmp_prob_prime.phpt b/ext/gmp/tests/gmp_prob_prime.phpt index efc5cf4e165ae..be8a8d0f6859f 100644 --- a/ext/gmp/tests/gmp_prob_prime.phpt +++ b/ext/gmp/tests/gmp_prob_prime.phpt @@ -75,5 +75,5 @@ int(0) int(0) int(0) int(0) -gmp_prob_prime(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_prob_prime(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_scan0.phpt b/ext/gmp/tests/gmp_scan0.phpt index 017148c0119b0..c949f6a3beef6 100644 --- a/ext/gmp/tests/gmp_scan0.phpt +++ b/ext/gmp/tests/gmp_scan0.phpt @@ -34,5 +34,5 @@ int(0) int(5) int(200) int(13) -gmp_scan0(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_scan0(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_scan1.phpt b/ext/gmp/tests/gmp_scan1.phpt index ba480e3e9665e..d625f0cb86343 100644 --- a/ext/gmp/tests/gmp_scan1.phpt +++ b/ext/gmp/tests/gmp_scan1.phpt @@ -34,5 +34,5 @@ int(12) int(9) int(-1) int(10) -gmp_scan1(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_scan1(): Argument #1 ($num1) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_setbit.phpt b/ext/gmp/tests/gmp_setbit.phpt index 02857c7e52ed9..6dad79f5d3b4e 100644 --- a/ext/gmp/tests/gmp_setbit.phpt +++ b/ext/gmp/tests/gmp_setbit.phpt @@ -59,6 +59,6 @@ string(1) "7" string(12) "100008388608" string(12) "100000000000" string(12) "100000000008" -gmp_setbit(): Argument #1 ($a) must be of type GMP, string given -gmp_setbit(): Argument #1 ($a) must be of type GMP, array given +gmp_setbit(): Argument #1 ($num) must be of type GMP, string given +gmp_setbit(): Argument #1 ($num) must be of type GMP, array given Done diff --git a/ext/gmp/tests/gmp_sign.phpt b/ext/gmp/tests/gmp_sign.phpt index 01567bb5c43f8..7d7e67177c996 100644 --- a/ext/gmp/tests/gmp_sign.phpt +++ b/ext/gmp/tests/gmp_sign.phpt @@ -36,7 +36,7 @@ int(1) int(0) int(1) int(-1) -gmp_sign(): Argument #1 ($a) is not an integer string -gmp_init(): Argument #1 ($number) is not an integer string -gmp_sign(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_sign(): Argument #1 ($num) is not an integer string +gmp_init(): Argument #1 ($num) is not an integer string +gmp_sign(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_sqrt.phpt b/ext/gmp/tests/gmp_sqrt.phpt index 19a44121b6593..dcd9c58373d08 100644 --- a/ext/gmp/tests/gmp_sqrt.phpt +++ b/ext/gmp/tests/gmp_sqrt.phpt @@ -40,13 +40,13 @@ try { echo "Done\n"; ?> --EXPECT-- -gmp_sqrt(): Argument #1 ($a) must be greater than or equal to 0 -gmp_sqrt(): Argument #1 ($a) must be greater than or equal to 0 +gmp_sqrt(): Argument #1 ($num) must be greater than or equal to 0 +gmp_sqrt(): Argument #1 ($num) must be greater than or equal to 0 string(1) "0" string(1) "1" string(2) "12" string(1) "0" -gmp_sqrt(): Argument #1 ($a) must be greater than or equal to 0 +gmp_sqrt(): Argument #1 ($num) must be greater than or equal to 0 string(2) "27" -gmp_sqrt(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_sqrt(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_sqrtrem.phpt b/ext/gmp/tests/gmp_sqrtrem.phpt index 0d63a54ff8e66..b415711bd4f2e 100644 --- a/ext/gmp/tests/gmp_sqrtrem.phpt +++ b/ext/gmp/tests/gmp_sqrtrem.phpt @@ -66,7 +66,7 @@ try { echo "Done\n"; ?> --EXPECT-- -gmp_sqrtrem(): Argument #1 ($a) must be greater than or equal to 0 +gmp_sqrtrem(): Argument #1 ($num) must be greater than or equal to 0 string(1) "0" string(1) "0" string(1) "1" @@ -83,8 +83,8 @@ string(4) "1000" string(1) "0" string(4) "1000" string(1) "1" -gmp_sqrtrem(): Argument #1 ($a) must be greater than or equal to 0 +gmp_sqrtrem(): Argument #1 ($num) must be greater than or equal to 0 string(4) "1000" string(1) "1" -gmp_sqrtrem(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_sqrtrem(): Argument #1 ($num) must be of type GMP|string|int, array given Done diff --git a/ext/gmp/tests/gmp_strict_types.phpt b/ext/gmp/tests/gmp_strict_types.phpt index 8a2b5509a5c78..e697afa67533c 100644 --- a/ext/gmp/tests/gmp_strict_types.phpt +++ b/ext/gmp/tests/gmp_strict_types.phpt @@ -48,8 +48,8 @@ object(GMP)#2 (1) { ["num"]=> string(1) "1" } -gmp_abs(): Argument #1 ($a) must be of type GMP|string|int, float given -gmp_abs(): Argument #1 ($a) must be of type GMP|string|int, bool given -gmp_abs(): Argument #1 ($a) must be of type GMP|string|int, bool given -gmp_abs(): Argument #1 ($a) must be of type GMP|string|int, null given -gmp_abs(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, float given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, bool given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, bool given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, null given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, array given diff --git a/ext/gmp/tests/gmp_strval.phpt b/ext/gmp/tests/gmp_strval.phpt index 234465c294a6b..3aa3e372a9fa4 100644 --- a/ext/gmp/tests/gmp_strval.phpt +++ b/ext/gmp/tests/gmp_strval.phpt @@ -65,9 +65,9 @@ try { echo "Done\n"; ?> --EXPECT-- -gmp_strval(): Argument #1 ($gmpnumber) is not an integer string +gmp_strval(): Argument #1 ($num) is not an integer string gmp_strval(): Argument #2 ($base) must be between 2 and 62, or -2 and -36 -gmp_strval(): Argument #1 ($gmpnumber) must be of type GMP|string|int, resource given +gmp_strval(): Argument #1 ($num) must be of type GMP|string|int, resource given string(7) "9765456" gmp_strval(): Argument #2 ($base) must be between 2 and 62, or -2 and -36 gmp_strval(): Argument #2 ($base) must be between 2 and 62, or -2 and -36 @@ -76,6 +76,6 @@ string(8) "-3373333" gmp_strval(): Argument #2 ($base) must be between 2 and 62, or -2 and -36 gmp_strval(): Argument #2 ($base) must be between 2 and 62, or -2 and -36 string(8) "-3373333" -gmp_strval(): Argument #1 ($gmpnumber) must be of type GMP|string|int, array given -gmp_strval(): Argument #1 ($gmpnumber) must be of type GMP|string|int, stdClass given +gmp_strval(): Argument #1 ($num) must be of type GMP|string|int, array given +gmp_strval(): Argument #1 ($num) must be of type GMP|string|int, stdClass given Done diff --git a/ext/gmp/tests/gmp_sub.phpt b/ext/gmp/tests/gmp_sub.phpt index 28a01f86ee640..a1e5a6158305c 100644 --- a/ext/gmp/tests/gmp_sub.phpt +++ b/ext/gmp/tests/gmp_sub.phpt @@ -37,8 +37,8 @@ try { echo "Done\n"; ?> --EXPECT-- -gmp_sub(): Argument #1 ($a) is not an integer string -gmp_sub(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_sub(): Argument #1 ($num1) is not an integer string +gmp_sub(): Argument #1 ($num1) must be of type GMP|string|int, array given object(GMP)#1 (1) { ["num"]=> string(2) "-1" @@ -49,6 +49,6 @@ object(GMP)#3 (1) { string(5) "10001" } string(5) "10001" -gmp_sub(): Argument #2 ($b) must be of type GMP|string|int, stdClass given -gmp_sub(): Argument #1 ($a) must be of type GMP|string|int, stdClass given +gmp_sub(): Argument #2 ($num2) must be of type GMP|string|int, stdClass given +gmp_sub(): Argument #1 ($num1) must be of type GMP|string|int, stdClass given Done diff --git a/ext/gmp/tests/gmp_xor.phpt b/ext/gmp/tests/gmp_xor.phpt index d81b5947fcbde..eb99f8c99c9ab 100644 --- a/ext/gmp/tests/gmp_xor.phpt +++ b/ext/gmp/tests/gmp_xor.phpt @@ -46,10 +46,10 @@ string(6) "476369" string(10) "2342340648" string(5) "-3334" string(5) "-4563" -gmp_xor(): Argument #1 ($a) is not an integer string +gmp_xor(): Argument #1 ($num1) is not an integer string string(15) "987657876574716" string(21) "987658017016065701376" -gmp_xor(): Argument #1 ($a) must be of type GMP|string|int, array given -gmp_xor(): Argument #2 ($b) must be of type GMP|string|int, array given -gmp_xor(): Argument #1 ($a) must be of type GMP|string|int, array given +gmp_xor(): Argument #1 ($num1) must be of type GMP|string|int, array given +gmp_xor(): Argument #2 ($num2) must be of type GMP|string|int, array given +gmp_xor(): Argument #1 ($num1) must be of type GMP|string|int, array given Done From 82f0d3c181d905f43a258073868df1711bf6d7f9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 29 Sep 2020 12:35:39 +0200 Subject: [PATCH 162/209] Remove unused variable --- ext/odbc/php_odbc.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index a64501c3ef3fb..a04b19ec50f72 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2264,8 +2264,6 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) db_conn->res = zend_register_resource(db_conn, le_pconn); RETVAL_RES(db_conn->res); } else { /* non persistent */ - zend_resource new_index_ptr; - if (ODBCG(max_links) != -1 && ODBCG(num_links) >= ODBCG(max_links)) { php_error_docref(NULL, E_WARNING,"Too many open connections (%ld)",ODBCG(num_links)); RETURN_FALSE; @@ -2276,9 +2274,6 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } db_conn->res = zend_register_resource(db_conn, le_conn); RETVAL_RES(db_conn->res); - new_index_ptr.ptr = (void *)(zend_uintptr_t)Z_RES_HANDLE_P(return_value); - new_index_ptr.type = le_index_ptr; - ODBCG(num_links)++; } } From 739eb435c24503187c0a4bce4038bd8c04ff6ea2 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 29 Sep 2020 15:07:45 +0300 Subject: [PATCH 163/209] Tracing JIT support for preloaded scripts --- ext/opcache/ZendAccelerator.c | 2 +- ext/opcache/jit/zend_jit.c | 145 ++++++++++++++++++++++++++----- ext/opcache/jit/zend_jit_trace.c | 20 +++++ 3 files changed, 146 insertions(+), 21 deletions(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 53ad1b01690a4..340c19764f46d 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4487,7 +4487,6 @@ static int accel_preload(const char *config, zend_bool in_child) } zend_end_try(); PG(open_basedir) = orig_open_basedir; - CG(compiler_options) = orig_compiler_options; accelerator_orig_compile_file = preload_orig_compile_file; ZCG(enabled) = 1; @@ -4726,6 +4725,7 @@ static int accel_preload(const char *config, zend_bool in_child) } finish: + CG(compiler_options) = orig_compiler_options; zend_hash_destroy(preload_scripts); efree(preload_scripts); preload_scripts = NULL; diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 3d46fcc8b5ff8..111b5f47e9075 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -3626,9 +3626,55 @@ void ZEND_FASTCALL zend_jit_hot_func(zend_execute_data *execute_data, const zend /* JIT-ed code is going to be called by VM */ } +static void zend_jit_setup_hot_counters_ex(zend_op_array *op_array, zend_cfg *cfg) +{ + if (JIT_G(hot_func)) { + zend_op *opline = op_array->opcodes; + + if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { + while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { + opline++; + } + } + + opline->handler = (const void*)zend_jit_func_hot_counter_handler; + } + + if (JIT_G(hot_loop)) { + uint32_t i; + + for (i = 0; i < cfg->blocks_count; i++) { + if ((cfg->blocks[i].flags & ZEND_BB_REACHABLE) && + (cfg->blocks[i].flags & ZEND_BB_LOOP_HEADER)) { + op_array->opcodes[cfg->blocks[i].start].handler = + (const void*)zend_jit_loop_hot_counter_handler; + } + } + } +} + +static int zend_jit_restart_hot_counters(zend_op_array *op_array) +{ + zend_jit_op_array_hot_extension *jit_extension; + zend_cfg cfg; + uint32_t i; + + jit_extension = (zend_jit_op_array_hot_extension*)ZEND_FUNC_INFO(op_array); + for (i = 0; i < op_array->last; i++) { + op_array->opcodes[i].handler = jit_extension->orig_handlers[i]; + } + + if (zend_jit_build_cfg(op_array, &cfg) != SUCCESS) { + return FAILURE; + } + + zend_jit_setup_hot_counters_ex(op_array, &cfg); + + return SUCCESS; +} + static int zend_jit_setup_hot_counters(zend_op_array *op_array) { - zend_op *opline = op_array->opcodes; zend_jit_op_array_hot_extension *jit_extension; zend_cfg cfg; uint32_t i; @@ -3649,25 +3695,7 @@ static int zend_jit_setup_hot_counters(zend_op_array *op_array) } ZEND_SET_FUNC_INFO(op_array, (void*)jit_extension); - if (JIT_G(hot_func)) { - if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { - while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { - opline++; - } - } - - opline->handler = (const void*)zend_jit_func_hot_counter_handler; - } - - if (JIT_G(hot_loop)) { - for (i = 0; i < cfg.blocks_count; i++) { - if ((cfg.blocks[i].flags & ZEND_BB_REACHABLE) && - (cfg.blocks[i].flags & ZEND_BB_LOOP_HEADER)) { - op_array->opcodes[cfg.blocks[i].start].handler = - (const void*)zend_jit_loop_hot_counter_handler; - } - } - } + zend_jit_setup_hot_counters_ex(op_array, &cfg); zend_shared_alloc_register_xlat_entry(op_array->opcodes, jit_extension); @@ -3686,6 +3714,12 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script) zend_jit_op_array_extension *jit_extension; zend_op *opline = op_array->opcodes; + if (CG(compiler_options) & ZEND_COMPILE_PRELOAD) { + ZEND_SET_FUNC_INFO(op_array, NULL); + zend_error(E_WARNING, "Preloading is incompatible with first-exec and profile triggered JIT"); + return SUCCESS; + } + /* Set run-time JIT handler */ ZEND_ASSERT(zend_jit_runtime_jit_handler != NULL); if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { @@ -3706,6 +3740,12 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script) zend_jit_op_array_extension *jit_extension; zend_op *opline = op_array->opcodes; + if (CG(compiler_options) & ZEND_COMPILE_PRELOAD) { + ZEND_SET_FUNC_INFO(op_array, NULL); + zend_error(E_WARNING, "Preloading is incompatible with first-exec and profile triggered JIT"); + return SUCCESS; + } + ZEND_ASSERT(zend_jit_profile_jit_handler != NULL); if (op_array->function_name) { if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { @@ -4265,6 +4305,59 @@ ZEND_EXT_API void zend_jit_deactivate(void) } } +static void zend_jit_restart_preloaded_op_array(zend_op_array *op_array) +{ + zend_func_info *func_info = ZEND_FUNC_INFO(op_array); + + if (!func_info) { + return; + } + + if (func_info->flags & ZEND_FUNC_JIT_ON_HOT_TRACE) { + zend_jit_restart_hot_trace_counters(op_array); + } else if (func_info->flags & ZEND_FUNC_JIT_ON_HOT_COUNTERS) { + zend_jit_restart_hot_counters(op_array); +#if 0 + // TODO: We have to restore handlers for some inner basic-blocks, but we didn't store them ??? + } else if (func_info->flags & (ZEND_FUNC_JIT_ON_FIRST_EXEC|ZEND_FUNC_JIT_ON_PROF_REQUEST)) { + zend_op *opline = op_array->opcodes; + zend_jit_op_array_extension *jit_extension = + (zend_jit_op_array_extension*)func_info; + + if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { + while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { + opline++; + } + } + if (func_info->flags & ZEND_FUNC_JIT_ON_FIRST_EXEC) { + opline->handler = (const void*)zend_jit_runtime_jit_handler; + } else { + opline->handler = (const void*)zend_jit_profile_jit_handler; + } +#endif + } +} + +static void zend_jit_restart_preloaded_script(zend_persistent_script *script) +{ + zend_class_entry *ce; + zend_op_array *op_array; + + zend_jit_restart_preloaded_op_array(&script->script.main_op_array); + + ZEND_HASH_FOREACH_PTR(&script->script.function_table, op_array) { + zend_jit_restart_preloaded_op_array(op_array); + } ZEND_HASH_FOREACH_END(); + + ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) { + ZEND_HASH_FOREACH_PTR(&ce->function_table, op_array) { + if (op_array->type == ZEND_USER_FUNCTION) { + zend_jit_restart_preloaded_op_array(op_array); + } + } ZEND_HASH_FOREACH_END(); + } ZEND_HASH_FOREACH_END(); +} + ZEND_EXT_API void zend_jit_restart(void) { if (dasm_buf) { @@ -4275,6 +4368,18 @@ ZEND_EXT_API void zend_jit_restart(void) zend_jit_trace_restart(); + if (ZCSG(preload_script)) { + zend_jit_restart_preloaded_script(ZCSG(preload_script)); + if (ZCSG(saved_scripts)) { + zend_persistent_script **p = ZCSG(saved_scripts); + + while (*p) { + zend_jit_restart_preloaded_script(*p); + p++; + } + } + } + zend_jit_protect(); } } diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index cc42fcb51bc4c..311e4c3e0a3eb 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -6833,6 +6833,26 @@ static zend_always_inline uint8_t zend_jit_trace_supported(const zend_op *opline } } +static int zend_jit_restart_hot_trace_counters(zend_op_array *op_array) +{ + zend_jit_op_array_trace_extension *jit_extension; + uint32_t i; + + jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); + for (i = 0; i < op_array->last; i++) { + jit_extension->trace_info[i].trace_flags &= + ZEND_JIT_TRACE_START_LOOP | ZEND_JIT_TRACE_START_ENTER | ZEND_JIT_TRACE_UNSUPPORTED; + if (jit_extension->trace_info[i].trace_flags == ZEND_JIT_TRACE_START_LOOP) { + op_array->opcodes[i].handler = (const void*)zend_jit_loop_trace_counter_handler; + } else if (jit_extension->trace_info[i].trace_flags == ZEND_JIT_TRACE_START_ENTER) { + op_array->opcodes[i].handler = (const void*)zend_jit_func_trace_counter_handler; + } else { + op_array->opcodes[i].handler = jit_extension->trace_info[i].orig_handler; + } + } + return SUCCESS; +} + static int zend_jit_setup_hot_trace_counters(zend_op_array *op_array) { zend_op *opline; From 59aa21c735190a978c976467560b270855eb92e9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 29 Sep 2020 14:48:31 +0200 Subject: [PATCH 164/209] Don't accept dir handle in Directory methods This is an artifact of the shared implementation with readdir() etc. The method versions should not accept an explicit dir handle, as they work on the dir handle from the object. --- ext/standard/dir.c | 30 ++++++++++--------- ext/standard/dir.stub.php | 9 ++---- ext/standard/dir_arginfo.h | 3 +- .../directory/DirectoryClass_basic_001.phpt | 9 ++---- 4 files changed, 23 insertions(+), 28 deletions(-) diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 98bff12fc2bc3..c1c264d1f0a8b 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -59,30 +59,32 @@ php_dir_globals dir_globals; static zend_class_entry *dir_class_entry_ptr; #define FETCH_DIRP() \ - ZEND_PARSE_PARAMETERS_START(0, 1) \ - Z_PARAM_OPTIONAL \ - Z_PARAM_RESOURCE_OR_NULL(id) \ - ZEND_PARSE_PARAMETERS_END(); \ - if (!id) { \ - myself = getThis(); \ - if (myself) { \ - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(myself), "handle", sizeof("handle")-1)) == NULL) { \ - zend_throw_error(NULL, "Unable to find my handle property"); \ - RETURN_THROWS(); \ - } \ - if ((dirp = (php_stream *)zend_fetch_resource_ex(tmp, "Directory", php_file_le_stream())) == NULL) { \ + myself = getThis(); \ + if (!myself) { \ + ZEND_PARSE_PARAMETERS_START(0, 1) \ + Z_PARAM_OPTIONAL \ + Z_PARAM_RESOURCE_OR_NULL(id) \ + ZEND_PARSE_PARAMETERS_END(); \ + if (id) { \ + if ((dirp = (php_stream *)zend_fetch_resource(Z_RES_P(id), "Directory", php_file_le_stream())) == NULL) { \ RETURN_THROWS(); \ } \ } else { \ if (!DIRG(default_dir)) { \ zend_type_error("No resource supplied"); \ RETURN_THROWS(); \ - } else if ((dirp = (php_stream *)zend_fetch_resource(DIRG(default_dir), "Directory", php_file_le_stream())) == NULL) { \ + } \ + if ((dirp = (php_stream *)zend_fetch_resource(DIRG(default_dir), "Directory", php_file_le_stream())) == NULL) { \ RETURN_THROWS(); \ } \ } \ } else { \ - if ((dirp = (php_stream *)zend_fetch_resource(Z_RES_P(id), "Directory", php_file_le_stream())) == NULL) { \ + ZEND_PARSE_PARAMETERS_NONE(); \ + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(myself), "handle", sizeof("handle")-1)) == NULL) { \ + zend_throw_error(NULL, "Unable to find my handle property"); \ + RETURN_THROWS(); \ + } \ + if ((dirp = (php_stream *)zend_fetch_resource_ex(tmp, "Directory", php_file_le_stream())) == NULL) { \ RETURN_THROWS(); \ } \ } diff --git a/ext/standard/dir.stub.php b/ext/standard/dir.stub.php index fb129acaef21c..9904c6bc992d6 100755 --- a/ext/standard/dir.stub.php +++ b/ext/standard/dir.stub.php @@ -5,23 +5,20 @@ class Directory { /** - * @param resource|null $dir_handle * @return void * @implementation-alias closedir */ - public function close($dir_handle = null) {} + public function close() {} /** - * @param resource|null $dir_handle * @return void * @implementation-alias rewinddir */ - public function rewind($dir_handle = null) {} + public function rewind() {} /** - * @param resource|null $dir_handle * @return string|false * @implementation-alias readdir */ - public function read($dir_handle = null) {} + public function read() {} } diff --git a/ext/standard/dir_arginfo.h b/ext/standard/dir_arginfo.h index a9f836d53a5d5..a2fa03611cab8 100644 --- a/ext/standard/dir_arginfo.h +++ b/ext/standard/dir_arginfo.h @@ -1,8 +1,7 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d8d8c93a1659e1790b25a65d7e1d0d7430724e9d */ + * Stub hash: a715bf6a8d5fe69732623cc17f03bd463f369648 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Directory_close, 0, 0, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, dir_handle, "null") ZEND_END_ARG_INFO() #define arginfo_class_Directory_rewind arginfo_class_Directory_close diff --git a/ext/standard/tests/directory/DirectoryClass_basic_001.phpt b/ext/standard/tests/directory/DirectoryClass_basic_001.phpt index 7e3c53b7970e2..9ccceda920437 100644 --- a/ext/standard/tests/directory/DirectoryClass_basic_001.phpt +++ b/ext/standard/tests/directory/DirectoryClass_basic_001.phpt @@ -41,22 +41,19 @@ Class [ class Directory ] { - Methods [3] { Method [ public method close ] { - - Parameters [1] { - Parameter #0 [ $dir_handle = null ] + - Parameters [0] { } } Method [ public method rewind ] { - - Parameters [1] { - Parameter #0 [ $dir_handle = null ] + - Parameters [0] { } } Method [ public method read ] { - - Parameters [1] { - Parameter #0 [ $dir_handle = null ] + - Parameters [0] { } } } From f3c58a5ed6bbb22260d2d848cc2bfd36ed8b00e3 Mon Sep 17 00:00:00 2001 From: Dik Takken Date: Fri, 25 Sep 2020 15:54:28 +0200 Subject: [PATCH 165/209] Make handling of NULL bytes in file paths more consistent (WIP) Not all extensions consistently throw exceptions when the user passes a path name containing null bytes. Also, some extensions would throw a ValueError while others would throw a TypeError. Error messages also varied. Now a ValueError is thrown after all failed path checks, at least for as far as these occur in functions that are exposed to userland. Closes GH-6216. --- ext/dom/document.c | 41 ++++++++++--------- .../tests/DOMDocument_loadHTML_error2.phpt | 10 +++-- .../DOMDocument_loadHTMLfile_error2.phpt | 22 ++++++---- ext/dom/tests/DOMDocument_loadXML_error6.phpt | 16 ++++++++ ext/dom/tests/DOMDocument_load_error6.phpt | 27 ++++++++++++ ...ocument_saveHTMLFile_invalid_filename.phpt | 10 +++-- ...MDocument_schemaValidateSource_error3.phpt | 12 +++--- .../DOMDocument_schemaValidate_error3.phpt | 12 +++--- .../DOMDocument_schemaValidate_error6.phpt | 25 +++++++++++ ext/fileinfo/fileinfo.c | 2 +- ext/fileinfo/tests/finfo_file_001.phpt | 2 +- ext/fileinfo/tests/finfo_file_basic.phpt | 2 +- ext/fileinfo/tests/mime_content_type_001.phpt | 2 +- ext/sqlite3/sqlite3.c | 19 +-------- 14 files changed, 137 insertions(+), 65 deletions(-) create mode 100644 ext/dom/tests/DOMDocument_loadXML_error6.phpt create mode 100644 ext/dom/tests/DOMDocument_load_error6.phpt create mode 100644 ext/dom/tests/DOMDocument_schemaValidate_error6.phpt diff --git a/ext/dom/document.c b/ext/dom/document.c index d3a8fa43a5aa7..23bdcae1e0c1a 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1197,6 +1197,7 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so if (mode == DOM_LOAD_FILE) { char *file_dest; if (CHECK_NULL_PATH(source, source_len)) { + zend_value_error("Path to document must not contain any null bytes"); return NULL; } file_dest = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN); @@ -1305,8 +1306,8 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { } if (!source_len) { - php_error_docref(NULL, E_WARNING, "Empty string supplied as input"); - RETURN_FALSE; + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); } if (ZEND_SIZE_T_INT_OVFL(source_len)) { php_error_docref(NULL, E_WARNING, "Input string is too long"); @@ -1388,8 +1389,8 @@ PHP_METHOD(DOMDocument, save) } if (file_len == 0) { - php_error_docref(NULL, E_WARNING, "Invalid Filename"); - RETURN_FALSE; + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); } DOM_GET_OBJ(docp, id, xmlDocPtr, intern); @@ -1623,9 +1624,9 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type RETURN_THROWS(); } - if (source_len == 0) { - php_error_docref(NULL, E_WARNING, "Invalid Schema source"); - RETURN_FALSE; + if (!source_len) { + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); } DOM_GET_OBJ(docp, id, xmlDocPtr, intern); @@ -1633,8 +1634,8 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type switch (type) { case DOM_LOAD_FILE: if (CHECK_NULL_PATH(source, source_len)) { - php_error_docref(NULL, E_WARNING, "Invalid Schema file source"); - RETURN_FALSE; + zend_argument_value_error(1, "must not contain any null bytes"); + RETURN_THROWS(); } valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN); if (!valid_file) { @@ -1724,9 +1725,9 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ RETURN_THROWS(); } - if (source_len == 0) { - php_error_docref(NULL, E_WARNING, "Invalid Schema source"); - RETURN_FALSE; + if (!source_len) { + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); } DOM_GET_OBJ(docp, id, xmlDocPtr, intern); @@ -1734,8 +1735,8 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ switch (type) { case DOM_LOAD_FILE: if (CHECK_NULL_PATH(source, source_len)) { - php_error_docref(NULL, E_WARNING, "Invalid RelaxNG file source"); - RETURN_FALSE; + zend_argument_value_error(1, "must not contain any null bytes"); + RETURN_THROWS(); } valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN); if (!valid_file) { @@ -1823,8 +1824,8 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ } if (!source_len) { - php_error_docref(NULL, E_WARNING, "Empty string supplied as input"); - RETURN_FALSE; + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); } if (ZEND_LONG_EXCEEDS_INT(options)) { @@ -1834,8 +1835,8 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ if (mode == DOM_LOAD_FILE) { if (CHECK_NULL_PATH(source, source_len)) { - php_error_docref(NULL, E_WARNING, "Invalid file source"); - RETURN_FALSE; + zend_argument_value_error(1, "must not contain any null bytes"); + RETURN_THROWS(); } ctxt = htmlCreateFileParserCtxt(source, NULL); } else { @@ -1930,8 +1931,8 @@ PHP_METHOD(DOMDocument, saveHTMLFile) } if (file_len == 0) { - php_error_docref(NULL, E_WARNING, "Invalid Filename"); - RETURN_FALSE; + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); } DOM_GET_OBJ(docp, id, xmlDocPtr, intern); diff --git a/ext/dom/tests/DOMDocument_loadHTML_error2.phpt b/ext/dom/tests/DOMDocument_loadHTML_error2.phpt index 3167c0189034a..695f58868d5b2 100644 --- a/ext/dom/tests/DOMDocument_loadHTML_error2.phpt +++ b/ext/dom/tests/DOMDocument_loadHTML_error2.phpt @@ -9,7 +9,11 @@ require_once('skipif.inc'); --FILE-- loadHTML(''); +try { + $doc->loadHTML(''); +} catch (ValueError $e) { + echo $e->getMessage() . "\n"; +} ?> ---EXPECTF-- -Warning: DOMDocument::loadHTML(): Empty string supplied as input in %s on line %d +--EXPECT-- +DOMDocument::loadHTML(): Argument #1 ($source) must not be empty diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt index 55b36e712d18a..492bedda1027a 100644 --- a/ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt +++ b/ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt @@ -11,13 +11,19 @@ assert.bail=true --FILE-- loadHTMLFile(""); -assert($result === false); +try { + $result = $doc->loadHTMLFile(""); +} catch (ValueError $e) { + echo $e->getMessage() . "\n"; +} + $doc = new DOMDocument(); -$result = $doc->loadHTMLFile("text.html\0something"); -assert($result === false); +try { + $result = $doc->loadHTMLFile("text.html\0something"); +} catch (ValueError $e) { + echo $e->getMessage() . "\n"; +} ?> ---EXPECTF-- -%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): Empty string supplied as input %s - -%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): Invalid file source %s +--EXPECT-- +DOMDocument::loadHTMLFile(): Argument #1 ($filename) must not be empty +DOMDocument::loadHTMLFile(): Argument #1 ($filename) must not contain any null bytes diff --git a/ext/dom/tests/DOMDocument_loadXML_error6.phpt b/ext/dom/tests/DOMDocument_loadXML_error6.phpt new file mode 100644 index 0000000000000..9f22692ed9f9b --- /dev/null +++ b/ext/dom/tests/DOMDocument_loadXML_error6.phpt @@ -0,0 +1,16 @@ +--TEST-- +Test DOMDocument::loadXML() with empty file path +--SKIPIF-- + +--FILE-- +loadXML(""); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} +?> +--EXPECT-- +DOMDocument::loadXML(): Argument #1 ($source) must not be empty diff --git a/ext/dom/tests/DOMDocument_load_error6.phpt b/ext/dom/tests/DOMDocument_load_error6.phpt new file mode 100644 index 0000000000000..70e270651cc6d --- /dev/null +++ b/ext/dom/tests/DOMDocument_load_error6.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test DOMDocument::load() with invalid paths +--SKIPIF-- + +--FILE-- +load(""); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} + +try { + $dom->load("/path/with/\0/byte"); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} + +// Path is too long +var_dump($dom->load(str_repeat(" ", PHP_MAXPATHLEN + 1))); +?> +--EXPECT-- +DOMDocument::load(): Argument #1 ($filename) must not be empty +Path to document must not contain any null bytes +bool(false) diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt index 6ca66730eb588..12b45a491bd04 100644 --- a/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt +++ b/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt @@ -19,7 +19,11 @@ $title = $doc->createElement('title'); $title = $head->appendChild($title); $text = $doc->createTextNode('This is the title'); $text = $title->appendChild($text); -$bytes = $doc->saveHTMLFile($filename); +try { + $doc->saveHTMLFile($filename); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} ?> ---EXPECTF-- -Warning: DOMDocument::saveHTMLFile(): Invalid Filename in %s on line %d +--EXPECT-- +DOMDocument::saveHTMLFile(): Argument #1 ($filename) must not be empty diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt index 41f9015b92b7a..dc7a1db901273 100644 --- a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt @@ -12,10 +12,12 @@ $doc = new DOMDocument; $doc->load(__DIR__."/book.xml"); -$result = $doc->schemaValidateSource(''); -var_dump($result); +try { + $doc->schemaValidateSource(''); +} catch (ValueError $e) { + echo $e->getMessage() . "\n"; +} ?> ---EXPECTF-- -Warning: DOMDocument::schemaValidateSource(): Invalid Schema source in %s.php on line %d -bool(false) +--EXPECT-- +DOMDocument::schemaValidateSource(): Argument #1 ($source) must not be empty diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt index 2ff2ce9487e69..0add6b2442a6d 100644 --- a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt @@ -12,10 +12,12 @@ $doc = new DOMDocument; $doc->load(__DIR__."/book.xml"); -$result = $doc->schemaValidate(''); -var_dump($result); +try { + $doc->schemaValidate(''); +} catch (ValueError $e) { + echo $e->getMessage() . "\n"; +} ?> ---EXPECTF-- -Warning: DOMDocument::schemaValidate(): Invalid Schema source in %s.php on line %d -bool(false) +--EXPECT-- +DOMDocument::schemaValidate(): Argument #1 ($filename) must not be empty diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error6.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error6.phpt new file mode 100644 index 0000000000000..1dbfb9a2af9f0 --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidate_error6.phpt @@ -0,0 +1,25 @@ +--TEST-- +DomDocument::schemaValidate() - invalid path to schema +--SKIPIF-- + +--FILE-- +load(__DIR__."/book.xml"); + +try { + $doc->schemaValidate("/path/with/\0/byte"); +} catch (ValueError $e) { + echo $e->getMessage() . "\n"; +} + +var_dump($doc->schemaValidate(str_repeat(" ", PHP_MAXPATHLEN + 1))); + +?> +--EXPECTF-- +DOMDocument::schemaValidate(): Argument #1 ($filename) must not contain any null bytes + +Warning: DOMDocument::schemaValidate(): Invalid Schema file source in %s on line %d +bool(false) diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index 1b26736ad0c45..0a4ee3c34eebb 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -444,7 +444,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime goto clean; } if (CHECK_NULL_PATH(buffer, buffer_len)) { - zend_argument_type_error(1, "must not contain null bytes"); + zend_argument_type_error(1, "must not contain any null bytes"); goto clean; } diff --git a/ext/fileinfo/tests/finfo_file_001.phpt b/ext/fileinfo/tests/finfo_file_001.phpt index 726103e02d666..71d88bbd43f03 100644 --- a/ext/fileinfo/tests/finfo_file_001.phpt +++ b/ext/fileinfo/tests/finfo_file_001.phpt @@ -26,7 +26,7 @@ var_dump(finfo_file($fp, '&')); ?> --EXPECTF-- -finfo_file(): Argument #1 ($finfo) must not contain null bytes +finfo_file(): Argument #1 ($finfo) must not contain any null bytes finfo_file(): Argument #1 ($finfo) cannot be empty finfo_file(): Argument #1 ($finfo) cannot be empty string(9) "directory" diff --git a/ext/fileinfo/tests/finfo_file_basic.phpt b/ext/fileinfo/tests/finfo_file_basic.phpt index 08c296ac8be3b..821405b48cd39 100644 --- a/ext/fileinfo/tests/finfo_file_basic.phpt +++ b/ext/fileinfo/tests/finfo_file_basic.phpt @@ -25,4 +25,4 @@ try { string(28) "text/x-php; charset=us-ascii" string(22) "PHP script, ASCII text" string(25) "text/plain; charset=utf-8" -finfo_file(): Argument #1 ($finfo) must not contain null bytes +finfo_file(): Argument #1 ($finfo) must not contain any null bytes diff --git a/ext/fileinfo/tests/mime_content_type_001.phpt b/ext/fileinfo/tests/mime_content_type_001.phpt index 9e3cb603986cd..76897cca7f9a6 100644 --- a/ext/fileinfo/tests/mime_content_type_001.phpt +++ b/ext/fileinfo/tests/mime_content_type_001.phpt @@ -48,4 +48,4 @@ mime_content_type(): Argument #2 must be of type resource|string, array given Warning: mime_content_type(foo/inexistent): Failed to open stream: No such file or directory in %s on line %d mime_content_type(): Argument #1 ($filename) cannot be empty -mime_content_type(): Argument #1 ($filename) must not contain null bytes +mime_content_type(): Argument #1 ($filename) must not contain any null bytes diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 464df5ae21aa5..cd91e68fd3e9a 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -1243,12 +1243,7 @@ PHP_METHOD(SQLite3, openBlob) db_obj = Z_SQLITE3_DB_P(object); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssl|sl", &table, &table_len, &column, &column_len, &rowid, &dbname, &dbname_len, &flags) == FAILURE) { - RETURN_THROWS(); - } - - if (ZEND_NUM_ARGS() >= 4 && CHECK_NULL_PATH(dbname, dbname_len)) { - zend_argument_type_error(4, "must not contain null bytes"); + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssl|pl", &table, &table_len, &column, &column_len, &rowid, &dbname, &dbname_len, &flags) == FAILURE) { RETURN_THROWS(); } @@ -1346,17 +1341,7 @@ PHP_METHOD(SQLite3, backup) sqlite3_backup *dbBackup; int rc; // Return code - if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|ss", &destination_zval, php_sqlite3_sc_entry, &source_dbname, &source_dbname_length, &destination_dbname, &destination_dbname_length) == FAILURE) { - RETURN_THROWS(); - } - - if (ZEND_NUM_ARGS() >= 2 && CHECK_NULL_PATH(source_dbname, source_dbname_length)) { - zend_argument_type_error(2, "must not contain null bytes"); - RETURN_THROWS(); - } - - if (ZEND_NUM_ARGS() >= 3 && CHECK_NULL_PATH(destination_dbname, destination_dbname_length)) { - zend_argument_type_error(3, "must not contain null bytes"); + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|pp", &destination_zval, php_sqlite3_sc_entry, &source_dbname, &source_dbname_length, &destination_dbname, &destination_dbname_length) == FAILURE) { RETURN_THROWS(); } From b44cf9377464327d58756a6f76f316ba8df86198 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 29 Sep 2020 16:33:32 +0300 Subject: [PATCH 166/209] Allow tracing JIT cooperate with function JIT. --- ext/opcache/jit/zend_jit_trace.c | 12 ++++++++++++ ext/opcache/jit/zend_jit_vm_helpers.c | 13 +++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 311e4c3e0a3eb..caf162e44d480 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -5788,6 +5788,7 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace { zend_jit_trace_stop ret; const void *handler; + uint8_t orig_trigger; zend_jit_trace_info *t = NULL; zend_jit_trace_exit_info exit_info[ZEND_JIT_TRACE_MAX_EXITS]; @@ -5818,8 +5819,13 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace t->exit_info = exit_info; t->stack_map = NULL; + orig_trigger = JIT_G(trigger); + JIT_G(trigger) = ZEND_JIT_ON_HOT_TRACE; + handler = zend_jit_trace(trace_buffer, 0, 0); + JIT_G(trigger) = orig_trigger; + if (handler) { zend_jit_trace_exit_info *shared_exit_info = NULL; @@ -6407,6 +6413,7 @@ static zend_jit_trace_stop zend_jit_compile_side_trace(zend_jit_trace_rec *trace { zend_jit_trace_stop ret; const void *handler; + uint8_t orig_trigger; zend_jit_trace_info *t; zend_jit_trace_exit_info exit_info[ZEND_JIT_TRACE_MAX_EXITS]; @@ -6439,8 +6446,13 @@ static zend_jit_trace_stop zend_jit_compile_side_trace(zend_jit_trace_rec *trace t->exit_info = exit_info; t->stack_map = NULL; + orig_trigger = JIT_G(trigger); + JIT_G(trigger) = ZEND_JIT_ON_HOT_TRACE; + handler = zend_jit_trace(trace_buffer, parent_num, exit_num); + JIT_G(trigger) = orig_trigger; + if (handler) { zend_jit_trace_exit_info *shared_exit_info = NULL; diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 5ca1fb25aa618..f022b16e298cd 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -465,7 +465,9 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend && (func->op_array.fn_flags & ZEND_ACC_CLOSURE)) { jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(&func->op_array); - if (UNEXPECTED(!jit_extension || (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE))) { + if (UNEXPECTED(!jit_extension + || !(jit_extension->func_info.flags & ZEND_FUNC_JIT_ON_HOT_TRACE) + || (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE))) { return -1; } func = (zend_function*)jit_extension->op_array; @@ -765,8 +767,9 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, op_array = &EX(func)->op_array; jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); - if (UNEXPECTED(!jit_extension)) { - stop = ZEND_JIT_TRACE_STOP_BAD_FUNC; + if (UNEXPECTED(!jit_extension) + || UNEXPECTED(!(jit_extension->func_info.flags & ZEND_FUNC_JIT_ON_HOT_TRACE))) { + stop = ZEND_JIT_TRACE_STOP_INTERPRETER; break; } offset = jit_extension->offset; @@ -902,7 +905,9 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, && (func->op_array.fn_flags & ZEND_ACC_CLOSURE)) { jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(&func->op_array); - if (UNEXPECTED(!jit_extension) || (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE)) { + if (UNEXPECTED(!jit_extension) + || !(jit_extension->func_info.flags & ZEND_FUNC_JIT_ON_HOT_TRACE) + || (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE)) { stop = ZEND_JIT_TRACE_STOP_INTERPRETER; break; } From 5dd5569b89cce66b377f9934ae82ceea4e19e2a5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 29 Sep 2020 15:21:32 +0200 Subject: [PATCH 167/209] Update ext/tokenizer param names Closes GH-6232. --- ext/tokenizer/tokenizer.stub.php | 4 ++-- ext/tokenizer/tokenizer_arginfo.h | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ext/tokenizer/tokenizer.stub.php b/ext/tokenizer/tokenizer.stub.php index 72d61ad8560a2..a3a4246a1af6a 100644 --- a/ext/tokenizer/tokenizer.stub.php +++ b/ext/tokenizer/tokenizer.stub.php @@ -2,9 +2,9 @@ /** @generate-function-entries */ -function token_get_all(string $source, int $flags = 0): array {} +function token_get_all(string $code, int $flags = 0): array {} -function token_name(int $token): string {} +function token_name(int $id): string {} class PhpToken implements Stringable { diff --git a/ext/tokenizer/tokenizer_arginfo.h b/ext/tokenizer/tokenizer_arginfo.h index 6e313cd0de384..8bf694074e2e1 100644 --- a/ext/tokenizer/tokenizer_arginfo.h +++ b/ext/tokenizer/tokenizer_arginfo.h @@ -1,19 +1,16 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d8e8b4d749c2960b33fd20b27a1abf033604d4e2 */ + * Stub hash: ef39f4efec05a3ebc5cf56a6b26e01369f00d129 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_token_get_all, 0, 1, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_token_name, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, token, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, id, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_PhpToken_getAll, 0, 1, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") -ZEND_END_ARG_INFO() +#define arginfo_class_PhpToken_getAll arginfo_token_get_all ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PhpToken___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, id, IS_LONG, 0) From 053a5fc141be9d3d9b9fb50e9856e0e102c28e66 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 28 Sep 2020 18:31:02 +0100 Subject: [PATCH 168/209] Promote E_NOTICE to Value/TypeError in PostgreSQL extension Add some tests to cover related codepaths. With the small caveat that the ones in build_assignment_string() still don't seem to be tested as it looks the condtions are checked beforehand, might need some more investigation. Closes GH-6226 --- ext/pgsql/pgsql.c | 105 ++++++++++-------- ext/pgsql/tests/05large_object.phpt | 26 +++++ ext/pgsql/tests/10pg_convert_9.phpt | 33 ++++++ ext/pgsql/tests/12pg_insert_9.phpt | 33 ++++++ ext/pgsql/tests/13pg_select_9.phpt | 34 ++++++ .../tests/28large_object_import_oid.phpt | 49 ++++++++ 6 files changed, 234 insertions(+), 46 deletions(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index c08ed40d01d22..63e59b63d695d 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2300,6 +2300,7 @@ PHP_FUNCTION(pg_lo_create) RETURN_THROWS(); } + /* Overloaded method uses default link if arg 1 is not a resource, set oid pointer */ if ((argc == 1) && (Z_TYPE_P(pgsql_link) != IS_RESOURCE)) { oid = pgsql_link; pgsql_link = NULL; @@ -2322,25 +2323,26 @@ PHP_FUNCTION(pg_lo_create) switch (Z_TYPE_P(oid)) { case IS_STRING: { + /* TODO: Use subroutine? */ char *end_ptr; wanted_oid = (Oid)strtoul(Z_STRVAL_P(oid), &end_ptr, 10); if ((Z_STRVAL_P(oid)+Z_STRLEN_P(oid)) != end_ptr) { - /* wrong integer format */ - php_error_docref(NULL, E_NOTICE, "Invalid OID value passed"); - RETURN_FALSE; + /* wrong integer format */ + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } } break; case IS_LONG: if (Z_LVAL_P(oid) < (zend_long)InvalidOid) { - php_error_docref(NULL, E_NOTICE, "Invalid OID value passed"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } wanted_oid = (Oid)Z_LVAL_P(oid); break; default: - php_error_docref(NULL, E_NOTICE, "Invalid OID value passed"); - RETURN_FALSE; + zend_type_error("OID value must be of type string|int, %s given", zend_zval_type_name(oid)); + RETURN_THROWS(); } if ((pgsql_oid = lo_create(pgsql, wanted_oid)) == InvalidOid) { php_error_docref(NULL, E_WARNING, "Unable to create PostgreSQL large object"); @@ -2374,30 +2376,32 @@ PHP_FUNCTION(pg_lo_unlink) /* accept string type since Oid type is unsigned int */ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rs", &pgsql_link, &oid_string, &oid_strlen) == SUCCESS) { + /* TODO: Use subroutine? */ oid = (Oid)strtoul(oid_string, &end_ptr, 10); if ((oid_string+oid_strlen) != end_ptr) { /* wrong integer format */ - php_error_docref(NULL, E_NOTICE, "Wrong OID value passed"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } link = Z_RES_P(pgsql_link); } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rl", &pgsql_link, &oid_long) == SUCCESS) { if (oid_long <= (zend_long)InvalidOid) { - php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } oid = (Oid)oid_long; link = Z_RES_P(pgsql_link); } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "s", &oid_string, &oid_strlen) == SUCCESS) { + /* TODO: subroutine? */ oid = (Oid)strtoul(oid_string, &end_ptr, 10); if ((oid_string+oid_strlen) != end_ptr) { /* wrong integer format */ - php_error_docref(NULL, E_NOTICE, "Wrong OID value passed"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } link = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(link); @@ -2405,8 +2409,8 @@ PHP_FUNCTION(pg_lo_unlink) else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "l", &oid_long) == SUCCESS) { if (oid_long <= (zend_long)InvalidOid) { - php_error_docref(NULL, E_NOTICE, "Invalid OID is specified"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } oid = (Oid)oid_long; link = FETCH_DEFAULT_LINK(); @@ -2447,30 +2451,32 @@ PHP_FUNCTION(pg_lo_open) /* accept string type since Oid is unsigned int */ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rss", &pgsql_link, &oid_string, &oid_strlen, &mode_string, &mode_strlen) == SUCCESS) { + /* TODO: Use subroutine? */ oid = (Oid)strtoul(oid_string, &end_ptr, 10); if ((oid_string+oid_strlen) != end_ptr) { /* wrong integer format */ - php_error_docref(NULL, E_NOTICE, "Wrong OID value passed"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } link = Z_RES_P(pgsql_link); } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rls", &pgsql_link, &oid_long, &mode_string, &mode_strlen) == SUCCESS) { if (oid_long <= (zend_long)InvalidOid) { - php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } oid = (Oid)oid_long; link = Z_RES_P(pgsql_link); } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "ss", &oid_string, &oid_strlen, &mode_string, &mode_strlen) == SUCCESS) { + /* TODO: Use subroutine? */ oid = (Oid)strtoul(oid_string, &end_ptr, 10); if ((oid_string+oid_strlen) != end_ptr) { /* wrong integer format */ - php_error_docref(NULL, E_NOTICE, "Wrong OID value passed"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } link = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(link); @@ -2478,8 +2484,8 @@ PHP_FUNCTION(pg_lo_open) else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "ls", &oid_long, &mode_string, &mode_strlen) == SUCCESS) { if (oid_long <= (zend_long)InvalidOid) { - php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } oid = (Oid)oid_long; link = FETCH_DEFAULT_LINK(); @@ -2717,25 +2723,26 @@ PHP_FUNCTION(pg_lo_import) switch (Z_TYPE_P(oid)) { case IS_STRING: { + /* TODO: Use subroutine? */ char *end_ptr; wanted_oid = (Oid)strtoul(Z_STRVAL_P(oid), &end_ptr, 10); if ((Z_STRVAL_P(oid)+Z_STRLEN_P(oid)) != end_ptr) { - /* wrong integer format */ - php_error_docref(NULL, E_NOTICE, "Invalid OID value passed"); - RETURN_FALSE; + /* wrong integer format */ + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } } break; case IS_LONG: if (Z_LVAL_P(oid) < (zend_long)InvalidOid) { - php_error_docref(NULL, E_NOTICE, "Invalid OID value passed"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } wanted_oid = (Oid)Z_LVAL_P(oid); break; default: - php_error_docref(NULL, E_NOTICE, "Invalid OID value passed"); - RETURN_FALSE; + zend_type_error("OID value must be of type string|int, %s given", zend_zval_type_name(oid)); + RETURN_THROWS(); } returned_oid = lo_import_with_oid(pgsql, file_in, wanted_oid); @@ -2773,27 +2780,28 @@ PHP_FUNCTION(pg_lo_export) if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rlp", &pgsql_link, &oid_long, &file_out, &name_len) == SUCCESS) { if (oid_long <= (zend_long)InvalidOid) { - php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } oid = (Oid)oid_long; link = Z_RES_P(pgsql_link); } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rsp", &pgsql_link, &oid_string, &oid_strlen, &file_out, &name_len) == SUCCESS) { + /* TODO: Use subroutine? */ oid = (Oid)strtoul(oid_string, &end_ptr, 10); if ((oid_string+oid_strlen) != end_ptr) { /* wrong integer format */ - php_error_docref(NULL, E_NOTICE, "Wrong OID value passed"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } link = Z_RES_P(pgsql_link); } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "lp", &oid_long, &file_out, &name_len) == SUCCESS) { if (oid_long <= (zend_long)InvalidOid) { - php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } oid = (Oid)oid_long; link = FETCH_DEFAULT_LINK(); @@ -2801,11 +2809,12 @@ PHP_FUNCTION(pg_lo_export) } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "sp", &oid_string, &oid_strlen, &file_out, &name_len) == SUCCESS) { + /* TODO: Use subroutine? */ oid = (Oid)strtoul(oid_string, &end_ptr, 10); if ((oid_string+oid_strlen) != end_ptr) { /* wrong integer format */ - php_error_docref(NULL, E_NOTICE, "Wrong OID value passed"); - RETURN_FALSE; + zend_value_error("Invalid OID value passed"); + RETURN_THROWS(); } link = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(link); @@ -4264,6 +4273,7 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z src = estrdup(table_name); tmp_name = php_strtok_r(src, ".", &tmp_name2); if (!tmp_name) { + // TODO ValueError (empty table name)? efree(src); php_error_docref(NULL, E_WARNING, "The table name must be specified"); return FAILURE; @@ -4557,6 +4567,7 @@ static int php_pgsql_add_quotes(zval *src, zend_bool should_free) } /* }}} */ +/* Raise E_NOTICE to E_WARNING or Error? */ #define PGSQL_CONV_CHECK_IGNORE() \ if (!err && Z_TYPE(new_val) == IS_STRING && !strcmp(Z_STRVAL(new_val), "NULL")) { \ /* if new_value is string "NULL" and field has default value, remove element to use default value */ \ @@ -4600,8 +4611,10 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con skip_field = 0; ZVAL_NULL(&new_val); + /* TODO: Check when meta data can be broken and see if can use assertions instead */ + if (!err && field == NULL) { - php_error_docref(NULL, E_WARNING, "Accepts only string key for values"); + zend_value_error("Array of values must be an associative array with string keys"); err = 1; } @@ -4625,8 +4638,8 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con php_error_docref(NULL, E_NOTICE, "Detected broken meta data. Missing 'is enum'"); err = 1; } - if (!err && (Z_TYPE_P(val) == IS_ARRAY || Z_TYPE_P(val) == IS_OBJECT)) { - php_error_docref(NULL, E_NOTICE, "Expects scalar values as field values"); + if (!err && (Z_TYPE_P(val) == IS_ARRAY || Z_TYPE_P(val) == IS_OBJECT || Z_TYPE_P(val) == IS_RESOURCE)) { + zend_type_error("Values must be of type string|int|float|bool|null, %s given", zend_zval_type_name(val)); err = 1; } if (err) { @@ -4641,6 +4654,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con data_type = php_pgsql_get_data_type(Z_STRVAL_P(type), Z_STRLEN_P(type)); } + /* TODO: Should E_NOTICE be converted to type error if PHP type cannot be converted to field type? */ switch(data_type) { case PG_BOOL: @@ -5358,7 +5372,7 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var ZEND_HASH_FOREACH_STR_KEY(Z_ARRVAL_P(var_array), fld) { if (fld == NULL) { - php_error_docref(NULL, E_NOTICE, "Expects associative array for values to be inserted"); + zend_value_error("Array of values must be an associative array with string keys"); goto cleanup; } if (opt & PGSQL_DML_ESCAPE) { @@ -5401,9 +5415,8 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var smart_str_appendl(&querystr, "NULL", sizeof("NULL")-1); break; default: - php_error_docref(NULL, E_WARNING, "Expects scaler values. type = %d", Z_TYPE_P(val)); + zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_type_name(val)); goto cleanup; - break; } smart_str_appendc(&querystr, ','); } ZEND_HASH_FOREACH_END(); @@ -5532,7 +5545,7 @@ static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, ZEND_HASH_FOREACH_STR_KEY_VAL(ht, fld, val) { if (fld == NULL) { - php_error_docref(NULL, E_NOTICE, "Expects associative array for values to be inserted"); + zend_value_error("Array of values must be an associative array with string keys"); return -1; } if (opt & PGSQL_DML_ESCAPE) { @@ -5573,7 +5586,7 @@ static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, smart_str_appendl(querystr, "NULL", sizeof("NULL")-1); break; default: - php_error_docref(NULL, E_WARNING, "Expects scaler values. type=%d", Z_TYPE_P(val)); + zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_type_name(val)); return -1; } smart_str_appendl(querystr, pad, pad_len); diff --git a/ext/pgsql/tests/05large_object.phpt b/ext/pgsql/tests/05large_object.phpt index 3a4a40eb0865f..b493edd221123 100644 --- a/ext/pgsql/tests/05large_object.phpt +++ b/ext/pgsql/tests/05large_object.phpt @@ -68,6 +68,28 @@ if (!file_exists($path . 'php.gif.exported')) { @unlink($path . 'php.gif.exported'); pg_query($db, 'commit'); +/* invalid OID values */ +try { + pg_lo_create(-15); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_create($db, -15); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_create('giberrish'); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_create($db, 'giberrish'); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} + echo "OK"; ?> --EXPECT-- @@ -79,4 +101,8 @@ unlink LO Test without connection Test with string oid value import/export LO +Invalid OID value passed +Invalid OID value passed +Invalid OID value passed +Invalid OID value passed OK diff --git a/ext/pgsql/tests/10pg_convert_9.phpt b/ext/pgsql/tests/10pg_convert_9.phpt index a8395315c6510..0a2828a247da4 100644 --- a/ext/pgsql/tests/10pg_convert_9.phpt +++ b/ext/pgsql/tests/10pg_convert_9.phpt @@ -18,6 +18,34 @@ $fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB'); $converted = pg_convert($db, $table_name, $fields); var_dump($converted); + +/* Invalid values */ +try { + $converted = pg_convert($db, $table_name, [5 => 'AAA']); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_convert($db, $table_name, ['AAA']); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_convert($db, $table_name, ['num' => []]); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_convert($db, $table_name, ['num' => new stdClass()]); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_convert($db, $table_name, ['num' => $db]); + var_dump($converted); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} ?> --EXPECT-- array(3) { @@ -28,3 +56,8 @@ array(3) { [""bin""]=> string(12) "E'\\x424242'" } +Array of values must be an associative array with string keys +Array of values must be an associative array with string keys +Values must be of type string|int|float|bool|null, array given +Values must be of type string|int|float|bool|null, stdClass given +Values must be of type string|int|float|bool|null, resource given diff --git a/ext/pgsql/tests/12pg_insert_9.phpt b/ext/pgsql/tests/12pg_insert_9.phpt index 275afc55e1df8..11a401f3580d5 100644 --- a/ext/pgsql/tests/12pg_insert_9.phpt +++ b/ext/pgsql/tests/12pg_insert_9.phpt @@ -21,10 +21,43 @@ echo pg_insert($db, $table_name, $fields, PGSQL_DML_STRING)."\n"; echo pg_insert($db, $table_name, $fields, PGSQL_DML_STRING|PGSQL_DML_ESCAPE)."\n"; var_dump( pg_insert($db, $table_name, $fields, PGSQL_DML_EXEC) ); // Return resource +/* Invalid values */ +try { + $converted = pg_insert($db, $table_name, [5 => 'AAA']); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_insert($db, $table_name, ['AAA']); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_insert($db, $table_name, ['num' => []]); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_insert($db, $table_name, ['num' => new stdClass()]); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_insert($db, $table_name, ['num' => $db]); + var_dump($converted); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} + echo "Ok\n"; ?> --EXPECTF-- INSERT INTO "php_pgsql_test" ("num","str","bin") VALUES (1234,E'AAA',E'\\x424242'); INSERT INTO "php_pgsql_test" ("num","str","bin") VALUES ('1234','AAA','BBB'); resource(%d) of type (pgsql result) +Array of values must be an associative array with string keys +Array of values must be an associative array with string keys +Values must be of type string|int|float|bool|null, array given +Values must be of type string|int|float|bool|null, stdClass given +Values must be of type string|int|float|bool|null, resource given Ok diff --git a/ext/pgsql/tests/13pg_select_9.phpt b/ext/pgsql/tests/13pg_select_9.phpt index d5e661e5e0105..82a59a1cf5638 100644 --- a/ext/pgsql/tests/13pg_select_9.phpt +++ b/ext/pgsql/tests/13pg_select_9.phpt @@ -21,6 +21,35 @@ $res = pg_select($db, $table_name, $ids) or print "Error\n"; var_dump($res); echo pg_select($db, $table_name, $ids, PGSQL_DML_STRING)."\n"; echo pg_select($db, $table_name, $ids, PGSQL_DML_STRING|PGSQL_DML_ESCAPE)."\n"; + +/* Invalid values */ +try { + $converted = pg_select($db, $table_name, [5 => 'AAA']); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_select($db, $table_name, ['AAA']); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_select($db, $table_name, ['num' => []]); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_select($db, $table_name, ['num' => new stdClass()]); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + $converted = pg_select($db, $table_name, ['num' => $db]); + var_dump($converted); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} + echo "Ok\n"; ?> @@ -47,4 +76,9 @@ array(2) { } SELECT * FROM "php_pgsql_test" WHERE "num"=1234; SELECT * FROM "php_pgsql_test" WHERE "num"='1234'; +Array of values must be an associative array with string keys +Array of values must be an associative array with string keys +Values must be of type string|int|float|bool|null, array given +Values must be of type string|int|float|bool|null, stdClass given +Values must be of type string|int|float|bool|null, resource given Ok diff --git a/ext/pgsql/tests/28large_object_import_oid.phpt b/ext/pgsql/tests/28large_object_import_oid.phpt index 9ffb96123e9d0..8209cc2932432 100644 --- a/ext/pgsql/tests/28large_object_import_oid.phpt +++ b/ext/pgsql/tests/28large_object_import_oid.phpt @@ -38,6 +38,47 @@ if ($oid != 21005) echo ("pg_lo_import() wrong id\n"); pg_lo_unlink ($oid); pg_exec('commit'); +/* Invalide OID */ +try { + pg_lo_import(__FILE__, -15); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_import($db, __FILE__, -15); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_import(__FILE__, 'giberrish'); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_import($db, __FILE__, 'giberrish'); +} catch (\ValueError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_import(__FILE__, true); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_import($db, __FILE__, []); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_import($db, __FILE__, new stdClass()); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} +try { + pg_lo_import($db, __FILE__, $db); +} catch (\TypeError $e) { + echo $e->getMessage(), \PHP_EOL; +} echo "OK"; ?> @@ -45,4 +86,12 @@ echo "OK"; import LO from int import LO from string import LO using default connection +Invalid OID value passed +Invalid OID value passed +Invalid OID value passed +Invalid OID value passed +OID value must be of type string|int, bool given +OID value must be of type string|int, array given +OID value must be of type string|int, stdClass given +OID value must be of type string|int, resource given OK From e39ce172f80e89e793a1b73ebe59a1e462b9ec31 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 29 Sep 2020 16:17:23 +0200 Subject: [PATCH 169/209] bump zip extension version --- UPGRADING | 2 +- ext/zip/php_zip.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UPGRADING b/UPGRADING index c2e425ef116b9..2d49f1043bbe9 100644 --- a/UPGRADING +++ b/UPGRADING @@ -812,7 +812,7 @@ PHP 8.0 UPGRADE NOTES values rather than int. - Zip: - . Extension updated to version 1.19.0 + . Extension updated to version 1.19.1 . New ZipArchive::lastId property to get index value of last added entry. . Error can be checked after an archive is closed using ZipArchive::status, ZipArchive::statusSys properties or ZipArchive::getStatusString() method. diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 92df580874db1..67fd87d6dae0b 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -31,7 +31,7 @@ extern zend_module_entry zip_module_entry; #define ZIP_OVERWRITE ZIP_TRUNCATE #endif -#define PHP_ZIP_VERSION "1.19.1-dev" +#define PHP_ZIP_VERSION "1.19.1" #define ZIP_OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename) From 6b77252f188eaf5443d08c58df4e502c1ecb2e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 17 Sep 2020 16:03:43 +0200 Subject: [PATCH 170/209] Make URI parameter in ldap_connect default to NULL --- ext/ldap/ldap.c | 4 ++-- ext/ldap/ldap.stub.php | 4 ++-- ext/ldap/ldap_arginfo.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index a50882486ad0b..576d97c927ef3 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1001,7 +1001,7 @@ PHP_FUNCTION(ldap_connect) WRONG_PARAM_COUNT; } - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|slssl", &host, &hostlen, &port, &wallet, &walletlen, &walletpasswd, &walletpasswdlen, &authmode) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!lssl", &host, &hostlen, &port, &wallet, &walletlen, &walletpasswd, &walletpasswdlen, &authmode) != SUCCESS) { RETURN_THROWS(); } @@ -1009,7 +1009,7 @@ PHP_FUNCTION(ldap_connect) ssl = 1; } #else - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sl", &host, &hostlen, &port) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!l", &host, &hostlen, &port) != SUCCESS) { RETURN_THROWS(); } #endif diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 372458fe78b9e..2c48b812464ad 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -4,10 +4,10 @@ #ifdef HAVE_ORALDAP /** @return resource|false */ -function ldap_connect(string $hostname = UNKNOWN, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {} +function ldap_connect(string $uri = NULL, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {} #else /** @return resource|false */ -function ldap_connect(string $hostname = UNKNOWN, int $port = 389) {} +function ldap_connect(string $uri = NULL, int $port = 389) {} #endif /** @param resource $link_identifier */ diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index d610408d97423..4be65ae9b26c2 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,9 +1,9 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f07138972651411473c34c5ee2d0c2de94e01ada */ + * Stub hash: 7db7fd320ca8ac2501d22f6cb473a08f47b82ad3 */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "NULL") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, wallet_passwd, IS_STRING, 0) @@ -13,7 +13,7 @@ ZEND_END_ARG_INFO() #if !(defined(HAVE_ORALDAP)) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) - ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "NULL") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_END_ARG_INFO() #endif From 14385fb203e12bc4137cb7d4f1b5abe6cc5c37a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 17 Sep 2020 16:40:04 +0200 Subject: [PATCH 171/209] Default bind dn and password to NULL in ldap_bind --- ext/ldap/ldap.c | 2 +- ext/ldap/ldap.stub.php | 2 +- ext/ldap/ldap_arginfo.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 576d97c927ef3..652a641e4f784 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1119,7 +1119,7 @@ PHP_FUNCTION(ldap_bind) ldap_linkdata *ld; int rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|ss", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen) != SUCCESS) { RETURN_THROWS(); } diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 2c48b812464ad..8187167becaa1 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -20,7 +20,7 @@ function ldap_unbind($link_identifier): bool {} function ldap_close($link_identifier): bool {} /** @param resource $link_identifier */ -function ldap_bind($link_identifier, string $bind_rdn = UNKNOWN, string $bind_password = UNKNOWN): bool {} +function ldap_bind($link_identifier, string $bind_rdn = NULL, string $bind_password = NULL): bool {} /** * @param resource $link_identifier diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 4be65ae9b26c2..9929281a7cdc9 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7db7fd320ca8ac2501d22f6cb473a08f47b82ad3 */ + * Stub hash: 53a23f4146cec03d90833de5a80a550199460207 */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) @@ -26,8 +26,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_bind, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_TYPE_INFO(0, bind_rdn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, bind_password, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "NULL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1) From 74b634751b8957b30ce12601884ca4a8bc9067a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 17 Sep 2020 16:42:17 +0200 Subject: [PATCH 172/209] Default bind dn and password to NULL in ldap_bind_ext --- ext/ldap/ldap.c | 2 +- ext/ldap/ldap.stub.php | 2 +- ext/ldap/ldap_arginfo.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 652a641e4f784..a43edd08a745d 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1175,7 +1175,7 @@ PHP_FUNCTION(ldap_bind_ext) LDAPMessage *ldap_res; int rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|ssa", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen, &serverctrls) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!a", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen, &serverctrls) != SUCCESS) { RETURN_THROWS(); } diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 8187167becaa1..243e57b1427d9 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -26,7 +26,7 @@ function ldap_bind($link_identifier, string $bind_rdn = NULL, string $bind_passw * @param resource $link_identifier * @return resource|false */ -function ldap_bind_ext($link_identifier, string $bind_rdn = UNKNOWN, string $bind_password = UNKNOWN, array $servercontrols = []) {} +function ldap_bind_ext($link_identifier, string $bind_rdn = NULL, string $bind_password = NULL, array $servercontrols = []) {} #ifdef HAVE_LDAP_SASL /** @param resource $link */ diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 9929281a7cdc9..24cb31304bf82 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 53a23f4146cec03d90833de5a80a550199460207 */ + * Stub hash: 4414873610a8b2099ddad28cbadd6b8d75f66431 */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) @@ -32,8 +32,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1) ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_TYPE_INFO(0, bind_rdn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, bind_password, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "NULL") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() From caa0cd7705a2d7154f2f1b478fea8ce6efc370d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 17 Sep 2020 16:47:12 +0200 Subject: [PATCH 173/209] Set all parameters to ldap_sasl_bind as NULL by default For mech, realm, authcid, authzid and props NULL means do not change current server setting. --- ext/ldap/ldap.c | 2 +- ext/ldap/ldap.stub.php | 2 +- ext/ldap/ldap_arginfo.h | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index a43edd08a745d..6a5f9398786c7 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1337,7 +1337,7 @@ PHP_FUNCTION(ldap_sasl_bind) size_t rc, dn_len, passwd_len, mech_len, realm_len, authc_id_len, authz_id_len, props_len; php_ldap_bictx *ctx; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|sssssss", &link, &binddn, &dn_len, &passwd, &passwd_len, &sasl_mech, &mech_len, &sasl_realm, &realm_len, &sasl_authc_id, &authc_id_len, &sasl_authz_id, &authz_id_len, &props, &props_len) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!s!s!s!s!s!", &link, &binddn, &dn_len, &passwd, &passwd_len, &sasl_mech, &mech_len, &sasl_realm, &realm_len, &sasl_authc_id, &authc_id_len, &sasl_authz_id, &authz_id_len, &props, &props_len) != SUCCESS) { RETURN_THROWS(); } diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 243e57b1427d9..a9ec590fe1e02 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -30,7 +30,7 @@ function ldap_bind_ext($link_identifier, string $bind_rdn = NULL, string $bind_p #ifdef HAVE_LDAP_SASL /** @param resource $link */ -function ldap_sasl_bind($link, string $binddn = UNKNOWN, string $password = UNKNOWN, string $sasl_mech = UNKNOWN, string $sasl_realm = UNKNOWN, string $sasl_authc_id = UNKNOWN, string $sasl_authz_id = UNKNOWN, string $props = UNKNOWN): bool {} +function ldap_sasl_bind($link, string $binddn = NULL, string $password = NULL, string $sasl_mech = NULL, string $sasl_realm = NULL, string $sasl_authc_id = NULL, string $sasl_authz_id = NULL, string $props = NULL): bool {} #endif /** diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 24cb31304bf82..1a19ee0c2abaa 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4414873610a8b2099ddad28cbadd6b8d75f66431 */ + * Stub hash: b4dc34ec9daecb904236e487fd4cf736f5f3fc44 */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) @@ -40,13 +40,13 @@ ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_SASL) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_sasl_bind, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, link) - ZEND_ARG_TYPE_INFO(0, binddn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, sasl_mech, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, sasl_realm, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, sasl_authc_id, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, sasl_authz_id, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, props, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binddn, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_mech, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_realm, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authc_id, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authz_id, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 0, "NULL") ZEND_END_ARG_INFO() #endif From eeec37d31d6aa4452d83e2640aee7c8c25349617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 17 Sep 2020 16:53:50 +0200 Subject: [PATCH 174/209] Remove dummy_ber parameter from ldap_first_attribute and ldap_next_attribute It has been unused and deprecated since PHP 5.2.4 --- ext/ldap/ldap.c | 6 ++---- ext/ldap/ldap.stub.php | 4 ++-- ext/ldap/ldap_arginfo.h | 8 ++------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 6a5f9398786c7..b8f3c35ab9edb 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1909,9 +1909,8 @@ PHP_FUNCTION(ldap_first_attribute) ldap_linkdata *ld; ldap_resultentry *resultentry; char *attribute; - zend_long dummy_ber; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|l", &link, &result_entry, &dummy_ber) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result_entry) != SUCCESS) { RETURN_THROWS(); } @@ -1941,9 +1940,8 @@ PHP_FUNCTION(ldap_next_attribute) ldap_linkdata *ld; ldap_resultentry *resultentry; char *attribute; - zend_long dummy_ber; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|l", &link, &result_entry, &dummy_ber) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|l", &link, &result_entry) != SUCCESS) { RETURN_THROWS(); } diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index a9ec590fe1e02..f7501ab6a5634 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -85,13 +85,13 @@ function ldap_get_entries($link_identifier, $result_identifier): array|false {} * @param resource $link_identifier * @param resource $result_entry_identifier */ -function ldap_first_attribute($link_identifier, $result_entry_identifier, int $dummy_ber = UNKNOWN): string|false {} +function ldap_first_attribute($link_identifier, $result_entry_identifier): string|false {} /** * @param resource $link_identifier * @param resource $result_entry_identifier */ -function ldap_next_attribute($link_identifier, $result_entry_identifier, int $dummy_ber = UNKNOWN): string|false {} +function ldap_next_attribute($link_identifier, $result_entry_identifier): string|false {} /** * @param resource $link_identifier diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 1a19ee0c2abaa..84c889dc06128 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b4dc34ec9daecb904236e487fd4cf736f5f3fc44 */ + * Stub hash: 93ddab4ae5660ed25b4a69f7aa900368f43e81e8 */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) @@ -88,7 +88,6 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_first_attribute, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_INFO(0, result_entry_identifier) - ZEND_ARG_TYPE_INFO(0, dummy_ber, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_ldap_next_attribute arginfo_ldap_first_attribute @@ -106,10 +105,7 @@ ZEND_END_ARG_INFO() #define arginfo_ldap_get_values arginfo_ldap_get_values_len -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_dn, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_INFO(0, result_entry_identifier) -ZEND_END_ARG_INFO() +#define arginfo_ldap_get_dn arginfo_ldap_first_attribute ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_explode_dn, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) From 2a34d35a668edfef233f8908ec7a67e8ab23bc63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 17 Sep 2020 17:03:23 +0200 Subject: [PATCH 175/209] Fix "null" case in ldap.stub.php --- ext/ldap/ldap.stub.php | 10 +++++----- ext/ldap/ldap_arginfo.h | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index f7501ab6a5634..507700365c8b8 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -4,10 +4,10 @@ #ifdef HAVE_ORALDAP /** @return resource|false */ -function ldap_connect(string $uri = NULL, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {} +function ldap_connect(string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {} #else /** @return resource|false */ -function ldap_connect(string $uri = NULL, int $port = 389) {} +function ldap_connect(string $uri = null, int $port = 389) {} #endif /** @param resource $link_identifier */ @@ -20,17 +20,17 @@ function ldap_unbind($link_identifier): bool {} function ldap_close($link_identifier): bool {} /** @param resource $link_identifier */ -function ldap_bind($link_identifier, string $bind_rdn = NULL, string $bind_password = NULL): bool {} +function ldap_bind($link_identifier, string $bind_rdn = null, string $bind_password = null): bool {} /** * @param resource $link_identifier * @return resource|false */ -function ldap_bind_ext($link_identifier, string $bind_rdn = NULL, string $bind_password = NULL, array $servercontrols = []) {} +function ldap_bind_ext($link_identifier, string $bind_rdn = null, string $bind_password = null, array $servercontrols = []) {} #ifdef HAVE_LDAP_SASL /** @param resource $link */ -function ldap_sasl_bind($link, string $binddn = NULL, string $password = NULL, string $sasl_mech = NULL, string $sasl_realm = NULL, string $sasl_authc_id = NULL, string $sasl_authz_id = NULL, string $props = NULL): bool {} +function ldap_sasl_bind($link, string $binddn = null, string $password = null, string $sasl_mech = null, string $sasl_realm = null, string $sasl_authc_id = null, string $sasl_authz_id = null, string $props = null): bool {} #endif /** diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 84c889dc06128..ed97aae13245a 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,9 +1,9 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 93ddab4ae5660ed25b4a69f7aa900368f43e81e8 */ + * Stub hash: 6f6efbc58e9c1db3f65ccdca286f97e2c97ac0c5 */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, wallet_passwd, IS_STRING, 0) @@ -13,7 +13,7 @@ ZEND_END_ARG_INFO() #if !(defined(HAVE_ORALDAP)) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_END_ARG_INFO() #endif @@ -26,27 +26,27 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_bind, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "NULL") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1) ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "NULL") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_SASL) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_sasl_bind, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, link) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binddn, IS_STRING, 0, "NULL") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "NULL") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_mech, IS_STRING, 0, "NULL") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_realm, IS_STRING, 0, "NULL") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authc_id, IS_STRING, 0, "NULL") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authz_id, IS_STRING, 0, "NULL") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 0, "NULL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binddn, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_mech, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_realm, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authc_id, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authz_id, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 0, "null") ZEND_END_ARG_INFO() #endif From c2a6da5ab24fb28aad8e752ce05f93fd17827eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 17 Sep 2020 17:13:48 +0200 Subject: [PATCH 176/209] Fix parameter names in ext/ldap Renamed all parameters to be consistent and concise --- ext/ldap/ldap.stub.php | 182 +++++++++++++------------- ext/ldap/ldap_arginfo.h | 106 +++++++-------- ext/ldap/tests/ldap_search_error.phpt | 4 +- 3 files changed, 146 insertions(+), 146 deletions(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 507700365c8b8..6cc89b6137696 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -10,171 +10,171 @@ function ldap_connect(string $uri = null, int $port = 389, string $wallet = UNKN function ldap_connect(string $uri = null, int $port = 389) {} #endif -/** @param resource $link_identifier */ -function ldap_unbind($link_identifier): bool {} +/** @param resource $link */ +function ldap_unbind($link): bool {} /** - * @param resource $link_identifier + * @param resource $link * @alias ldap_unbind */ -function ldap_close($link_identifier): bool {} +function ldap_close($link): bool {} -/** @param resource $link_identifier */ -function ldap_bind($link_identifier, string $bind_rdn = null, string $bind_password = null): bool {} +/** @param resource $link */ +function ldap_bind($link, string $dn = null, string $password = null): bool {} /** - * @param resource $link_identifier + * @param resource $link * @return resource|false */ -function ldap_bind_ext($link_identifier, string $bind_rdn = null, string $bind_password = null, array $servercontrols = []) {} +function ldap_bind_ext($link, string $dn = null, string $password = null, array $controls = []) {} #ifdef HAVE_LDAP_SASL /** @param resource $link */ -function ldap_sasl_bind($link, string $binddn = null, string $password = null, string $sasl_mech = null, string $sasl_realm = null, string $sasl_authc_id = null, string $sasl_authz_id = null, string $props = null): bool {} +function ldap_sasl_bind($link, string $dn = null, string $password = null, string $mech = null, string $realm = null, string $authc_id = null, string $authz_id = null, string $props = null): bool {} #endif /** - * @param resource|array $link_identifier + * @param resource|array $link * @return resource|false */ -function ldap_read($link_identifier, array|string $base_dn, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {} +function ldap_read($link, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} /** - * @param resource|array $link_identifier + * @param resource|array $link * @return resource|false */ -function ldap_list($link_identifier, array|string $base_dn, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {} +function ldap_list($link, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} /** - * @param resource|array $link_identifier + * @param resource|array $link * @return resource|false */ -function ldap_search($link_identifier, array|string $base_dn, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {} +function ldap_search($link, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} -/** @param resource $link_identifier */ -function ldap_free_result($link_identifier): bool {} +/** @param resource $link */ +function ldap_free_result($link): bool {} /** - * @param resource $link_identifier - * @param resource $result_identifier + * @param resource $link + * @param resource $result */ -function ldap_count_entries($link_identifier, $result_identifier): int {} +function ldap_count_entries($link, $result): int {} /** - * @param resource $link_identifier - * @param resource $result_identifier + * @param resource $link + * @param resource $result * @return resource|false */ -function ldap_first_entry($link_identifier, $result_identifier) {} +function ldap_first_entry($link, $result) {} /** - * @param resource $link_identifier - * @param resource $result_identifier + * @param resource $link + * @param resource $result * @return resource|false */ -function ldap_next_entry($link_identifier, $result_identifier) {} +function ldap_next_entry($link, $result) {} /** - * @param resource $link_identifier - * @param resource $result_identifier + * @param resource $link + * @param resource $result */ -function ldap_get_entries($link_identifier, $result_identifier): array|false {} +function ldap_get_entries($link, $result): array|false {} /** - * @param resource $link_identifier - * @param resource $result_entry_identifier + * @param resource $link + * @param resource $entry */ -function ldap_first_attribute($link_identifier, $result_entry_identifier): string|false {} +function ldap_first_attribute($link, $entry): string|false {} /** - * @param resource $link_identifier - * @param resource $result_entry_identifier + * @param resource $link + * @param resource $entry */ -function ldap_next_attribute($link_identifier, $result_entry_identifier): string|false {} +function ldap_next_attribute($link, $entry): string|false {} /** - * @param resource $link_identifier - * @param resource $result_entry_identifier + * @param resource $link + * @param resource $entry */ -function ldap_get_attributes($link_identifier, $result_entry_identifier): array {} +function ldap_get_attributes($link, $entry): array {} /** - * @param resource $link_identifier - * @param resource $result_entry_identifier + * @param resource $link + * @param resource $entry */ -function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute): array|false {} +function ldap_get_values_len($link, $entry, string $attribute): array|false {} /** - * @param resource $link_identifier - * @param resource $result_entry_identifier + * @param resource $link + * @param resource $entry * @alias ldap_get_values_len */ -function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array|false {} +function ldap_get_values($link, $entry, string $attribute): array|false {} /** - * @param resource $link_identifier - * @param resource $result_entry_identifier + * @param resource $link + * @param resource $entry */ -function ldap_get_dn($link_identifier, $result_entry_identifier): string|false {} +function ldap_get_dn($link, $entry): string|false {} function ldap_explode_dn(string $dn, int $with_attrib): array|false {} function ldap_dn2ufn(string $dn): string|false {} -/** @param resource $link_identifier */ -function ldap_add($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} +/** @param resource $link */ +function ldap_add($link, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link_identifier + * @param resource $link * @return resource|false */ -function ldap_add_ext($link_identifier, string $dn, array $entry, array $servercontrols = []) {} +function ldap_add_ext($link, string $dn, array $entry, array $controls = []) {} -/** @param resource $link_identifier */ -function ldap_delete($link_identifier, string $dn, array $servercontrols = []): bool {} +/** @param resource $link */ +function ldap_delete($link, string $dn, array $controls = []): bool {} /** - * @param resource $link_identifier + * @param resource $link * @return resource|false */ -function ldap_delete_ext($link_identifier, string $dn, array $servercontrols = []) {} +function ldap_delete_ext($link, string $dn, array $controls = []) {} -/** @param resource $link_identifier */ -function ldap_modify_batch($link_identifier, string $dn, array $modifications_info, array $servercontrols = []): bool {} +/** @param resource $link */ +function ldap_modify_batch($link, string $dn, array $modifications_info, array $controls = []): bool {} -/** @param resource $link_identifier */ -function ldap_mod_add($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} +/** @param resource $link */ +function ldap_mod_add($link, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link_identifier + * @param resource $link * @return resource|false */ -function ldap_mod_add_ext($link_identifier, string $dn, array $entry, array $servercontrols = []) {} +function ldap_mod_add_ext($link, string $dn, array $entry, array $controls = []) {} -/** @param resource $link_identifier */ -function ldap_mod_replace($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} +/** @param resource $link */ +function ldap_mod_replace($link, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link_identifier + * @param resource $link * @alias ldap_mod_replace */ -function ldap_modify($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} +function ldap_modify($link, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link_identifier + * @param resource $link * @return resource|false */ -function ldap_mod_replace_ext($link_identifier, string $dn, array $entry, array $servercontrols = []) {} +function ldap_mod_replace_ext($link, string $dn, array $entry, array $controls = []) {} -/** @param resource $link_identifier */ -function ldap_mod_del($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {} +/** @param resource $link */ +function ldap_mod_del($link, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link_identifier + * @param resource $link * @return resource|false */ -function ldap_mod_del_ext($link_identifier, string $dn, array $entry, array $servercontrols = []) {} +function ldap_mod_del_ext($link, string $dn, array $entry, array $controls = []) {} /** @param resource $link */ function ldap_errno($link): int {} @@ -184,8 +184,8 @@ function ldap_error($link): string {} function ldap_err2str(int $errno): string {} -/** @param resource $link_identifier */ -function ldap_compare($link_identifier, string $dn, string $attribute, string $value, array $servercontrols = []): bool|int {} +/** @param resource $link */ +function ldap_compare($link, string $dn, string $attribute, string $value, array $controls = []): bool|int {} #ifdef LDAP_CONTROL_PAGEDRESULTS @@ -206,33 +206,33 @@ function ldap_control_paged_result_response($link, $result, &$cookie = null, &$e #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) -/** @param resource $link_identifier */ -function ldap_rename($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $servercontrols = []): bool {} +/** @param resource $link */ +function ldap_rename($link, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $controls = []): bool {} /** - * @param resource $link_identifier + * @param resource $link * @return resource|false */ -function ldap_rename_ext($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $servercontrols = []) {} +function ldap_rename_ext($link, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $controls = []) {} /** - * @param resource $link_identifier + * @param resource $link * @param array|string|int $retval */ -function ldap_get_option($link_identifier, int $option, &$retval = null): bool {} +function ldap_get_option($link, int $option, &$retval = null): bool {} /** - * @param resource|null $link_identifier + * @param resource|null $link * @param array|string|int|bool $newval */ -function ldap_set_option($link_identifier, int $option, $newval): bool {} +function ldap_set_option($link, int $option, $newval): bool {} /** - * @param resource $link_identifier - * @param resource $result_identifier + * @param resource $link + * @param resource $result */ -function ldap_count_references($link_identifier, $result_identifier): int {} +function ldap_count_references($link, $result): int {} /** * @param resource $link @@ -265,9 +265,9 @@ function ldap_parse_reference($link, $entry, &$referrals): bool {} * @param string $matcheddn * @param string $errmsg * @param array $referrals - * @param array $serverctrls + * @param array $controls */ -function ldap_parse_result($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, &$referrals = null, &$serverctrls = null): bool {} +function ldap_parse_result($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, &$referrals = null, &$controls = null): bool {} #endif #endif @@ -277,8 +277,8 @@ function ldap_set_rebind_proc($link, ?callable $callback): bool {} #endif #ifdef HAVE_LDAP_START_TLS_S -/** @param resource $link_identifier */ -function ldap_start_tls($link_identifier): bool {} +/** @param resource $link */ +function ldap_start_tls($link): bool {} #endif function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {} @@ -297,15 +297,15 @@ function ldap_8859_to_t61(string $value): string|false {} * @param string $retoid * @return resource|bool */ -function ldap_exop($link, string $reqoid, ?string $reqdata = null, ?array $servercontrols = [], &$retdata = null, &$retoid = null) {} +function ldap_exop($link, string $reqoid, ?string $reqdata = null, ?array $controls = [], &$retdata = null, &$retoid = null) {} #endif #ifdef HAVE_LDAP_PASSWD /** * @param resource $link - * @param array $serverctrls + * @param array $controls */ -function ldap_exop_passwd($link, string $user = "", string $oldpw = "", string $newpw = "", &$serverctrls = null): string|bool {} +function ldap_exop_passwd($link, string $user = "", string $oldpw = "", string $newpw = "", &$controls = null): string|bool {} #endif diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index ed97aae13245a..922e66997cb71 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 6f6efbc58e9c1db3f65ccdca286f97e2c97ac0c5 */ + * Stub hash: daec139fe03acf248017060876e80bf7cab89e3a */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) @@ -19,47 +19,47 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_unbind, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_END_ARG_INFO() #define arginfo_ldap_close arginfo_ldap_unbind ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_bind, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "null") + ZEND_ARG_INFO(0, link) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_rdn, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bind_password, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_INFO(0, link) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_SASL) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_sasl_bind, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, link) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binddn, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_mech, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_realm, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authc_id, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authz_id, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mech, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, realm, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authc_id, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authz_id, IS_STRING, 0, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 0, "null") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_read, 0, 0, 3) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_TYPE_MASK(0, base_dn, MAY_BE_ARRAY|MAY_BE_STRING, NULL) + ZEND_ARG_INFO(0, link) + ZEND_ARG_TYPE_MASK(0, base, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, filter, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attrsonly, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sizelimit, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timelimit, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deref, IS_LONG, 0, "LDAP_DEREF_NEVER") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #define arginfo_ldap_list arginfo_ldap_read @@ -69,37 +69,37 @@ ZEND_END_ARG_INFO() #define arginfo_ldap_free_result arginfo_ldap_unbind ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_count_entries, 0, 2, IS_LONG, 0) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_INFO(0, result_identifier) + ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_first_entry, 0, 0, 2) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_INFO(0, result_identifier) + ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() #define arginfo_ldap_next_entry arginfo_ldap_first_entry ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_entries, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_INFO(0, result_identifier) + ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_first_attribute, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_INFO(0, result_entry_identifier) + ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, entry) ZEND_END_ARG_INFO() #define arginfo_ldap_next_attribute arginfo_ldap_first_attribute ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_attributes, 0, 2, IS_ARRAY, 0) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_INFO(0, result_entry_identifier) + ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, entry) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_values_len, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_INFO(0, result_entry_identifier) + ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, entry) ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -117,36 +117,36 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_dn2ufn, 0, 1, MAY_BE_STRING ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_add, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_add_ext, 0, 0, 3) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_delete, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_delete_ext, 0, 0, 2) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_modify_batch, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, modifications_info, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #define arginfo_ldap_mod_add arginfo_ldap_add @@ -176,11 +176,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_err2str, 0, 1, IS_STRING, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_compare, 0, 4, MAY_BE_BOOL|MAY_BE_LONG) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #if defined(LDAP_CONTROL_PAGEDRESULTS) @@ -203,29 +203,29 @@ ZEND_END_ARG_INFO() #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_rename, 0, 5, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newrdn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newparent, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, deleteoldrdn, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_rename_ext, 0, 0, 5) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newrdn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newparent, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, deleteoldrdn, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_option, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retval, "null") ZEND_END_ARG_INFO() @@ -233,7 +233,7 @@ ZEND_END_ARG_INFO() #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_set_option, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ZEND_ARG_INFO(0, newval) ZEND_END_ARG_INFO() @@ -241,8 +241,8 @@ ZEND_END_ARG_INFO() #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_count_references, 0, 2, IS_LONG, 0) - ZEND_ARG_INFO(0, link_identifier) - ZEND_ARG_INFO(0, result_identifier) + ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() #endif @@ -276,7 +276,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_result, 0, 3, _IS_BOO ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matcheddn, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errmsg, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, referrals, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, serverctrls, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, controls, "null") ZEND_END_ARG_INFO() #endif @@ -289,7 +289,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_START_TLS_S) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_start_tls, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, link) ZEND_END_ARG_INFO() #endif @@ -314,7 +314,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop, 0, 0, 2) ZEND_ARG_INFO(0, link) ZEND_ARG_TYPE_INFO(0, reqoid, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reqdata, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, servercontrols, IS_ARRAY, 1, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "[]") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retdata, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retoid, "null") ZEND_END_ARG_INFO() @@ -326,7 +326,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_passwd, 0, 1, MAY_BE_S ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 0, "\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, oldpw, IS_STRING, 0, "\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, newpw, IS_STRING, 0, "\"\"") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, serverctrls, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, controls, "null") ZEND_END_ARG_INFO() #endif diff --git a/ext/ldap/tests/ldap_search_error.phpt b/ext/ldap/tests/ldap_search_error.phpt index cc4653f2b7bf2..2eec205ef58a3 100644 --- a/ext/ldap/tests/ldap_search_error.phpt +++ b/ext/ldap/tests/ldap_search_error.phpt @@ -46,6 +46,6 @@ bool(false) Warning: ldap_search(): Array initialization wrong in %s on line %d bool(false) -ldap_search(): Argument #1 ($link_identifier) cannot be empty -ldap_search(): Argument #2 ($base_dn) must have the same number of elements as the links array +ldap_search(): Argument #1 ($link) cannot be empty +ldap_search(): Argument #2 ($base) must have the same number of elements as the links array ldap_search(): Argument #3 ($filter) must have the same number of elements as the links array From a835eee2cfb71e6dfe6f59bb4d7168965bcaef82 Mon Sep 17 00:00:00 2001 From: MCMic Date: Thu, 17 Sep 2020 18:14:23 +0200 Subject: [PATCH 177/209] Fix parameter mask in ldap_next_attribute Co-authored-by: Nikita Popov --- ext/ldap/ldap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index b8f3c35ab9edb..1f99e20720623 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1941,7 +1941,7 @@ PHP_FUNCTION(ldap_next_attribute) ldap_resultentry *resultentry; char *attribute; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|l", &link, &result_entry) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &link, &result_entry) != SUCCESS) { RETURN_THROWS(); } From fa1f86f11c1f32a8869f29531961575788c3cc53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 21 Sep 2020 14:50:15 +0200 Subject: [PATCH 178/209] Explicitely mark nullable strings --- ext/ldap/ldap.stub.php | 10 +++++----- ext/ldap/ldap_arginfo.h | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 6cc89b6137696..1c534284fd823 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -4,10 +4,10 @@ #ifdef HAVE_ORALDAP /** @return resource|false */ -function ldap_connect(string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {} +function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {} #else /** @return resource|false */ -function ldap_connect(string $uri = null, int $port = 389) {} +function ldap_connect(?string $uri = null, int $port = 389) {} #endif /** @param resource $link */ @@ -20,17 +20,17 @@ function ldap_unbind($link): bool {} function ldap_close($link): bool {} /** @param resource $link */ -function ldap_bind($link, string $dn = null, string $password = null): bool {} +function ldap_bind($link, ?string $dn = null, ?string $password = null): bool {} /** * @param resource $link * @return resource|false */ -function ldap_bind_ext($link, string $dn = null, string $password = null, array $controls = []) {} +function ldap_bind_ext($link, ?string $dn = null, ?string $password = null, array $controls = []) {} #ifdef HAVE_LDAP_SASL /** @param resource $link */ -function ldap_sasl_bind($link, string $dn = null, string $password = null, string $mech = null, string $realm = null, string $authc_id = null, string $authz_id = null, string $props = null): bool {} +function ldap_sasl_bind($link, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): bool {} #endif /** diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 922e66997cb71..25f8227911c29 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,9 +1,9 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: daec139fe03acf248017060876e80bf7cab89e3a */ + * Stub hash: 739893b4bf6f34da80b7c7b10a670c16d4239bdb */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, wallet_passwd, IS_STRING, 0) @@ -13,7 +13,7 @@ ZEND_END_ARG_INFO() #if !(defined(HAVE_ORALDAP)) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_END_ARG_INFO() #endif @@ -26,27 +26,27 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_bind, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, link) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1) ZEND_ARG_INFO(0, link) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_SASL) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_sasl_bind, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, link) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mech, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, realm, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authc_id, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authz_id, IS_STRING, 0, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 0, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mech, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, realm, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authc_id, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authz_id, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif From febd33cf7e9422cc823453b762a8b8a6ae814778 Mon Sep 17 00:00:00 2001 From: MCMic Date: Mon, 28 Sep 2020 14:18:43 +0200 Subject: [PATCH 179/209] Improve parameter naming in ldap_set_option ext/ldap/ldap.stub.php Co-authored-by: Nikita Popov --- ext/ldap/ldap.stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 1c534284fd823..dd5bcf3f28979 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -226,7 +226,7 @@ function ldap_get_option($link, int $option, &$retval = null): bool {} * @param resource|null $link * @param array|string|int|bool $newval */ -function ldap_set_option($link, int $option, $newval): bool {} +function ldap_set_option($link, int $option, $value): bool {} /** * @param resource $link From 27fe37e39497c81cd6ef10150b2111ddf23f75f2 Mon Sep 17 00:00:00 2001 From: MCMic Date: Mon, 28 Sep 2020 14:19:43 +0200 Subject: [PATCH 180/209] Improve parameter naming in ldap_connect Co-authored-by: Nikita Popov --- ext/ldap/ldap.stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index dd5bcf3f28979..941ec5ba58e71 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -4,7 +4,7 @@ #ifdef HAVE_ORALDAP /** @return resource|false */ -function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $wallet_passwd = UNKNOWN, int $authmode = GSLC_SSL_NO_AUTH) {} +function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH) {} #else /** @return resource|false */ function ldap_connect(?string $uri = null, int $port = 389) {} From 462c94447e3d1fcf0fef5122108e57f251770bcf Mon Sep 17 00:00:00 2001 From: MCMic Date: Mon, 28 Sep 2020 14:20:28 +0200 Subject: [PATCH 181/209] Improve parameter naming in ldap_exop_passwd Co-authored-by: Nikita Popov --- ext/ldap/ldap.stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 941ec5ba58e71..dc92eb2bb13f9 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -305,7 +305,7 @@ function ldap_exop($link, string $reqoid, ?string $reqdata = null, ?array $contr * @param resource $link * @param array $controls */ -function ldap_exop_passwd($link, string $user = "", string $oldpw = "", string $newpw = "", &$controls = null): string|bool {} +function ldap_exop_passwd($link, string $user = "", string $old_password = "", string $new_password = "", &$controls = null): string|bool {} #endif From 29e1a9717d86f39522a736e91c7b4ff5ed3f8f7c Mon Sep 17 00:00:00 2001 From: MCMic Date: Mon, 28 Sep 2020 14:20:48 +0200 Subject: [PATCH 182/209] Improve parameter naming in ldap_rename Co-authored-by: Nikita Popov --- ext/ldap/ldap.stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index dc92eb2bb13f9..a5233f473eefc 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -207,7 +207,7 @@ function ldap_control_paged_result_response($link, $result, &$cookie = null, &$e #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) /** @param resource $link */ -function ldap_rename($link, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $controls = []): bool {} +function ldap_rename($link, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = []): bool {} /** * @param resource $link From 1d3787ee94d261d3194d70b85382467995dcc7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 28 Sep 2020 14:52:40 +0200 Subject: [PATCH 183/209] Rename $link parameters to $ldap in ldap functions Also fixed ldap_set_option places where $newvalue was still used --- ext/ldap/ldap.c | 4 +- ext/ldap/ldap.stub.php | 210 +++++++++++----------- ext/ldap/ldap_arginfo.h | 92 +++++----- ext/ldap/tests/ldap_search_error.phpt | 2 +- ext/ldap/tests/ldap_set_option_error.phpt | 4 +- 5 files changed, 156 insertions(+), 156 deletions(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 1f99e20720623..13ea7647fc154 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1601,12 +1601,12 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope) } if (!base_dn_str) { - zend_argument_type_error(2, "must be of type string when argument #1 ($link_identifier) is a resource"); + zend_argument_type_error(2, "must be of type string when argument #1 ($ldap) is a resource"); } ldap_base_dn = zend_string_copy(base_dn_str); if (!filter_str) { - zend_argument_type_error(3, "must be of type string when argument #1 ($link_identifier) is a resource"); + zend_argument_type_error(3, "must be of type string when argument #1 ($ldap) is a resource"); } ldap_filter = zend_string_copy(filter_str); diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index a5233f473eefc..cd0cfb6bf6abe 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -10,256 +10,256 @@ function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNK function ldap_connect(?string $uri = null, int $port = 389) {} #endif -/** @param resource $link */ -function ldap_unbind($link): bool {} +/** @param resource $ldap */ +function ldap_unbind($ldap): bool {} /** - * @param resource $link + * @param resource $ldap * @alias ldap_unbind */ -function ldap_close($link): bool {} +function ldap_close($ldap): bool {} -/** @param resource $link */ -function ldap_bind($link, ?string $dn = null, ?string $password = null): bool {} +/** @param resource $ldap */ +function ldap_bind($ldap, ?string $dn = null, ?string $password = null): bool {} /** - * @param resource $link + * @param resource $ldap * @return resource|false */ -function ldap_bind_ext($link, ?string $dn = null, ?string $password = null, array $controls = []) {} +function ldap_bind_ext($ldap, ?string $dn = null, ?string $password = null, array $controls = []) {} #ifdef HAVE_LDAP_SASL -/** @param resource $link */ -function ldap_sasl_bind($link, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): bool {} +/** @param resource $ldap */ +function ldap_sasl_bind($ldap, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): bool {} #endif /** - * @param resource|array $link + * @param resource|array $ldap * @return resource|false */ -function ldap_read($link, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} +function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} /** - * @param resource|array $link + * @param resource|array $ldap * @return resource|false */ -function ldap_list($link, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} +function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} /** - * @param resource|array $link + * @param resource|array $ldap * @return resource|false */ -function ldap_search($link, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} +function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} -/** @param resource $link */ -function ldap_free_result($link): bool {} +/** @param resource $ldap */ +function ldap_free_result($ldap): bool {} /** - * @param resource $link + * @param resource $ldap * @param resource $result */ -function ldap_count_entries($link, $result): int {} +function ldap_count_entries($ldap, $result): int {} /** - * @param resource $link + * @param resource $ldap * @param resource $result * @return resource|false */ -function ldap_first_entry($link, $result) {} +function ldap_first_entry($ldap, $result) {} /** - * @param resource $link + * @param resource $ldap * @param resource $result * @return resource|false */ -function ldap_next_entry($link, $result) {} +function ldap_next_entry($ldap, $result) {} /** - * @param resource $link + * @param resource $ldap * @param resource $result */ -function ldap_get_entries($link, $result): array|false {} +function ldap_get_entries($ldap, $result): array|false {} /** - * @param resource $link + * @param resource $ldap * @param resource $entry */ -function ldap_first_attribute($link, $entry): string|false {} +function ldap_first_attribute($ldap, $entry): string|false {} /** - * @param resource $link + * @param resource $ldap * @param resource $entry */ -function ldap_next_attribute($link, $entry): string|false {} +function ldap_next_attribute($ldap, $entry): string|false {} /** - * @param resource $link + * @param resource $ldap * @param resource $entry */ -function ldap_get_attributes($link, $entry): array {} +function ldap_get_attributes($ldap, $entry): array {} /** - * @param resource $link + * @param resource $ldap * @param resource $entry */ -function ldap_get_values_len($link, $entry, string $attribute): array|false {} +function ldap_get_values_len($ldap, $entry, string $attribute): array|false {} /** - * @param resource $link + * @param resource $ldap * @param resource $entry * @alias ldap_get_values_len */ -function ldap_get_values($link, $entry, string $attribute): array|false {} +function ldap_get_values($ldap, $entry, string $attribute): array|false {} /** - * @param resource $link + * @param resource $ldap * @param resource $entry */ -function ldap_get_dn($link, $entry): string|false {} +function ldap_get_dn($ldap, $entry): string|false {} function ldap_explode_dn(string $dn, int $with_attrib): array|false {} function ldap_dn2ufn(string $dn): string|false {} -/** @param resource $link */ -function ldap_add($link, string $dn, array $entry, array $controls = []): bool {} +/** @param resource $ldap */ +function ldap_add($ldap, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link + * @param resource $ldap * @return resource|false */ -function ldap_add_ext($link, string $dn, array $entry, array $controls = []) {} +function ldap_add_ext($ldap, string $dn, array $entry, array $controls = []) {} -/** @param resource $link */ -function ldap_delete($link, string $dn, array $controls = []): bool {} +/** @param resource $ldap */ +function ldap_delete($ldap, string $dn, array $controls = []): bool {} /** - * @param resource $link + * @param resource $ldap * @return resource|false */ -function ldap_delete_ext($link, string $dn, array $controls = []) {} +function ldap_delete_ext($ldap, string $dn, array $controls = []) {} -/** @param resource $link */ -function ldap_modify_batch($link, string $dn, array $modifications_info, array $controls = []): bool {} +/** @param resource $ldap */ +function ldap_modify_batch($ldap, string $dn, array $modifications_info, array $controls = []): bool {} -/** @param resource $link */ -function ldap_mod_add($link, string $dn, array $entry, array $controls = []): bool {} +/** @param resource $ldap */ +function ldap_mod_add($ldap, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link + * @param resource $ldap * @return resource|false */ -function ldap_mod_add_ext($link, string $dn, array $entry, array $controls = []) {} +function ldap_mod_add_ext($ldap, string $dn, array $entry, array $controls = []) {} -/** @param resource $link */ -function ldap_mod_replace($link, string $dn, array $entry, array $controls = []): bool {} +/** @param resource $ldap */ +function ldap_mod_replace($ldap, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link + * @param resource $ldap * @alias ldap_mod_replace */ -function ldap_modify($link, string $dn, array $entry, array $controls = []): bool {} +function ldap_modify($ldap, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link + * @param resource $ldap * @return resource|false */ -function ldap_mod_replace_ext($link, string $dn, array $entry, array $controls = []) {} +function ldap_mod_replace_ext($ldap, string $dn, array $entry, array $controls = []) {} -/** @param resource $link */ -function ldap_mod_del($link, string $dn, array $entry, array $controls = []): bool {} +/** @param resource $ldap */ +function ldap_mod_del($ldap, string $dn, array $entry, array $controls = []): bool {} /** - * @param resource $link + * @param resource $ldap * @return resource|false */ -function ldap_mod_del_ext($link, string $dn, array $entry, array $controls = []) {} +function ldap_mod_del_ext($ldap, string $dn, array $entry, array $controls = []) {} -/** @param resource $link */ -function ldap_errno($link): int {} +/** @param resource $ldap */ +function ldap_errno($ldap): int {} -/** @param resource $link */ -function ldap_error($link): string {} +/** @param resource $ldap */ +function ldap_error($ldap): string {} function ldap_err2str(int $errno): string {} -/** @param resource $link */ -function ldap_compare($link, string $dn, string $attribute, string $value, array $controls = []): bool|int {} +/** @param resource $ldap */ +function ldap_compare($ldap, string $dn, string $attribute, string $value, array $controls = []): bool|int {} #ifdef LDAP_CONTROL_PAGEDRESULTS /** - * @param resource $link + * @param resource $ldap * @deprecated since 7.4 */ -function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ""): bool {} +function ldap_control_paged_result($ldap, int $pagesize, bool $iscritical = false, string $cookie = ""): bool {} /** - * @param resource $link + * @param resource $ldap * @param resource $result * @param string $cookie * @param int $estimated * @deprecated since 7.4 */ -function ldap_control_paged_result_response($link, $result, &$cookie = null, &$estimated = null): bool {} +function ldap_control_paged_result_response($ldap, $result, &$cookie = null, &$estimated = null): bool {} #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) -/** @param resource $link */ -function ldap_rename($link, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = []): bool {} +/** @param resource $ldap */ +function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = []): bool {} /** - * @param resource $link + * @param resource $ldap * @return resource|false */ -function ldap_rename_ext($link, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $controls = []) {} +function ldap_rename_ext($ldap, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $controls = []) {} /** - * @param resource $link + * @param resource $ldap * @param array|string|int $retval */ -function ldap_get_option($link, int $option, &$retval = null): bool {} +function ldap_get_option($ldap, int $option, &$retval = null): bool {} /** - * @param resource|null $link - * @param array|string|int|bool $newval + * @param resource|null $ldap + * @param array|string|int|bool $value */ -function ldap_set_option($link, int $option, $value): bool {} +function ldap_set_option($ldap, int $option, $value): bool {} /** - * @param resource $link + * @param resource $ldap * @param resource $result */ -function ldap_count_references($link, $result): int {} +function ldap_count_references($ldap, $result): int {} /** - * @param resource $link + * @param resource $ldap * @param resource $result * @return resource|false */ -function ldap_first_reference($link, $result) {} +function ldap_first_reference($ldap, $result) {} /** - * @param resource $link + * @param resource $ldap * @param resource $entry * @return resource|false */ -function ldap_next_reference($link, $entry) {} +function ldap_next_reference($ldap, $entry) {} #ifdef HAVE_LDAP_PARSE_REFERENCE /** - * @param resource $link + * @param resource $ldap * @param resource $entry * @param array $referrals */ -function ldap_parse_reference($link, $entry, &$referrals): bool {} +function ldap_parse_reference($ldap, $entry, &$referrals): bool {} #endif #ifdef HAVE_LDAP_PARSE_RESULT /** - * @param resource $link + * @param resource $ldap * @param resource $result * @param int $errcode * @param string $matcheddn @@ -267,18 +267,18 @@ function ldap_parse_reference($link, $entry, &$referrals): bool {} * @param array $referrals * @param array $controls */ -function ldap_parse_result($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, &$referrals = null, &$controls = null): bool {} +function ldap_parse_result($ldap, $result, &$errcode, &$matcheddn = null, &$errmsg = null, &$referrals = null, &$controls = null): bool {} #endif #endif #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC) -/** @param resource $link */ -function ldap_set_rebind_proc($link, ?callable $callback): bool {} +/** @param resource $ldap */ +function ldap_set_rebind_proc($ldap, ?callable $callback): bool {} #endif #ifdef HAVE_LDAP_START_TLS_S -/** @param resource $link */ -function ldap_start_tls($link): bool {} +/** @param resource $ldap */ +function ldap_start_tls($ldap): bool {} #endif function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {} @@ -292,39 +292,39 @@ function ldap_8859_to_t61(string $value): string|false {} #ifdef HAVE_LDAP_EXTENDED_OPERATION_S /** - * @param resource $link + * @param resource $ldap * @param string $retdata * @param string $retoid * @return resource|bool */ -function ldap_exop($link, string $reqoid, ?string $reqdata = null, ?array $controls = [], &$retdata = null, &$retoid = null) {} +function ldap_exop($ldap, string $reqoid, ?string $reqdata = null, ?array $controls = [], &$retdata = null, &$retoid = null) {} #endif #ifdef HAVE_LDAP_PASSWD /** - * @param resource $link + * @param resource $ldap * @param array $controls */ -function ldap_exop_passwd($link, string $user = "", string $old_password = "", string $new_password = "", &$controls = null): string|bool {} +function ldap_exop_passwd($ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = null): string|bool {} #endif #ifdef HAVE_LDAP_WHOAMI_S -/** @param resource $link */ -function ldap_exop_whoami($link): string|bool {} +/** @param resource $ldap */ +function ldap_exop_whoami($ldap): string|bool {} #endif #ifdef HAVE_LDAP_REFRESH_S -/** @param resource $link */ -function ldap_exop_refresh($link, string $dn, int $ttl): int|false {} +/** @param resource $ldap */ +function ldap_exop_refresh($ldap, string $dn, int $ttl): int|false {} #endif #ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT /** - * @param resource $link + * @param resource $ldap * @param resource $result * @param string $retdata * @param string $retoid */ -function ldap_parse_exop($link, $result, &$retdata = null, &$retoid = null): bool {} +function ldap_parse_exop($ldap, $result, &$retdata = null, &$retoid = null): bool {} #endif diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 25f8227911c29..24fe4c3acd8db 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,13 +1,13 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 739893b4bf6f34da80b7c7b10a670c16d4239bdb */ + * Stub hash: 4802f25ebc9936ccd6e4705d07a49a61892b71f3 */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389") ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, wallet_passwd, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authmode, IS_LONG, 0, "GSLC_SSL_NO_AUTH") + ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, auth_mode, IS_LONG, 0, "GSLC_SSL_NO_AUTH") ZEND_END_ARG_INFO() #endif @@ -19,19 +19,19 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_unbind, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_END_ARG_INFO() #define arginfo_ldap_close arginfo_ldap_unbind ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_bind, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_bind_ext, 0, 0, 1) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") @@ -39,7 +39,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_SASL) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_sasl_bind, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mech, IS_STRING, 1, "null") @@ -51,7 +51,7 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_read, 0, 0, 3) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_MASK(0, base, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, filter, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") @@ -69,36 +69,36 @@ ZEND_END_ARG_INFO() #define arginfo_ldap_free_result arginfo_ldap_unbind ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_count_entries, 0, 2, IS_LONG, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_first_entry, 0, 0, 2) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() #define arginfo_ldap_next_entry arginfo_ldap_first_entry ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_entries, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_first_attribute, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, entry) ZEND_END_ARG_INFO() #define arginfo_ldap_next_attribute arginfo_ldap_first_attribute ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_attributes, 0, 2, IS_ARRAY, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, entry) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_values_len, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, entry) ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -117,33 +117,33 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_dn2ufn, 0, 1, MAY_BE_STRING ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_add, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_add_ext, 0, 0, 3) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_delete, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_delete_ext, 0, 0, 2) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_modify_batch, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, modifications_info, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") @@ -164,11 +164,11 @@ ZEND_END_ARG_INFO() #define arginfo_ldap_mod_del_ext arginfo_ldap_add_ext ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_errno, 0, 1, IS_LONG, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_error, 0, 1, IS_STRING, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_err2str, 0, 1, IS_STRING, 0) @@ -176,7 +176,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_err2str, 0, 1, IS_STRING, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_compare, 0, 4, MAY_BE_BOOL|MAY_BE_LONG) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) @@ -185,7 +185,7 @@ ZEND_END_ARG_INFO() #if defined(LDAP_CONTROL_PAGEDRESULTS) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_control_paged_result, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, pagesize, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iscritical, _IS_BOOL, 0, "false") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cookie, IS_STRING, 0, "\"\"") @@ -194,7 +194,7 @@ ZEND_END_ARG_INFO() #if defined(LDAP_CONTROL_PAGEDRESULTS) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_control_paged_result_response, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, cookie, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, estimated, "null") @@ -203,18 +203,18 @@ ZEND_END_ARG_INFO() #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_rename, 0, 5, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, newrdn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, newparent, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, deleteoldrdn, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, new_rdn, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, new_parent, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, delete_old_rdn, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_rename_ext, 0, 0, 5) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newrdn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, newparent, IS_STRING, 0) @@ -225,7 +225,7 @@ ZEND_END_ARG_INFO() #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_option, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retval, "null") ZEND_END_ARG_INFO() @@ -233,36 +233,36 @@ ZEND_END_ARG_INFO() #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_set_option, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) - ZEND_ARG_INFO(0, newval) + ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_count_references, 0, 2, IS_LONG, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_first_reference, 0, 0, 2) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) ZEND_END_ARG_INFO() #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_next_reference, 0, 0, 2) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, entry) ZEND_END_ARG_INFO() #endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) && defined(HAVE_LDAP_PARSE_REFERENCE) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_reference, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, entry) ZEND_ARG_INFO(1, referrals) ZEND_END_ARG_INFO() @@ -270,7 +270,7 @@ ZEND_END_ARG_INFO() #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) && defined(HAVE_LDAP_PARSE_RESULT) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_result, 0, 3, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) ZEND_ARG_INFO(1, errcode) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matcheddn, "null") @@ -282,14 +282,14 @@ ZEND_END_ARG_INFO() #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_set_rebind_proc, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1) ZEND_END_ARG_INFO() #endif #if defined(HAVE_LDAP_START_TLS_S) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_start_tls, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_END_ARG_INFO() #endif @@ -311,7 +311,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_EXTENDED_OPERATION_S) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop, 0, 0, 2) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, reqoid, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reqdata, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "[]") @@ -322,23 +322,23 @@ ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_PASSWD) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_passwd, 0, 1, MAY_BE_STRING|MAY_BE_BOOL) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 0, "\"\"") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, oldpw, IS_STRING, 0, "\"\"") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, newpw, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, old_password, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, new_password, IS_STRING, 0, "\"\"") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, controls, "null") ZEND_END_ARG_INFO() #endif #if defined(HAVE_LDAP_WHOAMI_S) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_whoami, 0, 1, MAY_BE_STRING|MAY_BE_BOOL) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_END_ARG_INFO() #endif #if defined(HAVE_LDAP_REFRESH_S) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_refresh, 0, 3, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, ttl, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -346,7 +346,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_PARSE_EXTENDED_RESULT) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_exop, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, link) + ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retdata, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retoid, "null") diff --git a/ext/ldap/tests/ldap_search_error.phpt b/ext/ldap/tests/ldap_search_error.phpt index 2eec205ef58a3..7041c66746b01 100644 --- a/ext/ldap/tests/ldap_search_error.phpt +++ b/ext/ldap/tests/ldap_search_error.phpt @@ -46,6 +46,6 @@ bool(false) Warning: ldap_search(): Array initialization wrong in %s on line %d bool(false) -ldap_search(): Argument #1 ($link) cannot be empty +ldap_search(): Argument #1 ($ldap) cannot be empty ldap_search(): Argument #2 ($base) must have the same number of elements as the links array ldap_search(): Argument #3 ($filter) must have the same number of elements as the links array diff --git a/ext/ldap/tests/ldap_set_option_error.phpt b/ext/ldap/tests/ldap_set_option_error.phpt index f97193e22b581..fba37df6ef34d 100644 --- a/ext/ldap/tests/ldap_set_option_error.phpt +++ b/ext/ldap/tests/ldap_set_option_error.phpt @@ -38,6 +38,6 @@ var_dump(ldap_set_option($link, 999999, 999999)); --EXPECT-- bool(false) ValueError: ldap_set_option(): Control must have an "oid" key -TypeError: ldap_set_option(): Argument #3 ($newval) must contain only arrays, where each array is a control -TypeError: ldap_set_option(): Argument #3 ($newval) must be of type array for the LDAP_OPT_CLIENT_CONTROLS option, string given +TypeError: ldap_set_option(): Argument #3 ($value) must contain only arrays, where each array is a control +TypeError: ldap_set_option(): Argument #3 ($value) must be of type array for the LDAP_OPT_CLIENT_CONTROLS option, string given bool(false) From 3b3445f7834f7425504a36666c689867ccc7851d Mon Sep 17 00:00:00 2001 From: MCMic Date: Mon, 28 Sep 2020 16:32:57 +0200 Subject: [PATCH 184/209] Harmonize ldap_rename_ext with ldap_rename parameter names Co-authored-by: Nikita Popov --- ext/ldap/ldap.stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index cd0cfb6bf6abe..3a51986b4f256 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -213,7 +213,7 @@ function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, boo * @param resource $ldap * @return resource|false */ -function ldap_rename_ext($ldap, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $controls = []) {} +function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = []) {} /** From 19453554352ef7bfe2c0d72d37fd7206babf20f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 29 Sep 2020 09:36:25 +0200 Subject: [PATCH 185/209] Improve parameter names in ext/ldap Merging PR 6153 --- ext/ldap/ldap.stub.php | 30 +++++++++++++++--------------- ext/ldap/ldap_arginfo.h | 30 +++++++++++++++--------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index 3a51986b4f256..df973b933cb33 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -37,19 +37,19 @@ function ldap_sasl_bind($ldap, ?string $dn = null, ?string $password = null, ?st * @param resource|array $ldap * @return resource|false */ -function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} +function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} /** * @param resource|array $ldap * @return resource|false */ -function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} +function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} /** * @param resource|array $ldap * @return resource|false */ -function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} +function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {} /** @param resource $ldap */ function ldap_free_result($ldap): bool {} @@ -218,9 +218,9 @@ function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent, /** * @param resource $ldap - * @param array|string|int $retval + * @param array|string|int $value */ -function ldap_get_option($ldap, int $option, &$retval = null): bool {} +function ldap_get_option($ldap, int $option, &$value = null): bool {} /** * @param resource|null $ldap @@ -261,13 +261,13 @@ function ldap_parse_reference($ldap, $entry, &$referrals): bool {} /** * @param resource $ldap * @param resource $result - * @param int $errcode - * @param string $matcheddn - * @param string $errmsg + * @param int $error_code + * @param string $matched_dn + * @param string $error_message * @param array $referrals * @param array $controls */ -function ldap_parse_result($ldap, $result, &$errcode, &$matcheddn = null, &$errmsg = null, &$referrals = null, &$controls = null): bool {} +function ldap_parse_result($ldap, $result, &$error_code, &$matched_dn = null, &$error_message = null, &$referrals = null, &$controls = null): bool {} #endif #endif @@ -293,11 +293,11 @@ function ldap_8859_to_t61(string $value): string|false {} #ifdef HAVE_LDAP_EXTENDED_OPERATION_S /** * @param resource $ldap - * @param string $retdata - * @param string $retoid + * @param string $response_data + * @param string $response_oid * @return resource|bool */ -function ldap_exop($ldap, string $reqoid, ?string $reqdata = null, ?array $controls = [], &$retdata = null, &$retoid = null) {} +function ldap_exop($ldap, string $request_oid, ?string $request_data = null, ?array $controls = [], &$response_data = null, &$response_oid = null) {} #endif #ifdef HAVE_LDAP_PASSWD @@ -323,8 +323,8 @@ function ldap_exop_refresh($ldap, string $dn, int $ttl): int|false {} /** * @param resource $ldap * @param resource $result - * @param string $retdata - * @param string $retoid + * @param string $response_data + * @param string $response_oid */ -function ldap_parse_exop($ldap, $result, &$retdata = null, &$retoid = null): bool {} +function ldap_parse_exop($ldap, $result, &$response_data = null, &$response_oid = null): bool {} #endif diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 24fe4c3acd8db..4b73b68d8f32c 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4802f25ebc9936ccd6e4705d07a49a61892b71f3 */ + * Stub hash: 0c721a3272fef9d1a06a8cb4163eeb219661fb00 */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) @@ -55,7 +55,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_read, 0, 0, 3) ZEND_ARG_TYPE_MASK(0, base, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, filter, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attrsonly, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes_only, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sizelimit, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timelimit, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deref, IS_LONG, 0, "LDAP_DEREF_NEVER") @@ -216,9 +216,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_rename_ext, 0, 0, 5) ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, newrdn, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, newparent, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, deleteoldrdn, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, new_rdn, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, new_parent, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, delete_old_rdn, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() #endif @@ -227,7 +227,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_option, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, ldap) ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retval, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, value, "null") ZEND_END_ARG_INFO() #endif @@ -272,9 +272,9 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_result, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) - ZEND_ARG_INFO(1, errcode) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matcheddn, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errmsg, "null") + ZEND_ARG_INFO(1, error_code) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matched_dn, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_message, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, referrals, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, controls, "null") ZEND_END_ARG_INFO() @@ -312,11 +312,11 @@ ZEND_END_ARG_INFO() #if defined(HAVE_LDAP_EXTENDED_OPERATION_S) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop, 0, 0, 2) ZEND_ARG_INFO(0, ldap) - ZEND_ARG_TYPE_INFO(0, reqoid, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, reqdata, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO(0, request_oid, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, request_data, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "[]") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retdata, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retoid, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_data, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_oid, "null") ZEND_END_ARG_INFO() #endif @@ -348,8 +348,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_exop, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, ldap) ZEND_ARG_INFO(0, result) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retdata, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, retoid, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_data, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_oid, "null") ZEND_END_ARG_INFO() #endif From 25f1c405ffeb8e5045b88b46e999ac5a76f19e66 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 25 Sep 2020 12:29:21 +0200 Subject: [PATCH 186/209] Update ext/standard parameter names Closes GH-6214. --- Zend/tests/bug75290.phpt | 2 +- Zend/tests/bug79783.phpt | 2 +- Zend/tests/bug79979.phpt | 12 +- Zend/tests/call_user_func_001.phpt | 4 +- ext/date/tests/microtime_error.phpt | 4 +- ext/phar/tests/fgc_edgecases.phpt | 2 +- ext/phar/tests/opendir_edgecases.phpt | 2 +- ...eflectionParameter_canBePassedByValue.phpt | 2 +- ext/standard/basic_functions.stub.php | 595 +-- ext/standard/basic_functions_arginfo.h | 552 ++- ext/standard/tests/array/array_chunk2.phpt | 4 +- .../tests/array/array_chunk_variation5.phpt | 12 +- .../array/array_multisort_variation1.phpt | 50 +- .../tests/array/array_next_error2.phpt | 2 +- ext/standard/tests/array/array_pad.phpt | 2 +- ext/standard/tests/array/array_rand.phpt | 6 +- .../tests/array/array_rand_variation5.phpt | 8 +- .../tests/array/array_walk_objects.phpt | 2 +- .../tests/array/array_walk_rec_objects.phpt | Bin 921 -> 921 bytes ext/standard/tests/array/extract_error.phpt | 4 +- ext/standard/tests/array/max.phpt | 6 +- ext/standard/tests/array/min.phpt | 6 +- ext/standard/tests/array/prev_error3.phpt | 2 +- ext/standard/tests/array/sizeof_object2.phpt | 20 +- .../tests/assert/assert_options_error.phpt | 2 +- .../tests/file/fgetcsv_error_conditions.phpt | 4 +- .../tests/file/fgetcsv_variation12.phpt | 144 +- .../tests/file/fgetcsv_variation19.phpt | 150 +- .../tests/file/file_get_contents_error.phpt | 2 +- .../file/file_get_contents_error002.phpt | 2 +- ..._get_contents_file_put_contents_error.phpt | 2 +- .../tests/file/fputcsv_variation2.phpt | 216 +- .../tests/file/fputcsv_variation4.phpt | 216 +- .../tests/file/fputcsv_variation9.phpt | 216 +- .../tests/file/mkdir_rmdir_variation2.phpt | 4 +- .../tests/file/tempnam_variation7-win32.phpt | 4 +- .../tests/file/tempnam_variation7.phpt | 4 +- ext/standard/tests/file/touch.phpt | 2 +- ext/standard/tests/file/userstreams.phpt | 2 +- ext/standard/tests/filters/001.phpt | 6 +- ext/standard/tests/general_functions/010.phpt | 2 +- .../tests/general_functions/bug32647.phpt | 16 +- .../general_functions/proc_open_array.phpt | 2 +- .../general_functions/proc_open_pipes3.phpt | 2 +- .../tests/general_functions/putenv.phpt | 4 +- .../register_tick_function_error.phpt | 2 +- ext/standard/tests/image/bug79877.phpt | 2 +- ext/standard/tests/math/abs_variation.phpt | 16 +- .../tests/math/base_convert_error.phpt | 6 +- .../tests/math/base_convert_variation1.phpt | 4 +- ext/standard/tests/math/ceil_variation1.phpt | 16 +- ext/standard/tests/math/decbin_basic.phpt | 2 +- .../tests/math/decbin_basiclong_64bit.phpt | 2 +- .../tests/math/decbin_variation1.phpt | 24 +- .../tests/math/decbin_variation1_64bit.phpt | 20 +- ext/standard/tests/math/dechex_basic.phpt | 2 +- .../tests/math/dechex_basiclong_64bit.phpt | 2 +- .../tests/math/dechex_variation1.phpt | 24 +- .../tests/math/dechex_variation1_64bit.phpt | 20 +- ext/standard/tests/math/decoct_basic.phpt | 2 +- .../tests/math/decoct_basiclong_64bit.phpt | 2 +- .../tests/math/decoct_variation1.phpt | 24 +- .../tests/math/decoct_variation1_64bit.phpt | 20 +- ext/standard/tests/math/floor_variation1.phpt | 16 +- ext/standard/tests/math/round_variation1.phpt | 16 +- .../stream_get_contents_negative_length.phpt | 4 +- .../tests/strings/addcslashes_001.phpt | Bin 1641 -> 1643 bytes ext/standard/tests/strings/bug40754.phpt | 4 +- ext/standard/tests/strings/bug61116.phpt | 4 +- .../tests/strings/chunk_split_variation5.phpt | Bin 2094 -> 2086 bytes .../tests/strings/chunk_split_variation8.phpt | 8 +- ext/standard/tests/strings/implode1.phpt | Bin 6041 -> 6048 bytes .../tests/strings/join_variation1.phpt | 12 +- .../tests/strings/join_variation2.phpt | 38 +- .../tests/strings/join_variation4.phpt | Bin 2102 -> 2107 bytes .../tests/strings/join_variation5.phpt | 2 +- .../strings/levenshtein_error_conditions.phpt | 4 +- ext/standard/tests/strings/metaphone.phpt | 2 +- .../tests/strings/str_pad_variation1.phpt | 2 +- ext/standard/tests/strings/str_repeat.phpt | Bin 2809 -> 2810 bytes ext/standard/tests/strings/strcspn.phpt | 2 +- .../tests/strings/strcspn_variation11.phpt | 916 ++-- .../tests/strings/strcspn_variation12.phpt | 3436 +++++++------- .../tests/strings/strip_tags_variation2.phpt | 2 +- ext/standard/tests/strings/strpbrk_error.phpt | 2 +- .../tests/strings/strspn_variation11.phpt | 916 ++-- .../tests/strings/strspn_variation12.phpt | 3974 ++++++++--------- .../tests/strings/substr_replace_error.phpt | 2 +- .../tests/strings/vfprintf_error3.phpt | 2 +- .../tests/strings/vfprintf_error4.phpt | 2 +- .../tests/strings/vfprintf_variation1.phpt | 2 +- .../tests/strings/vprintf_variation2.phpt | 46 +- .../tests/strings/wordwrap_error.phpt | 2 +- ext/sysvshm/tests/001.phpt | 6 +- sapi/cli/tests/004.phpt | 4 +- 95 files changed, 5952 insertions(+), 5967 deletions(-) diff --git a/Zend/tests/bug75290.phpt b/Zend/tests/bug75290.phpt index 3b28e621d2c4c..9d9d1a05619c1 100644 --- a/Zend/tests/bug75290.phpt +++ b/Zend/tests/bug75290.phpt @@ -12,7 +12,7 @@ var_dump(function ($someThing) {}); object(Closure)#2 (1) { ["parameter"]=> array(1) { - ["$number"]=> + ["$num"]=> string(10) "" } } diff --git a/Zend/tests/bug79783.phpt b/Zend/tests/bug79783.phpt index 74d2672e02a00..6accb0c284de9 100644 --- a/Zend/tests/bug79783.phpt +++ b/Zend/tests/bug79783.phpt @@ -5,7 +5,7 @@ Bug #79783: Segfault in php_str_replace_common str_replace("a", "b", "c", strlen("d")); ?> --EXPECTF-- -Fatal error: Uncaught Error: str_replace(): Argument #4 ($replace_count) cannot be passed by reference in %s:%d +Fatal error: Uncaught Error: str_replace(): Argument #4 ($count) cannot be passed by reference in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug79979.phpt b/Zend/tests/bug79979.phpt index d655a0edce577..753b2abdb5f77 100644 --- a/Zend/tests/bug79979.phpt +++ b/Zend/tests/bug79979.phpt @@ -6,17 +6,17 @@ Bug #79979 (passing value to by-ref param via CUF(A) crashes) namespace Foo; call_user_func_array("str_replace", ["a", "b", "c", new \stdClass]); -call_user_func_array("str_replace", ["a", "b", "c", "replace_count" => new \stdClass]); +call_user_func_array("str_replace", ["a", "b", "c", "count" => new \stdClass]); \call_user_func_array("str_replace", ["a", "b", "c", new \stdClass]); -\call_user_func_array("str_replace", ["a", "b", "c", "replace_count" => new \stdClass]); +\call_user_func_array("str_replace", ["a", "b", "c", "count" => new \stdClass]); ?> --EXPECTF-- -Warning: str_replace(): Argument #4 ($replace_count) must be passed by reference, value given in %s on line %d +Warning: str_replace(): Argument #4 ($count) must be passed by reference, value given in %s on line %d -Warning: str_replace(): Argument #4 ($replace_count) must be passed by reference, value given in %s on line %d +Warning: str_replace(): Argument #4 ($count) must be passed by reference, value given in %s on line %d -Warning: str_replace(): Argument #4 ($replace_count) must be passed by reference, value given in %s on line %d +Warning: str_replace(): Argument #4 ($count) must be passed by reference, value given in %s on line %d -Warning: str_replace(): Argument #4 ($replace_count) must be passed by reference, value given in %s on line %d +Warning: str_replace(): Argument #4 ($count) must be passed by reference, value given in %s on line %d diff --git a/Zend/tests/call_user_func_001.phpt b/Zend/tests/call_user_func_001.phpt index 34234271b36b9..9497d305e2cda 100644 --- a/Zend/tests/call_user_func_001.phpt +++ b/Zend/tests/call_user_func_001.phpt @@ -37,5 +37,5 @@ namespace testing { ?> --EXPECT-- string(6) "foobar" -call_user_func(): Argument #1 ($function) must be a valid callback, cannot access private method testing\foo::priv() -call_user_func(): Argument #1 ($function) must be a valid callback, cannot access protected method testing\foo::prot() +call_user_func(): Argument #1 ($callback) must be a valid callback, cannot access private method testing\foo::priv() +call_user_func(): Argument #1 ($callback) must be a valid callback, cannot access protected method testing\foo::prot() diff --git a/ext/date/tests/microtime_error.phpt b/ext/date/tests/microtime_error.phpt index 32cc64bb9df85..ce13875e67b1a 100644 --- a/ext/date/tests/microtime_error.phpt +++ b/ext/date/tests/microtime_error.phpt @@ -46,11 +46,11 @@ float(%s) int(0) } } -microtime(): Argument #1 ($getAsFloat) must be of type bool, array given +microtime(): Argument #1 ($as_float) must be of type bool, array given --> bad arg: object(stdClass)#%d (0) { } -microtime(): Argument #1 ($getAsFloat) must be of type bool, stdClass given +microtime(): Argument #1 ($as_float) must be of type bool, stdClass given --> bad arg: int(1) float(%s) diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt index a30ca7df193da..aad575749bd37 100644 --- a/ext/phar/tests/fgc_edgecases.phpt +++ b/ext/phar/tests/fgc_edgecases.phpt @@ -71,7 +71,7 @@ echo file_get_contents("./hi", 0, $context, 50000); echo file_get_contents("./hi"); echo file_get_contents("./hi", 0, $context, 0, 0); ?> -file_get_contents(): Argument #5 ($maxlen) must be greater than or equal to 0 +file_get_contents(): Argument #5 ($max_length) must be greater than or equal to 0 test test array_multisort: -Name: array1 +Name: array Is passed by reference: yes Can be passed by value: yes diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index b640fce9eead6..5b8103f036fec 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -12,8 +12,8 @@ function header_register_callback(callable $callback): bool {} /* main/output.c */ -/** @param callable $user_function */ -function ob_start($user_function = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): bool {} +/** @param callable $callback */ +function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): bool {} function ob_flush(): bool {} @@ -37,7 +37,7 @@ function ob_list_handlers(): array {} function ob_get_status(bool $full_status = false): array {} -function ob_implicit_flush(bool $flag = true): void {} +function ob_implicit_flush(bool $enable = true): void {} function output_reset_rewrite_vars(): bool {} @@ -45,10 +45,10 @@ function output_add_rewrite_var(string $name, string $value): bool {} /* main/streams/userspace.c */ -function stream_wrapper_register(string $protocol, string $classname, int $flags = 0): bool {} +function stream_wrapper_register(string $protocol, string $class, int $flags = 0): bool {} /** @alias stream_wrapper_register */ -function stream_register_wrapper(string $protocol, string $classname, int $flags = 0): bool {} +function stream_register_wrapper(string $protocol, string $class, int $flags = 0): bool {} function stream_wrapper_unregister(string $protocol): bool {} @@ -56,16 +56,16 @@ function stream_wrapper_restore(string $protocol): bool {} /* array.c */ -function array_push(array &$stack, mixed ...$values): int {} +function array_push(array &$array, mixed ...$values): int {} function krsort(array &$array, int $flags = SORT_REGULAR): bool {} function ksort(array &$array, int $flags = SORT_REGULAR): bool {} -function count(Countable|array $var, int $mode = COUNT_NORMAL): int {} +function count(Countable|array $value, int $mode = COUNT_NORMAL): int {} /** @alias count */ -function sizeof(Countable|array $var, int $mode = COUNT_NORMAL): int {} +function sizeof(Countable|array $value, int $mode = COUNT_NORMAL): int {} function natsort(array &$array): bool {} @@ -85,35 +85,35 @@ function uasort(array &$array, callable $callback): bool {} function uksort(array &$array, callable $callback): bool {} -function end(array|object &$arg): mixed {} +function end(array|object &$array): mixed {} -function prev(array|object &$arg): mixed {} +function prev(array|object &$array): mixed {} -function next(array|object &$arg): mixed {} +function next(array|object &$array): mixed {} -function reset(array|object &$arg): mixed {} +function reset(array|object &$array): mixed {} -function current(array|object $arg): mixed {} +function current(array|object $array): mixed {} /** @alias current */ -function pos(array|object $arg): mixed {} +function pos(array|object $array): mixed {} -function key(array|object $arg): int|string|null {} +function key(array|object $array): int|string|null {} -function min(mixed $arg, mixed ...$args): mixed {} +function min(mixed $value, mixed ...$values): mixed {} -function max(mixed $arg, mixed ...$args): mixed {} +function max(mixed $value, mixed ...$values): mixed {} -function array_walk(array|object &$input, callable $callback, mixed $argument = UNKNOWN): bool {} +function array_walk(array|object &$array, callable $callback, mixed $arg = UNKNOWN): bool {} -function array_walk_recursive(array|object &$input, callable $callback, mixed $argument = UNKNOWN): bool {} +function array_walk_recursive(array|object &$array, callable $callback, mixed $arg = UNKNOWN): bool {} function in_array(mixed $needle, array $haystack, bool $strict = false): bool {} function array_search(mixed $needle, array $haystack, bool $strict = false): int|string|false {} /** @prefer-ref $array */ -function extract(array &$array, int $extract_type = EXTR_OVERWRITE, string $prefix = ""): int {} +function extract(array &$array, int $flags = EXTR_OVERWRITE, string $prefix = ""): int {} /** * @param array|string $var_name @@ -121,25 +121,25 @@ function extract(array &$array, int $extract_type = EXTR_OVERWRITE, string $pref */ function compact($var_name, ...$var_names): array {} -function array_fill(int $start_key, int $count, mixed $value): array {} +function array_fill(int $start_index, int $count, mixed $value): array {} function array_fill_keys(array $keys, mixed $value): array {} /** - * @param string|int|float $low - * @param string|int|float $high + * @param string|int|float $start + * @param string|int|float $end */ -function range($low, $high, int|float $step = 1): array {} +function range($start, $end, int|float $step = 1): array {} function shuffle(array &$array): bool {} -function array_pop(array &$stack): mixed {} +function array_pop(array &$array): mixed {} -function array_shift(array &$stack): mixed {} +function array_shift(array &$array): mixed {} -function array_unshift(array &$stack, mixed ...$values): int {} +function array_unshift(array &$array, mixed ...$values): int {} -function array_splice(array &$array, int $offset, ?int $length = null, mixed $replacements = []): array {} +function array_splice(array &$array, int $offset, ?int $length = null, mixed $replacement = []): array {} function array_slice(array $array, int $offset, ?int $length = null, bool $preserve_keys = false): array {} @@ -165,7 +165,7 @@ function array_column(array $array, int|string|null $column_key, int|string|null function array_reverse(array $array, bool $preserve_keys = false): array {} -function array_pad(array $array, int $pad_size, mixed $pad_value): array {} +function array_pad(array $array, int $length, mixed $value): array {} function array_flip(array $array): array {} @@ -216,14 +216,14 @@ function array_udiff_assoc(array $array, ...$rest): array {} function array_udiff_uassoc(array $array, ...$rest): array {} /** - * @param array $array1 + * @param array $array * @param array|int $rest - * @prefer-ref $array1 + * @prefer-ref $array * @prefer-ref $rest */ -function array_multisort(&$array1, &...$rest): bool {} +function array_multisort(&$array, &...$rest): bool {} -function array_rand(array $array, int $num_req = 1): int|string|array {} +function array_rand(array $array, int $num = 1): int|string|array {} function array_sum(array $array): int|float {} @@ -231,7 +231,7 @@ function array_product(array $array): int|float {} function array_reduce(array $array, callable $callback, mixed $initial = null): mixed {} -function array_filter(array $array, ?callable $callback = null, int $use_keys = 0): array {} +function array_filter(array $array, ?callable $callback = null, int $mode = 0): array {} function array_map(?callable $callback, array $array, array ...$arrays): array {} @@ -244,32 +244,32 @@ function array_key_exists($key, array $array): bool {} */ function key_exists($key, array $array): bool {} -function array_chunk(array $array, int $size, bool $preserve_keys = false): array {} +function array_chunk(array $array, int $length, bool $preserve_keys = false): array {} function array_combine(array $keys, array $values): array {} /* base64.c */ -function base64_encode(string $str): string {} +function base64_encode(string $string): string {} -function base64_decode(string $str, bool $strict = false): string|false {} +function base64_decode(string $string, bool $strict = false): string|false {} /* basic_functions.c */ function constant(string $name): mixed {} -function ip2long(string $ip_address): int|false {} +function ip2long(string $ip): int|false {} -function long2ip(int $proper_address): string|false {} +function long2ip(int $ip): string|false {} -function getenv(?string $variable = null, bool $local_only = false): string|array|false {} +function getenv(?string $name = null, bool $local_only = false): string|array|false {} #ifdef HAVE_PUTENV -function putenv(string $setting): bool {} +function putenv(string $assignment): bool {} #endif -/** @param int $optind */ -function getopt(string $options, array $longopts = [], &$optind = null): array|false {} +/** @param int $rest_index */ +function getopt(string $short_options, array $long_options = [], &$rest_index = null): array|false {} function flush(): void {} @@ -285,23 +285,23 @@ function time_sleep_until(float $timestamp): bool {} function get_current_user(): string {} -function get_cfg_var(string $option_name): string|array|false {} +function get_cfg_var(string $name): string|array|false {} -function error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $extra_headers = null): bool {} +function error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $additional_headers = null): bool {} function error_get_last(): ?array {} function error_clear_last(): void {} -function call_user_func(callable $function, mixed ...$args): mixed {} +function call_user_func(callable $callback, mixed ...$args): mixed {} -function call_user_func_array(callable $function, array $args): mixed {} +function call_user_func_array(callable $callback, array $args): mixed {} -function forward_static_call(callable $function, mixed ...$args): mixed {} +function forward_static_call(callable $callback, mixed ...$args): mixed {} -function forward_static_call_array(callable $function, array $args): mixed {} +function forward_static_call_array(callable $callback, array $args): mixed {} -function register_shutdown_function(callable $function, mixed ...$args): ?bool {} +function register_shutdown_function(callable $callback, mixed ...$args): ?bool {} function highlight_file(string $filename, bool $return = false): string|bool {} @@ -312,28 +312,28 @@ function php_strip_whitespace(string $filename): string {} function highlight_string(string $string, bool $return = false): string|bool {} -function ini_get(string $varname): string|false {} +function ini_get(string $name): string|false {} function ini_get_all(?string $extension = null, bool $details = true): array|false {} -function ini_set(string $varname, string $value): string|false {} +function ini_set(string $name, string $value): string|false {} /** @alias ini_set */ -function ini_alter(string $varname, string $value): string|false {} +function ini_alter(string $name, string $value): string|false {} -function ini_restore(string $varname): void {} +function ini_restore(string $name): void {} function set_include_path(string $include_path): string|false {} function get_include_path(): string|false {} -function print_r(mixed $var, bool $return = false): string|bool {} +function print_r(mixed $value, bool $return = false): string|bool {} function connection_aborted(): int {} function connection_status(): int {} -function ignore_user_abort(?bool $value = null): int {} +function ignore_user_abort(?bool $enable = null): int {} #if HAVE_GETSERVBYNAME function getservbyname(string $service, string $protocol): int|false {} @@ -344,20 +344,20 @@ function getservbyport(int $port, string $protocol): string|false {} #endif #if HAVE_GETPROTOBYNAME -function getprotobyname(string $name): int|false {} +function getprotobyname(string $protocol): int|false {} #endif #if HAVE_GETPROTOBYNUMBER function getprotobynumber(int $protocol): string|false {} #endif -function register_tick_function(callable $function, mixed ...$args): bool {} +function register_tick_function(callable $callback, mixed ...$args): bool {} -function unregister_tick_function(callable $function): void {} +function unregister_tick_function(callable $callback): void {} -function is_uploaded_file(string $path): bool {} +function is_uploaded_file(string $filename): bool {} -function move_uploaded_file(string $path, string $new_path): bool {} +function move_uploaded_file(string $from, string $to): bool {} function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array|false {} @@ -373,15 +373,15 @@ function sys_getloadavg(): array|false {} /* browscap.c */ -function get_browser(?string $browser_name = null, bool $return_array = false): object|array|false {} +function get_browser(?string $user_agent = null, bool $return_array = false): object|array|false {} /* crc32.c */ -function crc32(string $str): int {} +function crc32(string $string): int {} /* crypt.c */ -function crypt(string $str, string $salt): string {} +function crypt(string $string, string $salt): string {} /* datetime.c */ @@ -395,7 +395,7 @@ function strptime(string $timestamp, string $format): array|false {} function gethostname(): string|false {} #endif -function gethostbyaddr(string $ip_address): string|false {} +function gethostbyaddr(string $ip): string|false {} function gethostbyname(string $hostname): string {} @@ -408,23 +408,23 @@ function dns_check_record(string $hostname, string $type = "MX"): bool {} function checkdnsrr(string $hostname, string $type = "MX"): bool {} /** - * @param array $authns - * @param array $addtl + * @param array $authoritative_name_servers + * @param array $additional_records */ -function dns_get_record(string $hostname, int $type = DNS_ANY, &$authns = null, &$addtl = null, bool $raw = false): array|false {} +function dns_get_record(string $hostname, int $type = DNS_ANY, &$authoritative_name_servers = null, &$additional_records = null, bool $raw = false): array|false {} /** - * @param array $mxhosts - * @param array $weight + * @param array $hosts + * @param array $weights */ -function dns_get_mx(string $hostname, &$mxhosts, &$weight = null): bool {} +function dns_get_mx(string $hostname, &$hosts, &$weights = null): bool {} /** - * @param array $mxhosts - * @param array $weight + * @param array $hosts + * @param array $weights * @alias dns_get_mx */ -function getmxrr(string $hostname, &$mxhosts, &$weight = null): bool {} +function getmxrr(string $hostname, &$hosts, &$weights = null): bool {} #endif /* net.c */ @@ -434,12 +434,12 @@ function net_get_interfaces(): array|false {} /* ftok.c */ #if HAVE_FTOK -function ftok(string $pathname, string $proj): int {} +function ftok(string $filename, string $project_id): int {} #endif /* hrtime.c */ -function hrtime(bool $get_as_number = false): array|int|float|false {} +function hrtime(bool $as_number = false): array|int|float|false {} /* lcg.c */ @@ -447,9 +447,9 @@ function lcg_value(): float {} /* md5.c */ -function md5(string $str, bool $raw_output = false): string {} +function md5(string $string, bool $binary = false): string {} -function md5_file(string $filename, bool $raw_output = false): string|false {} +function md5_file(string $filename, bool $binary = false): string|false {} /* pageinfo.c */ @@ -465,14 +465,14 @@ function getlastmod(): int {} /* sha1.c */ -function sha1(string $str, bool $raw_output = false): string {} +function sha1(string $string, bool $binary = false): string {} -function sha1_file(string $filename, bool $raw_output = false): string|false {} +function sha1_file(string $filename, bool $binary = false): string|false {} /* syslog.c */ #ifdef HAVE_SYSLOG_H -function openlog(string $ident, int $option, int $facility): bool {} +function openlog(string $prefix, int $flags, int $facility): bool {} function closelog(): bool {} @@ -480,19 +480,19 @@ function syslog(int $priority, string $message): bool {} #endif #ifdef HAVE_INET_NTOP -function inet_ntop(string $in_addr): string|false {} +function inet_ntop(string $ip): string|false {} #endif #ifdef HAVE_INET_PTON -function inet_pton(string $ip_address): string|false {} +function inet_pton(string $ip): string|false {} #endif /* metaphone.c */ -function metaphone(string $text, int $phonemes = 0): string {} +function metaphone(string $string, int $max_phonemes = 0): string {} /* {{{ head.c */ -function header(string $string, bool $replace = true, int $http_response_code = 0): void {} +function header(string $header, bool $replace = true, int $response_code = 0): void {} function header_remove(?string $name = null): void {} @@ -503,24 +503,24 @@ function setcookie(string $name, string $value = "", array|int $expires_or_optio function http_response_code(int $response_code = 0): int|bool {} /** - * @param string $file + * @param string $filename * @param int $line */ -function headers_sent(&$file = null, &$line = null): bool {} +function headers_sent(&$filename = null, &$line = null): bool {} function headers_list(): array {} /* {{{ html.c */ -function htmlspecialchars(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {} +function htmlspecialchars(string $string, int $flags = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {} -function htmlspecialchars_decode(string $string, int $quote_style = ENT_COMPAT): string {} +function htmlspecialchars_decode(string $string, int $flags = ENT_COMPAT): string {} -function html_entity_decode(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null): string {} +function html_entity_decode(string $string, int $flags = ENT_COMPAT, ?string $encoding = null): string {} -function htmlentities(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {} +function htmlentities(string $string, int $flags = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {} -function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $quote_style = ENT_COMPAT, string $encoding = "UTF-8"): array {} +function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $flags = ENT_COMPAT, string $encoding = "UTF-8"): array {} /* }}} */ @@ -529,53 +529,53 @@ function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $quote_s function assert(mixed $assertion, Throwable|string|null $description = null): bool {} /** @param string|callable|null $value */ -function assert_options(int $what, $value = UNKNOWN): array|object|int|string|null {} +function assert_options(int $option, $value = UNKNOWN): array|object|int|string|null {} /* string.c */ -function bin2hex(string $data): string {} +function bin2hex(string $string): string {} -function hex2bin(string $data): string|false {} +function hex2bin(string $string): string|false {} -function strspn(string $str, string $mask, int $start = 0, ?int $len = null): int {} +function strspn(string $string, string $characters, int $offset = 0, ?int $length = null): int {} -function strcspn(string $str, string $mask, int $start = 0, ?int $len = null): int {} +function strcspn(string $string, string $characters, int $offset = 0, ?int $length = null): int {} #if HAVE_NL_LANGINFO function nl_langinfo(int $item): string|false {} #endif -function strcoll(string $str1, string $str2): int {} +function strcoll(string $string1, string $string2): int {} -function trim(string $str, string $character_mask = " \n\r\t\v\0"): string {} +function trim(string $string, string $characters = " \n\r\t\v\0"): string {} -function rtrim(string $str, string $character_mask = " \n\r\t\v\0"): string {} +function rtrim(string $string, string $characters = " \n\r\t\v\0"): string {} /** @alias rtrim */ -function chop(string $str, string $character_mask = " \n\r\t\v\0"): string {} +function chop(string $string, string $characters = " \n\r\t\v\0"): string {} -function ltrim(string $str, string $character_mask = " \n\r\t\v\0"): string {} +function ltrim(string $string, string $characters = " \n\r\t\v\0"): string {} -function wordwrap(string $str, int $width = 75, string $break = "\n", bool $cut = false): string {} +function wordwrap(string $string, int $width = 75, string $break = "\n", bool $cut_long_words = false): string {} -function explode(string $separator, string $str, int $limit = PHP_INT_MAX): array {} +function explode(string $separator, string $string, int $limit = PHP_INT_MAX): array {} -function implode(string|array $glue, ?array $pieces = null): string {} +function implode(string|array $separator, ?array $array = null): string {} /** @alias implode */ -function join(string|array $glue, ?array $pieces = null): string {} +function join(string|array $separator, ?array $array = null): string {} -function strtok(string $str, ?string $token = null): string|false {} +function strtok(string $string, ?string $token = null): string|false {} -function strtoupper(string $str): string {} +function strtoupper(string $string): string {} -function strtolower(string $str): string {} +function strtolower(string $string): string {} function basename(string $path, string $suffix = ""): string {} function dirname(string $path, int $levels = 1): string {} -function pathinfo(string $path, int $options = PATHINFO_ALL): array|string {} +function pathinfo(string $path, int $flags = PATHINFO_ALL): array|string {} function stristr(string $haystack, string $needle, bool $before_needle = false): string|false {} @@ -600,50 +600,50 @@ function str_starts_with(string $haystack, string $needle): bool {} function str_ends_with(string $haystack, string $needle): bool {} -function chunk_split(string $str, int $chunklen = 76, string $ending = "\r\n"): string {} +function chunk_split(string $string, int $length = 76, string $separator = "\r\n"): string {} -function substr(string $str, int $start, ?int $length = null): string {} +function substr(string $string, int $offset, ?int $length = null): string {} -function substr_replace(array|string $str, array|string $replace, array|int $start, array|int|null $length = null): string|array {} +function substr_replace(array|string $string, array|string $replace, array|int $offset, array|int|null $length = null): string|array {} -function quotemeta(string $str): string {} +function quotemeta(string $string): string {} function ord(string $character): int {} function chr(int $codepoint): string {} -function ucfirst(string $str): string {} +function ucfirst(string $string): string {} -function lcfirst(string $str): string {} +function lcfirst(string $string): string {} -function ucwords(string $str, string $delimiters = " \t\r\n\f\v"): string {} +function ucwords(string $string, string $separators = " \t\r\n\f\v"): string {} -function strtr(string $str, string|array $from, ?string $to = null): string {} +function strtr(string $string, string|array $from, ?string $to = null): string {} -function strrev(string $str): string {} +function strrev(string $string): string {} /** @param float $percent */ -function similar_text(string $str1, string $str2, &$percent = null): int {} +function similar_text(string $string1, string $string2, &$percent = null): int {} -function addcslashes(string $str, string $charlist): string {} +function addcslashes(string $string, string $characters): string {} -function addslashes(string $str): string {} +function addslashes(string $string): string {} -function stripcslashes(string $str): string {} +function stripcslashes(string $string): string {} -function stripslashes(string $str): string {} +function stripslashes(string $string): string {} -/** @param int $replace_count */ -function str_replace(array|string $search, array|string $replace, string|array $subject, &$replace_count = null): string|array {} +/** @param int $count */ +function str_replace(array|string $search, array|string $replace, string|array $subject, &$count = null): string|array {} -/** @param int $replace_count */ -function str_ireplace(array|string $search, array|string $replace, string|array $subject, &$replace_count = null): string|array {} +/** @param int $count */ +function str_ireplace(array|string $search, array|string $replace, string|array $subject, &$count = null): string|array {} -function hebrev(string $str, int $max_chars_per_line = 0): string {} +function hebrev(string $string, int $max_chars_per_line = 0): string {} -function nl2br(string $str, bool $is_xhtml = true): string {} +function nl2br(string $string, bool $use_xhtml = true): string {} -function strip_tags(string $str, array|string|null $allowable_tags = null): string {} +function strip_tags(string $string, array|string|null $allowed_tags = null): string {} /** * @param array|string $locales @@ -654,54 +654,56 @@ function setlocale(int $category, $locales, ...$rest): string|false {} /** @param array $result */ function parse_str(string $string, &$result): void {} -function str_getcsv(string $string, string $delimiter = ",", string $enclosure = "\"", string $escape = '\\'): array {} +function str_getcsv(string $string, string $separator = ",", string $enclosure = "\"", string $escape = '\\'): array {} -function str_repeat(string $input, int $mult): string {} +function str_repeat(string $string, int $times): string {} -function count_chars(string $input, int $mode = 0): array|string {} +function count_chars(string $string, int $mode = 0): array|string {} -function strnatcmp(string $s1, string $s2): int {} +function strnatcmp(string $string1, string $string2): int {} function localeconv(): array {} -function strnatcasecmp(string $s1, string $s2): int {} +function strnatcasecmp(string $string1, string $string2): int {} function substr_count(string $haystack, string $needle, int $offset = 0, ?int $length = null): int {} -function str_pad(string $input, int $pad_length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT): string {} +function str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT): string {} -function sscanf(string $str, string $format, mixed &...$vars): array|int|null {} +function sscanf(string $string, string $format, mixed &...$vars): array|int|null {} -function str_rot13(string $str): string {} +function str_rot13(string $string): string {} -function str_shuffle(string $str): string {} +function str_shuffle(string $string): string {} -function str_word_count(string $str, int $format = 0, ?string $charlist = null): array|int {} +function str_word_count(string $string, int $format = 0, ?string $characters = null): array|int {} -function str_split(string $str, int $length = 1): array {} +function str_split(string $string, int $length = 1): array {} -function strpbrk(string $haystack, string $char_list): string|false {} +function strpbrk(string $string, string $characters): string|false {} -function substr_compare(string $main_str, string $str, int $offset, ?int $length = null, bool $case_insensitivity = false): int {} +function substr_compare(string $haystack, string $needle, int $offset, ?int $length = null, bool $case_insensitive = false): int {} -function utf8_encode(string $data): string {} +function utf8_encode(string $string): string {} -function utf8_decode(string $data): string {} +function utf8_decode(string $string): string {} + +/* dir.c */ /** * @param resource|null $context * @return resource|false */ -function opendir(string $path, $context = null) {} +function opendir(string $directory, $context = null) {} /** @param resource $context */ -function getdir(string $path, $context = null): Directory|false {} +function getdir(string $directory, $context = null): Directory|false {} /** * @param resource|null $context * @alias getdir */ -function dir(string $path, $context = null): Directory|false {} +function dir(string $directory, $context = null): Directory|false {} /** @param resource|null $dir_handle */ function closedir($dir_handle = null): void {} @@ -754,10 +756,10 @@ function proc_nice(int $priority): bool {} /* file.c */ /** - * @param resource $handle - * @param int $wouldblock + * @param resource $stream + * @param int $would_block */ -function flock($handle, int $operation, &$wouldblock = null): bool {} +function flock($stream, int $operation, &$would_block = null): bool {} function get_meta_tags(string $filename, bool $use_include_path = false): array|false {} @@ -770,28 +772,28 @@ function popen(string $command, string $mode) {} /** @param resource|null $context */ function readfile(string $filename, bool $use_include_path = false, $context = null): int|false {} -/** @param resource $handle */ -function rewind($handle): bool {} +/** @param resource $stream */ +function rewind($stream): bool {} /** @param resource|null $context */ -function rmdir(string $dirname, $context = null): bool {} +function rmdir(string $directory, $context = null): bool {} function umask(?int $mask = null): int {} -/** @param resource $handle */ -function fclose($handle): bool {} +/** @param resource $stream */ +function fclose($stream): bool {} -/** @param resource $handle */ -function feof($handle): bool {} +/** @param resource $stream */ +function feof($stream): bool {} -/** @param resource $handle */ -function fgetc($handle): string|false {} +/** @param resource $stream */ +function fgetc($stream): string|false {} -/** @param resource $handle */ -function fgets($handle, ?int $length = null): string|false {} +/** @param resource $stream */ +function fgets($stream, ?int $length = null): string|false {} -/** @param resource $handle */ -function fread($handle, int $length): string|false {} +/** @param resource $stream */ +function fread($stream, int $length): string|false {} /** * @param resource|null $context @@ -800,45 +802,45 @@ function fread($handle, int $length): string|false {} function fopen(string $filename, string $mode, bool $use_include_path = false, $context = null) {} /** @param resource $stream */ -function fscanf($stream, string $format, mixed &...$args): array|int|false|null {} +function fscanf($stream, string $format, mixed &...$vars): array|int|false|null {} -/** @param resource $handle */ -function fpassthru($handle): int {} +/** @param resource $stream */ +function fpassthru($stream): int {} -/** @param resource $handle */ -function ftruncate($handle, int $size): bool {} +/** @param resource $stream */ +function ftruncate($stream, int $size): bool {} -/** @param resource $handle */ -function fstat($handle): array|false {} +/** @param resource $stream */ +function fstat($stream): array|false {} -/** @param resource $handle */ -function fseek($handle, int $offset, int $whence = SEEK_SET): int {} +/** @param resource $stream */ +function fseek($stream, int $offset, int $whence = SEEK_SET): int {} -/** @param resource $handle */ -function ftell($handle): int|false {} +/** @param resource $stream */ +function ftell($stream): int|false {} -/** @param resource $handle */ -function fflush($handle): bool {} +/** @param resource $stream */ +function fflush($stream): bool {} -/** @param resource $handle */ -function fwrite($handle, string $content, ?int $max_length = null): int|false {} +/** @param resource $stream */ +function fwrite($stream, string $string, ?int $max_length = null): int|false {} /** - * @param resource $handle + * @param resource $stream * @alias fwrite */ -function fputs($handle, string $content, ?int $max_length = null): int|false {} +function fputs($stream, string $string, ?int $max_length = null): int|false {} /** @param resource|null $context */ -function mkdir(string $pathname, int $mode = 0777, bool $recursive = false, $context = null): bool {} +function mkdir(string $directory, int $mode = 0777, bool $recursive = false, $context = null): bool {} /** @param resource|null $context */ -function rename(string $oldname, string $newname, $context = null): bool {} +function rename(string $from, string $to, $context = null): bool {} /** @param resource|null $context */ -function copy(string $source, string $dest, $context = null): bool {} +function copy(string $from, string $to, $context = null): bool {} -function tempnam(string $dir, string $prefix): string|false {} +function tempnam(string $directory, string $prefix): string|false {} /** @return resource|false */ function tmpfile() {} @@ -847,7 +849,7 @@ function tmpfile() {} function file(string $filename, int $flags = 0, $context = null): array|false {} /** @param resource|null $context */ -function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, ?int $maxlen = null): string|false {} +function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, ?int $max_length = null): string|false {} /** @param resource|null $context */ function unlink(string $filename, $context = null): bool {} @@ -855,11 +857,11 @@ function unlink(string $filename, $context = null): bool {} /** @param resource|null $context */ function file_put_contents(string $filename, mixed $content, int $flags = 0, $context = null): int|false {} -/** @param resource $handle */ -function fputcsv($handle, array $fields, string $delimiter = ",", string $enclosure = "\"", string $escape = "\\"): int|false {} +/** @param resource $stream */ +function fputcsv($stream, array $fields, string $separator = ",", string $enclosure = "\"", string $escape = "\\"): int|false {} -/** @param resource $handle */ -function fgetcsv($handle, ?int $length = null, string $delimiter = ",", string $enclosure = "\"", string $escape = "\\"): array|false {} +/** @param resource $stream */ +function fgetcsv($stream, ?int $length = null, string $separator = ",", string $enclosure = "\"", string $escape = "\\"): array|false {} function realpath(string $path): string|false {} @@ -923,7 +925,7 @@ function lchgrp(string $filename, string|int $group): bool {} function chmod(string $filename, int $mode): bool {} #if HAVE_UTIME -function touch(string $filename, ?int $time = null, ?int $atime = null): bool {} +function touch(string $filename, ?int $mtime = null, ?int $atime = null): bool {} #endif function clearstatcache(bool $clear_realpath_cache = false, string $filename = ""): void {} @@ -941,39 +943,39 @@ function realpath_cache_size(): int {} /* formatted_print.c */ -function sprintf(string $format, mixed ...$args): string {} +function sprintf(string $format, mixed ...$values): string {} -function printf(string $format, mixed ...$args): int {} +function printf(string $format, mixed ...$values): int {} -function vprintf(string $format, array $args): int {} +function vprintf(string $format, array $values): int {} -function vsprintf(string $format, array $args): string {} +function vsprintf(string $format, array $values): string {} -/** @param resource $handle */ -function fprintf($handle, string $format, mixed ...$args): int {} +/** @param resource $stream */ +function fprintf($stream, string $format, mixed ...$values): int {} -/** @param resource $handle */ -function vfprintf($handle, string $format, array $args): int {} +/** @param resource $stream */ +function vfprintf($stream, string $format, array $values): int {} /* fsock.c */ /** - * @param int $errno - * @param string $errstr + * @param int $error_code + * @param string $error_message * @return resource|false */ -function fsockopen(string $hostname, int $port = -1, &$errno = null, &$errstr = null, ?float $timeout = null) {} +function fsockopen(string $hostname, int $port = -1, &$error_code = null, &$error_message = null, ?float $timeout = null) {} /** - * @param int $errno - * @param string $errstr + * @param int $error_code + * @param string $error_message * @return resource|false */ -function pfsockopen(string $hostname, int $port = -1, &$errno = null, &$errstr = null, ?float $timeout = null) {} +function pfsockopen(string $hostname, int $port = -1, &$error_code = null, &$error_message = null, ?float $timeout = null) {} /* http.c */ -function http_build_query(array|object $data, string $numeric_prefix = "", ?string $arg_separator = null, int $enc_type = PHP_QUERY_RFC1738): string {} +function http_build_query(array|object $data, string $numeric_prefix = "", ?string $arg_separator = null, int $encoding_type = PHP_QUERY_RFC1738): string {} /* image.c */ @@ -982,18 +984,18 @@ function image_type_to_mime_type(int $image_type): string {} function image_type_to_extension(int $image_type, bool $include_dot = true): string|false {} /** @param array $image_info */ -function getimagesize(string $image_path, &$image_info = null): array|false {} +function getimagesize(string $filename, &$image_info = null): array|false {} /** @param array $image_info */ -function getimagesizefromstring(string $image, &$image_info = null): array|false {} +function getimagesizefromstring(string $string, &$image_info = null): array|false {} /* info.c */ -function phpinfo(int $what = INFO_ALL): bool {} +function phpinfo(int $flags = INFO_ALL): bool {} function phpversion(?string $extension = null): string|false {} -function phpcredits(int $flag = CREDITS_ALL): bool {} +function phpcredits(int $flags = CREDITS_ALL): bool {} function php_sapi_name(): string|false {} @@ -1005,13 +1007,13 @@ function php_ini_loaded_file(): string|false {} /* iptc.c */ -function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0): string|bool {} +function iptcembed(string $iptc_data, string $filename, int $spool = 0): string|bool {} -function iptcparse(string $iptcblock): array|false {} +function iptcparse(string $iptc_block): array|false {} /* levenshtein.c */ -function levenshtein(string $str1, string $str2, int $cost_ins = 1, int $cost_rep = 1, int $cost_del = 1): int {} +function levenshtein(string $string1, string $string2, int $insertion_cost = 1, int $repetition_cost = 1, int $deletion_cost = 1): int {} /* link.c */ @@ -1031,69 +1033,69 @@ function mail(string $to, string $subject, string $message, array|string $additi /* math.c */ -function abs(int|float $number): int|float {} +function abs(int|float $num): int|float {} -function ceil(int|float $number): float {} +function ceil(int|float $num): float {} -function floor(int|float $number): float {} +function floor(int|float $num): float {} -function round(int|float $number, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float {} +function round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float {} -function sin(float $number): float {} +function sin(float $num): float {} -function cos(float $number): float {} +function cos(float $num): float {} -function tan(float $number): float {} +function tan(float $num): float {} -function asin(float $number): float {} +function asin(float $num): float {} -function acos(float $number): float {} +function acos(float $num): float {} -function atan(float $number): float {} +function atan(float $num): float {} -function atanh(float $number): float {} +function atanh(float $num): float {} function atan2(float $y, float $x): float {} -function sinh(float $number): float {} +function sinh(float $num): float {} -function cosh(float $number): float {} +function cosh(float $num): float {} -function tanh(float $number): float {} +function tanh(float $num): float {} -function asinh(float $number): float {} +function asinh(float $num): float {} -function acosh(float $number): float {} +function acosh(float $num): float {} -function expm1(float $number): float {} +function expm1(float $num): float {} -function log1p(float $number): float {} +function log1p(float $num): float {} function pi(): float {} -function is_finite(float $number): bool {} +function is_finite(float $num): bool {} -function is_nan(float $number): bool {} +function is_nan(float $num): bool {} -function intdiv(int $dividend, int $divisor): int {} +function intdiv(int $num1, int $num2): int {} -function is_infinite(float $number): bool {} +function is_infinite(float $num): bool {} -function pow(mixed $base, mixed $exp): int|float|object {} +function pow(mixed $num, mixed $exponent): int|float|object {} -function exp(float $number): float {} +function exp(float $num): float {} -function log(float $number, float $base = M_E): float {} +function log(float $num, float $base = M_E): float {} -function log10(float $number): float {} +function log10(float $num): float {} -function sqrt(float $number): float {} +function sqrt(float $num): float {} function hypot(float $x, float $y): float {} -function deg2rad(float $number): float {} +function deg2rad(float $num): float {} -function rad2deg(float $number): float {} +function rad2deg(float $num): float {} function bindec(string $binary_string): int|float {} @@ -1101,37 +1103,37 @@ function hexdec(string $hex_string): int|float {} function octdec(string $octal_string): int|float {} -function decbin(int $number): string {} +function decbin(int $num): string {} -function decoct(int $number): string {} +function decoct(int $num): string {} -function dechex(int $number): string {} +function dechex(int $num): string {} -function base_convert(string $number, int $frombase, int $tobase): string {} +function base_convert(string $num, int $from_base, int $to_base): string {} -function number_format(float $number, int $decimals = 0, ?string $decimal_point = "." , ?string $thousands_separator = ","): string {} +function number_format(float $num, int $decimals = 0, ?string $decimal_separator = "." , ?string $thousands_separator = ","): string {} -function fmod(float $x, float $y): float {} +function fmod(float $num1, float $num2): float {} -function fdiv(float $dividend, float $divisor): float {} +function fdiv(float $num1, float $num2): float {} /* microtime.c */ #ifdef HAVE_GETTIMEOFDAY -function microtime(bool $getAsFloat = false): string|float {} +function microtime(bool $as_float = false): string|float {} -function gettimeofday(bool $returnFloat = false): array|float {} +function gettimeofday(bool $as_float = false): array|float {} #endif #ifdef HAVE_GETRUSAGE -function getrusage(int $who = 0): array|false {} +function getrusage(bool $mode = 0): array|false {} #endif /* pack.c */ -function pack(string $format, mixed ...$args): string {} +function pack(string $format, mixed ...$values): string {} -function unpack(string $format, string $data, int $offset = 0): array|false {} +function unpack(string $format, string $string, int $offset = 0): array|false {} /* password.c */ @@ -1152,7 +1154,7 @@ function password_algos(): array {} * @param array $pipes * @return resource|false */ -function proc_open(array|string $cmd, array $descriptorspec, &$pipes, ?string $cwd = null, ?array $env = null, ?array $other_options = null) {} +function proc_open(array|string $command, array $descriptor_spec, &$pipes, ?string $cwd = null, ?array $env_vars = null, ?array $options = null) {} /** @param resource $process */ function proc_close($process): int {} @@ -1166,9 +1168,9 @@ function proc_get_status($process): array {} /* quot_print.c */ -function quoted_printable_decode(string $str): string {} +function quoted_printable_decode(string $string): string {} -function quoted_printable_encode(string $str): string {} +function quoted_printable_encode(string $string): string {} /* mt_rand.c */ @@ -1198,7 +1200,7 @@ function soundex(string $string): string {} /* streamsfuncs.c */ -function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $tv_sec, int $tv_usec = 0): int|false {} +function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds = 0): int|false {} /** @return resource */ function stream_context_create(?array $options = null, ?array $params = null) {} @@ -1225,43 +1227,43 @@ function stream_context_set_default(array $options) {} * @param resource $stream * @return resource|false */ -function stream_filter_prepend($stream, string $filtername, int $read_write = 0, mixed $params = UNKNOWN) {} +function stream_filter_prepend($stream, string $filter_name, int $mode = 0, mixed $params = UNKNOWN) {} /** * @param resource $stream * @return resource|false */ -function stream_filter_append($stream, string $filtername, int $read_write = 0, mixed $params = UNKNOWN) {} +function stream_filter_append($stream, string $filter_name, int $mode = 0, mixed $params = UNKNOWN) {} /** @param resource $stream_filter */ function stream_filter_remove($stream_filter): bool {} /** - * @param int $errno - * @param string $errstr + * @param int $error_code + * @param string $error_message * @param resource|null $context * @return resource|false */ -function stream_socket_client(string $remote_socket, &$errno = null, &$errstr = null, ?float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null) {} +function stream_socket_client(string $address, &$error_code = null, &$error_message = null, ?float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null) {} /** - * @param int $errno - * @param string $errstr + * @param int $error_code + * @param string $error_message * @param resource|null $context * @return resource|false */ -function stream_socket_server(string $local_socket, &$errno = null, &$errstr = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null) {} +function stream_socket_server(string $address, &$error_code = null, &$error_message = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null) {} /** - * @param resource $server_socket + * @param resource $socket * @param float $timeout - * @param string $peername + * @param string $peer_name * @return resource|false */ -function stream_socket_accept($server_socket, ?float $timeout = null, &$peername = null) {} +function stream_socket_accept($socket, ?float $timeout = null, &$peer_name = null) {} -/** @param resource $handle */ -function stream_socket_get_name($handle, bool $want_peer): string|false {} +/** @param resource $socket */ +function stream_socket_get_name($socket, bool $remote): string|false {} /** * @param resource $socket @@ -1280,7 +1282,7 @@ function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_type = #ifdef HAVE_SHUTDOWN /** @param resource $stream */ -function stream_socket_shutdown($stream, int $how): bool {} +function stream_socket_shutdown($stream, int $mode): bool {} #endif #if HAVE_SOCKETPAIR @@ -1288,37 +1290,37 @@ function stream_socket_pair(int $domain, int $type, int $protocol): array|false #endif /** - * @param resource $source - * @param resource $dest + * @param resource $from + * @param resource $to */ -function stream_copy_to_stream($source, $dest, ?int $maxlength = null, int $position = 0): int|false {} +function stream_copy_to_stream($from, $to, ?int $max_length = null, int $offset = 0): int|false {} -/** @param resource $handle */ -function stream_get_contents($handle, ?int $maxlength = null, int $position = -1): string|false {} +/** @param resource $stream */ +function stream_get_contents($stream, ?int $max_length = null, int $offset = -1): string|false {} /** @param resource $stream */ function stream_supports_lock($stream): bool {} /** @param resource $stream */ -function stream_set_write_buffer($stream, int $buffer): int {} +function stream_set_write_buffer($stream, int $size): int {} /** * @param resource $stream * @alias stream_set_write_buffer */ -function set_file_buffer($stream, int $buffer): int {} +function set_file_buffer($stream, int $size): int {} /** @param resource $stream */ -function stream_set_read_buffer($stream, int $buffer): int {} +function stream_set_read_buffer($stream, int $size): int {} /** @param resource $stream */ -function stream_set_blocking($stream, bool $mode): bool {} +function stream_set_blocking($stream, bool $enable): bool {} /** * @param resource $stream * @alias stream_set_blocking */ -function socket_set_blocking($stream, bool $mode): bool {} +function socket_set_blocking($stream, bool $enable): bool {} /** @param resource $stream */ function stream_get_meta_data($stream): array {} @@ -1329,8 +1331,8 @@ function stream_get_meta_data($stream): array {} */ function socket_get_status($stream): array {} -/** @param resource $handle */ -function stream_get_line($handle, int $max_length, string $ending = ""): string|false {} +/** @param resource $stream */ +function stream_get_line($stream, int $max_length, string $ending = ""): string|false {} function stream_resolve_include_path(string $filename): string|false {} @@ -1353,21 +1355,21 @@ function sapi_windows_vt100_support($stream, ?bool $enable = null): bool {} function stream_set_chunk_size($stream, int $size): int {} #if HAVE_SYS_TIME_H || defined(PHP_WIN32) -/** @param resource $socket */ -function stream_set_timeout($socket, int $seconds, int $microseconds = 0): bool {} +/** @param resource $stream */ +function stream_set_timeout($stream, int $seconds, int $microseconds = 0): bool {} /** - * @param resource $socket + * @param resource $stream * @alias stream_set_timeout */ -function socket_set_timeout($socket, int $seconds, int $microseconds = 0): bool {} +function socket_set_timeout($stream, int $seconds, int $microseconds = 0): bool {} #endif /* type.c */ -function gettype(mixed $var): string {} +function gettype(mixed $value): string {} -function get_debug_type(mixed $var): string {} +function get_debug_type(mixed $value): string {} function settype(mixed &$var, string $type): bool {} @@ -1438,7 +1440,8 @@ function rawurlencode(string $string): string {} function rawurldecode(string $string): string {} /** @param resource $context */ -function get_headers(string $url, int $format = 0, $context = null): array|false {} +// TODO: Make bool argument? +function get_headers(string $url, int $as_assoc_array = 0, $context = null): array|false {} /* user_filters.c */ @@ -1456,13 +1459,13 @@ function stream_bucket_new($stream, string $buffer): object {} function stream_get_filters(): array {} -function stream_filter_register(string $filtername, string $classname): bool {} +function stream_filter_register(string $filter_name, string $class): bool {} /* uuencode.c */ -function convert_uuencode(string $data): string {} +function convert_uuencode(string $string): string {} -function convert_uudecode(string $data): string|false {} +function convert_uudecode(string $string): string|false {} /* var.c */ @@ -1487,7 +1490,7 @@ function version_compare(string $version1, string $version2, ?string $operator = /* win32/codepage.c */ #ifdef PHP_WIN32 -function sapi_windows_cp_set(int $cp): bool {} +function sapi_windows_cp_set(int $codepage): bool {} function sapi_windows_cp_get(string $kind = ""): int {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index e3f8d508e1bc8..5ee5b9602900b 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 5e2daf7a5fb04bafdc57b7d3668b94fe573b8b2e */ + * Stub hash: af5b921b66f7dd68ba8c771199825a439a07dba0 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -10,7 +10,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_header_register_callback, 0, 1, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ob_start, 0, 0, _IS_BOOL, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, user_function, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, callback, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, chunk_size, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PHP_OUTPUT_HANDLER_STDFLAGS") ZEND_END_ARG_INFO() @@ -45,7 +45,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ob_get_status, 0, 0, IS_ARRAY, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ob_implicit_flush, 0, 0, IS_VOID, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flag, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #define arginfo_output_reset_rewrite_vars arginfo_ob_flush @@ -57,7 +57,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_wrapper_register, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, protocol, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, classname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, class, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -70,7 +70,7 @@ ZEND_END_ARG_INFO() #define arginfo_stream_wrapper_restore arginfo_stream_wrapper_unregister ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_push, 0, 1, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(1, stack, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(1, array, IS_ARRAY, 0) ZEND_ARG_VARIADIC_TYPE_INFO(0, values, IS_MIXED, 0) ZEND_END_ARG_INFO() @@ -82,7 +82,7 @@ ZEND_END_ARG_INFO() #define arginfo_ksort arginfo_krsort ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_count, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, var, Countable, MAY_BE_ARRAY, NULL) + ZEND_ARG_OBJ_TYPE_MASK(0, value, Countable, MAY_BE_ARRAY, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "COUNT_NORMAL") ZEND_END_ARG_INFO() @@ -112,7 +112,7 @@ ZEND_END_ARG_INFO() #define arginfo_uksort arginfo_usort ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_end, 0, 1, IS_MIXED, 0) - ZEND_ARG_TYPE_MASK(1, arg, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) + ZEND_ARG_TYPE_MASK(1, array, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_END_ARG_INFO() #define arginfo_prev arginfo_end @@ -122,26 +122,26 @@ ZEND_END_ARG_INFO() #define arginfo_reset arginfo_end ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_current, 0, 1, IS_MIXED, 0) - ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) + ZEND_ARG_TYPE_MASK(0, array, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_END_ARG_INFO() #define arginfo_pos arginfo_current ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_key, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL) - ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) + ZEND_ARG_TYPE_MASK(0, array, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_min, 0, 1, IS_MIXED, 0) - ZEND_ARG_TYPE_INFO(0, arg, IS_MIXED, 0) - ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) + ZEND_ARG_VARIADIC_TYPE_INFO(0, values, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_max arginfo_min ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_walk, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_MASK(1, input, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) + ZEND_ARG_TYPE_MASK(1, array, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) - ZEND_ARG_TYPE_INFO(0, argument, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, arg, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_array_walk_recursive arginfo_array_walk @@ -160,7 +160,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_extract, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(ZEND_SEND_PREFER_REF, array, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extract_type, IS_LONG, 0, "EXTR_OVERWRITE") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "EXTR_OVERWRITE") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prefix, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() @@ -170,7 +170,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_compact, 0, 1, IS_ARRAY, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_fill, 0, 3, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, start_key, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, start_index, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_END_ARG_INFO() @@ -181,15 +181,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_fill_keys, 0, 2, IS_ARRAY, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_range, 0, 2, IS_ARRAY, 0) - ZEND_ARG_INFO(0, low) - ZEND_ARG_INFO(0, high) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, end) ZEND_ARG_TYPE_MASK(0, step, MAY_BE_LONG|MAY_BE_DOUBLE, "1") ZEND_END_ARG_INFO() #define arginfo_shuffle arginfo_natsort ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_pop, 0, 1, IS_MIXED, 0) - ZEND_ARG_TYPE_INFO(1, stack, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(1, array, IS_ARRAY, 0) ZEND_END_ARG_INFO() #define arginfo_array_shift arginfo_array_pop @@ -200,7 +200,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_splice, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(1, array, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, replacements, IS_MIXED, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, replacement, IS_MIXED, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_slice, 0, 2, IS_ARRAY, 0) @@ -254,8 +254,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_pad, 0, 3, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, pad_size, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, pad_value, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_array_flip arginfo_array_values @@ -309,13 +309,13 @@ ZEND_END_ARG_INFO() #define arginfo_array_udiff_uassoc arginfo_array_intersect_ukey ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_multisort, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, array1) + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, array) ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, rest) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_rand, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_ARRAY) ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, num_req, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, num, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_sum, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE) @@ -333,7 +333,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_filter, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_keys, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_map, 0, 2, IS_ARRAY, 0) @@ -351,7 +351,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_chunk, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preserve_keys, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() @@ -361,11 +361,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_combine, 0, 2, IS_ARRAY, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_base64_encode, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_base64_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() @@ -374,28 +374,28 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_constant, 0, 1, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ip2long, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, ip, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_long2ip, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, proper_address, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, ip, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getenv, 0, 0, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, variable, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, local_only, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #if defined(HAVE_PUTENV) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_putenv, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, setting, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, assignment, IS_STRING, 0) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getopt, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, options, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, longopts, IS_ARRAY, 0, "[]") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, optind, "null") + ZEND_ARG_TYPE_INFO(0, short_options, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, long_options, IS_ARRAY, 0, "[]") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, rest_index, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_flush, 0, 0, IS_VOID, 0) @@ -426,14 +426,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_current_user, 0, 0, IS_STRIN ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_cfg_var, 0, 1, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, option_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_error_log, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, message_type, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, destination, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extra_headers, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_headers, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_error_get_last, 0, 0, IS_ARRAY, 1) @@ -442,12 +442,12 @@ ZEND_END_ARG_INFO() #define arginfo_error_clear_last arginfo_flush ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_call_user_func, 0, 1, IS_MIXED, 0) - ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_call_user_func_array, 0, 2, IS_MIXED, 0) - ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -456,7 +456,7 @@ ZEND_END_ARG_INFO() #define arginfo_forward_static_call_array arginfo_call_user_func_array ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_register_shutdown_function, 0, 1, _IS_BOOL, 1) - ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) ZEND_END_ARG_INFO() @@ -477,7 +477,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_highlight_string, 0, 1, MAY_BE_S ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, varname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get_all, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -486,14 +486,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get_all, 0, 0, MAY_BE_ARRAY| ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_set, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, varname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_ini_alter arginfo_ini_set ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ini_restore, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, varname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_set_include_path, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) @@ -503,7 +503,7 @@ ZEND_END_ARG_INFO() #define arginfo_get_include_path arginfo_ob_get_flush ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_print_r, 0, 1, MAY_BE_STRING|MAY_BE_BOOL) - ZEND_ARG_TYPE_INFO(0, var, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() @@ -512,7 +512,7 @@ ZEND_END_ARG_INFO() #define arginfo_connection_status arginfo_ob_get_level ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ignore_user_abort, 0, 0, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, _IS_BOOL, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 1, "null") ZEND_END_ARG_INFO() #if HAVE_GETSERVBYNAME @@ -531,7 +531,7 @@ ZEND_END_ARG_INFO() #if HAVE_GETPROTOBYNAME ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getprotobyname, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, protocol, IS_STRING, 0) ZEND_END_ARG_INFO() #endif @@ -542,21 +542,21 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_register_tick_function, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_unregister_tick_function, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_uploaded_file, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_move_uploaded_file, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, new_path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, from, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_parse_ini_file, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -582,16 +582,16 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_browser, 0, 0, MAY_BE_OBJECT|MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, browser_name, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user_agent, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return_array, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_crc32, 0, 1, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_crypt, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -608,7 +608,7 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gethostbyaddr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, ip, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gethostbyname, 0, 1, IS_STRING, 0) @@ -634,8 +634,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dns_get_record, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "DNS_ANY") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, authns, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, addtl, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, authoritative_name_servers, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, additional_records, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #endif @@ -643,8 +643,8 @@ ZEND_END_ARG_INFO() #if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dns_get_mx, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) - ZEND_ARG_INFO(1, mxhosts) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, weight, "null") + ZEND_ARG_INFO(1, hosts) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, weights, "null") ZEND_END_ARG_INFO() #endif @@ -657,26 +657,26 @@ ZEND_END_ARG_INFO() #if HAVE_FTOK ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftok, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, proj, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, project_id, IS_STRING, 0) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hrtime, 0, 0, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_as_number, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, as_number, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_lcg_value, 0, 0, IS_DOUBLE, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_md5, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_md5_file, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, raw_output, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #define arginfo_getmyuid arginfo_ob_get_length @@ -695,8 +695,8 @@ ZEND_END_ARG_INFO() #if defined(HAVE_SYSLOG_H) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openlog, 0, 3, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, ident, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, facility, IS_LONG, 0) ZEND_END_ARG_INFO() #endif @@ -715,25 +715,25 @@ ZEND_END_ARG_INFO() #if defined(HAVE_INET_NTOP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inet_ntop, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, in_addr, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, ip, IS_STRING, 0) ZEND_END_ARG_INFO() #endif #if defined(HAVE_INET_PTON) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inet_pton, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, ip, IS_STRING, 0) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_metaphone, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, phonemes, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_phonemes, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_header, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, header, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, replace, _IS_BOOL, 0, "true") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, http_response_code, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, response_code, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_header_remove, 0, 0, IS_VOID, 0) @@ -757,7 +757,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_http_response_code, 0, 0, MAY_BE ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_headers_sent, 0, 0, _IS_BOOL, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, file, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, filename, "null") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, line, "null") ZEND_END_ARG_INFO() @@ -765,19 +765,19 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_htmlspecialchars, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ENT_COMPAT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, double_encode, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_htmlspecialchars_decode, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ENT_COMPAT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_html_entity_decode, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ENT_COMPAT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -785,7 +785,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_html_translation_table, 0, 0, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, table, IS_LONG, 0, "HTML_SPECIALCHARS") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, quote_style, IS_LONG, 0, "ENT_COMPAT") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ENT_COMPAT") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 0, "\"UTF-8\"") ZEND_END_ARG_INFO() @@ -795,23 +795,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_assert, 0, 1, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_assert_options, 0, 1, MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL) - ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bin2hex, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_bin2hex arginfo_base64_encode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hex2bin, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strspn, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mask, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, len, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, characters, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() #define arginfo_strcspn arginfo_strspn @@ -823,13 +821,13 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strcoll, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, str1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str2, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_trim, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, character_mask, IS_STRING, 0, "\" \\n\\r\\t\\v\\0\"") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, characters, IS_STRING, 0, "\" \\n\\r\\t\\v\\0\"") ZEND_END_ARG_INFO() #define arginfo_rtrim arginfo_trim @@ -839,27 +837,27 @@ ZEND_END_ARG_INFO() #define arginfo_ltrim arginfo_trim ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_wordwrap, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, width, IS_LONG, 0, "75") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, break, IS_STRING, 0, "\"\\n\"") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cut, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cut_long_words, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_explode, 0, 2, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, separator, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "PHP_INT_MAX") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_implode, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, glue, MAY_BE_STRING|MAY_BE_ARRAY, NULL) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pieces, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_MASK(0, separator, MAY_BE_STRING|MAY_BE_ARRAY, NULL) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, array, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() #define arginfo_join arginfo_implode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtok, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, token, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -879,7 +877,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pathinfo, 0, 1, MAY_BE_ARRAY|MAY_BE_STRING) ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "PATHINFO_ALL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PATHINFO_ALL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stristr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -919,21 +917,21 @@ ZEND_END_ARG_INFO() #define arginfo_str_ends_with arginfo_str_contains ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chunk_split, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, chunklen, IS_LONG, 0, "76") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ending, IS_STRING, 0, "\"\\r\\n\"") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "76") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\"\\r\\n\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY) - ZEND_ARG_TYPE_MASK(0, str, MAY_BE_ARRAY|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_MASK(0, string, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_ARRAY|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_MASK(0, start, MAY_BE_ARRAY|MAY_BE_LONG, NULL) + ZEND_ARG_TYPE_MASK(0, offset, MAY_BE_ARRAY|MAY_BE_LONG, NULL) ZEND_ARG_TYPE_MASK(0, length, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_NULL, "null") ZEND_END_ARG_INFO() @@ -952,12 +950,12 @@ ZEND_END_ARG_INFO() #define arginfo_lcfirst arginfo_base64_encode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ucwords, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiters, IS_STRING, 0, "\" \\t\\r\\n\\f\\v\"") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separators, IS_STRING, 0, "\" \\t\\r\\n\\f\\v\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strtr, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, from, MAY_BE_STRING|MAY_BE_ARRAY, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, to, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -965,14 +963,14 @@ ZEND_END_ARG_INFO() #define arginfo_strrev arginfo_base64_encode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_similar_text, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, str1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str2, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, percent, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_addcslashes, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, charlist, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, characters, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_addslashes arginfo_base64_encode @@ -985,24 +983,24 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_str_replace, 0, 3, MAY_BE_STRING ZEND_ARG_TYPE_MASK(0, search, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY, NULL) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, replace_count, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, count, "null") ZEND_END_ARG_INFO() #define arginfo_str_ireplace arginfo_str_replace ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hebrev, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_chars_per_line, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_nl2br, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_xhtml, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_xhtml, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strip_tags, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, allowable_tags, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_MASK(0, allowed_tags, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_setlocale, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -1018,29 +1016,26 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_getcsv, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\",\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\",\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\'\\\\\'") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_repeat, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mult, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, times, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_count_chars, 0, 1, MAY_BE_ARRAY|MAY_BE_STRING) - ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strnatcmp, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, s1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, s2, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_strnatcmp arginfo_strcoll #define arginfo_localeconv arginfo_ob_list_handlers -#define arginfo_strnatcasecmp arginfo_strnatcmp +#define arginfo_strnatcasecmp arginfo_strcoll ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr_count, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) @@ -1050,14 +1045,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr_count, 0, 2, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_pad, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, pad_length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pad_string, IS_STRING, 0, "\" \"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pad_type, IS_LONG, 0, "STR_PAD_RIGHT") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sscanf, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_NULL) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0) ZEND_END_ARG_INFO() @@ -1067,40 +1062,40 @@ ZEND_END_ARG_INFO() #define arginfo_str_shuffle arginfo_base64_encode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_str_word_count, 0, 1, MAY_BE_ARRAY|MAY_BE_LONG) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charlist, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, characters, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_split, 0, 1, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, char_list, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, characters, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr_compare, 0, 3, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, main_str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case_insensitivity, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case_insensitive, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() -#define arginfo_utf8_encode arginfo_bin2hex +#define arginfo_utf8_encode arginfo_base64_encode -#define arginfo_utf8_decode arginfo_bin2hex +#define arginfo_utf8_decode arginfo_base64_encode ZEND_BEGIN_ARG_INFO_EX(arginfo_opendir, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_getdir, 0, 1, Directory, MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() @@ -1176,9 +1171,9 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_flock, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, operation, IS_LONG, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, wouldblock, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, would_block, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_meta_tags, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) @@ -1202,11 +1197,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readfile, 0, 1, MAY_BE_LONG|MAY_ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rewind, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rmdir, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, dirname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() @@ -1219,16 +1214,16 @@ ZEND_END_ARG_INFO() #define arginfo_feof arginfo_rewind ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fgetc, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fgets, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fread, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -1242,61 +1237,59 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fscanf, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL) ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_VARIADIC_TYPE_INFO(1, args, IS_MIXED, 0) + ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0) ZEND_END_ARG_INFO() -#define arginfo_fpassthru arginfo_pclose +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fpassthru, 0, 1, IS_LONG, 0) + ZEND_ARG_INFO(0, stream) +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftruncate, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fstat, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fseek, 0, 2, IS_LONG, 0) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whence, IS_LONG, 0, "SEEK_SET") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftell, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_END_ARG_INFO() #define arginfo_fflush arginfo_rewind ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fwrite, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) - ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() #define arginfo_fputs arginfo_fwrite ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mkdir, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0777") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rename, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, oldname, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, newname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, from, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_copy, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, dest, IS_STRING, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") -ZEND_END_ARG_INFO() +#define arginfo_copy arginfo_rename ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tempnam, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, dir, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -1314,7 +1307,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_file_get_contents, 0, 1, MAY_BE_ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_unlink, 0, 1, _IS_BOOL, 0) @@ -1330,17 +1323,17 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_file_put_contents, 0, 2, MAY_BE_ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fputcsv, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, fields, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\",\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\",\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fgetcsv, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delimiter, IS_STRING, 0, "\",\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\",\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"") ZEND_END_ARG_INFO() @@ -1381,23 +1374,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_filetype, 0, 1, MAY_BE_STRING|MA ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_file_exists, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_file_exists arginfo_is_uploaded_file -#define arginfo_is_writable arginfo_file_exists +#define arginfo_is_writable arginfo_is_uploaded_file -#define arginfo_is_writeable arginfo_file_exists +#define arginfo_is_writeable arginfo_is_uploaded_file -#define arginfo_is_readable arginfo_file_exists +#define arginfo_is_readable arginfo_is_uploaded_file -#define arginfo_is_executable arginfo_file_exists +#define arginfo_is_executable arginfo_is_uploaded_file -#define arginfo_is_file arginfo_file_exists +#define arginfo_is_file arginfo_is_uploaded_file -#define arginfo_is_dir arginfo_file_exists +#define arginfo_is_dir arginfo_is_uploaded_file -#define arginfo_is_link arginfo_file_exists +#define arginfo_is_link arginfo_is_uploaded_file ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stat, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -1437,7 +1428,7 @@ ZEND_END_ARG_INFO() #if HAVE_UTIME ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_touch, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mtime, IS_LONG, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, atime, IS_LONG, 1, "null") ZEND_END_ARG_INFO() #endif @@ -1461,41 +1452,41 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sprintf, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) + ZEND_ARG_VARIADIC_TYPE_INFO(0, values, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_printf, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) + ZEND_ARG_VARIADIC_TYPE_INFO(0, values, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vprintf, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vsprintf, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fprintf, 0, 2, IS_LONG, 0) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) + ZEND_ARG_VARIADIC_TYPE_INFO(0, values, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_vfprintf, 0, 3, IS_LONG, 0) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "-1") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errno, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errstr, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_code, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_message, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_DOUBLE, 1, "null") ZEND_END_ARG_INFO() @@ -1505,7 +1496,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_http_build_query, 0, 1, IS_STRIN ZEND_ARG_TYPE_MASK(0, data, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, numeric_prefix, IS_STRING, 0, "\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arg_separator, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enc_type, IS_LONG, 0, "PHP_QUERY_RFC1738") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding_type, IS_LONG, 0, "PHP_QUERY_RFC1738") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_image_type_to_mime_type, 0, 1, IS_STRING, 0) @@ -1518,17 +1509,17 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_image_type_to_extension, 0, 1, M ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getimagesize, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, image_path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, image_info, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getimagesizefromstring, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, image, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, image_info, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpinfo, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, what, IS_LONG, 0, "INFO_ALL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "INFO_ALL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phpversion, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) @@ -1536,7 +1527,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phpversion, 0, 0, MAY_BE_STRING| ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpcredits, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flag, IS_LONG, 0, "CREDITS_ALL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "CREDITS_ALL") ZEND_END_ARG_INFO() #define arginfo_php_sapi_name arginfo_ob_get_flush @@ -1550,21 +1541,21 @@ ZEND_END_ARG_INFO() #define arginfo_php_ini_loaded_file arginfo_ob_get_flush ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iptcembed, 0, 2, MAY_BE_STRING|MAY_BE_BOOL) - ZEND_ARG_TYPE_INFO(0, iptcdata, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, jpeg_file_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, iptc_data, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, spool, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iptcparse, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, iptcblock, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, iptc_block, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_levenshtein, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, str1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cost_ins, IS_LONG, 0, "1") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cost_rep, IS_LONG, 0, "1") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cost_del, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO(0, string1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, insertion_cost, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, repetition_cost, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deletion_cost, IS_LONG, 0, "1") ZEND_END_ARG_INFO() #if defined(HAVE_SYMLINK) || defined(PHP_WIN32) @@ -1599,23 +1590,23 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mail, 0, 3, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_abs, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) + ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ceil, 0, 1, IS_DOUBLE, 0) - ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) + ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) ZEND_END_ARG_INFO() #define arginfo_floor arginfo_ceil ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_round, 0, 1, IS_DOUBLE, 0) - ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) + ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, precision, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PHP_ROUND_HALF_UP") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sin, 0, 1, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_DOUBLE, 0) ZEND_END_ARG_INFO() #define arginfo_cos arginfo_sin @@ -1652,27 +1643,27 @@ ZEND_END_ARG_INFO() #define arginfo_pi arginfo_lcg_value ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_finite, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_DOUBLE, 0) ZEND_END_ARG_INFO() #define arginfo_is_nan arginfo_is_finite ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intdiv, 0, 2, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, dividend, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, divisor, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, num1, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, num2, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_is_infinite arginfo_is_finite ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pow, 0, 2, MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_OBJECT) - ZEND_ARG_TYPE_INFO(0, base, IS_MIXED, 0) - ZEND_ARG_TYPE_INFO(0, exp, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, exponent, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_exp arginfo_sin ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_log, 0, 1, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, base, IS_DOUBLE, 0, "M_E") ZEND_END_ARG_INFO() @@ -1702,7 +1693,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_octdec, 0, 1, MAY_BE_LONG|MAY_BE ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_decbin, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, number, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_decoct arginfo_decbin @@ -1710,40 +1701,40 @@ ZEND_END_ARG_INFO() #define arginfo_dechex arginfo_decbin ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_base_convert, 0, 3, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, number, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, frombase, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, tobase, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, from_base, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, to_base, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_number_format, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_DOUBLE, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, decimals, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, decimal_point, IS_STRING, 1, "\".\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, decimal_separator, IS_STRING, 1, "\".\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, thousands_separator, IS_STRING, 1, "\",\"") ZEND_END_ARG_INFO() -#define arginfo_fmod arginfo_hypot - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fdiv, 0, 2, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, dividend, IS_DOUBLE, 0) - ZEND_ARG_TYPE_INFO(0, divisor, IS_DOUBLE, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fmod, 0, 2, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, num1, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, num2, IS_DOUBLE, 0) ZEND_END_ARG_INFO() +#define arginfo_fdiv arginfo_fmod + #if defined(HAVE_GETTIMEOFDAY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_microtime, 0, 0, MAY_BE_STRING|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, getAsFloat, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, as_float, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #endif #if defined(HAVE_GETTIMEOFDAY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gettimeofday, 0, 0, MAY_BE_ARRAY|MAY_BE_DOUBLE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, returnFloat, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, as_float, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() #endif #if defined(HAVE_GETRUSAGE) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getrusage, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, who, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, _IS_BOOL, 0, "0") ZEND_END_ARG_INFO() #endif @@ -1751,7 +1742,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_unpack, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -1780,12 +1771,12 @@ ZEND_END_ARG_INFO() #if defined(PHP_CAN_SUPPORT_PROC_OPEN) ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_open, 0, 0, 3) - ZEND_ARG_TYPE_MASK(0, cmd, MAY_BE_ARRAY|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO(0, descriptorspec, IS_ARRAY, 0) + ZEND_ARG_TYPE_MASK(0, command, MAY_BE_ARRAY|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_INFO(0, descriptor_spec, IS_ARRAY, 0) ZEND_ARG_INFO(1, pipes) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cwd, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, env, IS_ARRAY, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, other_options, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, env_vars, IS_ARRAY, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null") ZEND_END_ARG_INFO() #endif @@ -1839,16 +1830,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_random_int, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, max, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_soundex, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_soundex arginfo_base64_encode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) ZEND_ARG_TYPE_INFO(1, except, IS_ARRAY, 1) - ZEND_ARG_TYPE_INFO(0, tv_sec, IS_LONG, 1) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tv_usec, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 1) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0) @@ -1886,8 +1875,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_prepend, 0, 0, 2) ZEND_ARG_INFO(0, stream) - ZEND_ARG_TYPE_INFO(0, filtername, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, read_write, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO(0, filter_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO(0, params, IS_MIXED, 0) ZEND_END_ARG_INFO() @@ -1898,31 +1887,31 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_filter_remove, 0, 1, _IS_ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, remote_socket, IS_STRING, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errno, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errstr, "null") + ZEND_ARG_TYPE_INFO(0, address, IS_STRING, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_code, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_message, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_DOUBLE, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "STREAM_CLIENT_CONNECT") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_server, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, local_socket, IS_STRING, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errno, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, errstr, "null") + ZEND_ARG_TYPE_INFO(0, address, IS_STRING, 0) + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_code, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_message, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "STREAM_SERVER_BIND | STREAM_SERVER_LISTEN") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_accept, 0, 0, 1) - ZEND_ARG_INFO(0, server_socket) + ZEND_ARG_INFO(0, socket) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_DOUBLE, 1, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, peername, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, peer_name, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_get_name, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) - ZEND_ARG_TYPE_INFO(0, want_peer, _IS_BOOL, 0) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_TYPE_INFO(0, remote, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_recvfrom, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) @@ -1949,7 +1938,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_SHUTDOWN) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_socket_shutdown, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream) - ZEND_ARG_TYPE_INFO(0, how, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_END_ARG_INFO() #endif @@ -1962,25 +1951,23 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_copy_to_stream, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, source) - ZEND_ARG_INFO(0, dest) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlength, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, position, IS_LONG, 0, "0") + ZEND_ARG_INFO(0, from) + ZEND_ARG_INFO(0, to) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_get_contents, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlength, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, position, IS_LONG, 0, "-1") -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_supports_lock, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() +#define arginfo_stream_supports_lock arginfo_rewind + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_write_buffer, 0, 2, IS_LONG, 0) ZEND_ARG_INFO(0, stream) - ZEND_ARG_TYPE_INFO(0, buffer, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_set_file_buffer arginfo_stream_set_write_buffer @@ -1989,7 +1976,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_blocking, 0, 2, _IS_BOOL, 0) ZEND_ARG_INFO(0, stream) - ZEND_ARG_TYPE_INFO(0, mode, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0) ZEND_END_ARG_INFO() #define arginfo_socket_set_blocking arginfo_stream_set_blocking @@ -2001,7 +1988,7 @@ ZEND_END_ARG_INFO() #define arginfo_socket_get_status arginfo_stream_get_meta_data ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_get_line, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_INFO(0, handle) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, max_length, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ending, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() @@ -2012,9 +1999,9 @@ ZEND_END_ARG_INFO() #define arginfo_stream_get_transports arginfo_ob_list_handlers -#define arginfo_stream_is_local arginfo_stream_supports_lock +#define arginfo_stream_is_local arginfo_rewind -#define arginfo_stream_isatty arginfo_stream_supports_lock +#define arginfo_stream_isatty arginfo_rewind #if defined(PHP_WIN32) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sapi_windows_vt100_support, 0, 1, _IS_BOOL, 0) @@ -2023,14 +2010,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sapi_windows_vt100_support, 0, 1 ZEND_END_ARG_INFO() #endif -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_chunk_size, 0, 2, IS_LONG, 0) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) -ZEND_END_ARG_INFO() +#define arginfo_stream_set_chunk_size arginfo_stream_set_write_buffer #if HAVE_SYS_TIME_H || defined(PHP_WIN32) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_timeout, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, socket) + ZEND_ARG_INFO(0, stream) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -2041,7 +2025,7 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gettype, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, var, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_get_debug_type arginfo_gettype @@ -2066,9 +2050,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_boolval, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strval, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) -ZEND_END_ARG_INFO() +#define arginfo_strval arginfo_gettype #define arginfo_is_null arginfo_boolval @@ -2118,17 +2100,17 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_url, 0, 0, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, component, IS_LONG, 0, "-1") ZEND_END_ARG_INFO() -#define arginfo_urlencode arginfo_soundex +#define arginfo_urlencode arginfo_base64_encode -#define arginfo_urldecode arginfo_soundex +#define arginfo_urldecode arginfo_base64_encode -#define arginfo_rawurlencode arginfo_soundex +#define arginfo_rawurlencode arginfo_base64_encode -#define arginfo_rawurldecode arginfo_soundex +#define arginfo_rawurldecode arginfo_base64_encode ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, url, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, as_assoc_array, IS_LONG, 0, "0") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null") ZEND_END_ARG_INFO() @@ -2151,11 +2133,11 @@ ZEND_END_ARG_INFO() #define arginfo_stream_get_filters arginfo_ob_list_handlers ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_filter_register, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, filtername, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, classname, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, filter_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, class, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_convert_uuencode arginfo_bin2hex +#define arginfo_convert_uuencode arginfo_base64_encode #define arginfo_convert_uudecode arginfo_hex2bin @@ -2171,7 +2153,7 @@ ZEND_END_ARG_INFO() #define arginfo_debug_zval_dump arginfo_var_dump -#define arginfo_serialize arginfo_strval +#define arginfo_serialize arginfo_gettype ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_unserialize, 0, 1, IS_MIXED, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) @@ -2192,7 +2174,7 @@ ZEND_END_ARG_INFO() #if defined(PHP_WIN32) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sapi_windows_cp_set, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, cp, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, codepage, IS_LONG, 0) ZEND_END_ARG_INFO() #endif diff --git a/ext/standard/tests/array/array_chunk2.phpt b/ext/standard/tests/array/array_chunk2.phpt index f3846a1d7806d..c83f051a271de 100644 --- a/ext/standard/tests/array/array_chunk2.phpt +++ b/ext/standard/tests/array/array_chunk2.phpt @@ -24,8 +24,8 @@ var_dump(array_chunk($input_array, 10)); var_dump(array_chunk($input_array, 10, true)); ?> --EXPECT-- -array_chunk(): Argument #2 ($size) must be greater than 0 -array_chunk(): Argument #2 ($size) must be greater than 0 +array_chunk(): Argument #2 ($length) must be greater than 0 +array_chunk(): Argument #2 ($length) must be greater than 0 array(5) { [0]=> array(1) { diff --git a/ext/standard/tests/array/array_chunk_variation5.phpt b/ext/standard/tests/array/array_chunk_variation5.phpt index 4aa4ea1172358..24123b03707a4 100644 --- a/ext/standard/tests/array/array_chunk_variation5.phpt +++ b/ext/standard/tests/array/array_chunk_variation5.phpt @@ -42,9 +42,9 @@ foreach ($sizes as $size){ *** Testing array_chunk() : usage variations *** -- Testing array_chunk() when size = -1 -- -array_chunk(): Argument #2 ($size) must be greater than 0 -array_chunk(): Argument #2 ($size) must be greater than 0 -array_chunk(): Argument #2 ($size) must be greater than 0 +array_chunk(): Argument #2 ($length) must be greater than 0 +array_chunk(): Argument #2 ($length) must be greater than 0 +array_chunk(): Argument #2 ($length) must be greater than 0 -- Testing array_chunk() when size = 4 -- array(1) { @@ -82,9 +82,9 @@ array(1) { } -- Testing array_chunk() when size = 0 -- -array_chunk(): Argument #2 ($size) must be greater than 0 -array_chunk(): Argument #2 ($size) must be greater than 0 -array_chunk(): Argument #2 ($size) must be greater than 0 +array_chunk(): Argument #2 ($length) must be greater than 0 +array_chunk(): Argument #2 ($length) must be greater than 0 +array_chunk(): Argument #2 ($length) must be greater than 0 -- Testing array_chunk() when size = 1.5 -- array(3) { diff --git a/ext/standard/tests/array/array_multisort_variation1.phpt b/ext/standard/tests/array/array_multisort_variation1.phpt index f93ad2cfc7df9..c6cb286231e49 100644 --- a/ext/standard/tests/array/array_multisort_variation1.phpt +++ b/ext/standard/tests/array/array_multisort_variation1.phpt @@ -103,76 +103,76 @@ foreach($inputs as $key =>$value) { *** Testing array_multisort() : usage variation *** --int 0-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag that has not already been specified +array_multisort(): Argument #1 ($array) must be an array or a sort flag that has not already been specified --int 1-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag that has not already been specified +array_multisort(): Argument #1 ($array) must be an array or a sort flag that has not already been specified --int 12345-- -array_multisort(): Argument #1 ($array1) must be a valid sort flag +array_multisort(): Argument #1 ($array) must be a valid sort flag --int -12345-- -array_multisort(): Argument #1 ($array1) must be a valid sort flag +array_multisort(): Argument #1 ($array) must be a valid sort flag --float 10.5-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --float -10.5-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --float 12.3456789000e10-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --float -12.3456789000e10-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --float .5-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --uppercase NULL-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --lowercase null-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --lowercase true-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --lowercase false-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --uppercase TRUE-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --uppercase FALSE-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --empty string DQ-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --empty string SQ-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --string DQ-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --string SQ-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --mixed case string-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --heredoc-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --instance of classWithToString-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --instance of classWithoutToString-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --undefined var-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag --unset var-- -array_multisort(): Argument #1 ($array1) must be an array or a sort flag +array_multisort(): Argument #1 ($array) must be an array or a sort flag diff --git a/ext/standard/tests/array/array_next_error2.phpt b/ext/standard/tests/array/array_next_error2.phpt index e9df624e0e3e4..ca4626558edda 100644 --- a/ext/standard/tests/array/array_next_error2.phpt +++ b/ext/standard/tests/array/array_next_error2.phpt @@ -8,7 +8,7 @@ function f() { var_dump(next(array(1, 2))); ?> --EXPECTF-- -Fatal error: Uncaught Error: next(): Argument #1 ($arg) cannot be passed by reference in %s:%d +Fatal error: Uncaught Error: next(): Argument #1 ($array) cannot be passed by reference in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/standard/tests/array/array_pad.phpt b/ext/standard/tests/array/array_pad.phpt index 6efef020b9dfd..5abcbac87ef7d 100644 --- a/ext/standard/tests/array/array_pad.phpt +++ b/ext/standard/tests/array/array_pad.phpt @@ -84,4 +84,4 @@ array(4) { [3]=> float(2) } -array_pad(): Argument #2 ($pad_size) must be less than or equal to 1048576 +array_pad(): Argument #2 ($length) must be less than or equal to 1048576 diff --git a/ext/standard/tests/array/array_rand.phpt b/ext/standard/tests/array/array_rand.phpt index 52890dcafd2c5..03fb91eb53062 100644 --- a/ext/standard/tests/array/array_rand.phpt +++ b/ext/standard/tests/array/array_rand.phpt @@ -40,9 +40,9 @@ var_dump(array_rand(array(1,2,3), 2)); --EXPECTF-- array_rand(): Argument #1 ($array) cannot be empty array_rand(): Argument #1 ($array) cannot be empty -array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($array) -array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($array) -array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($array) +array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) +array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) +array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) array(3) { [0]=> int(%d) diff --git a/ext/standard/tests/array/array_rand_variation5.phpt b/ext/standard/tests/array/array_rand_variation5.phpt index 8b877c8a9108c..4a4295c615391 100644 --- a/ext/standard/tests/array/array_rand_variation5.phpt +++ b/ext/standard/tests/array/array_rand_variation5.phpt @@ -65,13 +65,13 @@ int(%d) int(%d) -- With num_req = 0 -- -array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($array) +array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) -- With num_req = -1 -- -array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($array) +array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) -- With num_req = -2 -- -array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($array) +array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) -- With num_req more than number of members in 'input' array -- -array_rand(): Argument #2 ($num_req) must be between 1 and the number of elements in argument #1 ($array) +array_rand(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) diff --git a/ext/standard/tests/array/array_walk_objects.phpt b/ext/standard/tests/array/array_walk_objects.phpt index 2c95b5a6d0a9d..44b5b27e51e84 100644 --- a/ext/standard/tests/array/array_walk_objects.phpt +++ b/ext/standard/tests/array/array_walk_objects.phpt @@ -43,5 +43,5 @@ string(10) "%r\0%r*%r\0%rvar_pro" string(14) "test_protected" string(7) "var_pub" string(11) "test_public" -array_walk(): Argument #1 ($input) must be of type array, string given +array_walk(): Argument #1 ($array) must be of type array, string given Done diff --git a/ext/standard/tests/array/array_walk_rec_objects.phpt b/ext/standard/tests/array/array_walk_rec_objects.phpt index 4577e1af0c62c2a0743100a524d3d67a169395aa..a3513437a28e293e758a24a8a4ad6db41c953f05 100644 GIT binary patch delta 17 YcmbQqK9hYzCNpbdQBh*$ --EXPECT-- *** Testing Error Conditions *** -extract(): Argument #2 ($extract_type) must be a valid extract type -extract(): Argument #2 ($extract_type) must be a valid extract type +extract(): Argument #2 ($flags) must be a valid extract type +extract(): Argument #2 ($flags) must be a valid extract type extract(): Argument #3 ($prefix) is required when using this extract type diff --git a/ext/standard/tests/array/max.phpt b/ext/standard/tests/array/max.phpt index 4360b915256d3..065461001690c 100644 --- a/ext/standard/tests/array/max.phpt +++ b/ext/standard/tests/array/max.phpt @@ -33,9 +33,9 @@ var_dump(max(0, true, false, true)); ?> --EXPECT-- -max(): Argument #1 ($arg) must be of type array, int given -max(): Argument #1 ($arg) must contain at least one element -max(): Argument #1 ($arg) must be of type array, stdClass given +max(): Argument #1 ($value) must be of type array, int given +max(): Argument #1 ($value) must contain at least one element +max(): Argument #1 ($value) must be of type array, stdClass given int(2) float(2.11) string(1) "t" diff --git a/ext/standard/tests/array/min.phpt b/ext/standard/tests/array/min.phpt index ad32ae4226924..97be4ad6828e0 100644 --- a/ext/standard/tests/array/min.phpt +++ b/ext/standard/tests/array/min.phpt @@ -33,9 +33,9 @@ var_dump(min(0, true, false, true)); ?> --EXPECT-- -min(): Argument #1 ($arg) must be of type array, int given -min(): Argument #1 ($arg) must contain at least one element -min(): Argument #1 ($arg) must be of type array, stdClass given +min(): Argument #1 ($value) must be of type array, int given +min(): Argument #1 ($value) must contain at least one element +min(): Argument #1 ($value) must be of type array, stdClass given int(1) float(2.09) string(0) "" diff --git a/ext/standard/tests/array/prev_error3.phpt b/ext/standard/tests/array/prev_error3.phpt index 7777527f16ab4..f7444975946cc 100644 --- a/ext/standard/tests/array/prev_error3.phpt +++ b/ext/standard/tests/array/prev_error3.phpt @@ -10,7 +10,7 @@ prev - ensure we cannot pass a temporary var_dump(prev(array(1, 2))); ?> --EXPECTF-- -Fatal error: Uncaught Error: prev(): Argument #1 ($arg) cannot be passed by reference in %s:%d +Fatal error: Uncaught Error: prev(): Argument #1 ($array) cannot be passed by reference in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/standard/tests/array/sizeof_object2.phpt b/ext/standard/tests/array/sizeof_object2.phpt index 754198765685f..7f165bc5a893a 100644 --- a/ext/standard/tests/array/sizeof_object2.phpt +++ b/ext/standard/tests/array/sizeof_object2.phpt @@ -104,22 +104,22 @@ echo "Done"; --- Testing sizeof() with objects which doesn't implement Countable interface --- -- Iteration 1 -- Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test given -COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test given -COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test given -- Iteration 2 -- Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given -COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given -COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test1 given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test1 given -- Iteration 3 -- Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given -COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given -COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test2 given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test2 given -- Iteration 4 -- Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given -COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given -COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, child_test2 given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, child_test2 given -- Iteration 5 -- Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given -COUNT_NORMAL Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given -COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given +COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, concrete_class given +COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, concrete_class given Done diff --git a/ext/standard/tests/assert/assert_options_error.phpt b/ext/standard/tests/assert/assert_options_error.phpt index 23ca2e9e03574..f1581fe720ea7 100644 --- a/ext/standard/tests/assert/assert_options_error.phpt +++ b/ext/standard/tests/assert/assert_options_error.phpt @@ -10,4 +10,4 @@ try { } ?> --EXPECT-- -assert_options(): Argument #1 ($what) must be an ASSERT_* constant +assert_options(): Argument #1 ($option) must be an ASSERT_* constant diff --git a/ext/standard/tests/file/fgetcsv_error_conditions.phpt b/ext/standard/tests/file/fgetcsv_error_conditions.phpt index 684ef7258a0a7..dd2b4d61d9fde 100644 --- a/ext/standard/tests/file/fgetcsv_error_conditions.phpt +++ b/ext/standard/tests/file/fgetcsv_error_conditions.phpt @@ -54,8 +54,8 @@ fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0 fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0 fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0 fgetcsv() with delimiter as NULL -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character fgetcsv() with enclosure as NULL fgetcsv(): Argument #4 ($enclosure) must be a single character fgetcsv() with delimiter & enclosure as NULL -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character diff --git a/ext/standard/tests/file/fgetcsv_variation12.phpt b/ext/standard/tests/file/fgetcsv_variation12.phpt index faf75bdb93ae8..b2297668e7bf6 100644 --- a/ext/standard/tests/file/fgetcsv_variation12.phpt +++ b/ext/standard/tests/file/fgetcsv_variation12.phpt @@ -91,362 +91,362 @@ echo "Done\n"; *** Testing fgetcsv() : with two chars as enclosure & delimiter *** -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) Done diff --git a/ext/standard/tests/file/fgetcsv_variation19.phpt b/ext/standard/tests/file/fgetcsv_variation19.phpt index bae8985cb554f..653f624f9d5ac 100644 --- a/ext/standard/tests/file/fgetcsv_variation19.phpt +++ b/ext/standard/tests/file/fgetcsv_variation19.phpt @@ -89,377 +89,377 @@ echo "Done\n"; *** Testing fgetcsv() : with default enclosure & delimiter of two chars *** -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rb mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using rt mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using r+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using a+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using w+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+ mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+b mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) -- Testing fgetcsv() with file opened using x+t mode -- -fgetcsv(): Argument #3 ($delimiter) must be a single character +fgetcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) Done diff --git a/ext/standard/tests/file/file_get_contents_error.phpt b/ext/standard/tests/file/file_get_contents_error.phpt index 66708c4f17a63..8e29847d8cf27 100644 --- a/ext/standard/tests/file/file_get_contents_error.phpt +++ b/ext/standard/tests/file/file_get_contents_error.phpt @@ -47,6 +47,6 @@ if(file_exists($file_path."/file_put_contents1.tmp")) { Warning: file_get_contents(/no/such/file/or/dir): Failed to open stream: No such file or directory in %s on line %d -- Testing for invalid negative maxlen values -- -file_get_contents(): Argument #5 ($maxlen) must be greater than or equal to 0 +file_get_contents(): Argument #5 ($max_length) must be greater than or equal to 0 *** Done *** diff --git a/ext/standard/tests/file/file_get_contents_error002.phpt b/ext/standard/tests/file/file_get_contents_error002.phpt index 6624279d748ce..a58308d831b0d 100644 --- a/ext/standard/tests/file/file_get_contents_error002.phpt +++ b/ext/standard/tests/file/file_get_contents_error002.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -file_get_contents(): Argument #5 ($maxlen) must be greater than or equal to 0 +file_get_contents(): Argument #5 ($max_length) must be greater than or equal to 0 diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt index 5b889a19c32ac..c41a826bf958f 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt @@ -39,6 +39,6 @@ unlink($file_path."/file_put_contents1.tmp"); Warning: file_get_contents(/no/such/file/or/dir): Failed to open stream: No such file or directory in %s on line %d -- Testing for invalid negative maxlen values -- -file_get_contents(): Argument #5 ($maxlen) must be greater than or equal to 0 +file_get_contents(): Argument #5 ($max_length) must be greater than or equal to 0 *** Done *** diff --git a/ext/standard/tests/file/fputcsv_variation2.phpt b/ext/standard/tests/file/fputcsv_variation2.phpt index 5116940b4d25b..77b075a5f042f 100644 --- a/ext/standard/tests/file/fputcsv_variation2.phpt +++ b/ext/standard/tests/file/fputcsv_variation2.phpt @@ -75,649 +75,649 @@ echo "Done\n"; *** Testing fputcsv() : with delimiter as NULL *** -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" diff --git a/ext/standard/tests/file/fputcsv_variation4.phpt b/ext/standard/tests/file/fputcsv_variation4.phpt index a53257535a364..dc78796158095 100644 --- a/ext/standard/tests/file/fputcsv_variation4.phpt +++ b/ext/standard/tests/file/fputcsv_variation4.phpt @@ -75,649 +75,649 @@ echo "Done\n"; *** Testing fputcsv() : with delimiter and enclosure as NULL *** -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" diff --git a/ext/standard/tests/file/fputcsv_variation9.phpt b/ext/standard/tests/file/fputcsv_variation9.phpt index 405122b448ef3..b2bc895cd870b 100644 --- a/ext/standard/tests/file/fputcsv_variation9.phpt +++ b/ext/standard/tests/file/fputcsv_variation9.phpt @@ -75,649 +75,649 @@ echo "Done\n"; *** Testing fputcsv() : with two chars as enclosure & delimiter *** -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in r+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in a+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in w+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+ -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+b -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" -- file opened in x+t -- -fputcsv(): Argument #3 ($delimiter) must be a single character +fputcsv(): Argument #3 ($separator) must be a single character int(0) bool(false) string(0) "" diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt index a9e386b0b030f..4da0b374ba946 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt @@ -60,8 +60,8 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d bool(false) *** Testing mkdir() and rmdir() for binary safe functionality *** -mkdir(): Argument #1 ($pathname) must not contain any null bytes -rmdir(): Argument #1 ($dirname) must not contain any null bytes +mkdir(): Argument #1 ($directory) must not contain any null bytes +rmdir(): Argument #1 ($directory) must not contain any null bytes *** Testing mkdir() with miscellaneous input *** bool(true) diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt index 38644b3c6cc6f..0c951e2657ff4 100644 --- a/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt @@ -96,9 +96,9 @@ File name is => %s%et%s File permissions are => 100666 File created in => temp dir -- Iteration 6 -- -tempnam(): Argument #1 ($dir) must not contain any null bytes +tempnam(): Argument #1 ($directory) must not contain any null bytes -- Iteration 7 -- -tempnam(): Argument #1 ($dir) must be of type string, array given +tempnam(): Argument #1 ($directory) must be of type string, array given -- Iteration 8 -- Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index dbe80d5ebb67c..9a0b1151c6b47 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -101,9 +101,9 @@ File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 6 -- -tempnam(): Argument #1 ($dir) must not contain any null bytes +tempnam(): Argument #1 ($directory) must not contain any null bytes -- Iteration 7 -- -tempnam(): Argument #1 ($dir) must be of type string, array given +tempnam(): Argument #1 ($directory) must be of type string, array given -- Iteration 8 -- Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d diff --git a/ext/standard/tests/file/touch.phpt b/ext/standard/tests/file/touch.phpt index 32e49f31497ba..9e3972631aa67 100644 --- a/ext/standard/tests/file/touch.phpt +++ b/ext/standard/tests/file/touch.phpt @@ -57,5 +57,5 @@ int(100) Warning: touch(): Unable to create file /no/such/file/or/directory because %s in %s on line %d bool(false) -touch(): Argument #2 ($time) cannot be null when argument #3 ($atime) is an integer +touch(): Argument #2 ($mtime) cannot be null when argument #3 ($atime) is an integer Done diff --git a/ext/standard/tests/file/userstreams.phpt b/ext/standard/tests/file/userstreams.phpt index 101604f5abcec..9549e01e2787a 100644 --- a/ext/standard/tests/file/userstreams.phpt +++ b/ext/standard/tests/file/userstreams.phpt @@ -318,7 +318,7 @@ echo $data . "\n"; ?> --EXPECT-- -stream_wrapper_register(): Argument #2 ($classname) must be a valid class name, class_not_exist given +stream_wrapper_register(): Argument #2 ($class) must be a valid class name, class_not_exist given Not Registered Registered Registered diff --git a/ext/standard/tests/filters/001.phpt b/ext/standard/tests/filters/001.phpt index 8afe3bbaf3b93..3f0d5f5eb44e4 100644 --- a/ext/standard/tests/filters/001.phpt +++ b/ext/standard/tests/filters/001.phpt @@ -25,8 +25,8 @@ var_dump(stream_filter_register("------", "nonexistentclass")); echo "Done\n"; ?> --EXPECT-- -stream_filter_register(): Argument #1 ($filtername) must be a non-empty string -stream_filter_register(): Argument #2 ($classname) must be a non-empty string -stream_filter_register(): Argument #1 ($filtername) must be a non-empty string +stream_filter_register(): Argument #1 ($filter_name) must be a non-empty string +stream_filter_register(): Argument #2 ($class) must be a non-empty string +stream_filter_register(): Argument #1 ($filter_name) must be a non-empty string bool(true) Done diff --git a/ext/standard/tests/general_functions/010.phpt b/ext/standard/tests/general_functions/010.phpt index a8fefd663debd..af722ea583c63 100644 --- a/ext/standard/tests/general_functions/010.phpt +++ b/ext/standard/tests/general_functions/010.phpt @@ -20,5 +20,5 @@ try { echo "Done\n"; ?> --EXPECT-- -register_shutdown_function(): Argument #1 ($function) must be a valid callback, non-static method test::__call() cannot be called statically +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, non-static method test::__call() cannot be called statically Done diff --git a/ext/standard/tests/general_functions/bug32647.phpt b/ext/standard/tests/general_functions/bug32647.phpt index a981a7f454781..2e388d4742060 100644 --- a/ext/standard/tests/general_functions/bug32647.phpt +++ b/ext/standard/tests/general_functions/bug32647.phpt @@ -73,15 +73,15 @@ register_shutdown_function(array($obj,'barfoo')); ?> --EXPECTF-- Warning: Undefined variable $obj in %s on line %d -register_shutdown_function(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object Warning: Undefined variable $obj in %s on line %d -register_shutdown_function(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object -register_shutdown_function(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object -register_shutdown_function(): Argument #1 ($function) must be a valid callback, class bar does not have a method "foo" -register_shutdown_function(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object -register_shutdown_function(): Argument #1 ($function) must be a valid callback, function "bar" not found or invalid function name -register_shutdown_function(): Argument #1 ($function) must be a valid callback, non-static method bar::barfoo() cannot be called statically -register_shutdown_function(): Argument #1 ($function) must be a valid callback, class bar does not have a method "foobar" +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, class bar does not have a method "foo" +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, function "bar" not found or invalid function name +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, non-static method bar::barfoo() cannot be called statically +register_shutdown_function(): Argument #1 ($callback) must be a valid callback, class bar does not have a method "foobar" foo! bar! diff --git a/ext/standard/tests/general_functions/proc_open_array.phpt b/ext/standard/tests/general_functions/proc_open_array.phpt index a37aea891ec69..9f969a1c32f24 100644 --- a/ext/standard/tests/general_functions/proc_open_array.phpt +++ b/ext/standard/tests/general_functions/proc_open_array.phpt @@ -68,7 +68,7 @@ proc_close($proc); ?> --EXPECT-- Empty command array: -proc_open(): Argument #1 ($cmd) must have at least one element +proc_open(): Argument #1 ($command) must have at least one element Nul byte in program name: Command array element 1 contains a null byte diff --git a/ext/standard/tests/general_functions/proc_open_pipes3.phpt b/ext/standard/tests/general_functions/proc_open_pipes3.phpt index 96ce75bd0ccac..f5801ad63e435 100644 --- a/ext/standard/tests/general_functions/proc_open_pipes3.phpt +++ b/ext/standard/tests/general_functions/proc_open_pipes3.phpt @@ -32,7 +32,7 @@ echo "END\n"; ?> --EXPECTF-- Warning: proc_open(): pi is not a valid descriptor spec/mode in %s on line %d -proc_open(): Argument #2 ($descriptorspec) must only contain arrays and streams +proc_open(): Argument #2 ($descriptor_spec) must only contain arrays and streams array(4) { [3]=> resource(%d) of type (Unknown) diff --git a/ext/standard/tests/general_functions/putenv.phpt b/ext/standard/tests/general_functions/putenv.phpt index 163fa7e4a708e..40799b25790f2 100644 --- a/ext/standard/tests/general_functions/putenv.phpt +++ b/ext/standard/tests/general_functions/putenv.phpt @@ -37,6 +37,6 @@ bool(true) string(0) "" bool(true) bool(false) -putenv(): Argument #1 ($setting) must have a valid syntax -putenv(): Argument #1 ($setting) must have a valid syntax +putenv(): Argument #1 ($assignment) must have a valid syntax +putenv(): Argument #1 ($assignment) must have a valid syntax Done diff --git a/ext/standard/tests/general_functions/register_tick_function_error.phpt b/ext/standard/tests/general_functions/register_tick_function_error.phpt index 82564a83b425e..adcc20215ed91 100644 --- a/ext/standard/tests/general_functions/register_tick_function_error.phpt +++ b/ext/standard/tests/general_functions/register_tick_function_error.phpt @@ -11,4 +11,4 @@ try { } ?> --EXPECT-- -register_tick_function(): Argument #1 ($function) must be a valid tick callback, "a" given +register_tick_function(): Argument #1 ($callback) must be a valid tick callback, "a" given diff --git a/ext/standard/tests/image/bug79877.phpt b/ext/standard/tests/image/bug79877.phpt index fa68fc963a75a..53532deb31ba7 100644 --- a/ext/standard/tests/image/bug79877.phpt +++ b/ext/standard/tests/image/bug79877.phpt @@ -5,7 +5,7 @@ Bug #79877 (getimagesize function silently truncates after a null byte) var_dump(getimagesize("/tmp/a.png\0xx")); ?> --EXPECTF-- -Fatal error: Uncaught ValueError: getimagesize(): Argument #1 ($image_path) must not contain any null bytes in %s:%d +Fatal error: Uncaught ValueError: getimagesize(): Argument #1 ($filename) must not contain any null bytes in %s:%d Stack trace: #0 %s(%d): getimagesize('/tmp/a.png\x00xx') #1 {main} diff --git a/ext/standard/tests/math/abs_variation.phpt b/ext/standard/tests/math/abs_variation.phpt index 4a40ab4e37cdb..6b7a184cbd93d 100644 --- a/ext/standard/tests/math/abs_variation.phpt +++ b/ext/standard/tests/math/abs_variation.phpt @@ -100,25 +100,25 @@ int(1) int(0) -- Iteration 7 -- -abs(): Argument #1 ($number) must be of type int|float, string given +abs(): Argument #1 ($num) must be of type int|float, string given -- Iteration 8 -- -abs(): Argument #1 ($number) must be of type int|float, string given +abs(): Argument #1 ($num) must be of type int|float, string given -- Iteration 9 -- -abs(): Argument #1 ($number) must be of type int|float, array given +abs(): Argument #1 ($num) must be of type int|float, array given -- Iteration 10 -- -abs(): Argument #1 ($number) must be of type int|float, string given +abs(): Argument #1 ($num) must be of type int|float, string given -- Iteration 11 -- -abs(): Argument #1 ($number) must be of type int|float, string given +abs(): Argument #1 ($num) must be of type int|float, string given -- Iteration 12 -- -abs(): Argument #1 ($number) must be of type int|float, string given +abs(): Argument #1 ($num) must be of type int|float, string given -- Iteration 13 -- -abs(): Argument #1 ($number) must be of type int|float, classA given +abs(): Argument #1 ($num) must be of type int|float, classA given -- Iteration 14 -- int(0) @@ -127,4 +127,4 @@ int(0) int(0) -- Iteration 16 -- -abs(): Argument #1 ($number) must be of type int|float, resource given +abs(): Argument #1 ($num) must be of type int|float, resource given diff --git a/ext/standard/tests/math/base_convert_error.phpt b/ext/standard/tests/math/base_convert_error.phpt index b2cf396ae3047..3d253606e0346 100644 --- a/ext/standard/tests/math/base_convert_error.phpt +++ b/ext/standard/tests/math/base_convert_error.phpt @@ -29,6 +29,6 @@ try { ?> --EXPECT-- *** Testing base_convert() : error conditions *** -base_convert(): Argument #2 ($frombase) must be between 2 and 36 (inclusive) -base_convert(): Argument #3 ($tobase) must be between 2 and 36 (inclusive) -base_convert(): Argument #1 ($number) must be of type string, classA given +base_convert(): Argument #2 ($from_base) must be between 2 and 36 (inclusive) +base_convert(): Argument #3 ($to_base) must be between 2 and 36 (inclusive) +base_convert(): Argument #1 ($num) must be of type string, classA given diff --git a/ext/standard/tests/math/base_convert_variation1.phpt b/ext/standard/tests/math/base_convert_variation1.phpt index a1365b3e74723..8d8e0ff3a295b 100644 --- a/ext/standard/tests/math/base_convert_variation1.phpt +++ b/ext/standard/tests/math/base_convert_variation1.phpt @@ -145,7 +145,7 @@ string(1) "0" string(1) "0" -- Iteration 19 -- -base_convert(): Argument #1 ($number) must be of type string, array given +base_convert(): Argument #1 ($num) must be of type string, array given -- Iteration 20 -- @@ -169,4 +169,4 @@ string(1) "0" string(1) "0" -- Iteration 25 -- -base_convert(): Argument #1 ($number) must be of type string, resource given +base_convert(): Argument #1 ($num) must be of type string, resource given diff --git a/ext/standard/tests/math/ceil_variation1.phpt b/ext/standard/tests/math/ceil_variation1.phpt index a21ffe609d17a..ce61442f6554c 100644 --- a/ext/standard/tests/math/ceil_variation1.phpt +++ b/ext/standard/tests/math/ceil_variation1.phpt @@ -93,25 +93,25 @@ float(1) float(0) -- Iteration 7 -- -ceil(): Argument #1 ($number) must be of type int|float, string given +ceil(): Argument #1 ($num) must be of type int|float, string given -- Iteration 8 -- -ceil(): Argument #1 ($number) must be of type int|float, string given +ceil(): Argument #1 ($num) must be of type int|float, string given -- Iteration 9 -- -ceil(): Argument #1 ($number) must be of type int|float, array given +ceil(): Argument #1 ($num) must be of type int|float, array given -- Iteration 10 -- -ceil(): Argument #1 ($number) must be of type int|float, string given +ceil(): Argument #1 ($num) must be of type int|float, string given -- Iteration 11 -- -ceil(): Argument #1 ($number) must be of type int|float, string given +ceil(): Argument #1 ($num) must be of type int|float, string given -- Iteration 12 -- -ceil(): Argument #1 ($number) must be of type int|float, string given +ceil(): Argument #1 ($num) must be of type int|float, string given -- Iteration 13 -- -ceil(): Argument #1 ($number) must be of type int|float, classA given +ceil(): Argument #1 ($num) must be of type int|float, classA given -- Iteration 14 -- float(0) @@ -120,4 +120,4 @@ float(0) float(0) -- Iteration 16 -- -ceil(): Argument #1 ($number) must be of type int|float, resource given +ceil(): Argument #1 ($num) must be of type int|float, resource given diff --git a/ext/standard/tests/math/decbin_basic.phpt b/ext/standard/tests/math/decbin_basic.phpt index 1366997dcf128..54b771ca26c20 100644 --- a/ext/standard/tests/math/decbin_basic.phpt +++ b/ext/standard/tests/math/decbin_basic.phpt @@ -36,7 +36,7 @@ string(4) "1010" string(12) "111101101110" string(12) "111101101110" string(6) "100111" -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given string(1) "1" string(1) "0" string(1) "0" diff --git a/ext/standard/tests/math/decbin_basiclong_64bit.phpt b/ext/standard/tests/math/decbin_basiclong_64bit.phpt index 6e4dfa826b0e3..16fd6b97b8033 100644 --- a/ext/standard/tests/math/decbin_basiclong_64bit.phpt +++ b/ext/standard/tests/math/decbin_basiclong_64bit.phpt @@ -55,7 +55,7 @@ string(32) "11111111111111111111111111111101" --- testing: 9223372036854775806 --- string(63) "111111111111111111111111111111111111111111111111111111111111110" --- testing: 9.2233720368548E+18 --- -decbin(): Argument #1 ($number) must be of type int, float given +decbin(): Argument #1 ($num) must be of type int, float given --- testing: -9223372036854775807 --- string(64) "1000000000000000000000000000000000000000000000000000000000000001" --- testing: -9.2233720368548E+18 --- diff --git a/ext/standard/tests/math/decbin_variation1.phpt b/ext/standard/tests/math/decbin_variation1.phpt index 53f4bcaab4687..fd9addc721c7c 100644 --- a/ext/standard/tests/math/decbin_variation1.phpt +++ b/ext/standard/tests/math/decbin_variation1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test decbin() function : usage variations - different data types as $number arg +Test decbin() function : usage variations - different data types as $num arg --INI-- precision=14 --SKIPIF-- @@ -106,10 +106,10 @@ string(14) "11000000111001" string(32) "11111111111111111111011011010111" -- Iteration 5 -- -decbin(): Argument #1 ($number) must be of type int, float given +decbin(): Argument #1 ($num) must be of type int, float given -- Iteration 6 -- -decbin(): Argument #1 ($number) must be of type int, float given +decbin(): Argument #1 ($num) must be of type int, float given -- Iteration 7 -- string(4) "1010" @@ -118,7 +118,7 @@ string(4) "1010" string(32) "11111111111111111111111111110110" -- Iteration 9 -- -decbin(): Argument #1 ($number) must be of type int, float given +decbin(): Argument #1 ($num) must be of type int, float given -- Iteration 10 -- string(1) "0" @@ -145,25 +145,25 @@ string(1) "1" string(1) "0" -- Iteration 18 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 19 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 20 -- -decbin(): Argument #1 ($number) must be of type int, array given +decbin(): Argument #1 ($num) must be of type int, array given -- Iteration 21 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 22 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 23 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 24 -- -decbin(): Argument #1 ($number) must be of type int, classA given +decbin(): Argument #1 ($num) must be of type int, classA given -- Iteration 25 -- string(1) "0" @@ -172,4 +172,4 @@ string(1) "0" string(1) "0" -- Iteration 27 -- -decbin(): Argument #1 ($number) must be of type int, resource given +decbin(): Argument #1 ($num) must be of type int, resource given diff --git a/ext/standard/tests/math/decbin_variation1_64bit.phpt b/ext/standard/tests/math/decbin_variation1_64bit.phpt index ed278bfed04c4..f9e1b19b29030 100644 --- a/ext/standard/tests/math/decbin_variation1_64bit.phpt +++ b/ext/standard/tests/math/decbin_variation1_64bit.phpt @@ -104,10 +104,10 @@ string(14) "11000000111001" string(64) "1111111111111111111111111111111111111111111111111111011011010111" -- Iteration 5 -- -decbin(): Argument #1 ($number) must be of type int, float given +decbin(): Argument #1 ($num) must be of type int, float given -- Iteration 6 -- -decbin(): Argument #1 ($number) must be of type int, float given +decbin(): Argument #1 ($num) must be of type int, float given -- Iteration 7 -- string(4) "1010" @@ -143,25 +143,25 @@ string(1) "1" string(1) "0" -- Iteration 18 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 19 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 20 -- -decbin(): Argument #1 ($number) must be of type int, array given +decbin(): Argument #1 ($num) must be of type int, array given -- Iteration 21 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 22 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 23 -- -decbin(): Argument #1 ($number) must be of type int, string given +decbin(): Argument #1 ($num) must be of type int, string given -- Iteration 24 -- -decbin(): Argument #1 ($number) must be of type int, classA given +decbin(): Argument #1 ($num) must be of type int, classA given -- Iteration 25 -- string(1) "0" @@ -170,4 +170,4 @@ string(1) "0" string(1) "0" -- Iteration 27 -- -decbin(): Argument #1 ($number) must be of type int, resource given +decbin(): Argument #1 ($num) must be of type int, resource given diff --git a/ext/standard/tests/math/dechex_basic.phpt b/ext/standard/tests/math/dechex_basic.phpt index 729685c206084..92e9c426b3755 100644 --- a/ext/standard/tests/math/dechex_basic.phpt +++ b/ext/standard/tests/math/dechex_basic.phpt @@ -36,7 +36,7 @@ string(1) "a" string(3) "f6e" string(3) "f6e" string(2) "27" -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given string(1) "1" string(1) "0" string(1) "0" diff --git a/ext/standard/tests/math/dechex_basiclong_64bit.phpt b/ext/standard/tests/math/dechex_basiclong_64bit.phpt index c7727c5ce8883..85051ea4567ba 100644 --- a/ext/standard/tests/math/dechex_basiclong_64bit.phpt +++ b/ext/standard/tests/math/dechex_basiclong_64bit.phpt @@ -55,7 +55,7 @@ string(8) "fffffffd" --- testing: 9223372036854775806 --- string(16) "7ffffffffffffffe" --- testing: 9.2233720368548E+18 --- -dechex(): Argument #1 ($number) must be of type int, float given +dechex(): Argument #1 ($num) must be of type int, float given --- testing: -9223372036854775807 --- string(16) "8000000000000001" --- testing: -9.2233720368548E+18 --- diff --git a/ext/standard/tests/math/dechex_variation1.phpt b/ext/standard/tests/math/dechex_variation1.phpt index 5dbe004a07ac5..8add97f7a24d1 100644 --- a/ext/standard/tests/math/dechex_variation1.phpt +++ b/ext/standard/tests/math/dechex_variation1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test dechex() function : usage variations - different data types as $number arg +Test dechex() function : usage variations - different data types as $num arg --INI-- precision=14 --SKIPIF-- @@ -106,10 +106,10 @@ string(4) "3039" string(8) "fffff6d7" -- Iteration 5 -- -dechex(): Argument #1 ($number) must be of type int, float given +dechex(): Argument #1 ($num) must be of type int, float given -- Iteration 6 -- -dechex(): Argument #1 ($number) must be of type int, float given +dechex(): Argument #1 ($num) must be of type int, float given -- Iteration 7 -- string(1) "a" @@ -118,7 +118,7 @@ string(1) "a" string(8) "fffffff6" -- Iteration 9 -- -dechex(): Argument #1 ($number) must be of type int, float given +dechex(): Argument #1 ($num) must be of type int, float given -- Iteration 10 -- string(1) "0" @@ -145,25 +145,25 @@ string(1) "1" string(1) "0" -- Iteration 18 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 19 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 20 -- -dechex(): Argument #1 ($number) must be of type int, array given +dechex(): Argument #1 ($num) must be of type int, array given -- Iteration 21 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 22 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 23 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 24 -- -dechex(): Argument #1 ($number) must be of type int, classA given +dechex(): Argument #1 ($num) must be of type int, classA given -- Iteration 25 -- string(1) "0" @@ -172,4 +172,4 @@ string(1) "0" string(1) "0" -- Iteration 27 -- -dechex(): Argument #1 ($number) must be of type int, resource given +dechex(): Argument #1 ($num) must be of type int, resource given diff --git a/ext/standard/tests/math/dechex_variation1_64bit.phpt b/ext/standard/tests/math/dechex_variation1_64bit.phpt index 981ccba493c56..020bbcd22ce73 100644 --- a/ext/standard/tests/math/dechex_variation1_64bit.phpt +++ b/ext/standard/tests/math/dechex_variation1_64bit.phpt @@ -105,10 +105,10 @@ string(4) "3039" string(16) "fffffffffffff6d7" -- Iteration 5 -- -dechex(): Argument #1 ($number) must be of type int, float given +dechex(): Argument #1 ($num) must be of type int, float given -- Iteration 6 -- -dechex(): Argument #1 ($number) must be of type int, float given +dechex(): Argument #1 ($num) must be of type int, float given -- Iteration 7 -- string(1) "a" @@ -144,25 +144,25 @@ string(1) "1" string(1) "0" -- Iteration 18 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 19 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 20 -- -dechex(): Argument #1 ($number) must be of type int, array given +dechex(): Argument #1 ($num) must be of type int, array given -- Iteration 21 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 22 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 23 -- -dechex(): Argument #1 ($number) must be of type int, string given +dechex(): Argument #1 ($num) must be of type int, string given -- Iteration 24 -- -dechex(): Argument #1 ($number) must be of type int, classA given +dechex(): Argument #1 ($num) must be of type int, classA given -- Iteration 25 -- string(1) "0" @@ -171,4 +171,4 @@ string(1) "0" string(1) "0" -- Iteration 27 -- -dechex(): Argument #1 ($number) must be of type int, resource given +dechex(): Argument #1 ($num) must be of type int, resource given diff --git a/ext/standard/tests/math/decoct_basic.phpt b/ext/standard/tests/math/decoct_basic.phpt index 4afdeb466e43c..9252789b2464b 100644 --- a/ext/standard/tests/math/decoct_basic.phpt +++ b/ext/standard/tests/math/decoct_basic.phpt @@ -36,7 +36,7 @@ string(2) "12" string(4) "7556" string(4) "7556" string(2) "47" -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given string(1) "1" string(1) "0" string(1) "0" diff --git a/ext/standard/tests/math/decoct_basiclong_64bit.phpt b/ext/standard/tests/math/decoct_basiclong_64bit.phpt index 0ebc7203f2eff..a4e951176cd0b 100644 --- a/ext/standard/tests/math/decoct_basiclong_64bit.phpt +++ b/ext/standard/tests/math/decoct_basiclong_64bit.phpt @@ -55,7 +55,7 @@ string(11) "37777777775" --- testing: 9223372036854775806 --- string(21) "777777777777777777776" --- testing: 9.2233720368548E+18 --- -decoct(): Argument #1 ($number) must be of type int, float given +decoct(): Argument #1 ($num) must be of type int, float given --- testing: -9223372036854775807 --- string(22) "1000000000000000000001" --- testing: -9.2233720368548E+18 --- diff --git a/ext/standard/tests/math/decoct_variation1.phpt b/ext/standard/tests/math/decoct_variation1.phpt index 79125661757df..a236ea53678bc 100644 --- a/ext/standard/tests/math/decoct_variation1.phpt +++ b/ext/standard/tests/math/decoct_variation1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test decoct() function : usage variations - different data types as $number arg +Test decoct() function : usage variations - different data types as $num arg --INI-- precision=14 --SKIPIF-- @@ -106,10 +106,10 @@ string(5) "30071" string(11) "37777773327" -- Iteration 5 -- -decoct(): Argument #1 ($number) must be of type int, float given +decoct(): Argument #1 ($num) must be of type int, float given -- Iteration 6 -- -decoct(): Argument #1 ($number) must be of type int, float given +decoct(): Argument #1 ($num) must be of type int, float given -- Iteration 7 -- string(2) "12" @@ -118,7 +118,7 @@ string(2) "12" string(11) "37777777766" -- Iteration 9 -- -decoct(): Argument #1 ($number) must be of type int, float given +decoct(): Argument #1 ($num) must be of type int, float given -- Iteration 10 -- string(1) "0" @@ -145,25 +145,25 @@ string(1) "1" string(1) "0" -- Iteration 18 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 19 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 20 -- -decoct(): Argument #1 ($number) must be of type int, array given +decoct(): Argument #1 ($num) must be of type int, array given -- Iteration 21 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 22 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 23 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 24 -- -decoct(): Argument #1 ($number) must be of type int, classA given +decoct(): Argument #1 ($num) must be of type int, classA given -- Iteration 25 -- string(1) "0" @@ -172,4 +172,4 @@ string(1) "0" string(1) "0" -- Iteration 27 -- -decoct(): Argument #1 ($number) must be of type int, resource given +decoct(): Argument #1 ($num) must be of type int, resource given diff --git a/ext/standard/tests/math/decoct_variation1_64bit.phpt b/ext/standard/tests/math/decoct_variation1_64bit.phpt index 35a9c892883c9..2ecc212844c0b 100644 --- a/ext/standard/tests/math/decoct_variation1_64bit.phpt +++ b/ext/standard/tests/math/decoct_variation1_64bit.phpt @@ -106,10 +106,10 @@ string(5) "30071" string(22) "1777777777777777773327" -- Iteration 5 -- -decoct(): Argument #1 ($number) must be of type int, float given +decoct(): Argument #1 ($num) must be of type int, float given -- Iteration 6 -- -decoct(): Argument #1 ($number) must be of type int, float given +decoct(): Argument #1 ($num) must be of type int, float given -- Iteration 7 -- string(2) "12" @@ -145,25 +145,25 @@ string(1) "1" string(1) "0" -- Iteration 18 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 19 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 20 -- -decoct(): Argument #1 ($number) must be of type int, array given +decoct(): Argument #1 ($num) must be of type int, array given -- Iteration 21 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 22 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 23 -- -decoct(): Argument #1 ($number) must be of type int, string given +decoct(): Argument #1 ($num) must be of type int, string given -- Iteration 24 -- -decoct(): Argument #1 ($number) must be of type int, classA given +decoct(): Argument #1 ($num) must be of type int, classA given -- Iteration 25 -- string(1) "0" @@ -172,4 +172,4 @@ string(1) "0" string(1) "0" -- Iteration 27 -- -decoct(): Argument #1 ($number) must be of type int, resource given +decoct(): Argument #1 ($num) must be of type int, resource given diff --git a/ext/standard/tests/math/floor_variation1.phpt b/ext/standard/tests/math/floor_variation1.phpt index 95228b4418aac..0b5f09f27dce5 100644 --- a/ext/standard/tests/math/floor_variation1.phpt +++ b/ext/standard/tests/math/floor_variation1.phpt @@ -93,25 +93,25 @@ float(1) float(0) -- Iteration 7 -- -floor(): Argument #1 ($number) must be of type int|float, string given +floor(): Argument #1 ($num) must be of type int|float, string given -- Iteration 8 -- -floor(): Argument #1 ($number) must be of type int|float, string given +floor(): Argument #1 ($num) must be of type int|float, string given -- Iteration 9 -- -floor(): Argument #1 ($number) must be of type int|float, array given +floor(): Argument #1 ($num) must be of type int|float, array given -- Iteration 10 -- -floor(): Argument #1 ($number) must be of type int|float, string given +floor(): Argument #1 ($num) must be of type int|float, string given -- Iteration 11 -- -floor(): Argument #1 ($number) must be of type int|float, string given +floor(): Argument #1 ($num) must be of type int|float, string given -- Iteration 12 -- -floor(): Argument #1 ($number) must be of type int|float, string given +floor(): Argument #1 ($num) must be of type int|float, string given -- Iteration 13 -- -floor(): Argument #1 ($number) must be of type int|float, classA given +floor(): Argument #1 ($num) must be of type int|float, classA given -- Iteration 14 -- float(0) @@ -120,4 +120,4 @@ float(0) float(0) -- Iteration 16 -- -floor(): Argument #1 ($number) must be of type int|float, resource given +floor(): Argument #1 ($num) must be of type int|float, resource given diff --git a/ext/standard/tests/math/round_variation1.phpt b/ext/standard/tests/math/round_variation1.phpt index ab8eecbe84227..b6ce56dd4acad 100644 --- a/ext/standard/tests/math/round_variation1.phpt +++ b/ext/standard/tests/math/round_variation1.phpt @@ -137,25 +137,25 @@ float(1) float(0) -- Iteration 17 -- -round(): Argument #1 ($number) must be of type int|float, string given +round(): Argument #1 ($num) must be of type int|float, string given -- Iteration 18 -- -round(): Argument #1 ($number) must be of type int|float, string given +round(): Argument #1 ($num) must be of type int|float, string given -- Iteration 19 -- -round(): Argument #1 ($number) must be of type int|float, array given +round(): Argument #1 ($num) must be of type int|float, array given -- Iteration 20 -- -round(): Argument #1 ($number) must be of type int|float, string given +round(): Argument #1 ($num) must be of type int|float, string given -- Iteration 21 -- -round(): Argument #1 ($number) must be of type int|float, string given +round(): Argument #1 ($num) must be of type int|float, string given -- Iteration 22 -- -round(): Argument #1 ($number) must be of type int|float, string given +round(): Argument #1 ($num) must be of type int|float, string given -- Iteration 23 -- -round(): Argument #1 ($number) must be of type int|float, classA given +round(): Argument #1 ($num) must be of type int|float, classA given -- Iteration 24 -- float(0) @@ -164,4 +164,4 @@ float(0) float(0) -- Iteration 26 -- -round(): Argument #1 ($number) must be of type int|float, resource given +round(): Argument #1 ($num) must be of type int|float, resource given diff --git a/ext/standard/tests/streams/stream_get_contents_negative_length.phpt b/ext/standard/tests/streams/stream_get_contents_negative_length.phpt index 7bfe8d5724d73..d229c0ef6bfbf 100644 --- a/ext/standard/tests/streams/stream_get_contents_negative_length.phpt +++ b/ext/standard/tests/streams/stream_get_contents_negative_length.phpt @@ -14,6 +14,6 @@ try { } ?> ---EXPECTF-- +--EXPECT-- string(2) "bc" -stream_get_contents(): Argument #2 ($maxlength) must be greater than or equal to -1 +stream_get_contents(): Argument #2 ($max_length) must be greater than or equal to -1 diff --git a/ext/standard/tests/strings/addcslashes_001.phpt b/ext/standard/tests/strings/addcslashes_001.phpt index 50a57129e5b36837e10656c9b15dc716818d88a9..be6b18559faa64304ecf5399d0057352e5ec9775 100644 GIT binary patch delta 19 bcmaFK^O|SF0cN(u|~xmofnWRLKYl delta 17 ZcmaFO^O9%70cMt*%;J*G$C#Hg0RTnO2SWe= diff --git a/ext/standard/tests/strings/bug40754.phpt b/ext/standard/tests/strings/bug40754.phpt index be9d89912dc63..42eed969abfdf 100644 --- a/ext/standard/tests/strings/bug40754.phpt +++ b/ext/standard/tests/strings/bug40754.phpt @@ -88,8 +88,8 @@ var_dump(substr("abcde", $v, $v)); --EXPECT-- string(4) "bcde" string(6) "abcdex" -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystack) substr_compare(): Argument #3 ($offset) must be contained in argument #1 ($main_str) stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/standard/tests/strings/bug61116.phpt b/ext/standard/tests/strings/bug61116.phpt index d03489560b231..f8f76cd5047e9 100644 --- a/ext/standard/tests/strings/bug61116.phpt +++ b/ext/standard/tests/strings/bug61116.phpt @@ -10,7 +10,7 @@ Function [ function htmlspecialchars ] { - Parameters [4] { Parameter #0 [ string $string ] - Parameter #1 [ int $quote_style = ENT_COMPAT ] + Parameter #1 [ int $flags = ENT_COMPAT ] Parameter #2 [ ?string $encoding = null ] Parameter #3 [ bool $double_encode = true ] } @@ -21,7 +21,7 @@ Function [ function get_html_translation_table ] { - Parameters [3] { Parameter #0 [ int $table = HTML_SPECIALCHARS ] - Parameter #1 [ int $quote_style = ENT_COMPAT ] + Parameter #1 [ int $flags = ENT_COMPAT ] Parameter #2 [ string $encoding = "UTF-8" ] } - Return [ array ] diff --git a/ext/standard/tests/strings/chunk_split_variation5.phpt b/ext/standard/tests/strings/chunk_split_variation5.phpt index 31a7b2c0389a540b9f6744905002e7e297e71e2f..9e59d6765877650794a6bf8bd9eb994c4374349b 100644 GIT binary patch delta 57 tcmZ1{uuNdXJr=f{)V%bPjLAA|YMXgjB^aUn%{pxDF!to#>_G@+k^nED65#*< delta 73 ycmZ1`uufpZJr<7SjMBX9oYcI@yd097|FWnuqKHiX%fh?ak1Y{NbSrxhiV^_BEg4S$ diff --git a/ext/standard/tests/strings/chunk_split_variation8.phpt b/ext/standard/tests/strings/chunk_split_variation8.phpt index 4a21455ecfd41..b0c889494e404 100644 --- a/ext/standard/tests/strings/chunk_split_variation8.phpt +++ b/ext/standard/tests/strings/chunk_split_variation8.phpt @@ -53,14 +53,14 @@ for($count = 0; $count < count($values); $count++) { --EXPECT-- *** Testing chunk_split() : different 'chunklen' with heredoc 'str' *** -- Iteration 1 -- -chunk_split(): Argument #2 ($chunklen) must be greater than 0 +chunk_split(): Argument #2 ($length) must be greater than 0 -- Iteration 2 -- string(504) "T:::h:::i:::s:::':::s::: :::h:::e:::r:::e:::d:::o:::c::: :::s:::t:::r:::i:::n:::g::: :::w:::i:::t:::h::: ::: ::: :::a:::n:::d::: ::: ::: :::w:::h:::i:::t:::e::: :::s:::p:::a:::c:::e::: :::c:::h:::a:::r:::.::: :::I:::t::: :::h:::a:::s::: :::_:::s:::p:::e:::c:::i:::@:::l::: :::c:::h:::@:::r:::$::: :::2:::2:::2:::2::: :::!:::!:::!:::N:::o:::w::: :::\:::k::: :::a:::s::: :::e:::s:::c:::a:::p:::e::: :::c:::h:::a:::r::: :::t:::o::: :::t:::e:::s:::t::: :::c:::h:::u:::n:::k:::_:::s:::p:::l:::i:::t:::(:::):::" -- Iteration 3 -- -chunk_split(): Argument #2 ($chunklen) must be greater than 0 +chunk_split(): Argument #2 ($length) must be greater than 0 -- Iteration 4 -- string(129) "This's heredoc string with and white space char. @@ -77,6 +77,6 @@ string(129) "This's heredoc string with and It has _speci@l ch@r$ 2222 !!!Now \k as escape char to test chunk_split():::" -- Iteration 7 -- -chunk_split(): Argument #2 ($chunklen) must be of type int, float given +chunk_split(): Argument #2 ($length) must be of type int, float given -- Iteration 8 -- -chunk_split(): Argument #2 ($chunklen) must be greater than 0 +chunk_split(): Argument #2 ($length) must be greater than 0 diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt index fdc9d329a8fad443258bc5c4945d85c74096a47f..c1c1599eb7b56c5ddfb62286e2a2a0b696ca0938 100644 GIT binary patch delta 79 zcmbQKzd(Njryyr>YC&RAVo83{W?sQ!W(0RKub|rIRU(fVSrdzj5-TU?ic3viBUTFM MsZaJ3mxS|l09nx+fdBvi delta 67 zcmZ3WKU04LryxsuPHF1oJ`uIe7J|OaVBY3F5e}xwO~MkB*NW9bX^zQ#;=Ge<#UzpV FLICvF73Tl| diff --git a/ext/standard/tests/strings/join_variation1.phpt b/ext/standard/tests/strings/join_variation1.phpt index a21251aec2a28..7a806349ce9cb 100644 --- a/ext/standard/tests/strings/join_variation1.phpt +++ b/ext/standard/tests/strings/join_variation1.phpt @@ -119,15 +119,15 @@ string(29) "element11.07654321E-9element2" -- Iteration 9 -- string(19) "element10.5element2" -- Iteration 10 -- -join(): Argument #1 ($glue) must be of type string, array given +join(): Argument #1 ($separator) must be of type string, array given -- Iteration 11 -- -join(): Argument #1 ($glue) must be of type string, array given +join(): Argument #1 ($separator) must be of type string, array given -- Iteration 12 -- -join(): Argument #1 ($glue) must be of type string, array given +join(): Argument #1 ($separator) must be of type string, array given -- Iteration 13 -- -join(): Argument #1 ($glue) must be of type string, array given +join(): Argument #1 ($separator) must be of type string, array given -- Iteration 14 -- -join(): Argument #1 ($glue) must be of type string, array given +join(): Argument #1 ($separator) must be of type string, array given -- Iteration 15 -- string(17) "element11element2" -- Iteration 16 -- @@ -147,7 +147,7 @@ string(16) "element1element2" -- Iteration 23 -- string(16) "element1element2" -- Iteration 24 -- -join(): Argument #1 ($glue) must be of type array|string, resource given +join(): Argument #1 ($separator) must be of type array|string, resource given -- Iteration 25 -- string(16) "element1element2" -- Iteration 26 -- diff --git a/ext/standard/tests/strings/join_variation2.phpt b/ext/standard/tests/strings/join_variation2.phpt index 5fc83dde794db..57f570b258703 100644 --- a/ext/standard/tests/strings/join_variation2.phpt +++ b/ext/standard/tests/strings/join_variation2.phpt @@ -102,47 +102,47 @@ echo "Done\n"; --- Testing join() by supplying different values for 'pieces' argument --- -- Iteration 1 -- -join(): Argument #2 ($pieces) must be of type ?array, int given +join(): Argument #2 ($array) must be of type ?array, int given -- Iteration 2 -- -join(): Argument #2 ($pieces) must be of type ?array, int given +join(): Argument #2 ($array) must be of type ?array, int given -- Iteration 3 -- -join(): Argument #2 ($pieces) must be of type ?array, int given +join(): Argument #2 ($array) must be of type ?array, int given -- Iteration 4 -- -join(): Argument #2 ($pieces) must be of type ?array, int given +join(): Argument #2 ($array) must be of type ?array, int given -- Iteration 5 -- -join(): Argument #2 ($pieces) must be of type ?array, float given +join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 6 -- -join(): Argument #2 ($pieces) must be of type ?array, float given +join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 7 -- -join(): Argument #2 ($pieces) must be of type ?array, float given +join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 8 -- -join(): Argument #2 ($pieces) must be of type ?array, float given +join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 9 -- -join(): Argument #2 ($pieces) must be of type ?array, float given +join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 10 -- -join(): Argument #2 ($pieces) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, bool given -- Iteration 11 -- -join(): Argument #2 ($pieces) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, bool given -- Iteration 12 -- -join(): Argument #2 ($pieces) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, bool given -- Iteration 13 -- -join(): Argument #2 ($pieces) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, bool given -- Iteration 14 -- -join(): Argument #2 ($pieces) must be of type ?array, string given +join(): Argument #2 ($array) must be of type ?array, string given -- Iteration 15 -- -join(): Argument #2 ($pieces) must be of type ?array, string given +join(): Argument #2 ($array) must be of type ?array, string given -- Iteration 16 -- -join(): Argument #2 ($pieces) must be of type ?array, test given +join(): Argument #2 ($array) must be of type ?array, test given -- Iteration 17 -- -join(): Argument #2 ($pieces) must be of type ?array, string given +join(): Argument #2 ($array) must be of type ?array, string given -- Iteration 18 -- -join(): Argument #2 ($pieces) must be of type ?array, string given +join(): Argument #2 ($array) must be of type ?array, string given -- Iteration 19 -- join(): Argument #1 ($pieces) must be of type array, string given -- Iteration 20 -- join(): Argument #1 ($pieces) must be of type array, string given -- Iteration 21 -- -join(): Argument #2 ($pieces) must be of type ?array, resource given +join(): Argument #2 ($array) must be of type ?array, resource given -- Iteration 22 -- join(): Argument #1 ($pieces) must be of type array, string given -- Iteration 23 -- diff --git a/ext/standard/tests/strings/join_variation4.phpt b/ext/standard/tests/strings/join_variation4.phpt index 6a9ff44297ed5777d70aba8c343ee8a44dc0f444..8c8c8b9092d94edd0c97ab8461d3fa17861699e2 100644 GIT binary patch delta 22 dcmdlcuv=imaTdJoYK_I7g(~H0YB0Pvj6}9 diff --git a/ext/standard/tests/strings/join_variation5.phpt b/ext/standard/tests/strings/join_variation5.phpt index 50dd08cbf2af3..9e5898d8c1079 100644 --- a/ext/standard/tests/strings/join_variation5.phpt +++ b/ext/standard/tests/strings/join_variation5.phpt @@ -35,7 +35,7 @@ Warning: Array to string conversion in %s on line %d Warning: Array to string conversion in %s on line %d string(27) "ArrayTESTArrayTESTPHPTEST50" -join(): Argument #1 ($glue) must be of type string, array given +join(): Argument #1 ($separator) must be of type string, array given Warning: Array to string conversion in %s on line %d diff --git a/ext/standard/tests/strings/levenshtein_error_conditions.phpt b/ext/standard/tests/strings/levenshtein_error_conditions.phpt index bd1b80742b19c..71af71297f653 100644 --- a/ext/standard/tests/strings/levenshtein_error_conditions.phpt +++ b/ext/standard/tests/strings/levenshtein_error_conditions.phpt @@ -25,7 +25,7 @@ try { --EXPECT-- --- String 1 --- int(254) -levenshtein(): Argument #1 ($str1) must be less than 256 characters +levenshtein(): Argument #1 ($string1) must be less than 256 characters --- String 2 --- int(254) -levenshtein(): Argument #2 ($str2) must be less than 256 characters +levenshtein(): Argument #2 ($string2) must be less than 256 characters diff --git a/ext/standard/tests/strings/metaphone.phpt b/ext/standard/tests/strings/metaphone.phpt index 0356c1fd69909..6b8f5c1c89d9d 100644 --- a/ext/standard/tests/strings/metaphone.phpt +++ b/ext/standard/tests/strings/metaphone.phpt @@ -30,7 +30,7 @@ echo "Done\n"; --EXPECT-- string(0) "" string(0) "" -metaphone(): Argument #2 ($phonemes) must be greater than or equal to 0 +metaphone(): Argument #2 ($max_phonemes) must be greater than or equal to 0 string(6) "FLTFRS" string(6) "FLTFRS" string(26) "0FLFRWRTKRFLNKHTLSLN0KLTR0" diff --git a/ext/standard/tests/strings/str_pad_variation1.phpt b/ext/standard/tests/strings/str_pad_variation1.phpt index d0f953a184ae2..cb71e61156fcd 100644 --- a/ext/standard/tests/strings/str_pad_variation1.phpt +++ b/ext/standard/tests/strings/str_pad_variation1.phpt @@ -31,6 +31,6 @@ var_dump( str_pad($input, $php_int_max_pad_length) ); ?> --EXPECTF-- *** Testing str_pad() function: with large value for for 'pad_length' argument *** -str_pad(): Argument #2 ($pad_length) must be of type int, float given +str_pad(): Argument #2 ($length) must be of type int, float given Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt index 7919dfda219894cfd4f9c1d2b1642da93ec32c65..3069f6bfe97f9bcb3a9523885b5ae82c49c1477f 100644 GIT binary patch delta 17 Ycmew<`b%`f1uoW-%-q!C$yc~k0Z97?WdHyG delta 16 Xcmew*`crhn1umA{(wvgXSGiOHLA?hB diff --git a/ext/standard/tests/strings/strcspn.phpt b/ext/standard/tests/strings/strcspn.phpt index bdeac113bbe8c..7fc2ca3f4007a 100644 --- a/ext/standard/tests/strings/strcspn.phpt +++ b/ext/standard/tests/strings/strcspn.phpt @@ -21,4 +21,4 @@ string(4) "1234" int(0) int(7) int(6) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) diff --git a/ext/standard/tests/strings/strcspn_variation11.phpt b/ext/standard/tests/strings/strcspn_variation11.phpt index 3c69373af093f..0ff3c614c3718 100644 --- a/ext/standard/tests/strings/strcspn_variation11.phpt +++ b/ext/standard/tests/strings/strcspn_variation11.phpt @@ -79,219 +79,219 @@ echo "Done" -- Iteration 1 -- int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 2 -- int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 3 -- int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 4 -- int(2) @@ -299,71 +299,71 @@ int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 5 -- int(24) @@ -371,71 +371,71 @@ int(23) int(22) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(24) int(23) int(22) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(0) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(24) int(23) int(22) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(24) int(23) int(22) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(0) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 6 -- int(28) @@ -443,71 +443,71 @@ int(27) int(26) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(28) int(27) int(26) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(0) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(28) int(27) int(26) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(28) int(27) int(26) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 7 -- int(20) @@ -515,71 +515,71 @@ int(19) int(18) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(20) int(19) int(18) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(20) int(19) int(18) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(20) int(19) int(18) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 8 -- int(21) @@ -587,71 +587,71 @@ int(20) int(19) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 9 -- int(5) @@ -659,71 +659,71 @@ int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(0) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(12) int(11) int(10) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(0) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 10 -- int(16) @@ -731,71 +731,71 @@ int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(16) int(15) int(14) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 11 -- int(0) @@ -803,71 +803,71 @@ int(0) int(0) int(0) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 12 -- int(0) @@ -875,71 +875,71 @@ int(5) int(4) int(0) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(5) int(4) int(0) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(3) int(2) int(1) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(3) int(2) int(1) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(13) int(12) int(11) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 13 -- int(0) @@ -947,71 +947,71 @@ int(12) int(11) int(0) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(12) int(11) int(0) int(1) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(3) int(2) int(1) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(3) int(2) int(1) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 14 -- int(5) @@ -1019,71 +1019,71 @@ int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 15 -- int(5) @@ -1091,71 +1091,71 @@ int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(11) int(10) int(9) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 16 -- int(5) @@ -1163,71 +1163,71 @@ int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(14) int(13) int(12) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(6) int(5) int(4) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 17 -- int(21) @@ -1235,69 +1235,69 @@ int(20) int(19) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(0) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(21) int(20) int(19) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(5) int(4) int(3) int(1) int(2) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) Done diff --git a/ext/standard/tests/strings/strcspn_variation12.phpt b/ext/standard/tests/strings/strcspn_variation12.phpt index 7367e20dce900..d43ff90599bf8 100644 --- a/ext/standard/tests/strings/strcspn_variation12.phpt +++ b/ext/standard/tests/strings/strcspn_variation12.phpt @@ -81,2399 +81,2399 @@ echo "Done" -- Iteration 1 -- int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 2 -- int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 3 -- int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 4 -- int(0) int(1) int(2) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 5 -- int(0) int(1) int(2) int(23) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(22) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(21) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(23) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(22) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(21) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(23) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(22) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(21) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 6 -- int(0) int(1) int(2) int(19) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(18) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(17) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(19) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(18) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(17) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(6) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(16) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(15) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(14) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(19) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(18) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(17) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(16) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(15) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(14) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 7 -- int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 8 -- int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 9 -- int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 10 -- int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(8) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(8) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(9) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(8) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 11 -- int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(12) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(11) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(10) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(6) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(5) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -int(1) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strcspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +int(1) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strcspn(): Argument #3 ($offset) must be contained in argument #1 ($str) Done diff --git a/ext/standard/tests/strings/strip_tags_variation2.phpt b/ext/standard/tests/strings/strip_tags_variation2.phpt index 640e353ab2b81..421f8a62ae4ea 100644 --- a/ext/standard/tests/strings/strip_tags_variation2.phpt +++ b/ext/standard/tests/strings/strip_tags_variation2.phpt @@ -125,5 +125,5 @@ string(10) "helloworld" -- Iteration 20 -- string(10) "helloworld" -- Iteration 21 -- -strip_tags(): Argument #2 ($allowable_tags) must be of type array|string|null, resource given +strip_tags(): Argument #2 ($allowed_tags) must be of type array|string|null, resource given Done diff --git a/ext/standard/tests/strings/strpbrk_error.phpt b/ext/standard/tests/strings/strpbrk_error.phpt index 78550ab009b9a..3d7f84e948bfb 100644 --- a/ext/standard/tests/strings/strpbrk_error.phpt +++ b/ext/standard/tests/strings/strpbrk_error.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECT-- -- Testing strpbrk() function with empty second argument -- -strpbrk(): Argument #2 ($char_list) must be a non-empty string +strpbrk(): Argument #2 ($characters) must be a non-empty string diff --git a/ext/standard/tests/strings/strspn_variation11.phpt b/ext/standard/tests/strings/strspn_variation11.phpt index 8e30a6d900a24..c66e86b7f570c 100644 --- a/ext/standard/tests/strings/strspn_variation11.phpt +++ b/ext/standard/tests/strings/strspn_variation11.phpt @@ -79,219 +79,219 @@ echo "Done" -- Iteration 1 -- int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 2 -- int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 3 -- int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 4 -- int(0) @@ -299,71 +299,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(2) int(1) int(0) int(1) int(2) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(1) int(0) int(0) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 5 -- int(0) @@ -371,71 +371,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 6 -- int(0) @@ -443,71 +443,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(2) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 7 -- int(0) @@ -515,71 +515,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 8 -- int(0) @@ -587,71 +587,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 9 -- int(0) @@ -659,71 +659,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(1) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 10 -- int(0) @@ -731,71 +731,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 11 -- int(0) @@ -803,71 +803,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 12 -- int(0) @@ -875,71 +875,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 13 -- int(0) @@ -947,71 +947,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(4) int(3) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 14 -- int(0) @@ -1019,71 +1019,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 15 -- int(0) @@ -1091,71 +1091,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 16 -- int(0) @@ -1163,71 +1163,71 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 17 -- int(0) @@ -1235,69 +1235,69 @@ int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) int(0) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(4) int(3) int(2) int(0) int(1) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) Done diff --git a/ext/standard/tests/strings/strspn_variation12.phpt b/ext/standard/tests/strings/strspn_variation12.phpt index 9fec20735c4b6..a43b85a696760 100644 --- a/ext/standard/tests/strings/strspn_variation12.phpt +++ b/ext/standard/tests/strings/strspn_variation12.phpt @@ -81,2795 +81,2795 @@ echo "Done" -- Iteration 1 -- int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 2 -- int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 3 -- int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -int(0) -int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +int(0) +int(1) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 4 -- int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(1) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 5 -- int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 6 -- int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 7 -- int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 8 -- int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 9 -- int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +int(0) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 10 -- int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) -- Iteration 11 -- int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) int(0) int(1) int(2) int(4) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(3) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(1) int(2) int(2) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) int(0) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #4 ($len) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) -strspn(): Argument #3 ($start) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #4 ($length) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) +strspn(): Argument #3 ($offset) must be contained in argument #1 ($str) Done diff --git a/ext/standard/tests/strings/substr_replace_error.phpt b/ext/standard/tests/strings/substr_replace_error.phpt index 6fc0c2e203553..165cc1e6913d1 100644 --- a/ext/standard/tests/strings/substr_replace_error.phpt +++ b/ext/standard/tests/strings/substr_replace_error.phpt @@ -27,5 +27,5 @@ try { *** Testing substr_replace() : error conditions *** -- Testing substr_replace() function with start and length as arrays but string not-- -substr_replace(): Argument #3 ($start) cannot be an array when working on a single string +substr_replace(): Argument #3 ($offset) cannot be an array when working on a single string substr_replace(): Argument #4 ($length) cannot be an array when working on a single string diff --git a/ext/standard/tests/strings/vfprintf_error3.phpt b/ext/standard/tests/strings/vfprintf_error3.phpt index 703bc73ad8ced..24991552e0a35 100644 --- a/ext/standard/tests/strings/vfprintf_error3.phpt +++ b/ext/standard/tests/strings/vfprintf_error3.phpt @@ -48,6 +48,6 @@ unlink( $file ); --EXPECT-- -- Testing vfprintf() function with wrong variable types as argument -- vfprintf(): Argument #2 ($format) must be of type string, array given -vfprintf(): Argument #3 ($args) must be of type array, string given +vfprintf(): Argument #3 ($values) must be of type array, string given Unknown format specifier "y" string(0) "" diff --git a/ext/standard/tests/strings/vfprintf_error4.phpt b/ext/standard/tests/strings/vfprintf_error4.phpt index fcbd86466dd5d..b635c7781e956 100644 --- a/ext/standard/tests/strings/vfprintf_error4.phpt +++ b/ext/standard/tests/strings/vfprintf_error4.phpt @@ -34,5 +34,5 @@ unlink( $file ); ?> --EXPECT-- -- Testing vfprintf() function with other strangeties -- -vfprintf(): Argument #1 ($handle) must be of type resource, string given +vfprintf(): Argument #1 ($stream) must be of type resource, string given Error found: Argument number must be greater than zero. diff --git a/ext/standard/tests/strings/vfprintf_variation1.phpt b/ext/standard/tests/strings/vfprintf_variation1.phpt index c9274d383bec4..36d983817024f 100644 --- a/ext/standard/tests/strings/vfprintf_variation1.phpt +++ b/ext/standard/tests/strings/vfprintf_variation1.phpt @@ -60,7 +60,7 @@ unlink( $file ); ?> --EXPECT-- *** Testing vfprintf() : variation functionality *** -vfprintf(): Argument #3 ($args) must be of type array, null given +vfprintf(): Argument #3 ($values) must be of type array, null given string(17) "Foo is 30 and bar" int(17) string(14) "Foobar testing" diff --git a/ext/standard/tests/strings/vprintf_variation2.phpt b/ext/standard/tests/strings/vprintf_variation2.phpt index 1f04a6395dd35..22f2f152d85a2 100644 --- a/ext/standard/tests/strings/vprintf_variation2.phpt +++ b/ext/standard/tests/strings/vprintf_variation2.phpt @@ -99,70 +99,70 @@ fclose($file_handle); *** Testing vprintf() : with unexpected values for args argument *** -- Iteration 1 -- -vprintf(): Argument #2 ($args) must be of type array, int given +vprintf(): Argument #2 ($values) must be of type array, int given -- Iteration 2 -- -vprintf(): Argument #2 ($args) must be of type array, int given +vprintf(): Argument #2 ($values) must be of type array, int given -- Iteration 3 -- -vprintf(): Argument #2 ($args) must be of type array, int given +vprintf(): Argument #2 ($values) must be of type array, int given -- Iteration 4 -- -vprintf(): Argument #2 ($args) must be of type array, int given +vprintf(): Argument #2 ($values) must be of type array, int given -- Iteration 5 -- -vprintf(): Argument #2 ($args) must be of type array, float given +vprintf(): Argument #2 ($values) must be of type array, float given -- Iteration 6 -- -vprintf(): Argument #2 ($args) must be of type array, float given +vprintf(): Argument #2 ($values) must be of type array, float given -- Iteration 7 -- -vprintf(): Argument #2 ($args) must be of type array, float given +vprintf(): Argument #2 ($values) must be of type array, float given -- Iteration 8 -- -vprintf(): Argument #2 ($args) must be of type array, float given +vprintf(): Argument #2 ($values) must be of type array, float given -- Iteration 9 -- -vprintf(): Argument #2 ($args) must be of type array, float given +vprintf(): Argument #2 ($values) must be of type array, float given -- Iteration 10 -- -vprintf(): Argument #2 ($args) must be of type array, null given +vprintf(): Argument #2 ($values) must be of type array, null given -- Iteration 11 -- -vprintf(): Argument #2 ($args) must be of type array, null given +vprintf(): Argument #2 ($values) must be of type array, null given -- Iteration 12 -- -vprintf(): Argument #2 ($args) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, bool given -- Iteration 13 -- -vprintf(): Argument #2 ($args) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, bool given -- Iteration 14 -- -vprintf(): Argument #2 ($args) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, bool given -- Iteration 15 -- -vprintf(): Argument #2 ($args) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, bool given -- Iteration 16 -- -vprintf(): Argument #2 ($args) must be of type array, string given +vprintf(): Argument #2 ($values) must be of type array, string given -- Iteration 17 -- -vprintf(): Argument #2 ($args) must be of type array, string given +vprintf(): Argument #2 ($values) must be of type array, string given -- Iteration 18 -- -vprintf(): Argument #2 ($args) must be of type array, string given +vprintf(): Argument #2 ($values) must be of type array, string given -- Iteration 19 -- -vprintf(): Argument #2 ($args) must be of type array, string given +vprintf(): Argument #2 ($values) must be of type array, string given -- Iteration 20 -- -vprintf(): Argument #2 ($args) must be of type array, sample given +vprintf(): Argument #2 ($values) must be of type array, sample given -- Iteration 21 -- -vprintf(): Argument #2 ($args) must be of type array, null given +vprintf(): Argument #2 ($values) must be of type array, null given -- Iteration 22 -- -vprintf(): Argument #2 ($args) must be of type array, null given +vprintf(): Argument #2 ($values) must be of type array, null given -- Iteration 23 -- -vprintf(): Argument #2 ($args) must be of type array, resource given +vprintf(): Argument #2 ($values) must be of type array, resource given diff --git a/ext/standard/tests/strings/wordwrap_error.phpt b/ext/standard/tests/strings/wordwrap_error.phpt index 26020f1e17da8..b93bb80565b89 100644 --- a/ext/standard/tests/strings/wordwrap_error.phpt +++ b/ext/standard/tests/strings/wordwrap_error.phpt @@ -47,7 +47,7 @@ var_dump( wordwrap($str, $width, $break, $cut) ); -- width = 0 & cut = false -- string(39) "testing
\nwordwrap
\nfunction" -- width = 0 & cut = true -- -wordwrap(): Argument #4 ($cut) cannot be true when argument #2 ($width) is 0 +wordwrap(): Argument #4 ($cut_long_words) cannot be true when argument #2 ($width) is 0 -- width = -10 & cut = false -- string(39) "testing
\nwordwrap
\nfunction" -- width = -10 & cut = true -- diff --git a/ext/sysvshm/tests/001.phpt b/ext/sysvshm/tests/001.phpt index e9d00bc6dc24c..487d862e8f55e 100644 --- a/ext/sysvshm/tests/001.phpt +++ b/ext/sysvshm/tests/001.phpt @@ -33,9 +33,9 @@ var_dump(ftok(__FILE__,"q")); echo "Done\n"; ?> --EXPECTF-- -ftok(): Argument #1 ($pathname) cannot be empty -ftok(): Argument #2 ($proj) must be a single character -ftok(): Argument #2 ($proj) must be a single character +ftok(): Argument #1 ($filename) cannot be empty +ftok(): Argument #2 ($project_id) must be a single character +ftok(): Argument #2 ($project_id) must be a single character Warning: ftok(): ftok() failed - No such file or directory in %s on line %d int(-1) diff --git a/sapi/cli/tests/004.phpt b/sapi/cli/tests/004.phpt index fb0ae99ddcdb9..094161a8fafcf 100644 --- a/sapi/cli/tests/004.phpt +++ b/sapi/cli/tests/004.phpt @@ -20,10 +20,10 @@ string(45) "Exception: Function unknown() does not exist " string(42) "Exception: Function echo() does not exist " -string(154) "Function [ function phpinfo ] { +string(155) "Function [ function phpinfo ] { - Parameters [1] { - Parameter #0 [ int $what = INFO_ALL ] + Parameter #0 [ int $flags = INFO_ALL ] } - Return [ bool ] } From 6dac6a996e096c251e9c56f67af0bb3942b815b9 Mon Sep 17 00:00:00 2001 From: Dik Takken Date: Tue, 29 Sep 2020 16:00:32 +0200 Subject: [PATCH 187/209] Warning promotion: Throw on writing invalid XML tag names This change throws a ValueError when an invalid tag name is passed to XMLWriter. The rationale is that this indicates a programming error because tag names typically originate from string literals or application code generating them. This translates into either a typo or a flaw in tag generation logic. Closes GH-6233. --- ext/xmlwriter/php_xmlwriter.c | 44 +++++++++++++++++------------------ ext/xmlwriter/tests/010.phpt | 27 ++++++++++++++------- 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index 6ccd23b37ea66..61e4a3a7d9579 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -88,10 +88,10 @@ static zend_object *xmlwriter_object_new(zend_class_entry *class_type) } /* }}} */ -#define XMLW_NAME_CHK(__err) \ +#define XMLW_NAME_CHK(__arg_no, __subject) \ if (xmlValidateName((xmlChar *) name, 0) != 0) { \ - php_error_docref(NULL, E_WARNING, "%s", __err); \ - RETURN_FALSE; \ + zend_argument_value_error(__arg_no, "must be a valid %s, \"%s\" given", __subject, name); \ + RETURN_THROWS(); \ } \ /* {{{ function prototypes */ @@ -199,7 +199,7 @@ static void xmlwriter_objects_clone(void *object, void **object_clone) } }}} */ -static void php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_one_char_t internal_function, char *err_string) +static void php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_one_char_t internal_function, char *subject_name) { xmlTextWriterPtr ptr; char *name; @@ -212,8 +212,8 @@ static void php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_rea } XMLWRITER_FROM_OBJECT(ptr, self); - if (err_string != NULL) { - XMLW_NAME_CHK(err_string); + if (subject_name != NULL) { + XMLW_NAME_CHK(2, subject_name); } if (ptr) { @@ -281,7 +281,7 @@ PHP_FUNCTION(xmlwriter_set_indent_string) /* {{{ Create start attribute - returns FALSE on error */ PHP_FUNCTION(xmlwriter_start_attribute) { - php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartAttribute, "Invalid Attribute Name"); + php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartAttribute, "attribute name"); } /* }}} */ @@ -307,7 +307,7 @@ PHP_FUNCTION(xmlwriter_start_attribute_ns) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Attribute Name"); + XMLW_NAME_CHK(3, "attribute name"); if (ptr) { retval = xmlTextWriterStartAttributeNS(ptr, (xmlChar *)prefix, (xmlChar *)name, (xmlChar *)uri); @@ -335,7 +335,7 @@ PHP_FUNCTION(xmlwriter_write_attribute) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Attribute Name"); + XMLW_NAME_CHK(2, "attribute name"); if (ptr) { retval = xmlTextWriterWriteAttribute(ptr, (xmlChar *)name, (xmlChar *)content); @@ -363,7 +363,7 @@ PHP_FUNCTION(xmlwriter_write_attribute_ns) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Attribute Name"); + XMLW_NAME_CHK(3, "attribute name"); if (ptr) { retval = xmlTextWriterWriteAttributeNS(ptr, (xmlChar *)prefix, (xmlChar *)name, (xmlChar *)uri, (xmlChar *)content); @@ -379,7 +379,7 @@ PHP_FUNCTION(xmlwriter_write_attribute_ns) /* {{{ Create start element tag - returns FALSE on error */ PHP_FUNCTION(xmlwriter_start_element) { - php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartElement, "Invalid Element Name"); + php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartElement, "element name"); } /* }}} */ @@ -398,7 +398,7 @@ PHP_FUNCTION(xmlwriter_start_element_ns) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Element Name"); + XMLW_NAME_CHK(3, "element name"); if (ptr) { retval = xmlTextWriterStartElementNS(ptr, (xmlChar *)prefix, (xmlChar *)name, (xmlChar *)uri); @@ -441,7 +441,7 @@ PHP_FUNCTION(xmlwriter_write_element) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Element Name"); + XMLW_NAME_CHK(2, "element name"); if (ptr) { if (!content) { @@ -480,7 +480,7 @@ PHP_FUNCTION(xmlwriter_write_element_ns) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Element Name"); + XMLW_NAME_CHK(3, "element name"); if (ptr) { if (!content) { @@ -507,7 +507,7 @@ PHP_FUNCTION(xmlwriter_write_element_ns) /* {{{ Create start PI tag - returns FALSE on error */ PHP_FUNCTION(xmlwriter_start_pi) { - php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartPI, "Invalid PI Target"); + php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartPI, "PI target"); } /* }}} */ @@ -533,7 +533,7 @@ PHP_FUNCTION(xmlwriter_write_pi) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid PI Target"); + XMLW_NAME_CHK(2, "PI target"); if (ptr) { retval = xmlTextWriterWritePI(ptr, (xmlChar *)name, (xmlChar *)content); @@ -726,7 +726,7 @@ PHP_FUNCTION(xmlwriter_write_dtd) /* {{{ Create start DTD element - returns FALSE on error */ PHP_FUNCTION(xmlwriter_start_dtd_element) { - php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDElement, "Invalid Element Name"); + php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDElement, "element name"); } /* }}} */ @@ -752,7 +752,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_element) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Element Name"); + XMLW_NAME_CHK(2, "element name"); if (ptr) { retval = xmlTextWriterWriteDTDElement(ptr, (xmlChar *)name, (xmlChar *)content); @@ -768,7 +768,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_element) /* {{{ Create start DTD AttList - returns FALSE on error */ PHP_FUNCTION(xmlwriter_start_dtd_attlist) { - php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDAttlist, "Invalid Element Name"); + php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDAttlist, "element name"); } /* }}} */ @@ -794,7 +794,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_attlist) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Element Name"); + XMLW_NAME_CHK(2, "element name"); if (ptr) { retval = xmlTextWriterWriteDTDAttlist(ptr, (xmlChar *)name, (xmlChar *)content); @@ -822,7 +822,7 @@ PHP_FUNCTION(xmlwriter_start_dtd_entity) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Attribute Name"); + XMLW_NAME_CHK(2, "attribute name"); if (ptr) { retval = xmlTextWriterStartDTDEntity(ptr, isparm, (xmlChar *)name); @@ -862,7 +862,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_entity) } XMLWRITER_FROM_OBJECT(ptr, self); - XMLW_NAME_CHK("Invalid Element Name"); + XMLW_NAME_CHK(2, "element name"); if (ptr) { retval = xmlTextWriterWriteDTDEntity(ptr, pe, (xmlChar *)name, (xmlChar *)pubid, (xmlChar *)sysid, (xmlChar *)ndataid, (xmlChar *)content); diff --git a/ext/xmlwriter/tests/010.phpt b/ext/xmlwriter/tests/010.phpt index 2ae160fad83d1..4c9b099a6801a 100644 --- a/ext/xmlwriter/tests/010.phpt +++ b/ext/xmlwriter/tests/010.phpt @@ -14,12 +14,27 @@ $xw = xmlwriter_open_uri($file); var_dump(xmlwriter_start_element($xw, "tag")); var_dump(xmlwriter_start_attribute($xw, "attr")); var_dump(xmlwriter_end_attribute($xw)); -var_dump(xmlwriter_start_attribute($xw, "-1")); + +try { + xmlwriter_start_attribute($xw, "-1"); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + var_dump(xmlwriter_end_attribute($xw)); -var_dump(xmlwriter_start_attribute($xw, "\"")); + +try { + xmlwriter_start_attribute($xw, "\""); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + var_dump(xmlwriter_end_attribute($xw)); var_dump(xmlwriter_end_element($xw)); +// Force to write and empty the buffer +xmlwriter_flush($xw, empty: true); + unset($xw); var_dump(file_get_contents($file)); @@ -32,13 +47,9 @@ echo "Done\n"; bool(true) bool(true) bool(true) - -Warning: xmlwriter_start_attribute(): Invalid Attribute Name in %s on line %d -bool(false) -bool(false) - -Warning: xmlwriter_start_attribute(): Invalid Attribute Name in %s on line %d +xmlwriter_start_attribute(): Argument #2 ($name) must be a valid attribute name, "-1" given bool(false) +xmlwriter_start_attribute(): Argument #2 ($name) must be a valid attribute name, """ given bool(false) bool(true) string(14) "" From a4331a67f427df4f5df0b0e6e5531907f9fecf52 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 29 Sep 2020 16:29:15 +0200 Subject: [PATCH 188/209] Update iconv parameter names And rename charset to encoding, including inside error messages. Closes GH-6234. --- ext/iconv/iconv.c | 22 +++++++------- ext/iconv/iconv.stub.php | 18 +++++------ ext/iconv/iconv_arginfo.h | 30 +++++++++---------- .../iconv-charset-length-cve-2007-4840.phpt | 4 +-- ...e_decode-charset-length-cve-2007-4840.phpt | 2 +- ..._headers-charset-length-cve-2007-4840.phpt | 2 +- ...encoding-charset-length-cve-2007-4840.phpt | 6 ++-- ...v_strlen-charset-length-cve-2007-4840.phpt | 2 +- ext/iconv/tests/iconv_strlen_error2.phpt | 2 +- ...v_strpos-charset-length-cve-2007-4840.phpt | 2 +- ext/iconv/tests/iconv_strpos_error2.phpt | 2 +- ..._strrpos-charset-length-cve-2007-4840.phpt | 2 +- ext/iconv/tests/iconv_strrpos_error2.phpt | 2 +- ...v_substr-charset-length-cve-2007-4783.phpt | 2 +- ext/iconv/tests/iconv_substr_error2.phpt | 2 +- 15 files changed, 50 insertions(+), 50 deletions(-) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 84f24baabbde7..90c209cbcbf00 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -1747,7 +1747,7 @@ static void _php_iconv_show_error(php_iconv_err_t err, const char *out_charset, break; case PHP_ICONV_ERR_WRONG_CHARSET: - php_error_docref(NULL, E_WARNING, "Wrong charset, conversion from \"%s\" to \"%s\" is not allowed", + php_error_docref(NULL, E_WARNING, "Wrong encoding, conversion from \"%s\" to \"%s\" is not allowed", in_charset, out_charset); break; @@ -1799,7 +1799,7 @@ PHP_FUNCTION(iconv_strlen) if (charset == NULL) { charset = get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -1835,7 +1835,7 @@ PHP_FUNCTION(iconv_substr) if (charset == NULL) { charset = get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -1876,7 +1876,7 @@ PHP_FUNCTION(iconv_strpos) if (charset == NULL) { charset = get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -1937,7 +1937,7 @@ PHP_FUNCTION(iconv_strrpos) if (charset == NULL) { charset = get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -1996,7 +1996,7 @@ PHP_FUNCTION(iconv_mime_encode) if ((pzval = zend_hash_str_find_deref(Z_ARRVAL_P(pref), "input-charset", sizeof("input-charset") - 1)) != NULL && Z_TYPE_P(pzval) == IS_STRING) { if (Z_STRLEN_P(pzval) >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -2008,7 +2008,7 @@ PHP_FUNCTION(iconv_mime_encode) if ((pzval = zend_hash_str_find_deref(Z_ARRVAL_P(pref), "output-charset", sizeof("output-charset") - 1)) != NULL && Z_TYPE_P(pzval) == IS_STRING) { if (Z_STRLEN_P(pzval) >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -2077,7 +2077,7 @@ PHP_FUNCTION(iconv_mime_decode) if (charset == NULL) { charset = get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -2118,7 +2118,7 @@ PHP_FUNCTION(iconv_mime_decode_headers) if (charset == NULL) { charset = get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -2211,7 +2211,7 @@ PHP_FUNCTION(iconv) } if (in_charset_len >= ICONV_CSNMAXLEN || out_charset_len >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } @@ -2241,7 +2241,7 @@ PHP_FUNCTION(iconv_set_encoding) } if (ZSTR_LEN(charset) >= ICONV_CSNMAXLEN) { - php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); + php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; } diff --git a/ext/iconv/iconv.stub.php b/ext/iconv/iconv.stub.php index a5f6743e81c44..84dc48a5e965f 100644 --- a/ext/iconv/iconv.stub.php +++ b/ext/iconv/iconv.stub.php @@ -2,22 +2,22 @@ /** @generate-function-entries */ -function iconv_strlen(string $str, ?string $charset = null): int|false {} +function iconv_strlen(string $string, ?string $encoding = null): int|false {} -function iconv_substr(string $str, int $offset, ?int $length = null, ?string $charset = null): string|false {} +function iconv_substr(string $string, int $offset, ?int $length = null, ?string $encoding = null): string|false {} -function iconv_strpos(string $haystack, string $needle, int $offset = 0, ?string $charset = null): int|false {} +function iconv_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {} -function iconv_strrpos(string $haystack, string $needle, ?string $charset = null): int|false {} +function iconv_strrpos(string $haystack, string $needle, ?string $encoding = null): int|false {} -function iconv_mime_encode(string $field_name, string $field_value, array $preference = []): string|false {} +function iconv_mime_encode(string $field_name, string $field_value, array $options = []): string|false {} -function iconv_mime_decode(string $encoded_string, int $mode = 0, ?string $charset = null): string|false {} +function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = null): string|false {} -function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $charset = null): array|false {} +function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $encoding = null): array|false {} -function iconv(string $in_charset, string $out_charset, string $str): string|false {} +function iconv(string $from_encoding, string $to_encoding, string $string): string|false {} -function iconv_set_encoding(string $type, string $charset): bool {} +function iconv_set_encoding(string $type, string $encoding): bool {} function iconv_get_encoding(string $type = "all"): array|string|false {} diff --git a/ext/iconv/iconv_arginfo.h b/ext/iconv/iconv_arginfo.h index 3702e5739bdf2..619d52631fb6d 100644 --- a/ext/iconv/iconv_arginfo.h +++ b/ext/iconv/iconv_arginfo.h @@ -1,58 +1,58 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4e26168b04450adf510a4e638184c46757679ac1 */ + * Stub hash: 5d05deb60466c6e1ee73b44ad0b09a032bc8410e */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strrpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_encode, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, field_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, field_value, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preference, IS_ARRAY, 0, "[]") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, encoded_string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_decode_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, in_charset, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, out_charset, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, from_encoding, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, to_encoding, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iconv_set_encoding, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_get_encoding, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE) diff --git a/ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt index b05bd560d7478..730870d4f71eb 100644 --- a/ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt +++ b/ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt @@ -9,8 +9,8 @@ var_dump(iconv($a, "b", "test")); var_dump(iconv("x", $a, "test")); ?> --EXPECTF-- -Warning: iconv(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) -Warning: iconv(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt index d2e7f5713f816..59a8668957d65 100644 --- a/ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt +++ b/ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt @@ -8,5 +8,5 @@ $a = str_repeat("/", 9000000); var_dump(iconv_mime_decode("a", null, $a)); ?> --EXPECTF-- -Warning: iconv_mime_decode(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_mime_decode(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt index f08d17754bec1..818b599500ade 100644 --- a/ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt +++ b/ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt @@ -8,5 +8,5 @@ $a = str_repeat("/", 9000000); var_dump(iconv_mime_decode_headers("a", null, $a)); ?> --EXPECTF-- -Warning: iconv_mime_decode_headers(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_mime_decode_headers(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt index 40c87001e4476..b0ba4016fb949 100644 --- a/ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt +++ b/ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt @@ -10,11 +10,11 @@ var_dump(iconv_set_encoding("output_encoding", $a)); var_dump(iconv_set_encoding("internal_encoding", $a)); ?> --EXPECTF-- -Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) -Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) -Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt index 23f0b6f2eae8c..f202d53625e1f 100644 --- a/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt +++ b/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt @@ -8,5 +8,5 @@ $a = str_repeat("/", 9791999); var_dump(iconv_strlen(1, $a)); ?> --EXPECTF-- -Warning: iconv_strlen(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_strlen(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_strlen_error2.phpt b/ext/iconv/tests/iconv_strlen_error2.phpt index 98c784c414233..a4517f6e08f13 100644 --- a/ext/iconv/tests/iconv_strlen_error2.phpt +++ b/ext/iconv/tests/iconv_strlen_error2.phpt @@ -23,5 +23,5 @@ var_dump(iconv_strlen($string, $encoding)); --EXPECTF-- *** Testing iconv_strlen() : error *** -Warning: iconv_strlen(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d +Warning: iconv_strlen(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt index 0b378cb5030d0..6bfbde0546b5e 100644 --- a/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt +++ b/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt @@ -8,5 +8,5 @@ $a = str_repeat("/", 9000000); var_dump(iconv_strpos("a", "b", 0, $a)); ?> --EXPECTF-- -Warning: iconv_strpos(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_strpos(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_strpos_error2.phpt b/ext/iconv/tests/iconv_strpos_error2.phpt index 48a8eff69b3fa..ac22704b2d95c 100644 --- a/ext/iconv/tests/iconv_strpos_error2.phpt +++ b/ext/iconv/tests/iconv_strpos_error2.phpt @@ -24,6 +24,6 @@ echo "Done"; --EXPECTF-- *** Testing iconv_strpos() : error conditions *** -Warning: iconv_strpos(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d +Warning: iconv_strpos(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d bool(false) Done diff --git a/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt index f1492798001a5..554920cc26ea6 100644 --- a/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt +++ b/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt @@ -8,5 +8,5 @@ $a = str_repeat("/", 9000000); var_dump(iconv_strrpos("a", "b", $a)); ?> --EXPECTF-- -Warning: iconv_strrpos(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_strrpos(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_strrpos_error2.phpt b/ext/iconv/tests/iconv_strrpos_error2.phpt index 4e9d925530fc0..4e02ac4712fa8 100644 --- a/ext/iconv/tests/iconv_strrpos_error2.phpt +++ b/ext/iconv/tests/iconv_strrpos_error2.phpt @@ -25,6 +25,6 @@ echo "Done"; --EXPECTF-- *** Testing iconv_strrpos() : error conditions *** -Warning: iconv_strrpos(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d +Warning: iconv_strrpos(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d bool(false) Done diff --git a/ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt b/ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt index 135c636718b03..77a29d0f21b8c 100644 --- a/ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt +++ b/ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt @@ -9,5 +9,5 @@ $b = str_repeat('/', 2798349); var_dump(iconv_substr($a, 0, 1, $b)); ?> --EXPECTF-- -Warning: iconv_substr(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d +Warning: iconv_substr(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/iconv_substr_error2.phpt b/ext/iconv/tests/iconv_substr_error2.phpt index 5da2d183fd634..858b89518694e 100644 --- a/ext/iconv/tests/iconv_substr_error2.phpt +++ b/ext/iconv/tests/iconv_substr_error2.phpt @@ -25,6 +25,6 @@ echo "Done"; --EXPECTF-- *** Testing iconv_substr() : error conditions *** -Warning: iconv_substr(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d +Warning: iconv_substr(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d bool(false) Done From a1ee3c74d1730f44adc69c638e1290502b5b2b89 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 29 Sep 2020 18:44:23 +0200 Subject: [PATCH 189/209] Fix recently introduced off-by-one error --- ext/odbc/php_odbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index a04b19ec50f72..c65ce3083fed4 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1087,7 +1087,7 @@ PHP_FUNCTION(odbc_execute) efree(params); RETURN_FALSE; } - if (i++ > result->numparams) break; + if (++i > result->numparams) break; } ZEND_HASH_FOREACH_END(); } /* Close cursor, needed for doing multiple selects */ From ae95d06f68768054fa3c4986d4cda24aca275541 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 29 Sep 2020 10:09:33 -0700 Subject: [PATCH 190/209] [ci skip] Add 7.3.23 security fixes to NEWS --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index a090a64eee819..214c5ac342e63 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,8 @@ PHP NEWS . Fixed bug #80048 (Bug #69100 has not been fixed for Windows). (cmb) . Fixed bug #80049 (Memleak when coercing integers to string via variadic argument). (Nikita) + . Fixed bug #79699 (PHP parses encoded cookie names so malicious `__Host-` + cookies can be sent). (CVE-2020-7070) (Stas) - Calendar: . Fixed bug #80007 (Potential type confusion in unixtojd() parameter parsing). @@ -52,6 +54,10 @@ PHP NEWS . Fixed bug #79825 (opcache.file_cache causes SIGSEGV when custom opcode handlers changed). (SammyK) +- OpenSSL: + . Fixed bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 + bytes IV). (CVE-2020-7069) (Jakub Zelenka) + - PDO: . Fixed bug #80027 (Terrible performance using $query->fetch on queries with many bind parameters (Matteo) From f20a2b4f3c25fba1769da5a2d35f44a492ed7f1f Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 29 Sep 2020 10:13:38 -0700 Subject: [PATCH 191/209] [ci skip] Add 7.4.11 security fixes to NEWS --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 33cd7e20ad2b5..d47582e51b945 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,8 @@ PHP NEWS . Fixed bug #80048 (Bug #69100 has not been fixed for Windows). (cmb) . Fixed bug #80049 (Memleak when coercing integers to string via variadic argument). (Nikita) + . Fixed bug #79699 (PHP parses encoded cookie names so malicious `__Host-` + cookies can be sent). (CVE-2020-7070) (Stas) - Calendar: . Fixed bug #80007 (Potential type confusion in unixtojd() parameter parsing). @@ -63,6 +65,10 @@ PHP NEWS . Fixed bug #79825 (opcache.file_cache causes SIGSEGV when custom opcode handlers changed). (SammyK) +- OpenSSL: + . Fixed bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 + bytes IV). (CVE-2020-7069) (Jakub Zelenka) + - PDO: . Fixed bug #80027 (Terrible performance using $query->fetch on queries with many bind parameters (Matteo) From 0574c21b503357e29703f901ed1912fcaaa651ec Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Wed, 30 Sep 2020 00:19:10 +0200 Subject: [PATCH 192/209] Prepare for PHP 8.0 RC1 --- Zend/zend_extensions.h | 2 +- Zend/zend_modules.h | 2 +- main/php.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index 708a1fe02a465..9f96d3b0fadba 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -44,7 +44,7 @@ You can use the following macro to check the extension API version for compatibi /* The first number is the engine version and the rest is the date (YYYYMMDD). * This way engine 2/3 API no. is always greater than engine 1 API no.. */ -#define ZEND_EXTENSION_API_NO 420200804 +#define ZEND_EXTENSION_API_NO 420200930 typedef struct _zend_extension_version_info { int zend_extension_api_no; diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h index ccd77f9eb68fe..30d70bbf53247 100644 --- a/Zend/zend_modules.h +++ b/Zend/zend_modules.h @@ -31,7 +31,7 @@ #define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module #define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module -#define ZEND_MODULE_API_NO 20200804 +#define ZEND_MODULE_API_NO 20200930 #ifdef ZTS #define USING_ZTS 1 #else diff --git a/main/php.h b/main/php.h index 497b906fc64ba..a747a99499ab4 100644 --- a/main/php.h +++ b/main/php.h @@ -22,7 +22,7 @@ #include #endif -#define PHP_API_VERSION 20200804 +#define PHP_API_VERSION 20200930 #define PHP_HAVE_STREAMS #define YYDEBUG 0 #define PHP_DEFAULT_CHARSET "UTF-8" From 6d2fe9f17f4190a86437f90ac3f9ad3fbeb93ec3 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 29 Sep 2020 22:32:14 +0000 Subject: [PATCH 193/209] Update NEWS for PHP 8.0.0rc1 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f91bd85e71cd5..a520a41d6dbf1 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.0.0RC1 +01 Oct 2020, PHP 8.0.0rc1 - CLI: . Allow debug server binding to an ephemeral port via `-S localhost:0`. (Sara) From c9074135677fc9d123b1048a980d4d79b50adf4b Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 29 Sep 2020 22:43:11 +0000 Subject: [PATCH 194/209] Update NEWS for 8.0.0rc2 --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index a520a41d6dbf1..b5f816a055e57 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +?? ??? ????, PHP 8.0.0rc2 + + 01 Oct 2020, PHP 8.0.0rc1 - CLI: From 07fa13088e1349f4b5a044faeee57f2b34f6b6e4 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 29 Sep 2020 23:13:43 +0200 Subject: [PATCH 195/209] Revert "Use external iterator instead of via the internal pointer" This reverts commit a6ecafece90909d74a578e09f626e875d3035eab. Closes GH-6242. --- ext/odbc/php_odbc.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index c65ce3083fed4..d058fd0191d2e 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -977,7 +977,7 @@ PHP_FUNCTION(odbc_execute) int i, ne; RETCODE rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|h", &pv_res, &pv_param_ht) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|h/", &pv_res, &pv_param_ht) == FAILURE) { RETURN_THROWS(); } @@ -991,13 +991,25 @@ PHP_FUNCTION(odbc_execute) RETURN_FALSE; } + zend_hash_internal_pointer_reset(pv_param_ht); params = (params_t *)safe_emalloc(sizeof(params_t), result->numparams, 0); for(i = 0; i < result->numparams; i++) { params[i].fp = -1; } - i = 1; - ZEND_HASH_FOREACH_VAL(pv_param_ht, tmp) { + for(i = 1; i <= result->numparams; i++) { + if ((tmp = zend_hash_get_current_data(pv_param_ht)) == NULL) { + php_error_docref(NULL, E_WARNING,"Error getting parameter"); + SQLFreeStmt(result->stmt,SQL_RESET_PARAMS); + for (i = 0; i < result->numparams; i++) { + if (params[i].fp != -1) { + close(params[i].fp); + } + } + efree(params); + RETURN_FALSE; + } + otype = Z_TYPE_P(tmp); if (!try_convert_to_string(tmp)) { SQLFreeStmt(result->stmt, SQL_RESET_PARAMS); @@ -1087,8 +1099,8 @@ PHP_FUNCTION(odbc_execute) efree(params); RETURN_FALSE; } - if (++i > result->numparams) break; - } ZEND_HASH_FOREACH_END(); + zend_hash_move_forward(pv_param_ht); + } } /* Close cursor, needed for doing multiple selects */ rc = SQLFreeStmt(result->stmt, SQL_CLOSE); From 8d0b871bde7b6503274100d31b373636e40fda2c Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 30 Sep 2020 08:15:04 +0300 Subject: [PATCH 196/209] Removed duplicate conditions --- ext/opcache/jit/zend_jit_x86.dasc | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 0aab3961cb02b..fd04435818516 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -11297,7 +11297,6 @@ static zend_bool zend_jit_may_avoid_refcounting(const zend_op *opline) switch (opline->opcode) { case ZEND_FETCH_OBJ_FUNC_ARG: if (!JIT_G(current_frame) || - !JIT_G(current_frame) || !JIT_G(current_frame)->call->func || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { return 0; @@ -11313,7 +11312,6 @@ static zend_bool zend_jit_may_avoid_refcounting(const zend_op *opline) break; case ZEND_FETCH_DIM_FUNC_ARG: if (!JIT_G(current_frame) || - !JIT_G(current_frame) || !JIT_G(current_frame)->call->func || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { return 0; From a1cee97de17fb124485da65bacdf8fa8d4db5b09 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 30 Sep 2020 08:21:46 +0300 Subject: [PATCH 197/209] Fixed incorrect logical conditions --- ext/ffi/ffi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index fa81868230871..214e71de757d4 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -7427,11 +7427,11 @@ void zend_ffi_val_character(zend_ffi_val *val, const char *str, size_t str_len) val->ch = '\t'; } else if (str[2] == 'v' && str_len == 4) { val->ch = '\v'; - } else if (str[2] >= '0' || str[2] <= '7') { + } else if (str[2] >= '0' && str[2] <= '7') { n = str[2] - '0'; - if (str[3] >= '0' || str[3] <= '7') { + if (str[3] >= '0' && str[3] <= '7') { n = n * 8 + (str[3] - '0'); - if ((str[4] >= '0' || str[4] <= '7') && str_len == 6) { + if ((str[4] >= '0' && str[4] <= '7') && str_len == 6) { n = n * 8 + (str[4] - '0'); } else if (str_len != 5) { val->kind = ZEND_FFI_VAL_ERROR; @@ -7445,20 +7445,20 @@ void zend_ffi_val_character(zend_ffi_val *val, const char *str, size_t str_len) val->kind = ZEND_FFI_VAL_ERROR; } } else if (str[2] == 'x') { - if (str[3] >= '0' || str[3] <= '7') { + if (str[3] >= '0' && str[3] <= '7') { n = str[3] - '0'; - } else if (str[3] >= 'A' || str[3] <= 'F') { + } else if (str[3] >= 'A' && str[3] <= 'F') { n = str[3] - 'A'; - } else if (str[3] >= 'a' || str[3] <= 'f') { + } else if (str[3] >= 'a' && str[3] <= 'f') { n = str[3] - 'a'; } else { val->kind = ZEND_FFI_VAL_ERROR; } - if ((str[4] >= '0' || str[4] <= '7') && str_len == 6) { + if ((str[4] >= '0' && str[4] <= '7') && str_len == 6) { n = n * 16 + (str[4] - '0'); - } else if ((str[4] >= 'A' || str[4] <= 'F') && str_len == 6) { + } else if ((str[4] >= 'A' && str[4] <= 'F') && str_len == 6) { n = n * 16 + (str[4] - 'A'); - } else if ((str[4] >= 'a' || str[4] <= 'f') && str_len == 6) { + } else if ((str[4] >= 'a' && str[4] <= 'f') && str_len == 6) { n = n * 16 + (str[4] - 'a'); } else if (str_len != 5) { val->kind = ZEND_FFI_VAL_ERROR; From 3f5c47af3bab388b9a8b70bf765ee8f3153649dc Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 30 Sep 2020 08:29:00 +0300 Subject: [PATCH 198/209] Fixed incorrect logical condition --- ext/soap/soap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 3651779972e70..64e32b3359e80 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2325,8 +2325,8 @@ PHP_METHOD(SoapClient, SoapClient) } if ((tmp = zend_hash_str_find(ht, "soap_version", sizeof("soap_version")-1)) != NULL) { - if (Z_TYPE_P(tmp) == IS_LONG || - (Z_LVAL_P(tmp) == SOAP_1_1 && Z_LVAL_P(tmp) == SOAP_1_2)) { + if (Z_TYPE_P(tmp) == IS_LONG && + (Z_LVAL_P(tmp) == SOAP_1_1 || Z_LVAL_P(tmp) == SOAP_1_2)) { soap_version = Z_LVAL_P(tmp); } } From 662083fc4f3a570f5b9180e80c2ddec86a8fded8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 30 Sep 2020 07:36:59 +0200 Subject: [PATCH 199/209] bump version to 7.2.35-dev --- NEWS | 5 ++++- configure.ac | 2 +- main/php_version.h | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 55a384dba700f..0fb16f2722fab 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 7.2.34 +?? ??? ????, PHP 7.2.35 + + +01 Oct 2020, PHP 7.2.34 - Core: . Fixed bug #79699 (PHP parses encoded cookie names so malicious `__Host-` diff --git a/configure.ac b/configure.ac index 6b6fd26c486a6..778b1f2915b7c 100644 --- a/configure.ac +++ b/configure.ac @@ -107,7 +107,7 @@ int zend_sprintf(char *buffer, const char *format, ...); PHP_MAJOR_VERSION=7 PHP_MINOR_VERSION=2 -PHP_RELEASE_VERSION=34 +PHP_RELEASE_VERSION=35 PHP_EXTRA_VERSION="-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/main/php_version.h b/main/php_version.h index 28a7c9bde2b4d..d43048239cc55 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 7 #define PHP_MINOR_VERSION 2 -#define PHP_RELEASE_VERSION 34 +#define PHP_RELEASE_VERSION 35 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "7.2.34-dev" -#define PHP_VERSION_ID 70234 +#define PHP_VERSION "7.2.35-dev" +#define PHP_VERSION_ID 70235 From 161636385057fdf7bc23539fc1714fc9c1526fa1 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 30 Sep 2020 08:37:16 +0300 Subject: [PATCH 200/209] Fixed incorrect error message --- ext/soap/php_schema.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c index edfe694021043..3eb66a5c03bb6 100644 --- a/ext/soap/php_schema.c +++ b/ext/soap/php_schema.c @@ -1614,8 +1614,6 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp attr = get_attribute(attrs, "default"); if (attr) { if (ref != NULL) { - soap_error0(E_ERROR, "Parsing Schema: element has both 'ref' and 'fixed' attributes"); - } else if (ref != NULL) { soap_error0(E_ERROR, "Parsing Schema: element has both 'default' and 'fixed' attributes"); } cur_type->def = estrdup((char*)attr->children->content); From 583093844e421d27c52a06a57c13efc6f5b8918b Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 30 Sep 2020 11:00:25 +0300 Subject: [PATCH 201/209] Fixed hex char parsing --- ext/ffi/ffi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 214e71de757d4..f350f91d8a3c2 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -7445,7 +7445,7 @@ void zend_ffi_val_character(zend_ffi_val *val, const char *str, size_t str_len) val->kind = ZEND_FFI_VAL_ERROR; } } else if (str[2] == 'x') { - if (str[3] >= '0' && str[3] <= '7') { + if (str[3] >= '0' && str[3] <= '9') { n = str[3] - '0'; } else if (str[3] >= 'A' && str[3] <= 'F') { n = str[3] - 'A'; @@ -7453,8 +7453,9 @@ void zend_ffi_val_character(zend_ffi_val *val, const char *str, size_t str_len) n = str[3] - 'a'; } else { val->kind = ZEND_FFI_VAL_ERROR; + return; } - if ((str[4] >= '0' && str[4] <= '7') && str_len == 6) { + if ((str[4] >= '0' && str[4] <= '9') && str_len == 6) { n = n * 16 + (str[4] - '0'); } else if ((str[4] >= 'A' && str[4] <= 'F') && str_len == 6) { n = n * 16 + (str[4] - 'A'); @@ -7462,6 +7463,7 @@ void zend_ffi_val_character(zend_ffi_val *val, const char *str, size_t str_len) n = n * 16 + (str[4] - 'a'); } else if (str_len != 5) { val->kind = ZEND_FFI_VAL_ERROR; + return; } val->ch = n; } else if (str_len == 4) { From 9fbb411e5292e5ef2ba36131ff05b722bdcd9f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 29 Sep 2020 21:35:58 +0200 Subject: [PATCH 202/209] Review parameter names in ext/json Closes GH-6236 --- ext/json/json.stub.php | 4 ++-- ext/json/json_arginfo.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/json/json.stub.php b/ext/json/json.stub.php index fc7d2c1569c0f..a9b5bbf511213 100644 --- a/ext/json/json.stub.php +++ b/ext/json/json.stub.php @@ -2,9 +2,9 @@ /** @generate-function-entries */ -function json_encode(mixed $value, int $options = 0, int $depth = 512): string|false {} +function json_encode(mixed $value, int $flags = 0, int $depth = 512): string|false {} -function json_decode(string $json, ?bool $assoc = null, int $depth = 512, int $options = 0): mixed {} +function json_decode(string $json, ?bool $associative = null, int $depth = 512, int $flags = 0): mixed {} function json_last_error(): int {} diff --git a/ext/json/json_arginfo.h b/ext/json/json_arginfo.h index bbcebf2a0b907..c4b20d7013856 100644 --- a/ext/json/json_arginfo.h +++ b/ext/json/json_arginfo.h @@ -1,17 +1,17 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7dbc9b323b73714227d91cc9566cc3c0c90cd7be */ + * Stub hash: 2d1e6c422221ec7efbbd540ee777a5ce2c639943 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_json_encode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, depth, IS_LONG, 0, "512") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_json_decode, 0, 1, IS_MIXED, 0) ZEND_ARG_TYPE_INFO(0, json, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, assoc, _IS_BOOL, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, associative, _IS_BOOL, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, depth, IS_LONG, 0, "512") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_json_last_error, 0, 0, IS_LONG, 0) From fe64d73979506d21469a96492cdd6320dc683aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 29 Sep 2020 21:41:37 +0200 Subject: [PATCH 203/209] Review parameter names in ext/opcache Closes GH-6237 --- ext/opcache/opcache.stub.php | 8 ++++---- ext/opcache/opcache_arginfo.h | 12 +++++------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ext/opcache/opcache.stub.php b/ext/opcache/opcache.stub.php index 0290b6453de4c..34cc789717157 100644 --- a/ext/opcache/opcache.stub.php +++ b/ext/opcache/opcache.stub.php @@ -4,12 +4,12 @@ function opcache_reset(): bool {} -function opcache_get_status(bool $fetch_scripts = true): array|false {} +function opcache_get_status(bool $include_scripts = true): array|false {} -function opcache_compile_file(string $file): bool {} +function opcache_compile_file(string $filename): bool {} -function opcache_invalidate(string $script, bool $force = false): bool {} +function opcache_invalidate(string $filename, bool $force = false): bool {} function opcache_get_configuration(): array|false {} -function opcache_is_script_cached(string $script): bool {} +function opcache_is_script_cached(string $filename): bool {} diff --git a/ext/opcache/opcache_arginfo.h b/ext/opcache/opcache_arginfo.h index 82ca83fd81f06..5085255a0f15f 100644 --- a/ext/opcache/opcache_arginfo.h +++ b/ext/opcache/opcache_arginfo.h @@ -1,28 +1,26 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 64f07c411732f60fed22267ee5e702a37e399879 */ + * Stub hash: 06a37b4af6a0fb5d7bd24b1660ea8ce09e959ec8 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_reset, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_opcache_get_status, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_scripts, _IS_BOOL, 0, "true") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, include_scripts, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_compile_file, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_invalidate, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, script, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, force, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_opcache_get_configuration, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_is_script_cached, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, script, IS_STRING, 0) -ZEND_END_ARG_INFO() +#define arginfo_opcache_is_script_cached arginfo_opcache_compile_file ZEND_FUNCTION(opcache_reset); From 26af8068288ac58127fcccb26cfe2f353c71bd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 29 Sep 2020 22:32:23 +0200 Subject: [PATCH 204/209] Review parameter names in ext/readline Closes GH-6240 --- ext/readline/readline.stub.php | 6 +++--- ext/readline/readline_arginfo.h | 8 ++++---- ext/readline/tests/readline_completion_function_001.phpt | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/readline/readline.stub.php b/ext/readline/readline.stub.php index ecd81416eba80..cfc1d0d8d5970 100644 --- a/ext/readline/readline.stub.php +++ b/ext/readline/readline.stub.php @@ -5,10 +5,10 @@ function readline(?string $prompt = null): string|false {} /** - * @param int|string|bool|null $newvalue + * @param int|string|bool|null $value * @return array|int|string|bool|null */ -function readline_info(?string $varname = null, $newvalue = null): mixed {} +function readline_info(?string $var_name = null, $value = null): mixed {} function readline_add_history(string $prompt): bool {} @@ -22,7 +22,7 @@ function readline_read_history(?string $filename = null): bool {} function readline_write_history(?string $filename = null): bool {} -function readline_completion_function(callable $funcname): bool {} +function readline_completion_function(callable $callback): bool {} #if HAVE_RL_CALLBACK_READ_CHAR diff --git a/ext/readline/readline_arginfo.h b/ext/readline/readline_arginfo.h index a83773b786cdf..0b432d1e4ee35 100644 --- a/ext/readline/readline_arginfo.h +++ b/ext/readline/readline_arginfo.h @@ -1,13 +1,13 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c7d13f6960171cab30984837379db25b32f38c36 */ + * Stub hash: 226b138a99e3e32aea90cbb5c44446ac7c16db71 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readline, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prompt, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_info, 0, 0, IS_MIXED, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, varname, IS_STRING, 1, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, newvalue, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, var_name, IS_STRING, 1, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, value, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_add_history, 0, 1, _IS_BOOL, 0) @@ -29,7 +29,7 @@ ZEND_END_ARG_INFO() #define arginfo_readline_write_history arginfo_readline_read_history ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_completion_function, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, funcname, IS_CALLABLE, 0) + ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_END_ARG_INFO() #if HAVE_RL_CALLBACK_READ_CHAR diff --git a/ext/readline/tests/readline_completion_function_001.phpt b/ext/readline/tests/readline_completion_function_001.phpt index 2556027bff37e..98fae6bbc0755 100644 --- a/ext/readline/tests/readline_completion_function_001.phpt +++ b/ext/readline/tests/readline_completion_function_001.phpt @@ -26,5 +26,5 @@ foreach ($data as $callback) { --EXPECT-- bool(true) bool(true) -readline_completion_function(): Argument #1 ($funcname) must be a valid callback, no array or string given -readline_completion_function(): Argument #1 ($funcname) must be a valid callback, no array or string given +readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given +readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given From aecb05f5e762ac08534dc144798571e68eba0562 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 30 Sep 2020 12:21:15 +0300 Subject: [PATCH 205/209] Give preference to ENTER->RECURSIVE_CALL trace over ENTER->RETURN --- ext/opcache/jit/zend_jit_internal.h | 1 + ext/opcache/jit/zend_jit_vm_helpers.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ext/opcache/jit/zend_jit_internal.h b/ext/opcache/jit/zend_jit_internal.h index d44aaae0e172d..e1cf4ffb8dba8 100644 --- a/ext/opcache/jit/zend_jit_internal.h +++ b/ext/opcache/jit/zend_jit_internal.h @@ -157,6 +157,7 @@ int ZEND_FASTCALL zend_jit_check_constant(const zval *key); _(DEEP_RECURSION, "deep recursion") \ _(LOOP_UNROLL, "loop unroll limit reached") \ _(LOOP_EXIT, "exit from loop") \ + _(RECURSION_EXIT, "return from recursive function") \ _(BLACK_LIST, "trace blacklisted") \ _(INNER_LOOP, "inner loop") /* trace it */ \ _(COMPILED_LOOP, "compiled loop") \ diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index f022b16e298cd..48df7ff108092 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -864,6 +864,13 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, If this doesn't work terminate it. */ stop = ZEND_JIT_TRACE_STOP_LOOP_EXIT; break; + } else if (start & ZEND_JIT_TRACE_START_ENTER + && EX(prev_execute_data) + && EX(func) == EX(prev_execute_data)->func + && zend_jit_trace_bad_stop_event(orig_opline, JIT_G(blacklist_root_trace) - 1) != + ZEND_JIT_TRACE_STOP_RECURSION_EXIT) { + stop = ZEND_JIT_TRACE_STOP_RECURSION_EXIT; + break; } else { stop = ZEND_JIT_TRACE_STOP_RETURN; break; From efe6006ced4f91d0df1fdb0aef7f0079273ac0d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 29 Sep 2020 22:21:06 +0200 Subject: [PATCH 206/209] Review parameter names in ext/session Closes GH-6239 --- ext/session/session.stub.php | 42 ++++++++++++++++++++++------------- ext/session/session_arginfo.h | 18 +++++++-------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php index 36a0b983b9f1c..d8c9b67e50a9e 100644 --- a/ext/session/session.stub.php +++ b/ext/session/session.stub.php @@ -43,35 +43,45 @@ function session_commit(): bool {} * @param callable|object $open * @param callable|bool $close */ -function session_set_save_handler($open, $close = UNKNOWN, callable $read = UNKNOWN, callable $write = UNKNOWN, callable $destroy = UNKNOWN, callable $gc = UNKNOWN, callable $create_sid = UNKNOWN, callable $validate_sid = UNKNOWN, callable $update_timestamp = UNKNOWN): bool {} +function session_set_save_handler( + $open, + $close = UNKNOWN, + callable $read = UNKNOWN, + callable $write = UNKNOWN, + callable $destroy = UNKNOWN, + callable $gc = UNKNOWN, + callable $create_sid = UNKNOWN, + callable $validate_sid = UNKNOWN, + callable $update_timestamp = UNKNOWN +): bool {} -function session_cache_limiter(?string $cache_limiter = null): string|false {} +function session_cache_limiter(?string $value = null): string|false {} -function session_cache_expire(?int $new_cache_expire = null): int|false {} +function session_cache_expire(?int $value = null): int|false {} -function session_set_cookie_params(array|int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null): bool {} +function session_set_cookie_params(array|int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null): bool {} function session_start(array $options = []): bool {} interface SessionHandlerInterface { /** @return bool */ - public function open(string $save_path, string $session_name); + public function open(string $path, string $name); /** @return bool */ public function close(); /** @return string */ - public function read(string $key); + public function read(string $id); /** @return bool */ - public function write(string $key, string $val); + public function write(string $id, string $data); /** @return bool */ - public function destroy(string $key); + public function destroy(string $id); /** @return int|bool */ - public function gc(int $maxlifetime); + public function gc(int $max_lifetime); } interface SessionIdInterface @@ -83,31 +93,31 @@ public function create_sid(); interface SessionUpdateTimestampHandlerInterface { /** @return bool */ - public function validateId(string $key); + public function validateId(string $id); /** @return bool */ - public function updateTimestamp(string $key, string $val); + public function updateTimestamp(string $id, string $data); } class SessionHandler implements SessionHandlerInterface, SessionIdInterface { /** @return bool */ - public function open(string $save_path, string $session_name) {} + public function open(string $path, string $name) {} /** @return bool */ public function close() {} /** @return string */ - public function read(string $key) {} + public function read(string $id) {} /** @return bool */ - public function write(string $key, string $val) {} + public function write(string $id, string $data) {} /** @return bool */ - public function destroy(string $key) {} + public function destroy(string $id) {} /** @return int|bool */ - public function gc(int $maxlifetime) {} + public function gc(int $max_lifetime) {} /** @return string */ public function create_sid() {} diff --git a/ext/session/session_arginfo.h b/ext/session/session_arginfo.h index f29a0df86b8e2..0c82feabb2033 100644 --- a/ext/session/session_arginfo.h +++ b/ext/session/session_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 9bdf602c14822b13553a5214a415e312c21cd30c */ + * Stub hash: 8175feea632f2832e43d830e70dc9332377b9f22 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_name, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") @@ -70,11 +70,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_set_save_handler, 0, 1, ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_limiter, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_limiter, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_expire, 0, 0, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, new_cache_expire, IS_LONG, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_set_cookie_params, 0, 1, _IS_BOOL, 0) @@ -90,26 +90,26 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_start, 0, 0, _IS_BOOL, 0 ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_open, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, save_path, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, session_name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_close, 0, 0, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_read, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_write, 0, 0, 2) - ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, val, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_class_SessionHandlerInterface_destroy arginfo_class_SessionHandlerInterface_read ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_gc, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, max_lifetime, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_class_SessionIdInterface_create_sid arginfo_class_SessionHandlerInterface_close From 01b239b6020fb39a4f74cea472416f3a0a92f8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 29 Sep 2020 21:55:39 +0200 Subject: [PATCH 207/209] Review parameter names in ext/shmop Closes GH-6238 --- ext/shmop/shmop.stub.php | 12 ++++++------ ext/shmop/shmop_arginfo.h | 20 ++++++++++---------- ext/shmop/tests/002.phpt | 8 ++++---- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ext/shmop/shmop.stub.php b/ext/shmop/shmop.stub.php index cddb9c64f4892..94859535021af 100644 --- a/ext/shmop/shmop.stub.php +++ b/ext/shmop/shmop.stub.php @@ -4,15 +4,15 @@ final class Shmop {} -function shmop_open(int $key, string $flags, int $mode, int $size): Shmop|false {} +function shmop_open(int $key, string $mode, int $permissions, int $size): Shmop|false {} -function shmop_read(Shmop $shmid, int $start, int $count): string {} +function shmop_read(Shmop $shmop, int $offset, int $size): string {} /** @deprecated */ -function shmop_close(Shmop $shmid): void {} +function shmop_close(Shmop $shmop): void {} -function shmop_size(Shmop $shmid): int {} +function shmop_size(Shmop $shmop): int {} -function shmop_write(Shmop $shmid, string $data, int $offset): int {} +function shmop_write(Shmop $shmop, string $data, int $offset): int {} -function shmop_delete(Shmop $shmid): bool {} +function shmop_delete(Shmop $shmop): bool {} diff --git a/ext/shmop/shmop_arginfo.h b/ext/shmop/shmop_arginfo.h index 211204720ad0a..3b92a62c2c761 100644 --- a/ext/shmop/shmop_arginfo.h +++ b/ext/shmop/shmop_arginfo.h @@ -1,35 +1,35 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 1fe8d001718e20ca915480d1ab6cb6996115b547 */ + * Stub hash: 81173e82e0378d5b5c729a3cce8561e0ca56e092 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_shmop_open, 0, 4, Shmop, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, flags, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, permissions, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_read, 0, 3, IS_STRING, 0) - ZEND_ARG_OBJ_INFO(0, shmid, Shmop, 0) - ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0) + ZEND_ARG_OBJ_INFO(0, shmop, Shmop, 0) + ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_close, 0, 1, IS_VOID, 0) - ZEND_ARG_OBJ_INFO(0, shmid, Shmop, 0) + ZEND_ARG_OBJ_INFO(0, shmop, Shmop, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_size, 0, 1, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, shmid, Shmop, 0) + ZEND_ARG_OBJ_INFO(0, shmop, Shmop, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_write, 0, 3, IS_LONG, 0) - ZEND_ARG_OBJ_INFO(0, shmid, Shmop, 0) + ZEND_ARG_OBJ_INFO(0, shmop, Shmop, 0) ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_delete, 0, 1, _IS_BOOL, 0) - ZEND_ARG_OBJ_INFO(0, shmid, Shmop, 0) + ZEND_ARG_OBJ_INFO(0, shmop, Shmop, 0) ZEND_END_ARG_INFO() diff --git a/ext/shmop/tests/002.phpt b/ext/shmop/tests/002.phpt index 40bbdbff23f84..2cd9db6187110 100644 --- a/ext/shmop/tests/002.phpt +++ b/ext/shmop/tests/002.phpt @@ -74,8 +74,8 @@ shmop_delete($shm_id); ?> --EXPECTF-- ## shmop_open function tests ## -shmop_open(): Argument #2 ($flags) must be a valid access mode -shmop_open(): Argument #2 ($flags) must be a valid access mode +shmop_open(): Argument #2 ($mode) must be a valid access mode +shmop_open(): Argument #2 ($mode) must be a valid access mode Warning: shmop_open(): Unable to attach or create shared memory segment "%s" in %s on line %d bool(false) @@ -84,8 +84,8 @@ Warning: shmop_open(): Unable to attach or create shared memory segment "%s" in shmop_open(): Argument #4 ($size) must be greater than 0 for the "c" and "n" access modes ## shmop_read function tests ## -shmop_read(): Argument #2 ($start) must be between 0 and the segment size -shmop_read(): Argument #3 ($count) is out of range +shmop_read(): Argument #2 ($offset) must be between 0 and the segment size +shmop_read(): Argument #3 ($size) is out of range ## shmop_write function tests ## shmop_write(): Argument #3 ($offset) is out of range From 9fbffe447083b667cca608faa13f19c3a7598750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 29 Sep 2020 22:38:27 +0200 Subject: [PATCH 208/209] Review parameter names in ext/gettext Closes GH-6241 --- ext/gettext/gettext.stub.php | 16 ++++++++-------- ext/gettext/gettext_arginfo.h | 24 ++++++++++++------------ ext/gettext/tests/44938.phpt | 18 +++++++++--------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ext/gettext/gettext.stub.php b/ext/gettext/gettext.stub.php index 7e4bec8c9ac27..6c06d1881dc92 100644 --- a/ext/gettext/gettext.stub.php +++ b/ext/gettext/gettext.stub.php @@ -4,27 +4,27 @@ function textdomain(?string $domain): string {} -function gettext(string $msgid): string {} +function gettext(string $message): string {} /** @alias gettext */ -function _(string $msgid): string {} +function _(string $message): string {} -function dgettext(string $domain, string $msgid): string {} +function dgettext(string $domain, string $message): string {} -function dcgettext(string $domain, string $msgid, int $category): string {} +function dcgettext(string $domain, string $message, int $category): string {} -function bindtextdomain(string $domain, string $dir): string|false {} +function bindtextdomain(string $domain, string $directory): string|false {} #ifdef HAVE_NGETTEXT -function ngettext(string $msgid1, string $msgid2, int $n): string {} +function ngettext(string $singular, string $plural, int $count): string {} #endif #ifdef HAVE_DNGETTEXT -function dngettext(string $domain, string $msgid1, string $msgid2, int $count): string {} +function dngettext(string $domain, string $singular, string $plural, int $count): string {} #endif #ifdef HAVE_DCNGETTEXT -function dcngettext(string $domain, string $msgid1, string $msgid2, int $count, int $category): string {} +function dcngettext(string $domain, string $singular, string $plural, int $count, int $category): string {} #endif #ifdef HAVE_BIND_TEXTDOMAIN_CODESET diff --git a/ext/gettext/gettext_arginfo.h b/ext/gettext/gettext_arginfo.h index b0a8664196050..a00e361bc9c64 100644 --- a/ext/gettext/gettext_arginfo.h +++ b/ext/gettext/gettext_arginfo.h @@ -1,45 +1,45 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a8b64ae24724f0552a62cd4146f6cfb3cd75fa19 */ + * Stub hash: 7d0fe93cb15576756edc5aad71deadae67046690 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_textdomain, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gettext, 0, 1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo__ arginfo_gettext ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dgettext, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dcgettext, 0, 3, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, category, IS_LONG, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bindtextdomain, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, dir, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0) ZEND_END_ARG_INFO() #if defined(HAVE_NGETTEXT) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ngettext, 0, 3, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, n, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, singular, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, plural, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0) ZEND_END_ARG_INFO() #endif #if defined(HAVE_DNGETTEXT) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dngettext, 0, 4, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, singular, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, plural, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0) ZEND_END_ARG_INFO() #endif @@ -47,8 +47,8 @@ ZEND_END_ARG_INFO() #if defined(HAVE_DCNGETTEXT) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dcngettext, 0, 5, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, singular, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, plural, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, category, IS_LONG, 0) ZEND_END_ARG_INFO() diff --git a/ext/gettext/tests/44938.phpt b/ext/gettext/tests/44938.phpt index 1de644a9339c2..c1f1c18a41818 100644 --- a/ext/gettext/tests/44938.phpt +++ b/ext/gettext/tests/44938.phpt @@ -106,16 +106,16 @@ try { --EXPECT-- bindtextdomain(): Argument #1 ($domain) is too long dngettext(): Argument #1 ($domain) is too long -dngettext(): Argument #2 ($msgid1) is too long -dngettext(): Argument #3 ($msgid2) is too long -gettext(): Argument #1 ($msgid) is too long -ngettext(): Argument #1 ($msgid1) is too long -ngettext(): Argument #2 ($msgid2) is too long +dngettext(): Argument #2 ($singular) is too long +dngettext(): Argument #3 ($plural) is too long +gettext(): Argument #1 ($message) is too long +ngettext(): Argument #1 ($singular) is too long +ngettext(): Argument #2 ($plural) is too long dcgettext(): Argument #1 ($domain) is too long -dcgettext(): Argument #2 ($msgid) is too long +dcgettext(): Argument #2 ($message) is too long dcngettext(): Argument #1 ($domain) is too long -dcngettext(): Argument #2 ($msgid1) is too long -dcngettext(): Argument #3 ($msgid2) is too long +dcngettext(): Argument #2 ($singular) is too long +dcngettext(): Argument #3 ($plural) is too long dgettext(): Argument #1 ($domain) is too long -dgettext(): Argument #2 ($msgid) is too long +dgettext(): Argument #2 ($message) is too long textdomain(): Argument #1 ($domain) is too long From 550a4f2fa89c3d3bc858aa81c62dbfa0f59f0e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 1 Oct 2020 10:11:43 +0200 Subject: [PATCH 209/209] Remove deprecated functions from php-ldap Remove ldap_control_paged_result and ldap_control_paged_result_response which have been deprecated in PHP 7.4, in favor of new $controls parameters for ldap request functions. --- UPGRADING | 2 + ext/ldap/ldap.c | 189 ------------------ ext/ldap/ldap.stub.php | 18 -- ext/ldap/ldap_arginfo.h | 32 +-- ...ldap_control_paged_results_variation1.phpt | 55 ----- ...ldap_control_paged_results_variation2.phpt | 71 ------- ...ldap_control_paged_results_variation3.phpt | 103 ---------- .../tests/ldap_parse_result_controls.phpt | 6 +- 8 files changed, 5 insertions(+), 471 deletions(-) delete mode 100644 ext/ldap/tests/ldap_control_paged_results_variation1.phpt delete mode 100644 ext/ldap/tests/ldap_control_paged_results_variation2.phpt delete mode 100644 ext/ldap/tests/ldap_control_paged_results_variation3.phpt diff --git a/UPGRADING b/UPGRADING index 2d49f1043bbe9..05c8eef1e9ec9 100644 --- a/UPGRADING +++ b/UPGRADING @@ -341,6 +341,8 @@ PHP 8.0 UPGRADE NOTES - LDAP: . The deprecated function ldap_sort has been removed. + . The deprecated function ldap_control_paged_result has been removed. + . The deprecated function ldap_control_paged_result_response has been removed. . The interface of ldap_set_rebind_proc has changed; the $callback parameter does not accept empty string anymore; null value shall be used instead. diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 13ea7647fc154..489984ba81aaa 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -3879,195 +3879,6 @@ PHP_FUNCTION(ldap_8859_to_t61) /* }}} */ #endif -#ifdef LDAP_CONTROL_PAGEDRESULTS -/* {{{ Inject paged results control*/ -PHP_FUNCTION(ldap_control_paged_result) -{ - zend_long pagesize; - zend_bool iscritical; - zval *link; - char *cookie = NULL; - size_t cookie_len = 0; - struct berval lcookie = { 0L, NULL }; - ldap_linkdata *ld; - LDAP *ldap; - BerElement *ber = NULL; - LDAPControl ctrl, *ctrlsp[2]; - int rc, myargcount = ZEND_NUM_ARGS(); - - if (zend_parse_parameters(myargcount, "rl|bs", &link, &pagesize, &iscritical, &cookie, &cookie_len) != SUCCESS) { - RETURN_THROWS(); - } - - if (Z_TYPE_P(link) == IS_NULL) { - ldap = NULL; - } else { - if ((ld = (ldap_linkdata *)zend_fetch_resource_ex(link, "ldap link", le_link)) == NULL) { - RETURN_THROWS(); - } - ldap = ld->link; - } - - ber = ber_alloc_t(LBER_USE_DER); - if (ber == NULL) { - php_error_docref(NULL, E_WARNING, "Unable to alloc BER encoding resources for paged results control"); - RETURN_FALSE; - } - - ctrl.ldctl_iscritical = 0; - - switch (myargcount) { - case 4: - lcookie.bv_val = cookie; - lcookie.bv_len = cookie_len; - /* fallthru */ - case 3: - ctrl.ldctl_iscritical = (int)iscritical; - /* fallthru */ - } - - if (ber_printf(ber, "{iO}", (int)pagesize, &lcookie) == LBER_ERROR) { - php_error_docref(NULL, E_WARNING, "Unable to BER printf paged results control"); - RETVAL_FALSE; - goto lcpr_error_out; - } - rc = ber_flatten2(ber, &ctrl.ldctl_value, 0); - if (rc == LBER_ERROR) { - php_error_docref(NULL, E_WARNING, "Unable to BER encode paged results control"); - RETVAL_FALSE; - goto lcpr_error_out; - } - - ctrl.ldctl_oid = LDAP_CONTROL_PAGEDRESULTS; - - if (ldap) { - /* directly set the option */ - ctrlsp[0] = &ctrl; - ctrlsp[1] = NULL; - - rc = ldap_set_option(ldap, LDAP_OPT_SERVER_CONTROLS, ctrlsp); - if (rc != LDAP_SUCCESS) { - php_error_docref(NULL, E_WARNING, "Unable to set paged results control: %s (%d)", ldap_err2string(rc), rc); - RETVAL_FALSE; - goto lcpr_error_out; - } - RETVAL_TRUE; - } else { - /* return a PHP control object */ - array_init(return_value); - - add_assoc_string(return_value, "oid", ctrl.ldctl_oid); - if (ctrl.ldctl_value.bv_len) { - add_assoc_stringl(return_value, "value", ctrl.ldctl_value.bv_val, ctrl.ldctl_value.bv_len); - } - if (ctrl.ldctl_iscritical) { - add_assoc_bool(return_value, "iscritical", ctrl.ldctl_iscritical); - } - } - -lcpr_error_out: - if (ber != NULL) { - ber_free(ber, 1); - } - return; -} -/* }}} */ - -/* {{{ Extract paged results control response */ -PHP_FUNCTION(ldap_control_paged_result_response) -{ - zval *link, *result, *cookie, *estimated; - struct berval lcookie; - int lestimated; - ldap_linkdata *ld; - LDAPMessage *ldap_result; - LDAPControl **lserverctrls, *lctrl; - BerElement *ber; - ber_tag_t tag; - int rc, lerrcode, myargcount = ZEND_NUM_ARGS(); - - if (zend_parse_parameters(myargcount, "rr|zz", &link, &result, &cookie, &estimated) != SUCCESS) { - RETURN_THROWS(); - } - - if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) { - RETURN_THROWS(); - } - - if ((ldap_result = (LDAPMessage *)zend_fetch_resource(Z_RES_P(result), "ldap result", le_result)) == NULL) { - RETURN_THROWS(); - } - - rc = ldap_parse_result(ld->link, - ldap_result, - &lerrcode, - NULL, /* matcheddn */ - NULL, /* errmsg */ - NULL, /* referrals */ - &lserverctrls, - 0); - - if (rc != LDAP_SUCCESS) { - php_error_docref(NULL, E_WARNING, "Unable to parse result: %s (%d)", ldap_err2string(rc), rc); - RETURN_FALSE; - } - - if (lerrcode != LDAP_SUCCESS) { - php_error_docref(NULL, E_WARNING, "Result is: %s (%d)", ldap_err2string(lerrcode), lerrcode); - RETURN_FALSE; - } - - if (lserverctrls == NULL) { - php_error_docref(NULL, E_WARNING, "No server controls in result"); - RETURN_FALSE; - } - - lctrl = ldap_control_find(LDAP_CONTROL_PAGEDRESULTS, lserverctrls, NULL); - if (lctrl == NULL) { - ldap_controls_free(lserverctrls); - php_error_docref(NULL, E_WARNING, "No paged results control response in result"); - RETURN_FALSE; - } - - ber = ber_init(&lctrl->ldctl_value); - if (ber == NULL) { - ldap_controls_free(lserverctrls); - php_error_docref(NULL, E_WARNING, "Unable to alloc BER decoding resources for paged results control response"); - RETURN_FALSE; - } - - tag = ber_scanf(ber, "{io}", &lestimated, &lcookie); - (void)ber_free(ber, 1); - - if (tag == LBER_ERROR) { - ldap_controls_free(lserverctrls); - php_error_docref(NULL, E_WARNING, "Unable to decode paged results control response"); - RETURN_FALSE; - } - - if (lestimated < 0) { - ldap_controls_free(lserverctrls); - php_error_docref(NULL, E_WARNING, "Invalid paged results control response value"); - RETURN_FALSE; - } - - ldap_controls_free(lserverctrls); - if (myargcount == 4) { - ZEND_TRY_ASSIGN_REF_LONG(estimated, lestimated); - } - - if (lcookie.bv_len == 0) { - ZEND_TRY_ASSIGN_REF_EMPTY_STRING(cookie); - } else { - ZEND_TRY_ASSIGN_REF_STRINGL(cookie, lcookie.bv_val, lcookie.bv_len); - } - ldap_memfree(lcookie.bv_val); - - RETURN_TRUE; -} -/* }}} */ -#endif - /* {{{ Extended operations, Pierangelo Masarati */ #ifdef HAVE_LDAP_EXTENDED_OPERATION_S /* {{{ Extended operation */ diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php index df973b933cb33..0aad23a16598d 100644 --- a/ext/ldap/ldap.stub.php +++ b/ext/ldap/ldap.stub.php @@ -187,24 +187,6 @@ function ldap_err2str(int $errno): string {} /** @param resource $ldap */ function ldap_compare($ldap, string $dn, string $attribute, string $value, array $controls = []): bool|int {} - -#ifdef LDAP_CONTROL_PAGEDRESULTS -/** - * @param resource $ldap - * @deprecated since 7.4 - */ -function ldap_control_paged_result($ldap, int $pagesize, bool $iscritical = false, string $cookie = ""): bool {} - -/** - * @param resource $ldap - * @param resource $result - * @param string $cookie - * @param int $estimated - * @deprecated since 7.4 - */ -function ldap_control_paged_result_response($ldap, $result, &$cookie = null, &$estimated = null): bool {} -#endif - #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) /** @param resource $ldap */ function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = []): bool {} diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 4b73b68d8f32c..a0b5890caddd9 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 0c721a3272fef9d1a06a8cb4163eeb219661fb00 */ + * Stub hash: 42f7118d8380424cd4178759cae6cb47b6d9b44f */ #if defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0) @@ -183,24 +183,6 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_compare, 0, 4, MAY_BE_BOOL| ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() -#if defined(LDAP_CONTROL_PAGEDRESULTS) -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_control_paged_result, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, ldap) - ZEND_ARG_TYPE_INFO(0, pagesize, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iscritical, _IS_BOOL, 0, "false") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cookie, IS_STRING, 0, "\"\"") -ZEND_END_ARG_INFO() -#endif - -#if defined(LDAP_CONTROL_PAGEDRESULTS) -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_control_paged_result_response, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(0, ldap) - ZEND_ARG_INFO(0, result) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, cookie, "null") - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, estimated, "null") -ZEND_END_ARG_INFO() -#endif - #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_rename, 0, 5, _IS_BOOL, 0) ZEND_ARG_INFO(0, ldap) @@ -396,12 +378,6 @@ ZEND_FUNCTION(ldap_errno); ZEND_FUNCTION(ldap_error); ZEND_FUNCTION(ldap_err2str); ZEND_FUNCTION(ldap_compare); -#if defined(LDAP_CONTROL_PAGEDRESULTS) -ZEND_FUNCTION(ldap_control_paged_result); -#endif -#if defined(LDAP_CONTROL_PAGEDRESULTS) -ZEND_FUNCTION(ldap_control_paged_result_response); -#endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_FUNCTION(ldap_rename); #endif @@ -505,12 +481,6 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(ldap_error, arginfo_ldap_error) ZEND_FE(ldap_err2str, arginfo_ldap_err2str) ZEND_FE(ldap_compare, arginfo_ldap_compare) -#if defined(LDAP_CONTROL_PAGEDRESULTS) - ZEND_DEP_FE(ldap_control_paged_result, arginfo_ldap_control_paged_result) -#endif -#if defined(LDAP_CONTROL_PAGEDRESULTS) - ZEND_DEP_FE(ldap_control_paged_result_response, arginfo_ldap_control_paged_result_response) -#endif #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) ZEND_FE(ldap_rename, arginfo_ldap_rename) #endif diff --git a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt deleted file mode 100644 index 75d147e0beb94..0000000000000 --- a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -ldap_ldap_control_paged_result() test (fetching the first page) ---CREDITS-- -Jean-Sebastien Hedde ---SKIPIF-- - ---FILE-- - ---CLEAN-- - ---EXPECTF-- -Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d -bool(true) -resource(%d) of type (ldap result) -array(2) { - ["count"]=> - int(1) - [0]=> - array(4) { - ["cn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(5) "userA" - } - [0]=> - string(2) "cn" - ["count"]=> - int(1) - ["dn"]=> - string(%d) "cn=userA,%s" - } -} diff --git a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt deleted file mode 100644 index b0b6e62aff7e0..0000000000000 --- a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt +++ /dev/null @@ -1,71 +0,0 @@ ---TEST-- -ldap_ldap_control_paged_result() test (fetching the first page with a pagesize=2) ---CREDITS-- -Jean-Sebastien Hedde ---SKIPIF-- - ---FILE-- - ---CLEAN-- - ---EXPECTF-- -Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d -bool(true) -resource(%d) of type (ldap result) -array(3) { - ["count"]=> - int(2) - [0]=> - array(4) { - ["cn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(5) "userA" - } - [0]=> - string(2) "cn" - ["count"]=> - int(1) - ["dn"]=> - string(%d) "cn=userA,%s" - } - [1]=> - array(4) { - ["cn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(5) "userB" - } - [0]=> - string(2) "cn" - ["count"]=> - int(1) - ["dn"]=> - string(%d) "cn=userB,%s" - } -} diff --git a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt deleted file mode 100644 index de904f051f996..0000000000000 --- a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt +++ /dev/null @@ -1,103 +0,0 @@ ---TEST-- -ldap_ldap_control_paged_result() test (fetching the first page then the next final page) ---CREDITS-- -Jean-Sebastien Hedde ---SKIPIF-- - ---FILE-- - ---CLEAN-- - ---EXPECTF-- -Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d - -Deprecated: Function ldap_control_paged_result_response() is deprecated in %s.php on line %d - -Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d -bool(true) -resource(%d) of type (ldap result) -array(3) { - ["count"]=> - int(2) - [0]=> - array(4) { - ["cn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(5) "userA" - } - [0]=> - string(2) "cn" - ["count"]=> - int(1) - ["dn"]=> - string(%d) "cn=userA,%s" - } - [1]=> - array(4) { - ["cn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(5) "userB" - } - [0]=> - string(2) "cn" - ["count"]=> - int(1) - ["dn"]=> - string(%d) "cn=userB,%s" - } -} -bool(true) -bool(true) -resource(%d) of type (ldap result) -array(2) { - ["count"]=> - int(1) - [0]=> - array(4) { - ["cn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(5) "userC" - } - [0]=> - string(2) "cn" - ["count"]=> - int(1) - ["dn"]=> - string(%d) "cn=userC,cn=userB,%s" - } -} diff --git a/ext/ldap/tests/ldap_parse_result_controls.phpt b/ext/ldap/tests/ldap_parse_result_controls.phpt index 63ef9e69d772a..2a5f7e1d3b152 100644 --- a/ext/ldap/tests/ldap_parse_result_controls.phpt +++ b/ext/ldap/tests/ldap_parse_result_controls.phpt @@ -19,8 +19,8 @@ insert_dummy_data($link, $base); $dn = "$base"; $filter = "(cn=user*)"; var_dump( - ldap_control_paged_result($link, 1), - $result = ldap_search($link, $dn, $filter, array('cn')), + $result = ldap_search($link, $dn, $filter, array('cn'), 0, 0, 0, LDAP_DEREF_NEVER, + [['oid' => LDAP_CONTROL_PAGEDRESULTS, 'iscritical' => TRUE, 'value' => ['size' => 1]]]), ldap_parse_result($link, $result, $errcode, $dn, $errmsg, $refs, $ctrls), $ctrls[LDAP_CONTROL_PAGEDRESULTS]['oid'], $ctrls[LDAP_CONTROL_PAGEDRESULTS]['value']['size'], @@ -36,8 +36,6 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); remove_dummy_data($link, $base); ?> --EXPECTF-- -Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d -bool(true) resource(%d) of type (ldap result) bool(true) string(22) "1.2.840.113556.1.4.319"