Convert standard/url to HNI

Convert standard/url to HNI

Closes #1604

Reviewed By: @ptarjan

Differential Revision: D1135473

Pulled By: @scannell
Esse commit está contido em:
Simon Welsh
2014-01-23 10:44:44 -08:00
commit de Sara Golemon
commit beb5d544a5
46 arquivos alterados com 254 adições e 490 exclusões
+2
Ver Arquivo
@@ -30,6 +30,7 @@ extern Extension s_bz2_extension;
extern Extension s_reflection_extension;
extern Extension s_ctype_extension;
extern Extension s_apache_extension;
extern Extension s_standardurl_extension;
#ifdef HAVE_UODBC
extern Extension s_odbc_extension;
#endif
@@ -43,6 +44,7 @@ const Extension *g_anchor_extensions[] = {
&s_reflection_extension,
&s_ctype_extension,
&s_apache_extension,
&s_standardurl_extension,
#ifdef HAVE_UODBC
&s_odbc_extension,
#endif
+1 -1
Ver Arquivo
@@ -19,7 +19,7 @@
#include "hphp/runtime/base/http-client.h"
#include "hphp/runtime/base/runtime-error.h"
#include "hphp/runtime/ext/ext_preg.h"
#include "hphp/runtime/ext/ext_url.h"
#include "hphp/runtime/ext/url/ext_url.h"
namespace HPHP {
+4
Ver Arquivo
@@ -150,9 +150,13 @@ bool url_parse(Url &output, const char *str, int length) {
} else {
return false;
}
} else if (*s == '/' && *(s+1) == '/') { /* relative-scheme URL */
s += 2;
} else {
goto just_path;
}
} else if (*s == '/' && *(s+1) == '/') { /* relative-scheme URL */
s += 2;
} else {
just_path:
ue = s + length;
-1
Ver Arquivo
@@ -73,7 +73,6 @@
#include "hphp/runtime/ext/ext_string.h"
#include "hphp/runtime/ext/ext_thread.h"
#include "hphp/runtime/ext/ext_thrift.h"
#include "hphp/runtime/ext/ext_url.h"
#include "hphp/runtime/ext/ext_variable.h"
#include "hphp/runtime/ext/ext_xml.h"
#include "hphp/runtime/ext/ext_xmlreader.h"
+1 -1
Ver Arquivo
@@ -23,7 +23,7 @@
#include "hphp/runtime/base/preg.h"
#include "hphp/runtime/ext/ext_function.h"
#include "hphp/runtime/ext/ext_string.h"
#include "hphp/runtime/ext/ext_url.h"
#include "hphp/runtime/ext/url/ext_url.h"
#include <arpa/inet.h>
#include <pcre.h>
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
*/
#include "hphp/runtime/ext/ext_url.h"
#include "hphp/runtime/ext/url/ext_url.h"
#include "hphp/runtime/base/string-util.h"
#include "hphp/runtime/base/zend-url.h"
#include "hphp/runtime/base/string-buffer.h"
@@ -37,7 +37,8 @@ const int64_t k_PHP_URL_QUERY = 6;
const int64_t k_PHP_URL_FRAGMENT = 7;
///////////////////////////////////////////////////////////////////////////////
Variant f_base64_decode(const String& data, bool strict /* = false */) {
Variant HHVM_FUNCTION(base64_decode, const String& data,
bool strict /* = false */) {
String decoded = StringUtil::Base64Decode(data, strict);
if (decoded.isNull()) {
return false;
@@ -45,7 +46,7 @@ Variant f_base64_decode(const String& data, bool strict /* = false */) {
return decoded;
}
String f_base64_encode(const String& data) {
Variant HHVM_FUNCTION(base64_encode, const String& data) {
String encoded = StringUtil::Base64Encode(data);
if (encoded.isNull()) {
return false;
@@ -53,7 +54,7 @@ String f_base64_encode(const String& data) {
return encoded;
}
Variant f_get_headers(const String& url, int format /* = 0 */) {
Variant HHVM_FUNCTION(get_headers, const String& url, int format /* = 0 */) {
Variant c = f_curl_init();
f_curl_setopt(c.toResource(), k_CURLOPT_URL, url);
f_curl_setopt(c.toResource(), k_CURLOPT_RETURNTRANSFER, true);
@@ -84,7 +85,7 @@ Variant f_get_headers(const String& url, int format /* = 0 */) {
}
}
return assoc;
}
}
static String normalize_variable_name(const String& name) {
StringBuffer sb;
@@ -103,7 +104,8 @@ static String normalize_variable_name(const String& name) {
return sb.detach();
}
Array f_get_meta_tags(const String& filename, bool use_include_path /* = false */) {
Array HHVM_FUNCTION(get_meta_tags, const String& filename,
bool use_include_path /* = false */) {
String f = f_file_get_contents(filename);
Variant matches;
@@ -190,7 +192,7 @@ static void url_encode_array(StringBuffer &ret, CVarRef varr,
const StaticString s_arg_separator_output("arg_separator.output");
Variant f_http_build_query(CVarRef formdata,
Variant HHVM_FUNCTION(http_build_query, CVarRef formdata,
const String& numeric_prefix /* = null_string */,
const String& arg_separator /* = null_string */) {
if (!formdata.is(KindOfArray) && !formdata.is(KindOfObject)) {
@@ -199,7 +201,7 @@ Variant f_http_build_query(CVarRef formdata,
}
String arg_sep;
if (arg_separator.isNull()) {
if (arg_separator.empty()) {
arg_sep = f_ini_get(s_arg_separator_output);
} else {
arg_sep = arg_separator;
@@ -237,7 +239,8 @@ const StaticString
resource.name = NULL; \
} \
Variant f_parse_url(const String& url, int component /* = -1 */) {
Variant HHVM_FUNCTION(parse_url, const String& url,
int64_t component /* = -1 */) {
Url resource;
if (!url_parse(resource, url.data(), url.size())) {
return false;
@@ -258,7 +261,7 @@ Variant f_parse_url(const String& url, int component /* = -1 */) {
}
break;
default:
throw_invalid_argument("component: %d", component);
raise_warning("parse_url(): Invalid URL component identifier %ld", component);
return false;
}
return uninit_null();
@@ -278,21 +281,75 @@ Variant f_parse_url(const String& url, int component /* = -1 */) {
return ret.create();
}
String f_rawurldecode(const String& str) {
String HHVM_FUNCTION(rawurldecode, const String& str) {
return StringUtil::UrlDecode(str, false);
}
String f_rawurlencode(const String& str) {
String HHVM_FUNCTION(rawurlencode, const String& str) {
return StringUtil::UrlEncode(str, false);
}
String f_urldecode(const String& str) {
String HHVM_FUNCTION(urldecode, const String& str) {
return StringUtil::UrlDecode(str, true);
}
String f_urlencode(const String& str) {
String HHVM_FUNCTION(urlencode, const String& str) {
return StringUtil::UrlEncode(str, true);
}
///////////////////////////////////////////////////////////////////////////////
const StaticString s_PHP_URL_SCHEME("PHP_URL_SCHEME");
const StaticString s_PHP_URL_HOST("PHP_URL_HOST");
const StaticString s_PHP_URL_PORT("PHP_URL_PORT");
const StaticString s_PHP_URL_USER("PHP_URL_USER");
const StaticString s_PHP_URL_PASS("PHP_URL_PASS");
const StaticString s_PHP_URL_PATH("PHP_URL_PATH");
const StaticString s_PHP_URL_QUERY("PHP_URL_QUERY");
const StaticString s_PHP_URL_FRAGMENT("PHP_URL_FRAGMENT");
class StandardURLExtension : public Extension {
public:
StandardURLExtension() : Extension("url") {}
virtual void moduleInit() {
Native::registerConstant<KindOfInt64>(
s_PHP_URL_SCHEME.get(), k_PHP_URL_SCHEME
);
Native::registerConstant<KindOfInt64>(
s_PHP_URL_HOST.get(), k_PHP_URL_HOST
);
Native::registerConstant<KindOfInt64>(
s_PHP_URL_PORT.get(), k_PHP_URL_PORT
);
Native::registerConstant<KindOfInt64>(
s_PHP_URL_USER.get(), k_PHP_URL_USER
);
Native::registerConstant<KindOfInt64>(
s_PHP_URL_PASS.get(), k_PHP_URL_PASS
);
Native::registerConstant<KindOfInt64>(
s_PHP_URL_PATH.get(), k_PHP_URL_PATH
);
Native::registerConstant<KindOfInt64>(
s_PHP_URL_QUERY.get(), k_PHP_URL_QUERY
);
Native::registerConstant<KindOfInt64>(
s_PHP_URL_FRAGMENT.get(), k_PHP_URL_FRAGMENT
);
HHVM_FE(base64_decode);
HHVM_FE(base64_encode);
HHVM_FE(get_headers);
HHVM_FE(get_meta_tags);
HHVM_FE(http_build_query);
HHVM_FE(parse_url);
HHVM_FE(rawurldecode);
HHVM_FE(rawurlencode);
HHVM_FE(urldecode);
HHVM_FE(urlencode);
loadSystemlib();
}
} s_standardurl_extension;
///////////////////////////////////////////////////////////////////////////////
}
@@ -32,24 +32,24 @@ extern const int64_t k_PHP_URL_PATH;
extern const int64_t k_PHP_URL_QUERY;
extern const int64_t k_PHP_URL_FRAGMENT;
Variant f_base64_decode(const String& data, bool strict = false);
String f_base64_encode(const String& data);
Variant HHVM_FUNCTION(base64_decode, const String& data,
bool strict /* = false */);
Variant HHVM_FUNCTION(base64_encode, const String& data);
Variant f_get_headers(const String& url, int format = 0);
Array f_get_meta_tags(const String& filename, bool use_include_path = false);
Variant HHVM_FUNCTION(get_headers, const String& url, int format /* = 0 */);
Array HHVM_FUNCTION(get_meta_tags, const String& filename,
bool use_include_path /* = false */);
Variant f_http_build_query(CVarRef formdata,
const String& numeric_prefix = null_string,
const String& arg_separator = null_string);
Variant f_parse_url(const String& url, int component = -1);
Variant HHVM_FUNCTION(http_build_query, CVarRef formdata,
const String& numeric_prefix /* = null_string */,
const String& arg_separator /* = null_string */);
Variant HHVM_FUNCTION(parse_url, const String& url,
int64_t component /* = -1 */);
String f_rawurldecode(const String& str);
String f_rawurlencode(const String& str);
String f_urldecode(const String& str);
String f_urlencode(const String& str);
String HHVM_FUNCTION(rawurldecode, const String& str);
String HHVM_FUNCTION(rawurlencode, const String& str);
String HHVM_FUNCTION(urldecode, const String& str);
String HHVM_FUNCTION(urlencode, const String& str);
///////////////////////////////////////////////////////////////////////////////
}
+139
Ver Arquivo
@@ -0,0 +1,139 @@
<?hh
/**
* Decodes data encoded with MIME base64
*
* @param string $data - The encoded data.
* @param bool $strict - Return FALSE if input contains character from outside
* the base64 alphabet.
*
* @return string - Returns the original data or FALSE on failure. The returned
* data may be binary.
*/
<<__Native>>
function base64_decode(string $data, bool $strict = false): mixed;
/**
* Encodes data with MIME base64
*
* @param string $data - The data to encode.
*
* @return string - The encoded data, as a string or FALSE on failure.
*/
<<__Native>>
function base64_encode(string $data): mixed;
/**
* Fetches all the headers sent by the server in response to a HTTP request
*
* @param string $url - The target URL.
* @param int $format - If the optional $format parameter is set to non-zero,
* get_headers() parses the response and sets the array's
* keys.
*
* @return array - Returns an indexed or associative array with the headers, or
* FALSE on failure.
*/
<<__Native>>
function get_headers(string $url, int $format = 0): mixed;
/**
* Extracts all meta tag content attributes from a file and returns an array
*
* @param string $filename - The path to the HTML file, as a string. This
* can be a local file or an URL
* @param bool $use_include_path - Setting use_include_path to TRUE will result
* in PHP trying to open the file along the
* standard include path as per the include_path
* directive. This is used for local files, not
* URLs.
*
* @return array - Returns an array with all the parsed meta tags.
*/
<<__Native>>
function get_meta_tags(string $filename,
bool $use_include_path = false): array<string, string>;
/**
* Generate URL-encoded query string
*
* @param mixed $query_data - May be an array or object containing
* properties.
* @param string $numeric_prefix - If numeric indices are used in the base array
* and this parameter is provided, it will be
* prepended to the numeric index for elements
* in the base array only.
* @param string $arg_separator - arg_separator.output is used to separate
* arguments, unless this parameter is
* specified, and is then used.
*
* @return string - Returns a URL-encoded string.
*/
<<__Native>>
function http_build_query(mixed $query_data, string $numeric_prefix = "",
string $arg_separator = ""): mixed;
/**
* Parse a URL and return its components
*
* @param string $url - The URL to parse.
* @param int $component - Specify one of the PHP_URL_* constants to retrieve
* just a specific URL component as a string (except
* when PHP_URL_PORT is given, in which case the return
* value will be an integer).
*
* @return mixed - On seriously malformed URLs, parse_url() may return FALSE.
* If the component parameter is omitted, an associative array
* is returned. If the component parameter is specified,
* parse_url() returns a string (or an integer, in the case of
* PHP_URL_PORT) instead of an array. If the requested
* component doesn't exist within the given URL, NULL will be
* returned.
*/
<<__Native>>
function parse_url(string $url, int $component = -1): mixed;
/**
* Decode URL-encoded strings
*
* @param string $str - The URL to be decoded.
*
* @return string - Returns the decoded URL, as a string.
*/
<<__Native>>
function rawurldecode(string $str): string;
/**
* URL-encode according to RFC 3986
*
* @param string $str - The URL to be encoded.
*
* @return string - Returns a string in which all non-alphanumeric characters
* except -_.~ have been replaced with a percent (%) sign
* followed by two hex digits.
*/
<<__Native>>
function rawurlencode(string $str): string;
/**
* Decode URL-encoded strings
*
* @param string $str - The URL to be decoded.
*
* @return string - Returns the decoded URL, as a string.
*/
<<__Native>>
function urldecode(string $str): string;
/**
* URL-encodes string
*
* @param string $str - The string to be encoded.
*
* @return string - Returns a string in which all non-alphanumeric characters
* except -_. have been replaced with a percent (%) sign
* followed by two hex digits and spaces encoded as plus (+)
* signs.
*/
<<__Native>>
function urlencode(string $str): string;
-247
Ver Arquivo
@@ -1,247 +0,0 @@
{
"preamble": "",
"consts": [
{
"name": "PHP_URL_FRAGMENT",
"type": "Int64"
},
{
"name": "PHP_URL_HOST",
"type": "Int64"
},
{
"name": "PHP_URL_PASS",
"type": "Int64"
},
{
"name": "PHP_URL_PATH",
"type": "Int64"
},
{
"name": "PHP_URL_PORT",
"type": "Int64"
},
{
"name": "PHP_URL_QUERY",
"type": "Int64"
},
{
"name": "PHP_URL_SCHEME",
"type": "Int64"
},
{
"name": "PHP_URL_USER",
"type": "Int64"
}
],
"funcs": [
{
"name": "base64_decode",
"desc": "Decodes a base64 encoded data.",
"flags": [
],
"return": {
"type": "Variant",
"desc": "Returns the original data or FALSE on failure. The returned data may be binary."
},
"args": [
{
"name": "data",
"type": "String",
"desc": "The encoded data."
},
{
"name": "strict",
"type": "Boolean",
"value": "false",
"desc": "Returns FALSE if input contains character from outside the base64 alphabet."
}
]
},
{
"name": "base64_encode",
"desc": "Encodes the given data with base64.\n\nThis encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies.\n\nBase64-encoded data takes about 33% more space than the original data.",
"flags": [
],
"return": {
"type": "String",
"desc": "The encoded data, as a string."
},
"args": [
{
"name": "data",
"type": "String",
"desc": "The data to encode."
}
]
},
{
"name": "get_headers",
"desc": "get_headers() returns an array with the headers sent by the server in response to a HTTP request.",
"flags": [
],
"return": {
"type": "Variant",
"desc": "Returns an indexed or associative array with the headers, or FALSE on failure."
},
"args": [
{
"name": "url",
"type": "String",
"desc": "The target URL."
},
{
"name": "format",
"type": "Int32",
"value": "0",
"desc": "If the optional format parameter is set to non-zero, get_headers() parses the response and sets the array's keys."
}
]
},
{
"name": "get_meta_tags",
"desc": "Opens filename and parses it line by line for <meta> tags in the file. The parsing stops at <\/head>.",
"flags": [
],
"return": {
"type": "StringVec",
"desc": "Returns an array with all the parsed meta tags.\n\nThe value of the name property becomes the key, the value of the content property becomes the value of the returned array, so you can easily use standard array functions to traverse it or access single values. Special characters in the value of the name property are substituted with '_', the rest is converted to lower case. If two meta tags have the same name, only the last one is returned."
},
"args": [
{
"name": "filename",
"type": "String",
"desc": "The path to the HTML file, as a string. This can be a local file or an URL.\n\nExample #1 What get_meta_tags() parses\n\n(pay attention to line endings - PHP uses a native function to parse the input, so a Mac file won't work on Unix)."
},
{
"name": "use_include_path",
"type": "Boolean",
"value": "false",
"desc": "Setting use_include_path to TRUE will result in PHP trying to open the file along the standard include path as per the include_path directive. This is used for local files, not URLs."
}
]
},
{
"name": "http_build_query",
"desc": "Generates a URL-encoded query string from the associative (or indexed) array provided.",
"flags": [
],
"return": {
"type": "Variant",
"desc": "Returns a URL-encoded string."
},
"args": [
{
"name": "formdata",
"type": "Variant",
"desc": "May be an array or object containing properties.\n\nIf query_data is an array, it may be a simple one-dimensional structure, or an array of arrays (which in turn may contain other arrays).\n\nIf query_data is an object, then only public properties will be incorporated into the result."
},
{
"name": "numeric_prefix",
"type": "String",
"value": "null_string",
"desc": "If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only.\n\nThis is meant to allow for legal variable names when the data is decoded by PHP or another CGI application later on."
},
{
"name": "arg_separator",
"type": "String",
"value": "null_string",
"desc": "arg_separator.output is used to separate arguments, unless this parameter is specified, and is then used."
}
]
},
{
"name": "parse_url",
"desc": "This function parses a URL and returns an associative array containing any of the various components of the URL that are present.\n\nThis function is not meant to validate the given URL, it only breaks it up into the above listed parts. Partial URLs are also accepted, parse_url() tries its best to parse them correctly.",
"flags": [
],
"return": {
"type": "Variant",
"desc": "On seriously malformed URLs, parse_url() may return FALSE. Otherwise an associative array is returned, whose components may be (at least one): scheme - e.g. http host port user pass path query - after the question mark ? fragment - after the hashmark #\n\nIf the component parameter is specified a string is returned instead of an array."
},
"args": [
{
"name": "url",
"type": "String",
"desc": "The URL to parse. Invalid characters are replaced by _."
},
{
"name": "component",
"type": "Int32",
"value": "-1",
"desc": "Specify one of PHP_URL_SCHEME, PHP_URL_HOST, PHP_URL_PORT, PHP_URL_USER, PHP_URL_PASS, PHP_URL_PATH, PHP_URL_QUERY or PHP_URL_FRAGMENT to retrieve just a specific URL component as a string."
}
]
},
{
"name": "rawurldecode",
"desc": "Returns a string in which the sequences with percent (%) signs followed by two hex digits have been replaced with literal characters.",
"flags": [
],
"return": {
"type": "String",
"desc": "Returns the decoded URL, as a string."
},
"args": [
{
"name": "str",
"type": "String",
"desc": "The URL to be decoded."
}
]
},
{
"name": "rawurlencode",
"desc": null,
"flags": [
],
"return": {
"type": "String",
"desc": null
},
"args": [
{
"name": "str",
"type": "String",
"desc": "The URL to be encoded."
}
]
},
{
"name": "urldecode",
"desc": "Decodes any %## encoding in the given string. Plus symbols ('+') are decoded to a space character.",
"flags": [
],
"return": {
"type": "String",
"desc": "Returns the decoded string."
},
"args": [
{
"name": "str",
"type": "String",
"desc": "The string to be decoded."
}
]
},
{
"name": "urlencode",
"desc": "This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to pass variables to the next page.",
"flags": [
],
"return": {
"type": "String",
"desc": null
},
"args": [
{
"name": "str",
"type": "String",
"desc": "The string to be encoded."
}
]
}
],
"classes": [
]
}
+2 -2
Ver Arquivo
@@ -19,9 +19,9 @@
#include <unistd.h>
#include <sys/param.h>
#include "hphp/runtime/base/http-client.h"
#include "hphp/runtime/ext/url/ext_url.h"
#include "hphp/runtime/ext/ext_json.h"
#include "hphp/runtime/ext/ext_mb.h"
#include "hphp/runtime/ext/ext_url.h"
#include "hphp/runtime/ext/ext_file.h"
using namespace HPHP;
@@ -110,7 +110,7 @@ Array TestLogger::postData(Array arr) {
Array data = make_map_array("method", "recordTestResults",
"args", f_json_encode(make_packed_array(arr)));
String str = f_http_build_query(data);
String str = HHVM_FN(http_build_query)(data, "", "");
client.post(log_url, str.c_str(), str.length(), response);
Arquivo binário não exibido.
@@ -1,75 +0,0 @@
<?php
/* Prototype : proto mixed parse_url(string url, [int url_component])
* Description: Parse a URL and return its components
* Source code: ext/standard/url.c
* Alias to functions:
*/
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
set_error_handler('test_error_handler');
echo "*** Testing parse_url() : usage variations ***\n";
// Initialise function arguments not being substituted (if any)
$url = 'http://secret:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123';
//get an unset variable
$unset_var = 10;
unset ($unset_var);
//array of values to iterate over
$values = array(
// float data
10.5,
-10.5,
10.1234567e10,
10.7654321E-10,
.5,
// array data
array(),
array(0),
array(1),
array(1, 2),
array('color' => 'red', 'item' => 'pen'),
// null data
NULL,
null,
// boolean data
true,
false,
TRUE,
FALSE,
// empty data
"",
'',
// string data
"string",
'string',
// object data
new stdclass(),
// undefined data
$undefined_var,
// unset data
$unset_var,
);
// loop through each element of the array for url_component
foreach($values as $value) {
echo "\nArg value $value \n";
var_dump( parse_url($url, $value) );
};
echo "Done";
?>
@@ -1,124 +0,0 @@
*** Testing parse_url() : usage variations ***
Error: 8 - Undefined variable: undefined_var, %s(61)
Error: 8 - Undefined variable: unset_var, %s(64)
Arg value 10.5
Error: 2 - parse_url(): Invalid URL component identifier 10, %s(71)
bool(false)
Arg value -10.5
array(8) {
["scheme"]=>
string(4) "http"
["host"]=>
string(11) "www.php.net"
["port"]=>
int(80)
["user"]=>
string(6) "secret"
["pass"]=>
string(7) "hideout"
["path"]=>
string(10) "/index.php"
["query"]=>
string(31) "test=1&test2=char&test3=mixesCI"
["fragment"]=>
string(16) "some_page_ref123"
}
Arg value 101234567000
array(8) {
["scheme"]=>
string(4) "http"
["host"]=>
string(11) "www.php.net"
["port"]=>
int(80)
["user"]=>
string(6) "secret"
["pass"]=>
string(7) "hideout"
["path"]=>
string(10) "/index.php"
["query"]=>
string(31) "test=1&test2=char&test3=mixesCI"
["fragment"]=>
string(16) "some_page_ref123"
}
Arg value 1.07654321E-9
string(4) "http"
Arg value 0.5
string(4) "http"
Error: 8 - Array to string conversion, %sparse_url_variation_002_32bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
NULL
Error: 8 - Array to string conversion, %sparse_url_variation_002_32bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
NULL
Error: 8 - Array to string conversion, %sparse_url_variation_002_32bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
NULL
Error: 8 - Array to string conversion, %sparse_url_variation_002_32bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
NULL
Error: 8 - Array to string conversion, %sparse_url_variation_002_32bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
NULL
Arg value
string(4) "http"
Arg value
string(4) "http"
Arg value 1
string(11) "www.php.net"
Arg value
string(4) "http"
Arg value 1
string(11) "www.php.net"
Arg value
string(4) "http"
Arg value
Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
NULL
Arg value
Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
NULL
Arg value string
Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
NULL
Arg value string
Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
NULL
Error: 4096 - Object of class stdClass could not be converted to string, %s(70)
Arg value
Error: 2 - parse_url() expects parameter 2 to be long, object given, %s(71)
NULL
Arg value
string(4) "http"
Arg value
string(4) "http"
Done
@@ -38,27 +38,27 @@ string(4) "http"
Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, array given, %s(71)
NULL
Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, array given, %s(71)
NULL
Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, array given, %s(71)
NULL
Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, array given, %s(71)
NULL
Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d)
Arg value Array
Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, array given, %s(71)
NULL
Arg value
@@ -80,24 +80,24 @@ Arg value
string(4) "http"
Arg value
Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, string given, %s(71)
NULL
Arg value
Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, string given, %s(71)
NULL
Arg value string
Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, string given, %s(71)
NULL
Arg value string
Error: 2 - parse_url() expects parameter 2 to be long, string given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, string given, %s(71)
NULL
Error: 4096 - Object of class stdClass could not be converted to string, %s(70)
Arg value
Error: 2 - parse_url() expects parameter 2 to be long, object given, %s(71)
Error: 2 - parse_url() expects parameter 2 to be integer, object given, %s(71)
NULL
Arg value
+9
Ver Arquivo
@@ -315,6 +315,7 @@ norepo_tests = (
'/ext/standard/tests/strings/bug44242.php',
'/ext/standard/tests/strings/trim.php',
'/ext/standard/tests/strings/wordwrap.php',
'/ext/standard/tests/url/base64_encode_variation_001.php',
'/ext/standard/tests/url/parse_url_basic_001.php',
'/ext/standard/tests/url/parse_url_basic_002.php',
'/ext/standard/tests/url/parse_url_basic_003.php',
@@ -324,6 +325,12 @@ norepo_tests = (
'/ext/standard/tests/url/parse_url_basic_007.php',
'/ext/standard/tests/url/parse_url_basic_008.php',
'/ext/standard/tests/url/parse_url_basic_009.php',
'/ext/standard/tests/url/parse_url_variation_001.php',
'/ext/standard/tests/url/parse_url_variation_002_64bit.php',
'/ext/standard/tests/url/rawurldecode_variation_001.php',
'/ext/standard/tests/url/rawurlencode_variation_001.php',
'/ext/standard/tests/url/urldecode_variation_001.php',
'/ext/standard/tests/url/urlencode_variation_001.php',
'/ext/zip/tests/bug53579.php',
'/ext/zip/tests/bug64342_1.php',
'/ext/zip/tests/bug7658.php',
@@ -759,6 +766,8 @@ def walk(filename, source_dir):
if '/ext/standard/tests/file/tempnam_variation5.php' in full_dest_filename:
exp = exp.replace('tempnam_variation6', 'tempnam_variation5')
if '/ext/standard/tests/url/parse_url_variation_002_64bit.php' in full_dest_filename:
exp = exp.replace('to be long', 'to be integer')
file(full_dest_filename+'.expectf', 'w').write(exp)
else: