summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPGRADING13
-rw-r--r--Zend/tests/bug67633.phpt44
-rw-r--r--Zend/tests/int_special_values.phpt37
-rw-r--r--Zend/zend_compile.c7
-rw-r--r--Zend/zend_exceptions.c282
-rw-r--r--Zend/zend_inheritance.c157
-rw-r--r--Zend/zend_operators.c24
-rw-r--r--Zend/zend_operators.h17
-rw-r--r--Zend/zend_smart_str.h (renamed from ext/standard/php_smart_str.h)23
-rw-r--r--Zend/zend_smart_str_public.h (renamed from ext/standard/php_smart_str_public.h)8
-rw-r--r--Zend/zend_virtual_cwd.c7
-rw-r--r--ext/curl/interface.c2
-rw-r--r--ext/curl/php_curl.h2
-rw-r--r--ext/date/php_date.c2
-rw-r--r--ext/dba/dba.c2
-rw-r--r--ext/fileinfo/libmagic/apprentice.c2
-rw-r--r--ext/filter/sanitizing_filters.c2
-rw-r--r--ext/gmp/gmp.c2
-rw-r--r--ext/iconv/iconv.c2
-rw-r--r--ext/imap/php_imap.c2
-rw-r--r--ext/intl/intl_error.h2
-rw-r--r--ext/intl/locale/locale_methods.c2
-rw-r--r--ext/intl/transliterator/transliterator.h2
-rw-r--r--ext/json/JSON_parser.h2
-rw-r--r--ext/json/json.c2
-rw-r--r--ext/json/php_json.h2
-rw-r--r--ext/libxml/php_libxml.h2
-rw-r--r--ext/mbstring/php_mbregex.c2
-rw-r--r--ext/mcrypt/mcrypt.c4
-rw-r--r--ext/mysqli/mysqli_api.c2
-rw-r--r--ext/mysqli/mysqli_nonapi.c2
-rw-r--r--ext/mysqlnd/mysqlnd.c2
-rw-r--r--ext/mysqlnd/mysqlnd_alloc.c2
-rw-r--r--ext/mysqlnd/mysqlnd_structs.h2
-rw-r--r--ext/mysqlnd/php_mysqlnd.c2
-rw-r--r--ext/oci8/oci8.c2
-rw-r--r--ext/openssl/xp_ssl.c2
-rw-r--r--ext/pcre/php_pcre.c2
-rw-r--r--ext/pgsql/pgsql.c2
-rw-r--r--ext/phar/phar_internal.h2
-rw-r--r--ext/readline/readline_cli.c2
-rw-r--r--ext/readline/readline_cli.h2
-rw-r--r--ext/session/session.c2
-rw-r--r--ext/soap/php_encoding.c2
-rw-r--r--ext/soap/php_http.c2
-rw-r--r--ext/soap/php_soap.h2
-rw-r--r--ext/sockets/conversions.c2
-rw-r--r--ext/spl/spl_array.c2
-rw-r--r--ext/spl/spl_dllist.c2
-rw-r--r--ext/spl/spl_iterators.c2
-rw-r--r--ext/spl/spl_observer.c2
-rw-r--r--ext/standard/array.c2
-rw-r--r--ext/standard/browscap.c2
-rw-r--r--ext/standard/file.c4
-rw-r--r--ext/standard/filters.c4
-rw-r--r--ext/standard/http.c20
-rw-r--r--ext/standard/http_fopen_wrapper.c4
-rw-r--r--ext/standard/php_http.h2
-rw-r--r--ext/standard/php_var.h2
-rw-r--r--ext/standard/string.c12
-rw-r--r--ext/standard/url_scanner_ex.c22
-rw-r--r--ext/standard/url_scanner_ex.h2
-rw-r--r--ext/standard/url_scanner_ex.re22
-rw-r--r--ext/standard/var.c14
-rw-r--r--ext/sysvmsg/sysvmsg.c2
-rw-r--r--ext/sysvshm/sysvshm.c2
-rw-r--r--ext/wddx/php_wddx_api.h2
-rw-r--r--ext/wddx/wddx.c2
-rw-r--r--main/php_variables.c2
-rw-r--r--main/spprintf.c2
-rw-r--r--sapi/apache2filter/php_functions.c2
-rw-r--r--sapi/apache2filter/sapi_apache2.c2
-rw-r--r--sapi/apache2handler/php_functions.c2
-rw-r--r--sapi/apache2handler/sapi_apache2.c2
-rw-r--r--sapi/cli/php_cli_server.c2
-rw-r--r--sapi/thttpd/thttpd.c2
-rw-r--r--sapi/thttpd/thttpd_patch2
-rw-r--r--sapi/tux/php_tux.c2
-rw-r--r--tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt355
-rw-r--r--tests/lang/operators/bitwiseShiftLeft_variationStr.phpt398
-rw-r--r--tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt396
-rw-r--r--tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt253
-rw-r--r--tests/lang/operators/bitwiseShiftRight_variationStr.phpt400
83 files changed, 1328 insertions, 1315 deletions
diff --git a/UPGRADING b/UPGRADING
index 7468ab6daf..edd55b4545 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -21,6 +21,15 @@ PHP X.Y UPGRADE NOTES
1. Backward Incompatible Changes
========================================
+- Core
+ . Bitwise shifts by negative numbers of bits are disallowed (throws E_WARNING
+ and gives FALSE, like a division by zero).
+ . Left bitwise shifts by a number of bits beyond the bit width of an integer
+ will always result in 0, even on CPUs which wrap around.
+ . Right bitwise shifts by a number of bits beyond the bit width of an integer
+ will always result in 0 or -1 (depending on sign), even on CPUs which wrap
+ around.
+
- DBA
. dba_delete() now returns false if the key was not found for the inifile
handler, too.
@@ -100,5 +109,9 @@ PHP X.Y UPGRADE NOTES
13. Other Changes
========================================
+- Core
+ . Instead of being undefined and platform-dependant, NaN and Infinity will
+ always be zero when casted to integer.
+
- Standard
. call_user_method() and call_user_method_array() no longer exists.
diff --git a/Zend/tests/bug67633.phpt b/Zend/tests/bug67633.phpt
new file mode 100644
index 0000000000..a9e05d10ab
--- /dev/null
+++ b/Zend/tests/bug67633.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Bug #67633: A foreach on an array returned from a function not doing copy-on-write
+--FILE--
+<?php
+
+function id($x) {
+ return $x;
+}
+
+function &ref_id(&$x) {
+ return $x;
+}
+
+$c = 'c';
+$array = ['a', 'b', $c];
+
+foreach(id($array) as &$v) {
+ $v .= 'q';
+}
+var_dump($array);
+
+foreach(ref_id($array) as &$v) {
+ $v .= 'q';
+}
+var_dump($array);
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+}
+array(3) {
+ [0]=>
+ string(2) "aq"
+ [1]=>
+ string(2) "bq"
+ [2]=>
+ &string(2) "cq"
+}
diff --git a/Zend/tests/int_special_values.phpt b/Zend/tests/int_special_values.phpt
new file mode 100644
index 0000000000..e1a50b6ecb
--- /dev/null
+++ b/Zend/tests/int_special_values.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Conversion of special float values to int
+--FILE--
+<?php
+$values = [
+ 0.0,
+ INF,
+ -INF,
+ 1 / INF,
+ -1 / INF, // Negative zero,
+ NAN
+];
+
+foreach($values as $value) {
+ var_dump($value);
+ var_dump((int)$value);
+ echo PHP_EOL;
+}
+?>
+--EXPECT--
+float(0)
+int(0)
+
+float(INF)
+int(0)
+
+float(-INF)
+int(0)
+
+float(0)
+int(0)
+
+float(-0)
+int(0)
+
+float(NAN)
+int(0) \ No newline at end of file
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 0b114552cc..b88f329eaf 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -128,7 +128,7 @@ static zend_string *zend_build_runtime_definition_key(zend_string *name, unsigne
/* NULL, name length, filename length, last accepting char position length */
result = zend_string_alloc(1 + name->len + filename_len + char_pos_len, 0);
sprintf(result->val, "%c%s%s%s", '\0', name->val, filename, char_pos_buf);
- return result;
+ return zend_new_interned_string(result TSRMLS_CC);
}
/* }}} */
@@ -3409,6 +3409,10 @@ void zend_compile_foreach(zend_ast *ast TSRMLS_DC) /* {{{ */
zend_compile_expr(&expr_node, expr_ast TSRMLS_CC);
}
+ if (by_ref) {
+ zend_separate_if_call_and_write(&expr_node, expr_ast, BP_VAR_W TSRMLS_CC);
+ }
+
opnum_reset = get_next_op_number(CG(active_op_array));
opline = zend_emit_op(&reset_node, ZEND_FE_RESET, &expr_node, NULL TSRMLS_CC);
if (by_ref && is_variable) {
@@ -4856,6 +4860,7 @@ void zend_compile_const_decl(zend_ast *ast TSRMLS_DC) /* {{{ */
}
name = zend_prefix_with_ns(name TSRMLS_CC);
+ name = zend_new_interned_string(name TSRMLS_CC);
if (CG(current_import_const)
&& (import_name = zend_hash_find_ptr(CG(current_import_const), name))
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 9a270c0c10..999b6d790e 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -28,6 +28,7 @@
#include "zend_exceptions.h"
#include "zend_vm.h"
#include "zend_dtrace.h"
+#include "zend_smart_str.h"
static zend_class_entry *default_exception_ce;
static zend_class_entry *error_exception_ce;
@@ -334,45 +335,78 @@ ZEND_METHOD(error_exception, getSeverity)
}
/* }}} */
-/* {{{ gettraceasstring() macros */
-#define TRACE_APPEND_CHR(chr) \
- str = zend_string_realloc(str, str->len + 1, 0); \
- str->val[str->len - 1] = chr
-
-#define TRACE_APPEND_STRL(v, l) \
- { \
- str = zend_string_realloc(str, str->len + (l), 0); \
- memcpy(str->val + str->len - (l), (v), (l)); \
- }
-
-#define TRACE_APPEND_STR(v) \
- TRACE_APPEND_STRL((v), sizeof((v))-1)
-
#define TRACE_APPEND_KEY(key) do { \
tmp = zend_hash_str_find(ht, key, sizeof(key)-1); \
if (tmp) { \
if (Z_TYPE_P(tmp) != IS_STRING) { \
zend_error(E_WARNING, "Value for %s is no string", key); \
- TRACE_APPEND_STR("[unknown]"); \
+ smart_str_appends(str, "[unknown]"); \
} else { \
- TRACE_APPEND_STRL(Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)); \
+ smart_str_append(str, Z_STR_P(tmp)); \
} \
} \
} while (0)
+/* Windows uses VK_ESCAPE instead of \e */
+#ifndef VK_ESCAPE
+#define VK_ESCAPE '\e'
+#endif
-#define TRACE_ARG_APPEND(vallen) do { \
- size_t len = str->len; \
- str = zend_string_realloc(str, len + vallen, 0); \
- memmove(str->val + len - l_added + 1 + vallen, str->val + len - l_added + 1, l_added); \
- } while (0)
+static size_t compute_escaped_string_len(const char *s, size_t l) {
+ size_t i, len = l;
+ for (i = 0; i < l; ++i) {
+ char c = s[i];
+ if (c == '\n' || c == '\r' || c == '\t' ||
+ c == '\f' || c == '\v' || c == '\\' || c == VK_ESCAPE) {
+ len += 1;
+ } else if (c < 32 || c > 126) {
+ len += 3;
+ }
+ }
+ return len;
+}
-/* }}} */
+static void smart_str_append_escaped(smart_str *str, const char *s, size_t l) {
+ char *res;
+ size_t i, len = compute_escaped_string_len(s, l);
+
+ smart_str_alloc(str, len, 0);
+ res = &str->s->val[str->s->len];
+ str->s->len += len;
+
+ for (i = 0; i < l; ++i) {
+ char c = s[i];
+ if (c < 32 || c == '\\' || c > 126) {
+ *res++ = '\\';
+ switch (c) {
+ case '\n': *res++ = 'n'; break;
+ case '\r': *res++ = 'r'; break;
+ case '\t': *res++ = 't'; break;
+ case '\f': *res++ = 'f'; break;
+ case '\v': *res++ = 'v'; break;
+ case '\\': *res++ = '\\'; break;
+ case VK_ESCAPE: *res++ = 'e'; break;
+ default:
+ *res++ = 'x';
+ if ((c >> 4) < 10) {
+ *res++ = (c >> 4) + '0';
+ } else {
+ *res++ = (c >> 4) + 'A' - 10;
+ }
+ if ((c & 0xf) < 10) {
+ *res++ = (c & 0xf) + '0';
+ } else {
+ *res++ = (c & 0xf) + 'A' - 10;
+ }
+ }
+ } else {
+ *res++ = c;
+ }
+ }
+}
-static void _build_trace_args(zval *arg, zend_string **str_ptr TSRMLS_DC) /* {{{ */
+static void _build_trace_args(zval *arg, smart_str *str TSRMLS_DC) /* {{{ */
{
- zend_string *str = *str_ptr;
-
/* the trivial way would be to do:
* convert_to_string_ex(arg);
* append it and kill the now tmp arg.
@@ -382,159 +416,68 @@ static void _build_trace_args(zval *arg, zend_string **str_ptr TSRMLS_DC) /* {{{
ZVAL_DEREF(arg);
switch (Z_TYPE_P(arg)) {
case IS_NULL:
- TRACE_APPEND_STR("NULL, ");
+ smart_str_appends(str, "NULL, ");
break;
- case IS_STRING: {
- int l_added;
- TRACE_APPEND_CHR('\'');
+ case IS_STRING:
+ smart_str_appendc(str, '\'');
+ smart_str_append_escaped(str, Z_STRVAL_P(arg), MIN(Z_STRLEN_P(arg), 15));
if (Z_STRLEN_P(arg) > 15) {
- TRACE_APPEND_STRL(Z_STRVAL_P(arg), 15);
- TRACE_APPEND_STR("...', ");
- l_added = 15 + 6 + 1; /* +1 because of while (--l_added) */
+ smart_str_appends(str, "...', ");
} else {
- l_added = Z_STRLEN_P(arg);
- TRACE_APPEND_STRL(Z_STRVAL_P(arg), l_added);
- TRACE_APPEND_STR("', ");
- l_added += 3 + 1;
- }
- while (--l_added) {
- unsigned char chr = str->val[str->len - l_added];
- if (chr < 32 || chr == '\\' || chr > 126) {
- str->val[str->len - l_added] = '\\';
-
- switch (chr) {
- case '\n':
- TRACE_ARG_APPEND(1);
- str->val[str->len - l_added] = 'n';
- break;
- case '\r':
- TRACE_ARG_APPEND(1);
- str->val[str->len - l_added] = 'r';
- break;
- case '\t':
- TRACE_ARG_APPEND(1);
- str->val[str->len - l_added] = 't';
- break;
- case '\f':
- TRACE_ARG_APPEND(1);
- str->val[str->len - l_added] = 'f';
- break;
- case '\v':
- TRACE_ARG_APPEND(1);
- str->val[str->len - l_added] = 'v';
- break;
-#ifndef PHP_WIN32
- case '\e':
-#else
- case VK_ESCAPE:
-#endif
- TRACE_ARG_APPEND(1);
- str->val[str->len - l_added] = 'e';
- break;
- case '\\':
- TRACE_ARG_APPEND(1);
- str->val[str->len - l_added] = '\\';
- break;
- default:
- TRACE_ARG_APPEND(3);
- str->val[str->len - l_added - 2] = 'x';
- if ((chr >> 4) < 10) {
- str->val[str->len - l_added - 1] = (chr >> 4) + '0';
- } else {
- str->val[str->len - l_added - 1] = (chr >> 4) + 'A' - 10;
- }
- if (chr % 16 < 10) {
- str->val[str->len - l_added] = chr % 16 + '0';
- } else {
- str->val[str->len - l_added] = chr % 16 + 'A' - 10;
- }
- }
- }
+ smart_str_appends(str, "', ");
}
break;
- }
case IS_FALSE:
- TRACE_APPEND_STR("false, ");
+ smart_str_appends(str, "false, ");
break;
case IS_TRUE:
- TRACE_APPEND_STR("true, ");
+ smart_str_appends(str, "true, ");
break;
- case IS_RESOURCE: {
- zend_long lval = Z_RES_HANDLE_P(arg);
- char s_tmp[MAX_LENGTH_OF_LONG + 1];
- int l_tmp = zend_sprintf(s_tmp, ZEND_LONG_FMT, lval); /* SAFE */
- TRACE_APPEND_STR("Resource id #");
- TRACE_APPEND_STRL(s_tmp, l_tmp);
- TRACE_APPEND_STR(", ");
+ case IS_RESOURCE:
+ smart_str_appends(str, "Resource id #");
+ smart_str_append_long(str, Z_RES_HANDLE_P(arg));
+ smart_str_appends(str, ", ");
break;
- }
- case IS_LONG: {
- zend_long lval = Z_LVAL_P(arg);
- char s_tmp[MAX_LENGTH_OF_LONG + 1];
- int l_tmp = zend_sprintf(s_tmp, ZEND_LONG_FMT, lval); /* SAFE */
- TRACE_APPEND_STRL(s_tmp, l_tmp);
- TRACE_APPEND_STR(", ");
+ case IS_LONG:
+ smart_str_append_long(str, Z_LVAL_P(arg));
+ smart_str_appends(str, ", ");
break;
- }
case IS_DOUBLE: {
double dval = Z_DVAL_P(arg);
- char *s_tmp;
- int l_tmp;
-
- s_tmp = emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
- l_tmp = zend_sprintf(s_tmp, "%.*G", (int) EG(precision), dval); /* SAFE */
- TRACE_APPEND_STRL(s_tmp, l_tmp);
- /* %G already handles removing trailing zeros from the fractional part, yay */
+ char *s_tmp = emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
+ int l_tmp = zend_sprintf(s_tmp, "%.*G", (int) EG(precision), dval); /* SAFE */
+ smart_str_appendl(str, s_tmp, l_tmp);
+ smart_str_appends(str, ", ");
efree(s_tmp);
- TRACE_APPEND_STR(", ");
break;
}
case IS_ARRAY:
- TRACE_APPEND_STR("Array, ");
- break;
- case IS_OBJECT: {
- zend_string *class_name;
-
- TRACE_APPEND_STR("Object(");
-
- class_name = zend_get_object_classname(Z_OBJ_P(arg) TSRMLS_CC);
-
- TRACE_APPEND_STRL(class_name->val, class_name->len);
- TRACE_APPEND_STR("), ");
+ smart_str_appends(str, "Array, ");
break;
- }
- default:
+ case IS_OBJECT:
+ smart_str_appends(str, "Object(");
+ smart_str_append(str, zend_get_object_classname(Z_OBJ_P(arg) TSRMLS_CC));
+ smart_str_appends(str, "), ");
break;
}
- *str_ptr = str;
}
/* }}} */
-static void _build_trace_string(zval *frame, zend_ulong index, zend_string **str_ptr, int *num TSRMLS_DC) /* {{{ */
+static void _build_trace_string(smart_str *str, HashTable *ht, uint32_t num TSRMLS_DC) /* {{{ */
{
- char *s_tmp;
- int len;
- zend_long line;
- HashTable *ht;
zval *file, *tmp;
- zend_string *str = *str_ptr;
- if (Z_TYPE_P(frame) != IS_ARRAY) {
- zend_error(E_WARNING, "Expected array for frame %pu", index);
- return;
- }
+ smart_str_appendc(str, '#');
+ smart_str_append_long(str, num);
+ smart_str_appendc(str, ' ');
- ht = Z_ARRVAL_P(frame);
- s_tmp = emalloc(1 + MAX_LENGTH_OF_LONG + 1 + 1);
- len = sprintf(s_tmp, "#%d ", (*num)++);
- TRACE_APPEND_STRL(s_tmp, len);
- efree(s_tmp);
file = zend_hash_str_find(ht, "file", sizeof("file")-1);
if (file) {
if (Z_TYPE_P(file) != IS_STRING) {
zend_error(E_WARNING, "Function name is no string");
- TRACE_APPEND_STR("[unknown function]");
+ smart_str_appends(str, "[unknown function]");
} else{
+ zend_long line;
tmp = zend_hash_str_find(ht, "line", sizeof("line")-1);
if (tmp) {
if (Z_TYPE_P(tmp) == IS_LONG) {
@@ -546,37 +489,36 @@ static void _build_trace_string(zval *frame, zend_ulong index, zend_string **str
} else {
line = 0;
}
- s_tmp = emalloc(Z_STRLEN_P(file) + MAX_LENGTH_OF_LONG + 4 + 1);
- len = sprintf(s_tmp, "%s(" ZEND_LONG_FMT "): ", Z_STRVAL_P(file), line);
- TRACE_APPEND_STRL(s_tmp, len);
- efree(s_tmp);
+ smart_str_append(str, Z_STR_P(file));
+ smart_str_appendc(str, '(');
+ smart_str_append_long(str, line);
+ smart_str_appends(str, "): ");
}
} else {
- TRACE_APPEND_STR("[internal function]: ");
+ smart_str_appends(str, "[internal function]: ");
}
TRACE_APPEND_KEY("class");
TRACE_APPEND_KEY("type");
TRACE_APPEND_KEY("function");
- TRACE_APPEND_CHR('(');
+ smart_str_appendc(str, '(');
tmp = zend_hash_str_find(ht, "args", sizeof("args")-1);
if (tmp) {
if (Z_TYPE_P(tmp) == IS_ARRAY) {
- int last_len = str->len;
+ size_t last_len = str->s->len;
zval *arg;
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(tmp), arg) {
- _build_trace_args(arg, &str TSRMLS_CC);
+ _build_trace_args(arg, str TSRMLS_CC);
} ZEND_HASH_FOREACH_END();
- if (last_len != str->len) {
- str->len -= 2; /* remove last ', ' */
+ if (last_len != str->s->len) {
+ str->s->len -= 2; /* remove last ', ' */
}
} else {
zend_error(E_WARNING, "args element is no array");
}
}
- TRACE_APPEND_STR(")\n");
- *str_ptr = str;
+ smart_str_appends(str, ")\n");
}
/* }}} */
@@ -586,25 +528,27 @@ ZEND_METHOD(exception, getTraceAsString)
{
zval *trace, *frame;
zend_ulong index;
- zend_string *str;
- int num = 0, len;
- char s_tmp[MAX_LENGTH_OF_LONG + 7 + 1 + 1];
+ smart_str str = {0};
+ uint32_t num = 0;
DEFAULT_0_PARAMS;
- str = zend_string_alloc(0, 0);
-
trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC);
ZEND_HASH_FOREACH_NUM_KEY_VAL(Z_ARRVAL_P(trace), index, frame) {
- _build_trace_string(frame, index, &str, &num TSRMLS_CC);
- } ZEND_HASH_FOREACH_END();
+ if (Z_TYPE_P(frame) != IS_ARRAY) {
+ zend_error(E_WARNING, "Expected array for frame %pu", index);
+ continue;
+ }
- len = sprintf(s_tmp, "#%d {main}", num);
- TRACE_APPEND_STRL(s_tmp, len);
+ _build_trace_string(&str, Z_ARRVAL_P(frame), num++ TSRMLS_CC);
+ } ZEND_HASH_FOREACH_END();
- str->val[str->len] = '\0';
+ smart_str_appendc(&str, '#');
+ smart_str_append_long(&str, num);
+ smart_str_appends(&str, " {main}");
+ smart_str_0(&str);
- RETURN_NEW_STR(str);
+ RETURN_NEW_STR(str.s);
}
/* }}} */
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index c6b965714a..5cc970ee92 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -21,6 +21,7 @@
#include "zend_API.h"
#include "zend_compile.h"
#include "zend_execute.h"
+#include "zend_smart_str.h"
static void ptr_dtor(zval *zv) /* {{{ */
{
@@ -324,38 +325,22 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
}
/* }}} */
-#define REALLOC_BUF_IF_EXCEED(buf, offset, length, size) \
- if (UNEXPECTED(offset - buf + size >= length)) { \
- length += size + 1; \
- buf = erealloc(buf, length); \
- }
-
-static char *zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{{ */
+static zend_string *zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{{ */
{
- char *offset, *buf;
- uint32_t length = 1024;
+ smart_str str = {0};
- offset = buf = (char *)emalloc(length * sizeof(char));
if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
- *(offset++) = '&';
- *(offset++) = ' ';
+ smart_str_appends(&str, "& ");
}
if (fptr->common.scope) {
- memcpy(offset, fptr->common.scope->name->val, fptr->common.scope->name->len);
- offset += fptr->common.scope->name->len;
- *(offset++) = ':';
- *(offset++) = ':';
+ smart_str_append(&str, fptr->common.scope->name);
+ smart_str_appends(&str, "::");
}
- {
- size_t name_len = fptr->common.function_name->len;
- REALLOC_BUF_IF_EXCEED(buf, offset, length, name_len);
- memcpy(offset, fptr->common.function_name->val, name_len);
- offset += name_len;
- }
+ smart_str_append(&str, fptr->common.function_name);
+ smart_str_appendc(&str, '(');
- *(offset++) = '(';
if (fptr->common.arg_info) {
uint32_t i, required;
zend_arg_info *arg_info = fptr->common.arg_info;
@@ -365,7 +350,7 @@ static char *zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{{
if (arg_info->class_name) {
const char *class_name;
uint32_t class_name_len;
- if (!strcasecmp(arg_info->class_name, "self") && fptr->common.scope ) {
+ if (!strcasecmp(arg_info->class_name, "self") && fptr->common.scope) {
class_name = fptr->common.scope->name->val;
class_name_len = fptr->common.scope->name->len;
} else if (!strcasecmp(arg_info->class_name, "parent") && fptr->common.scope->parent) {
@@ -375,55 +360,40 @@ static char *zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{{
class_name = arg_info->class_name;
class_name_len = arg_info->class_name_len;
}
- REALLOC_BUF_IF_EXCEED(buf, offset, length, class_name_len);
- memcpy(offset, class_name, class_name_len);
- offset += class_name_len;
- *(offset++) = ' ';
+
+ smart_str_appendl(&str, class_name, class_name_len);
+ smart_str_appendc(&str, ' ');
} else if (arg_info->type_hint) {
- uint32_t type_name_len;
- char *type_name = zend_get_type_by_const(arg_info->type_hint);
- type_name_len = strlen(type_name);
- REALLOC_BUF_IF_EXCEED(buf, offset, length, type_name_len);
- memcpy(offset, type_name, type_name_len);
- offset += type_name_len;
- *(offset++) = ' ';
+ const char *type_name = zend_get_type_by_const(arg_info->type_hint);
+ smart_str_appends(&str, type_name);
+ smart_str_appendc(&str, ' ');
}
if (arg_info->pass_by_reference) {
- *(offset++) = '&';
+ smart_str_appendc(&str, '&');
}
if (arg_info->is_variadic) {
- *(offset++) = '.';
- *(offset++) = '.';
- *(offset++) = '.';
+ smart_str_appends(&str, "...");
}
- *(offset++) = '$';
+ smart_str_appendc(&str, '$');
if (arg_info->name) {
- REALLOC_BUF_IF_EXCEED(buf, offset, length, arg_info->name_len);
- memcpy(offset, arg_info->name, arg_info->name_len);
- offset += arg_info->name_len;
+ smart_str_appendl(&str, arg_info->name, arg_info->name_len);
} else {
- uint32_t idx = i;
- memcpy(offset, "param", 5);
- offset += 5;
- do {
- *(offset++) = (char) (idx % 10) + '0';
- idx /= 10;
- } while (idx > 0);
+ smart_str_appends(&str, "param");
+ smart_str_append_unsigned(&str, i);
}
+
if (i >= required && !arg_info->is_variadic) {
- *(offset++) = ' ';
- *(offset++) = '=';
- *(offset++) = ' ';
+ smart_str_appends(&str, " = ");
if (fptr->type == ZEND_USER_FUNCTION) {
zend_op *precv = NULL;
{
uint32_t idx = i;
- zend_op *op = ((zend_op_array *)fptr)->opcodes;
- zend_op *end = op + ((zend_op_array *)fptr)->last;
+ zend_op *op = fptr->op_array.opcodes;
+ zend_op *end = op + fptr->op_array.last;
++idx;
while (op < end) {
@@ -439,61 +409,46 @@ static char *zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{{
zval *zv = precv->op2.zv;
if (Z_TYPE_P(zv) == IS_CONSTANT) {
- REALLOC_BUF_IF_EXCEED(buf, offset, length, Z_STRLEN_P(zv));
- memcpy(offset, Z_STRVAL_P(zv), Z_STRLEN_P(zv));
- offset += Z_STRLEN_P(zv);
+ smart_str_append(&str, Z_STR_P(zv));
} else if (Z_TYPE_P(zv) == IS_FALSE) {
- memcpy(offset, "false", 5);
- offset += 5;
+ smart_str_appends(&str, "false");
} else if (Z_TYPE_P(zv) == IS_TRUE) {
- memcpy(offset, "true", 4);
- offset += 4;
+ smart_str_appends(&str, "true");
} else if (Z_TYPE_P(zv) == IS_NULL) {
- memcpy(offset, "NULL", 4);
- offset += 4;
+ smart_str_appends(&str, "NULL");
} else if (Z_TYPE_P(zv) == IS_STRING) {
- *(offset++) = '\'';
- REALLOC_BUF_IF_EXCEED(buf, offset, length, MIN(Z_STRLEN_P(zv), 10));
- memcpy(offset, Z_STRVAL_P(zv), MIN(Z_STRLEN_P(zv), 10));
- offset += MIN(Z_STRLEN_P(zv), 10);
+ smart_str_appendc(&str, '\'');
+ smart_str_appendl(&str, Z_STRVAL_P(zv), MIN(Z_STRLEN_P(zv), 10));
if (Z_STRLEN_P(zv) > 10) {
- *(offset++) = '.';
- *(offset++) = '.';
- *(offset++) = '.';
+ smart_str_appends(&str, "...");
}
- *(offset++) = '\'';
+ smart_str_appendc(&str, '\'');
} else if (Z_TYPE_P(zv) == IS_ARRAY) {
- memcpy(offset, "Array", 5);
- offset += 5;
+ smart_str_appends(&str, "Array");
} else if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
- memcpy(offset, "<expression>", 12);
- offset += 12;
+ smart_str_appends(&str, "<expression>");
} else {
- zend_string *str = zval_get_string(zv);
- REALLOC_BUF_IF_EXCEED(buf, offset, length, str->len);
- memcpy(offset, str->val, str->len);
- offset += str->len;
- zend_string_release(str);
+ zend_string *zv_str = zval_get_string(zv);
+ smart_str_append(&str, zv_str);
+ zend_string_release(zv_str);
}
}
} else {
- memcpy(offset, "NULL", 4);
- offset += 4;
+ smart_str_appends(&str, "NULL");
}
}
if (++i < fptr->common.num_args) {
- *(offset++) = ',';
- *(offset++) = ' ';
+ smart_str_appends(&str, ", ");
}
arg_info++;
- REALLOC_BUF_IF_EXCEED(buf, offset, length, 32);
}
}
- *(offset++) = ')';
- *offset = '\0';
- return buf;
+ smart_str_appendc(&str, ')');
+ smart_str_0(&str);
+
+ return str.s;
}
/* }}} */
@@ -557,13 +512,13 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
- zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, zend_get_function_declaration(child->common.prototype TSRMLS_CC));
+ zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, zend_get_function_declaration(child->common.prototype TSRMLS_CC)->val);
}
} else if (EG(error_reporting) & E_STRICT || Z_TYPE(EG(user_error_handler)) != IS_UNDEF) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
- char *method_prototype = zend_get_function_declaration(parent TSRMLS_CC);
- zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, method_prototype);
- efree(method_prototype);
+ zend_string *method_prototype = zend_get_function_declaration(parent TSRMLS_CC);
+ zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, method_prototype->val);
+ zend_string_free(method_prototype);
}
}
}
@@ -1039,15 +994,15 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s
/* Make sure the trait method is compatible with previosly declared abstract method */
if (!zend_traits_method_compatibility_check(fn, existing_fn TSRMLS_CC)) {
zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s",
- zend_get_function_declaration(fn TSRMLS_CC),
- zend_get_function_declaration(existing_fn TSRMLS_CC));
+ zend_get_function_declaration(fn TSRMLS_CC)->val,
+ zend_get_function_declaration(existing_fn TSRMLS_CC)->val);
}
} else if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
/* Make sure the abstract declaration is compatible with previous declaration */
if (!zend_traits_method_compatibility_check(existing_fn, fn TSRMLS_CC)) {
zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s",
- zend_get_function_declaration(fn TSRMLS_CC),
- zend_get_function_declaration(existing_fn TSRMLS_CC));
+ zend_get_function_declaration(fn TSRMLS_CC)->val,
+ zend_get_function_declaration(existing_fn TSRMLS_CC)->val);
}
return;
}
@@ -1062,15 +1017,15 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s
/* Make sure the trait method is compatible with previosly declared abstract method */
if (!zend_traits_method_compatibility_check(fn, existing_fn TSRMLS_CC)) {
zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s",
- zend_get_function_declaration(fn TSRMLS_CC),
- zend_get_function_declaration(existing_fn TSRMLS_CC));
+ zend_get_function_declaration(fn TSRMLS_CC)->val,
+ zend_get_function_declaration(existing_fn TSRMLS_CC)->val);
}
} else if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
/* Make sure the abstract declaration is compatible with previous declaration */
if (!zend_traits_method_compatibility_check(existing_fn, fn TSRMLS_CC)) {
zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s",
- zend_get_function_declaration(fn TSRMLS_CC),
- zend_get_function_declaration(existing_fn TSRMLS_CC));
+ zend_get_function_declaration(fn TSRMLS_CC)->val,
+ zend_get_function_declaration(existing_fn TSRMLS_CC)->val);
}
return;
} else if ((existing_fn->common.scope->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 8047aa6019..567d18c4aa 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -1449,6 +1449,18 @@ ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /
op1_lval = Z_LVAL_P(op1);
}
+ /* prevent wrapping quirkiness on some processors where << 64 + x == << x */
+ if (Z_LVAL_P(op2) >= SIZEOF_ZEND_LONG * 8) {
+ ZVAL_LONG(result, 0);
+ return SUCCESS;
+ }
+
+ if (Z_LVAL_P(op2) < 0) {
+ zend_error(E_WARNING, "Bit shift by negative number");
+ ZVAL_FALSE(result);
+ return FAILURE;
+ }
+
ZVAL_LONG(result, op1_lval << Z_LVAL_P(op2));
return SUCCESS;
}
@@ -1469,6 +1481,18 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
op1_lval = Z_LVAL_P(op1);
}
+ /* prevent wrapping quirkiness on some processors where >> 64 + x == >> x */
+ if (Z_LVAL_P(op2) >= SIZEOF_ZEND_LONG * 8) {
+ ZVAL_LONG(result, (Z_LVAL_P(op1) < 0) ? -1 : 0);
+ return SUCCESS;
+ }
+
+ if (Z_LVAL_P(op2) < 0) {
+ zend_error(E_WARNING, "Bit shift by negative number");
+ ZVAL_FALSE(result);
+ return FAILURE;
+ }
+
ZVAL_LONG(result, op1_lval >> Z_LVAL_P(op2));
return SUCCESS;
}
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index ddec162174..adb30f603f 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -72,11 +72,20 @@ ZEND_API zend_bool instanceof_function(const zend_class_entry *instance_ce, cons
END_EXTERN_C()
#if ZEND_DVAL_TO_LVAL_CAST_OK
-# define zend_dval_to_lval(d) ((zend_long) (d))
+static zend_always_inline zend_long zend_dval_to_lval(double d)
+{
+ if (EXPECTED(zend_finite(d)) && EXPECTED(!zend_isnan(d))) {
+ return (zend_long)d;
+ } else {
+ return 0;
+ }
+}
#elif SIZEOF_ZEND_LONG == 4
static zend_always_inline zend_long zend_dval_to_lval(double d)
{
- if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
+ if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
+ return 0;
+ } else if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
double two_pow_32 = pow(2., 32.),
dmod;
@@ -93,8 +102,10 @@ static zend_always_inline zend_long zend_dval_to_lval(double d)
#else
static zend_always_inline zend_long zend_dval_to_lval(double d)
{
+ if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
+ return 0;
/* >= as (double)ZEND_LONG_MAX is outside signed range */
- if (d >= ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
+ } else if (d >= ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
double two_pow_64 = pow(2., 64.),
dmod;
diff --git a/ext/standard/php_smart_str.h b/Zend/zend_smart_str.h
index e32def2307..2724ac7323 100644
--- a/ext/standard/php_smart_str.h
+++ b/Zend/zend_smart_str.h
@@ -16,15 +16,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
+#ifndef ZEND_SMART_STR_H
+#define ZEND_SMART_STR_H
-#ifndef PHP_SMART_STR_H
-#define PHP_SMART_STR_H
-
-#include "php_smart_str_public.h"
-
-#include <stdlib.h>
#include <zend.h>
+#include "zend_smart_str_public.h"
#ifndef SMART_STR_PREALLOC
#define SMART_STR_PREALLOC 128
@@ -34,8 +30,6 @@
#define SMART_STR_START_SIZE 78
#endif
-/* wrapper */
-
#define smart_str_appends_ex(dest, src, what) \
smart_str_appendl_ex((dest), (src), strlen(src), (what))
#define smart_str_appends(dest, src) \
@@ -46,6 +40,8 @@
smart_str_appendl_ex((dest), (src), (len), 0)
#define smart_str_append(dest, src) \
smart_str_append_ex((dest), (src), 0)
+#define smart_str_append_smart_str(dest, src) \
+ smart_str_append_smart_str_ex((dest), (src), 0)
#define smart_str_sets(dest, src) \
smart_str_setl((dest), (src), strlen(src));
#define smart_str_append_long(dest, val) \
@@ -98,9 +94,13 @@ static zend_always_inline void smart_str_appendl_ex(smart_str *dest, const char
dest->s->len = new_len;
}
-static zend_always_inline void smart_str_append_ex(smart_str *dest, const smart_str *src, zend_bool persistent) {
+static zend_always_inline void smart_str_append_ex(smart_str *dest, const zend_string *src, zend_bool persistent) {
+ smart_str_appendl_ex(dest, src->val, src->len, persistent);
+}
+
+static zend_always_inline void smart_str_append_smart_str_ex(smart_str *dest, const smart_str *src, zend_bool persistent) {
if (src->s && src->s->len) {
- smart_str_appendl_ex(dest, src->s->val, src->s->len, persistent);
+ smart_str_append_ex(dest, src->s, persistent);
}
}
@@ -122,3 +122,4 @@ static zend_always_inline void smart_str_setl(smart_str *dest, const char *src,
}
#endif
+
diff --git a/ext/standard/php_smart_str_public.h b/Zend/zend_smart_str_public.h
index e33348efd6..23abe8e064 100644
--- a/ext/standard/php_smart_str_public.h
+++ b/Zend/zend_smart_str_public.h
@@ -16,12 +16,8 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
-#ifndef PHP_SMART_STR_PUBLIC_H
-#define PHP_SMART_STR_PUBLIC_H
-
-#include <sys/types.h>
+#ifndef ZEND_SMART_STR_PUBLIC_H
+#define ZEND_SMART_STR_PUBLIC_H
typedef struct {
zend_string *s;
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c
index 75d9dd1ab6..5fc6fb6165 100644
--- a/Zend/zend_virtual_cwd.c
+++ b/Zend/zend_virtual_cwd.c
@@ -178,7 +178,7 @@ static int php_check_dots(const char *element, int n)
#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 )
typedef struct {
- zend_ulong ReparseTag;
+ unsigned long ReparseTag;
unsigned short ReparseDataLength;
unsigned short Reserved;
union {
@@ -187,7 +187,7 @@ typedef struct {
unsigned short SubstituteNameLength;
unsigned short PrintNameOffset;
unsigned short PrintNameLength;
- zend_ulong Flags;
+ unsigned long Flags;
wchar_t ReparseTarget[1];
} SymbolicLinkReparseBuffer;
struct {
@@ -201,7 +201,7 @@ typedef struct {
unsigned char ReparseTarget[1];
} GenericReparseBuffer;
};
-} REPARSE_DATA_BUFFER;
+} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
#define SECS_BETWEEN_EPOCHS (__int64)11644473600
#define SECS_TO_100NS (__int64)10000000
@@ -983,6 +983,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
memcpy(substitutename, path, len + 1);
substitutename_len = len;
} else {
+ /* XXX this might be not the end, restart handling with REPARSE_GUID_DATA_BUFFER should be implemented. */
free_alloca(pbuffer, use_heap_large);
return -1;
}
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 5c517d71a5..d7cacf54f9 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -82,7 +82,7 @@
#define SMART_STR_PREALLOC 4096
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"
#include "ext/standard/url.h"
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index cc96a410f3..ad44ae7b96 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -23,7 +23,7 @@
#define _PHP_CURL_H
#include "php.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#ifdef COMPILE_DL_CURL
#undef HAVE_CURL
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 3fd4b27eb3..360c6d3f67 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -999,7 +999,7 @@ PHPAPI timelib_tzinfo *get_timezone_info(TSRMLS_D)
/* {{{ date() and gmdate() data */
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
static char *mon_full_names[] = {
"January", "February", "March", "April",
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 5ca29ed276..de4ea4c464 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -519,7 +519,7 @@ PHP_MSHUTDOWN_FUNCTION(dba)
}
/* }}} */
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
/* {{{ PHP_MINFO_FUNCTION
*/
diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c
index 41a3ac5239..c1dc5aa1fa 100644
--- a/ext/fileinfo/libmagic/apprentice.c
+++ b/ext/fileinfo/libmagic/apprentice.c
@@ -1272,7 +1272,7 @@ file_signextend(struct magic_set *ms, struct magic *m, uint64_t v)
* the sign extension must have happened.
*/
case FILE_BYTE:
- v = (char) v;
+ v = (signed char) v;
break;
case FILE_SHORT:
case FILE_BESHORT:
diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c
index 8ddd55b95a..083b5382b6 100644
--- a/ext/filter/sanitizing_filters.c
+++ b/ext/filter/sanitizing_filters.c
@@ -20,7 +20,7 @@
#include "php_filter.h"
#include "filter_private.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
/* {{{ STRUCTS */
typedef unsigned long filter_map[256];
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 5a51c50ea6..18e7965199 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -25,7 +25,7 @@
#include "php_gmp.h"
#include "ext/standard/info.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_smart_str_public.h"
+#include "zend_smart_str_public.h"
#include "zend_exceptions.h"
#if HAVE_GMP
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 7ca97f9418..d425f6cf1e 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -55,7 +55,7 @@
#undef iconv
#endif
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/base64.h"
#include "ext/standard/quot_print.h"
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index d937681507..8dc56c5223 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -40,7 +40,7 @@
#include "ext/standard/php_string.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/pcre/php_pcre.h"
#ifdef ERROR
diff --git a/ext/intl/intl_error.h b/ext/intl/intl_error.h
index 6a809e8e39..b800d10dbf 100644
--- a/ext/intl/intl_error.h
+++ b/ext/intl/intl_error.h
@@ -21,7 +21,7 @@
#include <unicode/utypes.h>
#include <unicode/parseerr.h>
-#include <ext/standard/php_smart_str.h>
+#include <zend_smart_str.h>
#define INTL_ERROR_CODE(e) (e).code
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index 2679983646..27f917ffbb 100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -36,7 +36,7 @@
#include <zend.h>
#include <php.h>
#include "main/php_ini.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
ZEND_EXTERN_MODULE_GLOBALS( intl )
diff --git a/ext/intl/transliterator/transliterator.h b/ext/intl/transliterator/transliterator.h
index 3e38095b89..081a730cbc 100644
--- a/ext/intl/transliterator/transliterator.h
+++ b/ext/intl/transliterator/transliterator.h
@@ -21,7 +21,7 @@
#include <unicode/utypes.h>
#include <unicode/utrans.h>
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
void transliterator_register_constants( INIT_FUNC_ARGS );
smart_str transliterator_parse_error_to_string( UParseError* pe );
diff --git a/ext/json/JSON_parser.h b/ext/json/JSON_parser.h
index 3df999c5f3..da47f4078f 100644
--- a/ext/json/JSON_parser.h
+++ b/ext/json/JSON_parser.h
@@ -4,8 +4,8 @@
#define JSON_PARSER_H
#include "php.h"
-#include "ext/standard/php_smart_str.h"
#include "php_json.h"
+#include "zend_smart_str.h"
#define JSON_PARSER_DEFAULT_DEPTH 512
diff --git a/ext/json/json.c b/ext/json/json.c
index 485d14d11b..16e452a004 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -26,7 +26,7 @@
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/standard/html.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "JSON_parser.h"
#include "php_json.h"
#include <zend_exceptions.h>
diff --git a/ext/json/php_json.h b/ext/json/php_json.h
index 05dcc43e06..5b2dc127dd 100644
--- a/ext/json/php_json.h
+++ b/ext/json/php_json.h
@@ -22,7 +22,7 @@
#define PHP_JSON_H
#define PHP_JSON_VERSION "1.2.1"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str_public.h"
extern zend_module_entry json_module_entry;
#define phpext_json_ptr &json_module_entry
diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h
index b06462db28..cccc83f8db 100644
--- a/ext/libxml/php_libxml.h
+++ b/ext/libxml/php_libxml.h
@@ -34,7 +34,7 @@ extern zend_module_entry libxml_module_entry;
# define PHP_LIBXML_API
#endif
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include <libxml/tree.h>
#define LIBXML_SAVE_NOEMPTYTAG 1<<2
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 246f2223d1..de0bc768ad 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -28,7 +28,7 @@
#if HAVE_MBREGEX
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/info.h"
#include "php_mbregex.h"
#include "mbstring.h"
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index e572b7e4ba..82cbe72176 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -40,7 +40,7 @@
#include "php_globals.h"
#include "ext/standard/info.h"
#include "ext/standard/php_rand.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "php_mcrypt_filter.h"
static int le_mcrypt;
@@ -452,7 +452,7 @@ static PHP_MSHUTDOWN_FUNCTION(mcrypt) /* {{{ */
}
/* }}} */
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
PHP_MINFO_FUNCTION(mcrypt) /* {{{ */
{
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index eea6348034..4eff098999 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -30,7 +30,7 @@
#include "php_ini.h"
#include "php_globals.h"
#include "ext/standard/info.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "php_mysqli_structs.h"
#include "mysqli_priv.h"
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index e137e822d8..db0d0ee677 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -29,7 +29,7 @@
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "php_mysqli_structs.h"
#include "mysqli_priv.h"
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 513df95a80..41f34e366a 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -27,7 +27,7 @@
#include "mysqlnd_statistics.h"
#include "mysqlnd_charset.h"
#include "mysqlnd_debug.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
/*
TODO :
diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c
index f37738dd12..daa758c043 100644
--- a/ext/mysqlnd/mysqlnd_alloc.c
+++ b/ext/mysqlnd/mysqlnd_alloc.c
@@ -539,7 +539,7 @@ void _mysqlnd_free(void *ptr MYSQLND_MEM_D)
#define SMART_STR_START_SIZE 2048
#define SMART_STR_PREALLOC 512
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
/* {{{ _mysqlnd_pestrndup */
diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h
index 406c5a69b1..6be8b68034 100644
--- a/ext/mysqlnd/mysqlnd_structs.h
+++ b/ext/mysqlnd/mysqlnd_structs.h
@@ -23,7 +23,7 @@
#ifndef MYSQLND_STRUCTS_H
#define MYSQLND_STRUCTS_H
-#include "ext/standard/php_smart_str_public.h"
+#include "zend_smart_str_public.h"
#define MYSQLND_TYPEDEFED_METHODS
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c
index c38975f146..a16018f6ba 100644
--- a/ext/mysqlnd/php_mysqlnd.c
+++ b/ext/mysqlnd/php_mysqlnd.c
@@ -27,7 +27,7 @@
#include "mysqlnd_statistics.h"
#include "mysqlnd_reverse_api.h"
#include "ext/standard/info.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
/* {{{ mysqlnd_functions[]
*
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index c941c8eaf2..dba13ced93 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -33,7 +33,7 @@
#include "php.h"
#include "ext/standard/info.h"
#include "php_ini.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#if HAVE_OCI8
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 28afe1d4dd..b3213f9aea 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -28,7 +28,7 @@
#include "ext/standard/file.h"
#include "ext/standard/url.h"
#include "streams/php_streams_int.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "php_openssl.h"
#include "php_network.h"
#include <openssl/ssl.h>
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 3b49bf9ef5..67857da2c7 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -23,7 +23,7 @@
#include "php_globals.h"
#include "php_pcre.h"
#include "ext/standard/info.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#if HAVE_PCRE || HAVE_BUNDLED_PCRE
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 8ea4d3c06f..207764b165 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -35,7 +35,7 @@
#include "php.h"
#include "php_ini.h"
#include "ext/standard/php_standard.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/ereg/php_regex.h"
#ifdef PHP_WIN32
# include "win32/time.h"
diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h
index 77df0a71c2..f49143bc8c 100644
--- a/ext/phar/phar_internal.h
+++ b/ext/phar/phar_internal.h
@@ -35,6 +35,7 @@
#include "zend_operators.h"
#include "zend_qsort.h"
#include "zend_vm.h"
+#include "zend_smart_str.h"
#include "main/php_streams.h"
#include "main/streams/php_stream_plain_wrapper.h"
#include "main/SAPI.h"
@@ -49,7 +50,6 @@
#include "ext/standard/md5.h"
#include "ext/standard/sha1.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_smart_str.h"
#include "ext/standard/php_versioning.h"
#ifndef PHP_WIN32
#include "TSRM/tsrm_strtok_r.h"
diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c
index 23841e4eea..ff0671ce9f 100644
--- a/ext/readline/readline_cli.c
+++ b/ext/readline/readline_cli.c
@@ -42,7 +42,7 @@
#include "php_main.h"
#include "fopen_wrappers.h"
#include "ext/standard/php_standard.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#ifdef __riscos__
#include <unixlib/local.h>
diff --git a/ext/readline/readline_cli.h b/ext/readline/readline_cli.h
index 0531c71e35..6e57c83408 100644
--- a/ext/readline/readline_cli.h
+++ b/ext/readline/readline_cli.h
@@ -20,7 +20,7 @@
/* $Id$ */
#include "php.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str_public.h"
ZEND_BEGIN_MODULE_GLOBALS(cli_readline)
char *pager;
diff --git a/ext/session/session.c b/ext/session/session.c
index 18c02822e3..63bb00e06a 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -48,7 +48,7 @@
#include "ext/standard/url_scanner_ex.h"
#include "ext/standard/php_rand.h" /* for RAND_MAX */
#include "ext/standard/info.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/url.h"
#include "ext/standard/basic_functions.h"
#include "ext/standard/head.h"
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 99375be050..d34587b85e 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -2441,7 +2441,7 @@ iterator_done:
smart_str_appendl(&array_type,"xsd:ur-type",sizeof("xsd:ur-type")-1);
}
smart_str_appendc(&array_type, '[');
- smart_str_append(&array_type, &array_size);
+ smart_str_append_smart_str(&array_type, &array_size);
smart_str_appendc(&array_type, ']');
smart_str_0(&array_type);
set_ns_prop(xmlParam, SOAP_1_1_ENC_NAMESPACE, "arrayType", array_type.s->val);
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index ebadf6debb..a1cee555a8 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -595,7 +595,7 @@ try_again:
smart_str_append_const(&soap_headers, "User-Agent: PHP-SOAP/"PHP_VERSION"\r\n");
}
- smart_str_append(&soap_headers, &soap_headers_z);
+ smart_str_append_smart_str(&soap_headers, &soap_headers_z);
if (soap_version == SOAP_1_2) {
smart_str_append_const(&soap_headers,"Content-Type: application/soap+xml; charset=utf-8");
diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h
index 1cba5e7f07..6d36792981 100644
--- a/ext/soap/php_soap.h
+++ b/ext/soap/php_soap.h
@@ -29,7 +29,7 @@
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
#include "ext/session/php_session.h"
#endif
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "php_ini.h"
#include "SAPI.h"
#include <libxml/parser.h>
diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c
index f31208cf4d..d808271728 100644
--- a/ext/sockets/conversions.c
+++ b/ext/sockets/conversions.c
@@ -6,7 +6,7 @@
#endif
#include <Zend/zend_llist.h>
-#include <ext/standard/php_smart_str.h>
+#include <zend_smart_str.h>
#ifndef PHP_WIN32
# include <sys/types.h>
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 11293eb5e5..211180a08d 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -26,7 +26,7 @@
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index a02cfb685d..0a6f97c563 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -29,7 +29,7 @@
#include "php_spl.h"
#include "ext/standard/info.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "spl_functions.h"
#include "spl_engine.h"
#include "spl_iterators.h"
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 75f229dfc1..dddc8c5e73 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -35,7 +35,7 @@
#include "spl_directory.h"
#include "spl_array.h"
#include "spl_exceptions.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#ifdef accept
#undef accept
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 289e9212e8..d3ce72aaa3 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -28,7 +28,7 @@
#include "ext/standard/info.h"
#include "ext/standard/php_array.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
diff --git a/ext/standard/array.c b/ext/standard/array.c
index de5639fbab..c8e79957b5 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -45,7 +45,7 @@
#include "basic_functions.h"
#include "php_string.h"
#include "php_rand.h"
-#include "php_smart_str.h"
+#include "zend_smart_str.h"
#ifdef HAVE_SPL
#include "ext/spl/spl_array.h"
#endif
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index a9c9c8bd1b..fa2740e0ec 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -413,7 +413,7 @@ static int browser_reg_compare(zval *browser TSRMLS_DC, int num_args, va_list ar
/* Pick which browser pattern replaces the least amount of
characters when compared to the original user agent string... */
- if (ua_len - prev_len > ua_len - curr_len) {
+ if (prev_len < curr_len) {
ZVAL_COPY_VALUE(found_browser_entry, browser);
}
}
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 74ec941803..4147604e03 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -35,7 +35,7 @@
#include "php_open_temporary_file.h"
#include "ext/standard/basic_functions.h"
#include "php_ini.h"
-#include "php_smart_str.h"
+#include "zend_smart_str.h"
#include <stdio.h>
#include <stdlib.h>
@@ -1943,7 +1943,7 @@ PHPAPI size_t php_fputcsv(php_stream *stream, zval *fields, char delimiter, char
}
smart_str_appendc(&csvline, enclosure);
} else {
- smart_str_appendl(&csvline, field_str->val, field_str->len);
+ smart_str_append(&csvline, field_str);
}
if (++i != count) {
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index e76ddfb619..f0f49950bb 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -27,7 +27,7 @@
#include "ext/standard/basic_functions.h"
#include "ext/standard/file.h"
#include "ext/standard/php_string.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
/* {{{ rot13 stream filter implementation */
static char rot13_from[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
@@ -263,7 +263,7 @@ static php_stream_filter *strfilter_strip_tags_create(const char *filtername, zv
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(filterparams), tmp) {
convert_to_string_ex(tmp);
smart_str_appendc(&tags_ss, '<');
- smart_str_appendl(&tags_ss, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
+ smart_str_append(&tags_ss, Z_STR_P(tmp));
smart_str_appendc(&tags_ss, '>');
} ZEND_HASH_FOREACH_END();
smart_str_0(&tags_ss);
diff --git a/ext/standard/http.c b/ext/standard/http.c
index 45ff3890aa..9174163b7d 100644
--- a/ext/standard/http.c
+++ b/ext/standard/http.c
@@ -159,18 +159,14 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
} else {
ekey = php_url_encode(prop_name, prop_len);
}
- smart_str_appendl(formstr, ekey->val, ekey->len);
+ smart_str_append(formstr, ekey);
zend_string_free(ekey);
} else {
- char *ekey;
- int ekey_len;
/* Numeric key */
if (num_prefix) {
smart_str_appendl(formstr, num_prefix, num_prefix_len);
}
- ekey_len = spprintf(&ekey, 0, "%pd", idx);
- smart_str_appendl(formstr, ekey, ekey_len);
- efree(ekey);
+ smart_str_append_long(formstr, idx);
}
smart_str_appendl(formstr, key_suffix, key_suffix_len);
smart_str_appendl(formstr, "=", 1);
@@ -182,18 +178,12 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
} else {
ekey = php_url_encode(Z_STRVAL_P(zdata), Z_STRLEN_P(zdata));
}
- smart_str_appendl(formstr, ekey->val, ekey->len);
+ smart_str_append(formstr, ekey);
zend_string_free(ekey);
}
break;
case IS_LONG:
- {
- char *ekey;
- int ekey_len;
- ekey_len = spprintf(&ekey, 0, "%pd", Z_LVAL_P(zdata));
- smart_str_appendl(formstr, ekey, ekey_len);
- efree(ekey);
- }
+ smart_str_append_long(formstr, Z_LVAL_P(zdata));
break;
case IS_FALSE:
smart_str_appendl(formstr, "0", sizeof("0")-1);
@@ -221,7 +211,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
} else {
ekey = php_url_encode(Z_STRVAL(copyzval), Z_STRLEN(copyzval));
}
- smart_str_appendl(formstr, ekey->val, ekey->len);
+ smart_str_append(formstr, ekey);
zval_ptr_dtor(&copyzval);
zend_string_free(ekey);
}
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 83e894c123..27c6cf6248 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -27,7 +27,7 @@
#include "php_network.h"
#include "php_ini.h"
#include "ext/standard/basic_functions.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include <stdio.h>
#include <stdlib.h>
@@ -422,7 +422,7 @@ finish:
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(tmpzval), tmpheader) {
if (Z_TYPE_P(tmpheader) == IS_STRING) {
- smart_str_appendl(&tmpstr, Z_STRVAL_P(tmpheader), Z_STRLEN_P(tmpheader));
+ smart_str_append(&tmpstr, Z_STR_P(tmpheader));
smart_str_appendl(&tmpstr, "\r\n", sizeof("\r\n") - 1);
}
} ZEND_HASH_FOREACH_END();
diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h
index 0351b2a59c..0979348314 100644
--- a/ext/standard/php_http.h
+++ b/ext/standard/php_http.h
@@ -22,7 +22,7 @@
#define PHP_HTTP_H
#include "php.h"
-#include "php_smart_str.h"
+#include "zend_smart_str.h"
PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
const char *num_prefix, int num_prefix_len,
diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h
index 5a9aae1a24..90979159ab 100644
--- a/ext/standard/php_var.h
+++ b/ext/standard/php_var.h
@@ -22,7 +22,7 @@
#define PHP_VAR_H
#include "ext/standard/basic_functions.h"
-#include "ext/standard/php_smart_str_public.h"
+#include "zend_smart_str_public.h"
PHP_FUNCTION(var_dump);
PHP_FUNCTION(var_export);
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 559fb8b57f..dcd6f09a9c 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -56,7 +56,7 @@
#include "zend_execute.h"
#include "php_globals.h"
#include "basic_functions.h"
-#include "php_smart_str.h"
+#include "zend_smart_str.h"
#include <Zend/zend_exceptions.h>
#ifdef ZTS
#include "TSRM.h"
@@ -1150,7 +1150,7 @@ PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value TSRMLS_DC)
again:
switch (Z_TYPE_P(tmp)) {
case IS_STRING:
- smart_str_appendl(&implstr, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
+ smart_str_append(&implstr, Z_STR_P(tmp));
break;
case IS_LONG:
@@ -1179,14 +1179,14 @@ again:
default:
str = zval_get_string(tmp);
- smart_str_appendl(&implstr, str->val, str->len);
+ smart_str_append(&implstr, str);
zend_string_release(str);
break;
}
if (++i != numelems) {
- smart_str_appendl(&implstr, Z_STRVAL_P(delim), Z_STRLEN_P(delim));
+ smart_str_append(&implstr, Z_STR_P(delim));
}
} ZEND_HASH_FOREACH_END();
@@ -2907,7 +2907,7 @@ static void php_strtr_array(zval *return_value, char *str, size_t slen, HashTabl
entry = zend_hash_str_find(pats, key, len);
if (entry != NULL) {
zend_string *str = zval_get_string(entry);
- smart_str_appendl(&result, str->val, str->len);
+ smart_str_append(&result, str);
pos += len;
found = 1;
zend_string_release(str);
@@ -2932,7 +2932,7 @@ static void php_strtr_array(zval *return_value, char *str, size_t slen, HashTabl
entry = zend_hash_str_find(pats, key, len);
if (entry != NULL) {
zend_string *str = zval_get_string(entry);
- smart_str_appendl(&result, str->val, str->len);
+ smart_str_append(&result, str);
pos += len;
found = 1;
zend_string_release(str);
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index b7c9403f8b..3d7aa985b8 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -42,7 +42,7 @@
#define url_scanner url_scanner_ex
-#include "php_smart_str.h"
+#include "zend_smart_str.h"
static void tag_dtor(zval *zv)
{
@@ -166,7 +166,7 @@ scan:
if (yych >= ';') goto yy4;
++YYCURSOR;
#line 125 "ext/standard/url_scanner_ex.re"
- { smart_str_append(dest, url); return; }
+ { smart_str_append_smart_str(dest, url); return; }
#line 171 "ext/standard/url_scanner_ex.c"
yy4:
++YYCURSOR;
@@ -195,17 +195,17 @@ done:
/* Don't modify URLs of the format "#mark" */
if (bash && bash - url->s->val == 0) {
- smart_str_append(dest, url);
+ smart_str_append_smart_str(dest, url);
return;
}
if (bash)
smart_str_appendl(dest, url->s->val, bash - url->s->val);
else
- smart_str_append(dest, url);
+ smart_str_append_smart_str(dest, url);
smart_str_appends(dest, sep);
- smart_str_append(dest, url_app);
+ smart_str_append_smart_str(dest, url_app);
if (bash)
smart_str_appendl(dest, bash, q - bash);
@@ -230,7 +230,7 @@ static inline void tag_arg(url_adapt_state_ex_t *ctx, char quotes, char type TSR
if (f) {
append_modified_url(&ctx->val, &ctx->result, &ctx->url_app, PG(arg_separator).output);
} else {
- smart_str_append(&ctx->result, &ctx->val);
+ smart_str_append_smart_str(&ctx->result, &ctx->val);
}
if (quotes)
smart_str_appendc(&ctx->result, type);
@@ -304,7 +304,7 @@ static void handle_form(STD_PARA)
}
if (doit)
- smart_str_append(&ctx->result, &ctx->form_app);
+ smart_str_append_smart_str(&ctx->result, &ctx->form_app);
}
}
@@ -958,7 +958,7 @@ static char *url_adapt_ext(const char *src, size_t srclen, size_t *newlen, zend_
}
smart_str_0(&ctx->result);
if (do_flush) {
- smart_str_appendl(&ctx->result, ctx->buf.s->val, ctx->buf.s->len);
+ smart_str_append(&ctx->result, ctx->buf.s);
*newlen += ctx->buf.s->len;
smart_str_free(&ctx->buf);
smart_str_free(&ctx->val);
@@ -1007,7 +1007,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char *
} else if (BG(url_adapt_state_ex).url_app.s->len == 0) {
url_adapt_state_ex_t *ctx = &BG(url_adapt_state_ex);
if (ctx->buf.s && ctx->buf.s->len) {
- smart_str_appendl(&ctx->result, ctx->buf.s->val, ctx->buf.s->len);
+ smart_str_append(&ctx->result, ctx->buf.s);
smart_str_appendl(&ctx->result, output, output_len);
*handled_output = estrndup(ctx->result.s->val, ctx->result.s->len);
@@ -1048,12 +1048,12 @@ PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int va
smart_str_appendl(&BG(url_adapt_state_ex).url_app, name, name_len);
smart_str_appendc(&BG(url_adapt_state_ex).url_app, '=');
- smart_str_append(&BG(url_adapt_state_ex).url_app, &val);
+ smart_str_append_smart_str(&BG(url_adapt_state_ex).url_app, &val);
smart_str_appends(&BG(url_adapt_state_ex).form_app, "<input type=\"hidden\" name=\"");
smart_str_appendl(&BG(url_adapt_state_ex).form_app, name, name_len);
smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" value=\"");
- smart_str_append(&BG(url_adapt_state_ex).form_app, &val);
+ smart_str_append_smart_str(&BG(url_adapt_state_ex).form_app, &val);
smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" />");
if (urlencode) {
diff --git a/ext/standard/url_scanner_ex.h b/ext/standard/url_scanner_ex.h
index 00dd9fbfb0..3c5b68c95b 100644
--- a/ext/standard/url_scanner_ex.h
+++ b/ext/standard/url_scanner_ex.h
@@ -31,7 +31,7 @@ PHPAPI char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, co
PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int value_len, int urlencode TSRMLS_DC);
PHPAPI int php_url_scanner_reset_vars(TSRMLS_D);
-#include "php_smart_str_public.h"
+#include "zend_smart_str_public.h"
typedef struct {
/* Used by the mainloop of the scanner */
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index 28a5ca3196..2e74b1fb30 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -40,7 +40,7 @@
#define url_scanner url_scanner_ex
-#include "php_smart_str.h"
+#include "zend_smart_str.h"
static void tag_dtor(zval *zv)
{
@@ -122,7 +122,7 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st
scan:
/*!re2c
- ":" { smart_str_append(dest, url); return; }
+ ":" { smart_str_append_smart_str(dest, url); return; }
"?" { sep = separator; goto scan; }
"#" { bash = p - 1; goto done; }
(any\[:?#])+ { goto scan; }
@@ -131,17 +131,17 @@ done:
/* Don't modify URLs of the format "#mark" */
if (bash && bash - url->s->val == 0) {
- smart_str_append(dest, url);
+ smart_str_append_smart_str(dest, url);
return;
}
if (bash)
smart_str_appendl(dest, url->s->val, bash - url->s->val);
else
- smart_str_append(dest, url);
+ smart_str_append_smart_str(dest, url);
smart_str_appends(dest, sep);
- smart_str_append(dest, url_app);
+ smart_str_append_smart_str(dest, url_app);
if (bash)
smart_str_appendl(dest, bash, q - bash);
@@ -166,7 +166,7 @@ static inline void tag_arg(url_adapt_state_ex_t *ctx, char quotes, char type TSR
if (f) {
append_modified_url(&ctx->val, &ctx->result, &ctx->url_app, PG(arg_separator).output);
} else {
- smart_str_append(&ctx->result, &ctx->val);
+ smart_str_append_smart_str(&ctx->result, &ctx->val);
}
if (quotes)
smart_str_appendc(&ctx->result, type);
@@ -240,7 +240,7 @@ static void handle_form(STD_PARA)
}
if (doit)
- smart_str_append(&ctx->result, &ctx->form_app);
+ smart_str_append_smart_str(&ctx->result, &ctx->form_app);
}
}
@@ -410,7 +410,7 @@ static char *url_adapt_ext(const char *src, size_t srclen, size_t *newlen, zend_
}
smart_str_0(&ctx->result);
if (do_flush) {
- smart_str_appendl(&ctx->result, ctx->buf.s->val, ctx->buf.s->len);
+ smart_str_append(&ctx->result, ctx->buf.s);
*newlen += ctx->buf.s->len;
smart_str_free(&ctx->buf);
smart_str_free(&ctx->val);
@@ -459,7 +459,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char *
} else if (BG(url_adapt_state_ex).url_app.s->len == 0) {
url_adapt_state_ex_t *ctx = &BG(url_adapt_state_ex);
if (ctx->buf.s && ctx->buf.s->len) {
- smart_str_appendl(&ctx->result, ctx->buf.s->val, ctx->buf.s->len);
+ smart_str_append(&ctx->result, ctx->buf.s);
smart_str_appendl(&ctx->result, output, output_len);
*handled_output = estrndup(ctx->result.s->val, ctx->result.s->len);
@@ -500,12 +500,12 @@ PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int va
smart_str_appendl(&BG(url_adapt_state_ex).url_app, name, name_len);
smart_str_appendc(&BG(url_adapt_state_ex).url_app, '=');
- smart_str_append(&BG(url_adapt_state_ex).url_app, &val);
+ smart_str_append_smart_str(&BG(url_adapt_state_ex).url_app, &val);
smart_str_appends(&BG(url_adapt_state_ex).form_app, "<input type=\"hidden\" name=\"");
smart_str_appendl(&BG(url_adapt_state_ex).form_app, name, name_len);
smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" value=\"");
- smart_str_append(&BG(url_adapt_state_ex).form_app, &val);
+ smart_str_append_smart_str(&BG(url_adapt_state_ex).form_app, &val);
smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" />");
if (urlencode) {
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 532e53a110..f9d897a4ec 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -28,7 +28,7 @@
#include "php.h"
#include "php_string.h"
#include "php_var.h"
-#include "php_smart_str.h"
+#include "zend_smart_str.h"
#include "basic_functions.h"
#include "php_incomplete_class.h"
@@ -413,7 +413,7 @@ static void php_array_element_export(zval *zv, zend_ulong index, zend_string *ke
buffer_append_spaces(buf, level + 1);
smart_str_appendc(buf, '\'');
- smart_str_appendl(buf, tmp_str->val, tmp_str->len);
+ smart_str_append(buf, tmp_str);
smart_str_appendl(buf, "' => ", 5);
zend_string_free(ckey);
@@ -438,7 +438,7 @@ static void php_object_element_export(zval *zv, zend_ulong index, zend_string *k
pname_esc = php_addcslashes(prop_name, prop_name_len, 0, "'\\", 2 TSRMLS_CC);
smart_str_appendc(buf, '\'');
- smart_str_appendl(buf, pname_esc->val, pname_esc->len);
+ smart_str_append(buf, pname_esc);
smart_str_appendc(buf, '\'');
zend_string_release(pname_esc);
} else {
@@ -486,7 +486,7 @@ again:
ztmp2 = php_str_to_str_ex(ztmp->val, ztmp->len, "\0", 1, "' . \"\\0\" . '", 12, 0, NULL);
smart_str_appendc(buf, '\'');
- smart_str_appendl(buf, ztmp2->val, ztmp2->len);
+ smart_str_append(buf, ztmp2);
smart_str_appendc(buf, '\'');
zend_string_free(ztmp);
@@ -535,7 +535,7 @@ again:
}
class_name = Z_OBJ_HANDLER_P(struc, get_class_name)(Z_OBJ_P(struc), 0 TSRMLS_CC);
- smart_str_appendl(buf, class_name->val, class_name->len);
+ smart_str_append(buf, class_name);
smart_str_appendl(buf, "::__set_state(array(\n", 21);
zend_string_release(class_name);
@@ -675,7 +675,7 @@ static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval *struc
smart_str_appendl(buf, "O:", 2);
smart_str_append_unsigned(buf, class_name->len);
smart_str_appendl(buf, ":\"", 2);
- smart_str_appendl(buf, class_name->val, class_name->len);
+ smart_str_append(buf, class_name);
smart_str_appendl(buf, "\":", 2);
PHP_CLEANUP_CLASS_ATTRIBUTES();
return incomplete_class;
@@ -859,7 +859,7 @@ again:
smart_str_appendl(buf, "C:", 2);
smart_str_append_unsigned(buf, Z_OBJCE_P(struc)->name->len);
smart_str_appendl(buf, ":\"", 2);
- smart_str_appendl(buf, Z_OBJCE_P(struc)->name->val, Z_OBJCE_P(struc)->name->len);
+ smart_str_append(buf, Z_OBJCE_P(struc)->name);
smart_str_appendl(buf, "\":", 2);
smart_str_append_unsigned(buf, serialized_length);
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c
index 15021783a6..d158366ea5 100644
--- a/ext/sysvmsg/sysvmsg.c
+++ b/ext/sysvmsg/sysvmsg.c
@@ -27,7 +27,7 @@
#include "ext/standard/info.h"
#include "php_sysvmsg.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
/* In order to detect MSG_EXCEPT use at run time; we have no way
* of knowing what the bit definitions are, so we can't just define
diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c
index e0f9df3ac3..c87be09e4f 100644
--- a/ext/sysvshm/sysvshm.c
+++ b/ext/sysvshm/sysvshm.c
@@ -36,7 +36,7 @@
#include "php_sysvshm.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "php_ini.h"
/* {{{ arginfo */
diff --git a/ext/wddx/php_wddx_api.h b/ext/wddx/php_wddx_api.h
index 420377eb22..5c47109ee3 100644
--- a/ext/wddx/php_wddx_api.h
+++ b/ext/wddx/php_wddx_api.h
@@ -21,7 +21,7 @@
#ifndef PHP_WDDX_API_H
#define PHP_WDDX_API_H
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str_public.h"
#define WDDX_ARRAY_S "<array length='%d'>"
#define WDDX_ARRAY_E "</array>"
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index be5913d521..705babd885 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -35,7 +35,7 @@
#include "ext/standard/php_incomplete_class.h"
#include "ext/standard/base64.h"
#include "ext/standard/info.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/html.h"
#include "ext/standard/php_string.h"
#include "ext/date/php_date.h"
diff --git a/main/php_variables.c b/main/php_variables.c
index c1d69532e0..a0acb38264 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -23,7 +23,7 @@
#include "php.h"
#include "ext/standard/php_standard.h"
#include "ext/standard/credits.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "php_variables.h"
#include "php_globals.h"
#include "php_content_types.h"
diff --git a/main/spprintf.c b/main/spprintf.c
index 12443a7769..cf730dd964 100644
--- a/main/spprintf.c
+++ b/main/spprintf.c
@@ -111,7 +111,7 @@
#define FLOAT_DIGITS 6
#define EXPONENT_LENGTH 10
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/php_smart_string.h"
/* {{{ macros */
diff --git a/sapi/apache2filter/php_functions.c b/sapi/apache2filter/php_functions.c
index 321df14416..ea137384f2 100644
--- a/sapi/apache2filter/php_functions.c
+++ b/sapi/apache2filter/php_functions.c
@@ -22,7 +22,7 @@
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
#include "php.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/info.h"
#include "SAPI.h"
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 9d159327c0..389686124d 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -30,7 +30,7 @@
#include "php_variables.h"
#include "SAPI.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#ifndef NETWARE
#include "ext/standard/php_standard.h"
#else
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index c79af0e3db..9529b708a6 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -21,7 +21,7 @@
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
#include "php.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/info.h"
#include "ext/standard/head.h"
#include "php_ini.h"
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index f993b478bc..86372e126d 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -30,7 +30,7 @@
#include <fcntl.h>
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#ifndef NETWARE
#include "ext/standard/php_standard.h"
#else
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 6e6c78fe5b..eb4dde4d0e 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -96,7 +96,7 @@
#endif
#include "ext/standard/file.h" /* for php_set_sock_blocking() :-( */
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "ext/standard/html.h"
#include "ext/standard/url.h" /* for php_url_decode() */
#include "ext/standard/php_string.h" /* for php_dirname() */
diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c
index 1671a5b65b..7c03454f58 100644
--- a/sapi/thttpd/thttpd.c
+++ b/sapi/thttpd/thttpd.c
@@ -27,7 +27,7 @@
#include "php_ini.h"
#include "zend_highlight.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include <sys/time.h>
#include <sys/types.h>
diff --git a/sapi/thttpd/thttpd_patch b/sapi/thttpd/thttpd_patch
index c79ee44e62..1a9ed29d60 100644
--- a/sapi/thttpd/thttpd_patch
+++ b/sapi/thttpd/thttpd_patch
@@ -240,7 +240,7 @@ diff -ur thttpd-2.21b/libhttpd.c thttpd-2.21b-cool/libhttpd.c
+
+#define SMART_STR_USE_REALLOC
+
-+#include "ext/standard/php_smart_str.h"
++#include "zend_smart_str.h"
static void
-send_mime( httpd_conn* hc, int status, char* title, char* encodings, char* extraheads, char* type, int length, time_t mod )
diff --git a/sapi/tux/php_tux.c b/sapi/tux/php_tux.c
index 9bff4f1695..783fe852bc 100644
--- a/sapi/tux/php_tux.c
+++ b/sapi/tux/php_tux.c
@@ -21,7 +21,7 @@
#include "php_main.h"
#include "php_variables.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "tuxmodule.h"
diff --git a/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt b/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt
index 24da2d0dc4..d784ed6601 100644
--- a/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt
@@ -44,25 +44,25 @@ int(9223372036854775807)
--- testing: 9223372036854775807 << 1 ---
int(-2)
--- testing: 9223372036854775807 << -1 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 9223372036854775807 << 7 ---
int(-128)
--- testing: 9223372036854775807 << 9 ---
int(-512)
--- testing: 9223372036854775807 << 65 ---
-int(-2)
+int(0)
--- testing: 9223372036854775807 << -44 ---
-int(-1048576)
+bool(false)
--- testing: 9223372036854775807 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 9223372036854775807 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: -9223372036854775808 << 0 ---
int(-9223372036854775808)
--- testing: -9223372036854775808 << 1 ---
int(0)
--- testing: -9223372036854775808 << -1 ---
-int(0)
+bool(false)
--- testing: -9223372036854775808 << 7 ---
int(0)
--- testing: -9223372036854775808 << 9 ---
@@ -70,7 +70,7 @@ int(0)
--- testing: -9223372036854775808 << 65 ---
int(0)
--- testing: -9223372036854775808 << -44 ---
-int(0)
+bool(false)
--- testing: -9223372036854775808 << 2147483647 ---
int(0)
--- testing: -9223372036854775808 << 9223372036854775807 ---
@@ -80,33 +80,33 @@ int(2147483647)
--- testing: 2147483647 << 1 ---
int(4294967294)
--- testing: 2147483647 << -1 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 2147483647 << 7 ---
int(274877906816)
--- testing: 2147483647 << 9 ---
int(1099511627264)
--- testing: 2147483647 << 65 ---
-int(4294967294)
+int(0)
--- testing: 2147483647 << -44 ---
-int(2251799812636672)
+bool(false)
--- testing: 2147483647 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 2147483647 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: -2147483648 << 0 ---
int(-2147483648)
--- testing: -2147483648 << 1 ---
int(-4294967296)
--- testing: -2147483648 << -1 ---
-int(0)
+bool(false)
--- testing: -2147483648 << 7 ---
int(-274877906944)
--- testing: -2147483648 << 9 ---
int(-1099511627776)
--- testing: -2147483648 << 65 ---
-int(-4294967296)
+int(0)
--- testing: -2147483648 << -44 ---
-int(-2251799813685248)
+bool(false)
--- testing: -2147483648 << 2147483647 ---
int(0)
--- testing: -2147483648 << 9223372036854775807 ---
@@ -116,15 +116,15 @@ int(9223372034707292160)
--- testing: 9223372034707292160 << 1 ---
int(-4294967296)
--- testing: 9223372034707292160 << -1 ---
-int(0)
+bool(false)
--- testing: 9223372034707292160 << 7 ---
int(-274877906944)
--- testing: 9223372034707292160 << 9 ---
int(-1099511627776)
--- testing: 9223372034707292160 << 65 ---
-int(-4294967296)
+int(0)
--- testing: 9223372034707292160 << -44 ---
-int(-2251799813685248)
+bool(false)
--- testing: 9223372034707292160 << 2147483647 ---
int(0)
--- testing: 9223372034707292160 << 9223372036854775807 ---
@@ -134,15 +134,15 @@ int(-9223372034707292160)
--- testing: -9223372034707292160 << 1 ---
int(4294967296)
--- testing: -9223372034707292160 << -1 ---
-int(0)
+bool(false)
--- testing: -9223372034707292160 << 7 ---
int(274877906944)
--- testing: -9223372034707292160 << 9 ---
int(1099511627776)
--- testing: -9223372034707292160 << 65 ---
-int(4294967296)
+int(0)
--- testing: -9223372034707292160 << -44 ---
-int(2251799813685248)
+bool(false)
--- testing: -9223372034707292160 << 2147483647 ---
int(0)
--- testing: -9223372034707292160 << 9223372036854775807 ---
@@ -152,15 +152,15 @@ int(2147483648)
--- testing: 2147483648 << 1 ---
int(4294967296)
--- testing: 2147483648 << -1 ---
-int(0)
+bool(false)
--- testing: 2147483648 << 7 ---
int(274877906944)
--- testing: 2147483648 << 9 ---
int(1099511627776)
--- testing: 2147483648 << 65 ---
-int(4294967296)
+int(0)
--- testing: 2147483648 << -44 ---
-int(2251799813685248)
+bool(false)
--- testing: 2147483648 << 2147483647 ---
int(0)
--- testing: 2147483648 << 9223372036854775807 ---
@@ -170,33 +170,33 @@ int(-2147483649)
--- testing: -2147483649 << 1 ---
int(-4294967298)
--- testing: -2147483649 << -1 ---
-int(-9223372036854775808)
+bool(false)
--- testing: -2147483649 << 7 ---
int(-274877907072)
--- testing: -2147483649 << 9 ---
int(-1099511628288)
--- testing: -2147483649 << 65 ---
-int(-4294967298)
+int(0)
--- testing: -2147483649 << -44 ---
-int(-2251799814733824)
+bool(false)
--- testing: -2147483649 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: -2147483649 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 4294967294 << 0 ---
int(4294967294)
--- testing: 4294967294 << 1 ---
int(8589934588)
--- testing: 4294967294 << -1 ---
-int(0)
+bool(false)
--- testing: 4294967294 << 7 ---
int(549755813632)
--- testing: 4294967294 << 9 ---
int(2199023254528)
--- testing: 4294967294 << 65 ---
-int(8589934588)
+int(0)
--- testing: 4294967294 << -44 ---
-int(4503599625273344)
+bool(false)
--- testing: 4294967294 << 2147483647 ---
int(0)
--- testing: 4294967294 << 9223372036854775807 ---
@@ -206,51 +206,51 @@ int(4294967295)
--- testing: 4294967295 << 1 ---
int(8589934590)
--- testing: 4294967295 << -1 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 4294967295 << 7 ---
int(549755813760)
--- testing: 4294967295 << 9 ---
int(2199023255040)
--- testing: 4294967295 << 65 ---
-int(8589934590)
+int(0)
--- testing: 4294967295 << -44 ---
-int(4503599626321920)
+bool(false)
--- testing: 4294967295 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 4294967295 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 4294967293 << 0 ---
int(4294967293)
--- testing: 4294967293 << 1 ---
int(8589934586)
--- testing: 4294967293 << -1 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 4294967293 << 7 ---
int(549755813504)
--- testing: 4294967293 << 9 ---
int(2199023254016)
--- testing: 4294967293 << 65 ---
-int(8589934586)
+int(0)
--- testing: 4294967293 << -44 ---
-int(4503599624224768)
+bool(false)
--- testing: 4294967293 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 4294967293 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 9223372036854775806 << 0 ---
int(9223372036854775806)
--- testing: 9223372036854775806 << 1 ---
int(-4)
--- testing: 9223372036854775806 << -1 ---
-int(0)
+bool(false)
--- testing: 9223372036854775806 << 7 ---
int(-256)
--- testing: 9223372036854775806 << 9 ---
int(-1024)
--- testing: 9223372036854775806 << 65 ---
-int(-4)
+int(0)
--- testing: 9223372036854775806 << -44 ---
-int(-2097152)
+bool(false)
--- testing: 9223372036854775806 << 2147483647 ---
int(0)
--- testing: 9223372036854775806 << 9223372036854775807 ---
@@ -260,7 +260,7 @@ int(-9223372036854775808)
--- testing: 9.2233720368548E+18 << 1 ---
int(0)
--- testing: 9.2233720368548E+18 << -1 ---
-int(0)
+bool(false)
--- testing: 9.2233720368548E+18 << 7 ---
int(0)
--- testing: 9.2233720368548E+18 << 9 ---
@@ -268,7 +268,7 @@ int(0)
--- testing: 9.2233720368548E+18 << 65 ---
int(0)
--- testing: 9.2233720368548E+18 << -44 ---
-int(0)
+bool(false)
--- testing: 9.2233720368548E+18 << 2147483647 ---
int(0)
--- testing: 9.2233720368548E+18 << 9223372036854775807 ---
@@ -278,25 +278,25 @@ int(-9223372036854775807)
--- testing: -9223372036854775807 << 1 ---
int(2)
--- testing: -9223372036854775807 << -1 ---
-int(-9223372036854775808)
+bool(false)
--- testing: -9223372036854775807 << 7 ---
int(128)
--- testing: -9223372036854775807 << 9 ---
int(512)
--- testing: -9223372036854775807 << 65 ---
-int(2)
+int(0)
--- testing: -9223372036854775807 << -44 ---
-int(1048576)
+bool(false)
--- testing: -9223372036854775807 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: -9223372036854775807 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: -9.2233720368548E+18 << 0 ---
int(-9223372036854775808)
--- testing: -9.2233720368548E+18 << 1 ---
int(0)
--- testing: -9.2233720368548E+18 << -1 ---
-int(0)
+bool(false)
--- testing: -9.2233720368548E+18 << 7 ---
int(0)
--- testing: -9.2233720368548E+18 << 9 ---
@@ -304,7 +304,7 @@ int(0)
--- testing: -9.2233720368548E+18 << 65 ---
int(0)
--- testing: -9.2233720368548E+18 << -44 ---
-int(0)
+bool(false)
--- testing: -9.2233720368548E+18 << 2147483647 ---
int(0)
--- testing: -9.2233720368548E+18 << 9223372036854775807 ---
@@ -312,19 +312,19 @@ int(0)
--- testing: 0 << 9223372036854775807 ---
int(0)
--- testing: 0 << -9223372036854775808 ---
-int(0)
+bool(false)
--- testing: 0 << 2147483647 ---
int(0)
--- testing: 0 << -2147483648 ---
-int(0)
+bool(false)
--- testing: 0 << 9223372034707292160 ---
int(0)
--- testing: 0 << -9223372034707292160 ---
-int(0)
+bool(false)
--- testing: 0 << 2147483648 ---
int(0)
--- testing: 0 << -2147483649 ---
-int(0)
+bool(false)
--- testing: 0 << 4294967294 ---
int(0)
--- testing: 0 << 4294967295 ---
@@ -334,250 +334,249 @@ int(0)
--- testing: 0 << 9223372036854775806 ---
int(0)
--- testing: 0 << 9.2233720368548E+18 ---
-int(0)
+bool(false)
--- testing: 0 << -9223372036854775807 ---
-int(0)
+bool(false)
--- testing: 0 << -9.2233720368548E+18 ---
-int(0)
+bool(false)
--- testing: 1 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 1 << -9223372036854775808 ---
-int(1)
+bool(false)
--- testing: 1 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 1 << -2147483648 ---
-int(1)
+bool(false)
--- testing: 1 << 9223372034707292160 ---
-int(1)
+int(0)
--- testing: 1 << -9223372034707292160 ---
-int(1)
+bool(false)
--- testing: 1 << 2147483648 ---
-int(1)
+int(0)
--- testing: 1 << -2147483649 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 1 << 4294967294 ---
-int(4611686018427387904)
+int(0)
--- testing: 1 << 4294967295 ---
-int(-9223372036854775808)
+int(0)
--- testing: 1 << 4294967293 ---
-int(2305843009213693952)
+int(0)
--- testing: 1 << 9223372036854775806 ---
-int(4611686018427387904)
+int(0)
--- testing: 1 << 9.2233720368548E+18 ---
-int(1)
+bool(false)
--- testing: 1 << -9223372036854775807 ---
-int(2)
+bool(false)
--- testing: 1 << -9.2233720368548E+18 ---
-int(1)
+bool(false)
--- testing: -1 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: -1 << -9223372036854775808 ---
-int(-1)
+bool(false)
--- testing: -1 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: -1 << -2147483648 ---
-int(-1)
+bool(false)
--- testing: -1 << 9223372034707292160 ---
-int(-1)
+int(0)
--- testing: -1 << -9223372034707292160 ---
-int(-1)
+bool(false)
--- testing: -1 << 2147483648 ---
-int(-1)
+int(0)
--- testing: -1 << -2147483649 ---
-int(-9223372036854775808)
+bool(false)
--- testing: -1 << 4294967294 ---
-int(-4611686018427387904)
+int(0)
--- testing: -1 << 4294967295 ---
-int(-9223372036854775808)
+int(0)
--- testing: -1 << 4294967293 ---
-int(-2305843009213693952)
+int(0)
--- testing: -1 << 9223372036854775806 ---
-int(-4611686018427387904)
+int(0)
--- testing: -1 << 9.2233720368548E+18 ---
-int(-1)
+bool(false)
--- testing: -1 << -9223372036854775807 ---
-int(-2)
+bool(false)
--- testing: -1 << -9.2233720368548E+18 ---
-int(-1)
+bool(false)
--- testing: 7 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 7 << -9223372036854775808 ---
-int(7)
+bool(false)
--- testing: 7 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 7 << -2147483648 ---
-int(7)
+bool(false)
--- testing: 7 << 9223372034707292160 ---
-int(7)
+int(0)
--- testing: 7 << -9223372034707292160 ---
-int(7)
+bool(false)
--- testing: 7 << 2147483648 ---
-int(7)
+int(0)
--- testing: 7 << -2147483649 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 7 << 4294967294 ---
-int(-4611686018427387904)
+int(0)
--- testing: 7 << 4294967295 ---
-int(-9223372036854775808)
+int(0)
--- testing: 7 << 4294967293 ---
-int(-2305843009213693952)
+int(0)
--- testing: 7 << 9223372036854775806 ---
-int(-4611686018427387904)
+int(0)
--- testing: 7 << 9.2233720368548E+18 ---
-int(7)
+bool(false)
--- testing: 7 << -9223372036854775807 ---
-int(14)
+bool(false)
--- testing: 7 << -9.2233720368548E+18 ---
-int(7)
+bool(false)
--- testing: 9 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 9 << -9223372036854775808 ---
-int(9)
+bool(false)
--- testing: 9 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 9 << -2147483648 ---
-int(9)
+bool(false)
--- testing: 9 << 9223372034707292160 ---
-int(9)
+int(0)
--- testing: 9 << -9223372034707292160 ---
-int(9)
+bool(false)
--- testing: 9 << 2147483648 ---
-int(9)
+int(0)
--- testing: 9 << -2147483649 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 9 << 4294967294 ---
-int(4611686018427387904)
+int(0)
--- testing: 9 << 4294967295 ---
-int(-9223372036854775808)
+int(0)
--- testing: 9 << 4294967293 ---
-int(2305843009213693952)
+int(0)
--- testing: 9 << 9223372036854775806 ---
-int(4611686018427387904)
+int(0)
--- testing: 9 << 9.2233720368548E+18 ---
-int(9)
+bool(false)
--- testing: 9 << -9223372036854775807 ---
-int(18)
+bool(false)
--- testing: 9 << -9.2233720368548E+18 ---
-int(9)
+bool(false)
--- testing: 65 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 65 << -9223372036854775808 ---
-int(65)
+bool(false)
--- testing: 65 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 65 << -2147483648 ---
-int(65)
+bool(false)
--- testing: 65 << 9223372034707292160 ---
-int(65)
+int(0)
--- testing: 65 << -9223372034707292160 ---
-int(65)
+bool(false)
--- testing: 65 << 2147483648 ---
-int(65)
+int(0)
--- testing: 65 << -2147483649 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 65 << 4294967294 ---
-int(4611686018427387904)
+int(0)
--- testing: 65 << 4294967295 ---
-int(-9223372036854775808)
+int(0)
--- testing: 65 << 4294967293 ---
-int(2305843009213693952)
+int(0)
--- testing: 65 << 9223372036854775806 ---
-int(4611686018427387904)
+int(0)
--- testing: 65 << 9.2233720368548E+18 ---
-int(65)
+bool(false)
--- testing: 65 << -9223372036854775807 ---
-int(130)
+bool(false)
--- testing: 65 << -9.2233720368548E+18 ---
-int(65)
+bool(false)
--- testing: -44 << 9223372036854775807 ---
int(0)
--- testing: -44 << -9223372036854775808 ---
-int(-44)
+bool(false)
--- testing: -44 << 2147483647 ---
int(0)
--- testing: -44 << -2147483648 ---
-int(-44)
+bool(false)
--- testing: -44 << 9223372034707292160 ---
-int(-44)
+int(0)
--- testing: -44 << -9223372034707292160 ---
-int(-44)
+bool(false)
--- testing: -44 << 2147483648 ---
-int(-44)
---- testing: -44 << -2147483649 ---
int(0)
+--- testing: -44 << -2147483649 ---
+bool(false)
--- testing: -44 << 4294967294 ---
int(0)
--- testing: -44 << 4294967295 ---
int(0)
--- testing: -44 << 4294967293 ---
-int(-9223372036854775808)
+int(0)
--- testing: -44 << 9223372036854775806 ---
int(0)
--- testing: -44 << 9.2233720368548E+18 ---
-int(-44)
+bool(false)
--- testing: -44 << -9223372036854775807 ---
-int(-88)
+bool(false)
--- testing: -44 << -9.2233720368548E+18 ---
-int(-44)
+bool(false)
--- testing: 2147483647 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 2147483647 << -9223372036854775808 ---
-int(2147483647)
+bool(false)
--- testing: 2147483647 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 2147483647 << -2147483648 ---
-int(2147483647)
+bool(false)
--- testing: 2147483647 << 9223372034707292160 ---
-int(2147483647)
+int(0)
--- testing: 2147483647 << -9223372034707292160 ---
-int(2147483647)
+bool(false)
--- testing: 2147483647 << 2147483648 ---
-int(2147483647)
+int(0)
--- testing: 2147483647 << -2147483649 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 2147483647 << 4294967294 ---
-int(-4611686018427387904)
+int(0)
--- testing: 2147483647 << 4294967295 ---
-int(-9223372036854775808)
+int(0)
--- testing: 2147483647 << 4294967293 ---
-int(-2305843009213693952)
+int(0)
--- testing: 2147483647 << 9223372036854775806 ---
-int(-4611686018427387904)
+int(0)
--- testing: 2147483647 << 9.2233720368548E+18 ---
-int(2147483647)
+bool(false)
--- testing: 2147483647 << -9223372036854775807 ---
-int(4294967294)
+bool(false)
--- testing: 2147483647 << -9.2233720368548E+18 ---
-int(2147483647)
+bool(false)
--- testing: 9223372036854775807 << 9223372036854775807 ---
-int(-9223372036854775808)
+int(0)
--- testing: 9223372036854775807 << -9223372036854775808 ---
-int(9223372036854775807)
+bool(false)
--- testing: 9223372036854775807 << 2147483647 ---
-int(-9223372036854775808)
+int(0)
--- testing: 9223372036854775807 << -2147483648 ---
-int(9223372036854775807)
+bool(false)
--- testing: 9223372036854775807 << 9223372034707292160 ---
-int(9223372036854775807)
+int(0)
--- testing: 9223372036854775807 << -9223372034707292160 ---
-int(9223372036854775807)
+bool(false)
--- testing: 9223372036854775807 << 2147483648 ---
-int(9223372036854775807)
+int(0)
--- testing: 9223372036854775807 << -2147483649 ---
-int(-9223372036854775808)
+bool(false)
--- testing: 9223372036854775807 << 4294967294 ---
-int(-4611686018427387904)
+int(0)
--- testing: 9223372036854775807 << 4294967295 ---
-int(-9223372036854775808)
+int(0)
--- testing: 9223372036854775807 << 4294967293 ---
-int(-2305843009213693952)
+int(0)
--- testing: 9223372036854775807 << 9223372036854775806 ---
-int(-4611686018427387904)
+int(0)
--- testing: 9223372036854775807 << 9.2233720368548E+18 ---
-int(9223372036854775807)
+bool(false)
--- testing: 9223372036854775807 << -9223372036854775807 ---
-int(-2)
+bool(false)
--- testing: 9223372036854775807 << -9.2233720368548E+18 ---
-int(9223372036854775807)
-===DONE===
- \ No newline at end of file
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
index e13fc3bc1b..d507577777 100644
--- a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
@@ -3,7 +3,6 @@ Test << operator : various numbers as strings
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-if ((65<<65)==0) die("skip this test is for Intel only");
?>
--FILE--
<?php
@@ -18,7 +17,7 @@ error_reporting(E_ERROR);
foreach ($strVals as $strVal) {
foreach($strVals as $otherVal) {
echo "--- testing: '$strVal' << '$otherVal' ---\n";
- var_dump(bin2hex($strVal<<$otherVal));
+ var_dump(strVal<<$otherVal);
}
}
@@ -26,396 +25,395 @@ foreach ($strVals as $strVal) {
===DONE===
--EXPECT--
--- testing: '0' << '0' ---
-string(2) "30"
+int(0)
--- testing: '0' << '65' ---
-string(2) "30"
+int(0)
--- testing: '0' << '-44' ---
-string(2) "30"
+bool(false)
--- testing: '0' << '1.2' ---
-string(2) "30"
+int(0)
--- testing: '0' << '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '0' << 'abc' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123abc' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123e5' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '0' << ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '0' << '3.4a' ---
-string(2) "30"
+int(0)
--- testing: '0' << 'a5.9' ---
-string(2) "30"
+int(0)
--- testing: '65' << '0' ---
-string(4) "3635"
+int(0)
--- testing: '65' << '65' ---
-string(6) "313330"
+int(0)
--- testing: '65' << '-44' ---
-string(16) "3638313537343430"
+bool(false)
--- testing: '65' << '1.2' ---
-string(6) "313330"
+int(0)
--- testing: '65' << '-7.7' ---
-string(22) "2d32313133393239323136"
+bool(false)
--- testing: '65' << 'abc' ---
-string(4) "3635"
+int(0)
--- testing: '65' << '123abc' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '65' << '123e5' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '65' << '123e5xyz' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '65' << ' 123abc' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '65' << '123 abc' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '65' << '123abc ' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '65' << '3.4a' ---
-string(6) "353230"
+int(0)
--- testing: '65' << 'a5.9' ---
-string(4) "3635"
+int(0)
--- testing: '-44' << '0' ---
-string(6) "2d3434"
+int(0)
--- testing: '-44' << '65' ---
-string(6) "2d3838"
+int(0)
--- testing: '-44' << '-44' ---
-string(18) "2d3436313337333434"
+bool(false)
--- testing: '-44' << '1.2' ---
-string(6) "2d3838"
+int(0)
--- testing: '-44' << '-7.7' ---
-string(22) "2d31343736333935303038"
+bool(false)
--- testing: '-44' << 'abc' ---
-string(6) "2d3434"
+int(0)
--- testing: '-44' << '123abc' ---
-string(22) "2d31363130363132373336"
+int(0)
--- testing: '-44' << '123e5' ---
-string(22) "2d31363130363132373336"
+int(0)
--- testing: '-44' << '123e5xyz' ---
-string(22) "2d31363130363132373336"
+int(0)
--- testing: '-44' << ' 123abc' ---
-string(22) "2d31363130363132373336"
+int(0)
--- testing: '-44' << '123 abc' ---
-string(22) "2d31363130363132373336"
+int(0)
--- testing: '-44' << '123abc ' ---
-string(22) "2d31363130363132373336"
+int(0)
--- testing: '-44' << '3.4a' ---
-string(8) "2d333532"
+int(0)
--- testing: '-44' << 'a5.9' ---
-string(6) "2d3434"
+int(0)
--- testing: '1.2' << '0' ---
-string(2) "31"
+int(0)
--- testing: '1.2' << '65' ---
-string(2) "32"
+int(0)
--- testing: '1.2' << '-44' ---
-string(14) "31303438353736"
+bool(false)
--- testing: '1.2' << '1.2' ---
-string(2) "32"
+int(0)
--- testing: '1.2' << '-7.7' ---
-string(16) "3333353534343332"
+bool(false)
--- testing: '1.2' << 'abc' ---
-string(2) "31"
+int(0)
--- testing: '1.2' << '123abc' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '1.2' << '123e5' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '1.2' << '123e5xyz' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '1.2' << ' 123abc' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '1.2' << '123 abc' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '1.2' << '123abc ' ---
-string(18) "313334323137373238"
+int(0)
--- testing: '1.2' << '3.4a' ---
-string(2) "38"
+int(0)
--- testing: '1.2' << 'a5.9' ---
-string(2) "31"
+int(0)
--- testing: '-7.7' << '0' ---
-string(4) "2d37"
+int(0)
--- testing: '-7.7' << '65' ---
-string(6) "2d3134"
+int(0)
--- testing: '-7.7' << '-44' ---
-string(16) "2d37333430303332"
+bool(false)
--- testing: '-7.7' << '1.2' ---
-string(6) "2d3134"
+int(0)
--- testing: '-7.7' << '-7.7' ---
-string(20) "2d323334383831303234"
+bool(false)
--- testing: '-7.7' << 'abc' ---
-string(4) "2d37"
+int(0)
--- testing: '-7.7' << '123abc' ---
-string(20) "2d393339353234303936"
+int(0)
--- testing: '-7.7' << '123e5' ---
-string(20) "2d393339353234303936"
+int(0)
--- testing: '-7.7' << '123e5xyz' ---
-string(20) "2d393339353234303936"
+int(0)
--- testing: '-7.7' << ' 123abc' ---
-string(20) "2d393339353234303936"
+int(0)
--- testing: '-7.7' << '123 abc' ---
-string(20) "2d393339353234303936"
+int(0)
--- testing: '-7.7' << '123abc ' ---
-string(20) "2d393339353234303936"
+int(0)
--- testing: '-7.7' << '3.4a' ---
-string(6) "2d3536"
+int(0)
--- testing: '-7.7' << 'a5.9' ---
-string(4) "2d37"
+int(0)
--- testing: 'abc' << '0' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '65' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '-44' ---
-string(2) "30"
+bool(false)
--- testing: 'abc' << '1.2' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: 'abc' << 'abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123e5' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123 abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123abc ' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '3.4a' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << 'a5.9' ---
-string(2) "30"
+int(0)
--- testing: '123abc' << '0' ---
-string(6) "313233"
+int(0)
--- testing: '123abc' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123abc' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123abc' << '1.2' ---
-string(6) "323436"
+int(0)
--- testing: '123abc' << '-7.7' ---
-string(20) "2d313637373732313630"
+bool(false)
--- testing: '123abc' << 'abc' ---
-string(6) "313233"
+int(0)
--- testing: '123abc' << '123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc' << '123e5' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc' << '123e5xyz' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc' << ' 123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc' << '123 abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc' << '123abc ' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc' << '3.4a' ---
-string(6) "393834"
+int(0)
--- testing: '123abc' << 'a5.9' ---
-string(6) "313233"
+int(0)
--- testing: '123e5' << '0' ---
-string(6) "313233"
+int(0)
--- testing: '123e5' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123e5' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123e5' << '1.2' ---
-string(6) "323436"
+int(0)
--- testing: '123e5' << '-7.7' ---
-string(20) "2d313637373732313630"
+bool(false)
--- testing: '123e5' << 'abc' ---
-string(6) "313233"
+int(0)
--- testing: '123e5' << '123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5' << '123e5' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5' << '123e5xyz' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5' << ' 123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5' << '123 abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5' << '123abc ' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5' << '3.4a' ---
-string(6) "393834"
+int(0)
--- testing: '123e5' << 'a5.9' ---
-string(6) "313233"
+int(0)
--- testing: '123e5xyz' << '0' ---
-string(6) "313233"
+int(0)
--- testing: '123e5xyz' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123e5xyz' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123e5xyz' << '1.2' ---
-string(6) "323436"
+int(0)
--- testing: '123e5xyz' << '-7.7' ---
-string(20) "2d313637373732313630"
+bool(false)
--- testing: '123e5xyz' << 'abc' ---
-string(6) "313233"
+int(0)
--- testing: '123e5xyz' << '123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5xyz' << '123e5' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5xyz' << '123e5xyz' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5xyz' << ' 123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5xyz' << '123 abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5xyz' << '123abc ' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123e5xyz' << '3.4a' ---
-string(6) "393834"
+int(0)
--- testing: '123e5xyz' << 'a5.9' ---
-string(6) "313233"
+int(0)
--- testing: ' 123abc' << '0' ---
-string(6) "313233"
+int(0)
--- testing: ' 123abc' << '65' ---
-string(6) "323436"
+int(0)
--- testing: ' 123abc' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: ' 123abc' << '1.2' ---
-string(6) "323436"
+int(0)
--- testing: ' 123abc' << '-7.7' ---
-string(20) "2d313637373732313630"
+bool(false)
--- testing: ' 123abc' << 'abc' ---
-string(6) "313233"
+int(0)
--- testing: ' 123abc' << '123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: ' 123abc' << '123e5' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: ' 123abc' << '123e5xyz' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: ' 123abc' << ' 123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: ' 123abc' << '123 abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: ' 123abc' << '123abc ' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: ' 123abc' << '3.4a' ---
-string(6) "393834"
+int(0)
--- testing: ' 123abc' << 'a5.9' ---
-string(6) "313233"
+int(0)
--- testing: '123 abc' << '0' ---
-string(6) "313233"
+int(0)
--- testing: '123 abc' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123 abc' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123 abc' << '1.2' ---
-string(6) "323436"
+int(0)
--- testing: '123 abc' << '-7.7' ---
-string(20) "2d313637373732313630"
+bool(false)
--- testing: '123 abc' << 'abc' ---
-string(6) "313233"
+int(0)
--- testing: '123 abc' << '123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123 abc' << '123e5' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123 abc' << '123e5xyz' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123 abc' << ' 123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123 abc' << '123 abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123 abc' << '123abc ' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123 abc' << '3.4a' ---
-string(6) "393834"
+int(0)
--- testing: '123 abc' << 'a5.9' ---
-string(6) "313233"
+int(0)
--- testing: '123abc ' << '0' ---
-string(6) "313233"
+int(0)
--- testing: '123abc ' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123abc ' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123abc ' << '1.2' ---
-string(6) "323436"
+int(0)
--- testing: '123abc ' << '-7.7' ---
-string(20) "2d313637373732313630"
+bool(false)
--- testing: '123abc ' << 'abc' ---
-string(6) "313233"
+int(0)
--- testing: '123abc ' << '123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc ' << '123e5' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc ' << '123e5xyz' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc ' << ' 123abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc ' << '123 abc' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc ' << '123abc ' ---
-string(20) "2d363731303838363430"
+int(0)
--- testing: '123abc ' << '3.4a' ---
-string(6) "393834"
+int(0)
--- testing: '123abc ' << 'a5.9' ---
-string(6) "313233"
+int(0)
--- testing: '3.4a' << '0' ---
-string(2) "33"
+int(0)
--- testing: '3.4a' << '65' ---
-string(2) "36"
+int(0)
--- testing: '3.4a' << '-44' ---
-string(14) "33313435373238"
+bool(false)
--- testing: '3.4a' << '1.2' ---
-string(2) "36"
+int(0)
--- testing: '3.4a' << '-7.7' ---
-string(18) "313030363633323936"
+bool(false)
--- testing: '3.4a' << 'abc' ---
-string(2) "33"
+int(0)
--- testing: '3.4a' << '123abc' ---
-string(18) "343032363533313834"
+int(0)
--- testing: '3.4a' << '123e5' ---
-string(18) "343032363533313834"
+int(0)
--- testing: '3.4a' << '123e5xyz' ---
-string(18) "343032363533313834"
+int(0)
--- testing: '3.4a' << ' 123abc' ---
-string(18) "343032363533313834"
+int(0)
--- testing: '3.4a' << '123 abc' ---
-string(18) "343032363533313834"
+int(0)
--- testing: '3.4a' << '123abc ' ---
-string(18) "343032363533313834"
+int(0)
--- testing: '3.4a' << '3.4a' ---
-string(4) "3234"
+int(0)
--- testing: '3.4a' << 'a5.9' ---
-string(2) "33"
+int(0)
--- testing: 'a5.9' << '0' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '65' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '-44' ---
-string(2) "30"
+bool(false)
--- testing: 'a5.9' << '1.2' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: 'a5.9' << 'abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123e5' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123 abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123abc ' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '3.4a' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << 'a5.9' ---
-string(2) "30"
-===DONE===
-
+int(0)
+===DONE=== \ No newline at end of file
diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
index 0b697c8579..655d72545d 100644
--- a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
@@ -17,7 +17,7 @@ error_reporting(E_ERROR);
foreach ($strVals as $strVal) {
foreach($strVals as $otherVal) {
echo "--- testing: '$strVal' << '$otherVal' ---\n";
- var_dump(bin2hex($strVal<<$otherVal));
+ var_dump($strVal<<$otherVal);
}
}
@@ -26,395 +26,395 @@ foreach ($strVals as $strVal) {
===DONE===
--EXPECT--
--- testing: '0' << '0' ---
-string(2) "30"
+int(0)
--- testing: '0' << '65' ---
-string(2) "30"
+int(0)
--- testing: '0' << '-44' ---
-string(2) "30"
+bool(false)
--- testing: '0' << '1.2' ---
-string(2) "30"
+int(0)
--- testing: '0' << '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '0' << 'abc' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123abc' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123e5' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '0' << ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '0' << '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '0' << '3.4a' ---
-string(2) "30"
+int(0)
--- testing: '0' << 'a5.9' ---
-string(2) "30"
+int(0)
--- testing: '65' << '0' ---
-string(4) "3635"
+int(65)
--- testing: '65' << '65' ---
-string(6) "313330"
+int(0)
--- testing: '65' << '-44' ---
-string(16) "3638313537343430"
+bool(false)
--- testing: '65' << '1.2' ---
-string(6) "313330"
+int(130)
--- testing: '65' << '-7.7' ---
-string(40) "2d39303739323536383438373738393139393336"
+bool(false)
--- testing: '65' << 'abc' ---
-string(4) "3635"
+int(65)
--- testing: '65' << '123abc' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '65' << '123e5' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '65' << '123e5xyz' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '65' << ' 123abc' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '65' << '123 abc' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '65' << '123abc ' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '65' << '3.4a' ---
-string(6) "353230"
+int(520)
--- testing: '65' << 'a5.9' ---
-string(4) "3635"
+int(65)
--- testing: '-44' << '0' ---
-string(6) "2d3434"
+int(-44)
--- testing: '-44' << '65' ---
-string(6) "2d3838"
+int(0)
--- testing: '-44' << '-44' ---
-string(18) "2d3436313337333434"
+bool(false)
--- testing: '-44' << '1.2' ---
-string(6) "2d3838"
+int(-88)
--- testing: '-44' << '-7.7' ---
-string(40) "2d36333431303638323735333337363538333638"
+bool(false)
--- testing: '-44' << 'abc' ---
-string(6) "2d3434"
+int(-44)
--- testing: '-44' << '123abc' ---
-string(40) "2d36393137353239303237363431303831383536"
+int(0)
--- testing: '-44' << '123e5' ---
-string(40) "2d36393137353239303237363431303831383536"
+int(0)
--- testing: '-44' << '123e5xyz' ---
-string(40) "2d36393137353239303237363431303831383536"
+int(0)
--- testing: '-44' << ' 123abc' ---
-string(40) "2d36393137353239303237363431303831383536"
+int(0)
--- testing: '-44' << '123 abc' ---
-string(40) "2d36393137353239303237363431303831383536"
+int(0)
--- testing: '-44' << '123abc ' ---
-string(40) "2d36393137353239303237363431303831383536"
+int(0)
--- testing: '-44' << '3.4a' ---
-string(8) "2d333532"
+int(-352)
--- testing: '-44' << 'a5.9' ---
-string(6) "2d3434"
+int(-44)
--- testing: '1.2' << '0' ---
-string(2) "31"
+int(1)
--- testing: '1.2' << '65' ---
-string(2) "32"
+int(0)
--- testing: '1.2' << '-44' ---
-string(14) "31303438353736"
+bool(false)
--- testing: '1.2' << '1.2' ---
-string(2) "32"
+int(2)
--- testing: '1.2' << '-7.7' ---
-string(36) "313434313135313838303735383535383732"
+bool(false)
--- testing: '1.2' << 'abc' ---
-string(2) "31"
+int(1)
--- testing: '1.2' << '123abc' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '1.2' << '123e5' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '1.2' << '123e5xyz' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '1.2' << ' 123abc' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '1.2' << '123 abc' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '1.2' << '123abc ' ---
-string(36) "353736343630373532333033343233343838"
+int(0)
--- testing: '1.2' << '3.4a' ---
-string(2) "38"
+int(8)
--- testing: '1.2' << 'a5.9' ---
-string(2) "31"
+int(1)
--- testing: '-7.7' << '0' ---
-string(4) "2d37"
+int(-7)
--- testing: '-7.7' << '65' ---
-string(6) "2d3134"
+int(0)
--- testing: '-7.7' << '-44' ---
-string(16) "2d37333430303332"
+bool(false)
--- testing: '-7.7' << '1.2' ---
-string(6) "2d3134"
+int(-14)
--- testing: '-7.7' << '-7.7' ---
-string(40) "2d31303038383036333136353330393931313034"
+bool(false)
--- testing: '-7.7' << 'abc' ---
-string(4) "2d37"
+int(-7)
--- testing: '-7.7' << '123abc' ---
-string(40) "2d34303335323235323636313233393634343136"
+int(0)
--- testing: '-7.7' << '123e5' ---
-string(40) "2d34303335323235323636313233393634343136"
+int(0)
--- testing: '-7.7' << '123e5xyz' ---
-string(40) "2d34303335323235323636313233393634343136"
+int(0)
--- testing: '-7.7' << ' 123abc' ---
-string(40) "2d34303335323235323636313233393634343136"
+int(0)
--- testing: '-7.7' << '123 abc' ---
-string(40) "2d34303335323235323636313233393634343136"
+int(0)
--- testing: '-7.7' << '123abc ' ---
-string(40) "2d34303335323235323636313233393634343136"
+int(0)
--- testing: '-7.7' << '3.4a' ---
-string(6) "2d3536"
+int(-56)
--- testing: '-7.7' << 'a5.9' ---
-string(4) "2d37"
+int(-7)
--- testing: 'abc' << '0' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '65' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '-44' ---
-string(2) "30"
+bool(false)
--- testing: 'abc' << '1.2' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: 'abc' << 'abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123e5' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123 abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '123abc ' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << '3.4a' ---
-string(2) "30"
+int(0)
--- testing: 'abc' << 'a5.9' ---
-string(2) "30"
+int(0)
--- testing: '123abc' << '0' ---
-string(6) "313233"
+int(123)
--- testing: '123abc' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123abc' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123abc' << '1.2' ---
-string(6) "323436"
+int(246)
--- testing: '123abc' << '-7.7' ---
-string(38) "2d373230353735393430333739323739333630"
+bool(false)
--- testing: '123abc' << 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123abc' << '123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc' << '123e5' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc' << '123e5xyz' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc' << ' 123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc' << '123 abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc' << '123abc ' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc' << '3.4a' ---
-string(6) "393834"
+int(984)
--- testing: '123abc' << 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '123e5' << '0' ---
-string(6) "313233"
+int(123)
--- testing: '123e5' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123e5' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123e5' << '1.2' ---
-string(6) "323436"
+int(246)
--- testing: '123e5' << '-7.7' ---
-string(38) "2d373230353735393430333739323739333630"
+bool(false)
--- testing: '123e5' << 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123e5' << '123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5' << '123e5' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5' << '123e5xyz' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5' << ' 123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5' << '123 abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5' << '123abc ' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5' << '3.4a' ---
-string(6) "393834"
+int(984)
--- testing: '123e5' << 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '123e5xyz' << '0' ---
-string(6) "313233"
+int(123)
--- testing: '123e5xyz' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123e5xyz' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123e5xyz' << '1.2' ---
-string(6) "323436"
+int(246)
--- testing: '123e5xyz' << '-7.7' ---
-string(38) "2d373230353735393430333739323739333630"
+bool(false)
--- testing: '123e5xyz' << 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123e5xyz' << '123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5xyz' << '123e5' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5xyz' << '123e5xyz' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5xyz' << ' 123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5xyz' << '123 abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5xyz' << '123abc ' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123e5xyz' << '3.4a' ---
-string(6) "393834"
+int(984)
--- testing: '123e5xyz' << 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: ' 123abc' << '0' ---
-string(6) "313233"
+int(123)
--- testing: ' 123abc' << '65' ---
-string(6) "323436"
+int(0)
--- testing: ' 123abc' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: ' 123abc' << '1.2' ---
-string(6) "323436"
+int(246)
--- testing: ' 123abc' << '-7.7' ---
-string(38) "2d373230353735393430333739323739333630"
+bool(false)
--- testing: ' 123abc' << 'abc' ---
-string(6) "313233"
+int(123)
--- testing: ' 123abc' << '123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: ' 123abc' << '123e5' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: ' 123abc' << '123e5xyz' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: ' 123abc' << ' 123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: ' 123abc' << '123 abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: ' 123abc' << '123abc ' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: ' 123abc' << '3.4a' ---
-string(6) "393834"
+int(984)
--- testing: ' 123abc' << 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '123 abc' << '0' ---
-string(6) "313233"
+int(123)
--- testing: '123 abc' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123 abc' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123 abc' << '1.2' ---
-string(6) "323436"
+int(246)
--- testing: '123 abc' << '-7.7' ---
-string(38) "2d373230353735393430333739323739333630"
+bool(false)
--- testing: '123 abc' << 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123 abc' << '123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123 abc' << '123e5' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123 abc' << '123e5xyz' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123 abc' << ' 123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123 abc' << '123 abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123 abc' << '123abc ' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123 abc' << '3.4a' ---
-string(6) "393834"
+int(984)
--- testing: '123 abc' << 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '123abc ' << '0' ---
-string(6) "313233"
+int(123)
--- testing: '123abc ' << '65' ---
-string(6) "323436"
+int(0)
--- testing: '123abc ' << '-44' ---
-string(18) "313238393734383438"
+bool(false)
--- testing: '123abc ' << '1.2' ---
-string(6) "323436"
+int(246)
--- testing: '123abc ' << '-7.7' ---
-string(38) "2d373230353735393430333739323739333630"
+bool(false)
--- testing: '123abc ' << 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123abc ' << '123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc ' << '123e5' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc ' << '123e5xyz' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc ' << ' 123abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc ' << '123 abc' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc ' << '123abc ' ---
-string(40) "2d32383832333033373631353137313137343430"
+int(0)
--- testing: '123abc ' << '3.4a' ---
-string(6) "393834"
+int(984)
--- testing: '123abc ' << 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '3.4a' << '0' ---
-string(2) "33"
+int(3)
--- testing: '3.4a' << '65' ---
-string(2) "36"
+int(0)
--- testing: '3.4a' << '-44' ---
-string(14) "33313435373238"
+bool(false)
--- testing: '3.4a' << '1.2' ---
-string(2) "36"
+int(6)
--- testing: '3.4a' << '-7.7' ---
-string(36) "343332333435353634323237353637363136"
+bool(false)
--- testing: '3.4a' << 'abc' ---
-string(2) "33"
+int(3)
--- testing: '3.4a' << '123abc' ---
-string(38) "31373239333832323536393130323730343634"
+int(0)
--- testing: '3.4a' << '123e5' ---
-string(38) "31373239333832323536393130323730343634"
+int(0)
--- testing: '3.4a' << '123e5xyz' ---
-string(38) "31373239333832323536393130323730343634"
+int(0)
--- testing: '3.4a' << ' 123abc' ---
-string(38) "31373239333832323536393130323730343634"
+int(0)
--- testing: '3.4a' << '123 abc' ---
-string(38) "31373239333832323536393130323730343634"
+int(0)
--- testing: '3.4a' << '123abc ' ---
-string(38) "31373239333832323536393130323730343634"
+int(0)
--- testing: '3.4a' << '3.4a' ---
-string(4) "3234"
+int(24)
--- testing: '3.4a' << 'a5.9' ---
-string(2) "33"
+int(3)
--- testing: 'a5.9' << '0' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '65' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '-44' ---
-string(2) "30"
+bool(false)
--- testing: 'a5.9' << '1.2' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: 'a5.9' << 'abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123e5' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123 abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '123abc ' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << '3.4a' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' << 'a5.9' ---
-string(2) "30"
-===DONE===
+int(0)
+===DONE=== \ No newline at end of file
diff --git a/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt b/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt
index 1029d1942a..1747bc66fe 100644
--- a/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt
+++ b/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt
@@ -44,15 +44,15 @@ int(9223372036854775807)
--- testing: 9223372036854775807 >> 1 ---
int(4611686018427387903)
--- testing: 9223372036854775807 >> -1 ---
-int(0)
+bool(false)
--- testing: 9223372036854775807 >> 7 ---
int(72057594037927935)
--- testing: 9223372036854775807 >> 9 ---
int(18014398509481983)
--- testing: 9223372036854775807 >> 65 ---
-int(4611686018427387903)
+int(0)
--- testing: 9223372036854775807 >> -44 ---
-int(8796093022207)
+bool(false)
--- testing: 9223372036854775807 >> 2147483647 ---
int(0)
--- testing: 9223372036854775807 >> 9223372036854775807 ---
@@ -62,15 +62,15 @@ int(-9223372036854775808)
--- testing: -9223372036854775808 >> 1 ---
int(-4611686018427387904)
--- testing: -9223372036854775808 >> -1 ---
-int(-1)
+bool(false)
--- testing: -9223372036854775808 >> 7 ---
int(-72057594037927936)
--- testing: -9223372036854775808 >> 9 ---
int(-18014398509481984)
--- testing: -9223372036854775808 >> 65 ---
-int(-4611686018427387904)
+int(-1)
--- testing: -9223372036854775808 >> -44 ---
-int(-8796093022208)
+bool(false)
--- testing: -9223372036854775808 >> 2147483647 ---
int(-1)
--- testing: -9223372036854775808 >> 9223372036854775807 ---
@@ -80,15 +80,15 @@ int(2147483647)
--- testing: 2147483647 >> 1 ---
int(1073741823)
--- testing: 2147483647 >> -1 ---
-int(0)
+bool(false)
--- testing: 2147483647 >> 7 ---
int(16777215)
--- testing: 2147483647 >> 9 ---
int(4194303)
--- testing: 2147483647 >> 65 ---
-int(1073741823)
+int(0)
--- testing: 2147483647 >> -44 ---
-int(2047)
+bool(false)
--- testing: 2147483647 >> 2147483647 ---
int(0)
--- testing: 2147483647 >> 9223372036854775807 ---
@@ -98,15 +98,15 @@ int(-2147483648)
--- testing: -2147483648 >> 1 ---
int(-1073741824)
--- testing: -2147483648 >> -1 ---
-int(-1)
+bool(false)
--- testing: -2147483648 >> 7 ---
int(-16777216)
--- testing: -2147483648 >> 9 ---
int(-4194304)
--- testing: -2147483648 >> 65 ---
-int(-1073741824)
+int(-1)
--- testing: -2147483648 >> -44 ---
-int(-2048)
+bool(false)
--- testing: -2147483648 >> 2147483647 ---
int(-1)
--- testing: -2147483648 >> 9223372036854775807 ---
@@ -116,15 +116,15 @@ int(9223372034707292160)
--- testing: 9223372034707292160 >> 1 ---
int(4611686017353646080)
--- testing: 9223372034707292160 >> -1 ---
-int(0)
+bool(false)
--- testing: 9223372034707292160 >> 7 ---
int(72057594021150720)
--- testing: 9223372034707292160 >> 9 ---
int(18014398505287680)
--- testing: 9223372034707292160 >> 65 ---
-int(4611686017353646080)
+int(0)
--- testing: 9223372034707292160 >> -44 ---
-int(8796093020160)
+bool(false)
--- testing: 9223372034707292160 >> 2147483647 ---
int(0)
--- testing: 9223372034707292160 >> 9223372036854775807 ---
@@ -134,15 +134,15 @@ int(-9223372034707292160)
--- testing: -9223372034707292160 >> 1 ---
int(-4611686017353646080)
--- testing: -9223372034707292160 >> -1 ---
-int(-1)
+bool(false)
--- testing: -9223372034707292160 >> 7 ---
int(-72057594021150720)
--- testing: -9223372034707292160 >> 9 ---
int(-18014398505287680)
--- testing: -9223372034707292160 >> 65 ---
-int(-4611686017353646080)
+int(-1)
--- testing: -9223372034707292160 >> -44 ---
-int(-8796093020160)
+bool(false)
--- testing: -9223372034707292160 >> 2147483647 ---
int(-1)
--- testing: -9223372034707292160 >> 9223372036854775807 ---
@@ -152,15 +152,15 @@ int(2147483648)
--- testing: 2147483648 >> 1 ---
int(1073741824)
--- testing: 2147483648 >> -1 ---
-int(0)
+bool(false)
--- testing: 2147483648 >> 7 ---
int(16777216)
--- testing: 2147483648 >> 9 ---
int(4194304)
--- testing: 2147483648 >> 65 ---
-int(1073741824)
+int(0)
--- testing: 2147483648 >> -44 ---
-int(2048)
+bool(false)
--- testing: 2147483648 >> 2147483647 ---
int(0)
--- testing: 2147483648 >> 9223372036854775807 ---
@@ -170,15 +170,15 @@ int(-2147483649)
--- testing: -2147483649 >> 1 ---
int(-1073741825)
--- testing: -2147483649 >> -1 ---
-int(-1)
+bool(false)
--- testing: -2147483649 >> 7 ---
int(-16777217)
--- testing: -2147483649 >> 9 ---
int(-4194305)
--- testing: -2147483649 >> 65 ---
-int(-1073741825)
+int(-1)
--- testing: -2147483649 >> -44 ---
-int(-2049)
+bool(false)
--- testing: -2147483649 >> 2147483647 ---
int(-1)
--- testing: -2147483649 >> 9223372036854775807 ---
@@ -188,15 +188,15 @@ int(4294967294)
--- testing: 4294967294 >> 1 ---
int(2147483647)
--- testing: 4294967294 >> -1 ---
-int(0)
+bool(false)
--- testing: 4294967294 >> 7 ---
int(33554431)
--- testing: 4294967294 >> 9 ---
int(8388607)
--- testing: 4294967294 >> 65 ---
-int(2147483647)
+int(0)
--- testing: 4294967294 >> -44 ---
-int(4095)
+bool(false)
--- testing: 4294967294 >> 2147483647 ---
int(0)
--- testing: 4294967294 >> 9223372036854775807 ---
@@ -206,15 +206,15 @@ int(4294967295)
--- testing: 4294967295 >> 1 ---
int(2147483647)
--- testing: 4294967295 >> -1 ---
-int(0)
+bool(false)
--- testing: 4294967295 >> 7 ---
int(33554431)
--- testing: 4294967295 >> 9 ---
int(8388607)
--- testing: 4294967295 >> 65 ---
-int(2147483647)
+int(0)
--- testing: 4294967295 >> -44 ---
-int(4095)
+bool(false)
--- testing: 4294967295 >> 2147483647 ---
int(0)
--- testing: 4294967295 >> 9223372036854775807 ---
@@ -224,15 +224,15 @@ int(4294967293)
--- testing: 4294967293 >> 1 ---
int(2147483646)
--- testing: 4294967293 >> -1 ---
-int(0)
+bool(false)
--- testing: 4294967293 >> 7 ---
int(33554431)
--- testing: 4294967293 >> 9 ---
int(8388607)
--- testing: 4294967293 >> 65 ---
-int(2147483646)
+int(0)
--- testing: 4294967293 >> -44 ---
-int(4095)
+bool(false)
--- testing: 4294967293 >> 2147483647 ---
int(0)
--- testing: 4294967293 >> 9223372036854775807 ---
@@ -242,15 +242,15 @@ int(9223372036854775806)
--- testing: 9223372036854775806 >> 1 ---
int(4611686018427387903)
--- testing: 9223372036854775806 >> -1 ---
-int(0)
+bool(false)
--- testing: 9223372036854775806 >> 7 ---
int(72057594037927935)
--- testing: 9223372036854775806 >> 9 ---
int(18014398509481983)
--- testing: 9223372036854775806 >> 65 ---
-int(4611686018427387903)
+int(0)
--- testing: 9223372036854775806 >> -44 ---
-int(8796093022207)
+bool(false)
--- testing: 9223372036854775806 >> 2147483647 ---
int(0)
--- testing: 9223372036854775806 >> 9223372036854775807 ---
@@ -260,15 +260,15 @@ int(-9223372036854775808)
--- testing: 9.2233720368548E+18 >> 1 ---
int(-4611686018427387904)
--- testing: 9.2233720368548E+18 >> -1 ---
-int(-1)
+bool(false)
--- testing: 9.2233720368548E+18 >> 7 ---
int(-72057594037927936)
--- testing: 9.2233720368548E+18 >> 9 ---
int(-18014398509481984)
--- testing: 9.2233720368548E+18 >> 65 ---
-int(-4611686018427387904)
+int(-1)
--- testing: 9.2233720368548E+18 >> -44 ---
-int(-8796093022208)
+bool(false)
--- testing: 9.2233720368548E+18 >> 2147483647 ---
int(-1)
--- testing: 9.2233720368548E+18 >> 9223372036854775807 ---
@@ -278,15 +278,15 @@ int(-9223372036854775807)
--- testing: -9223372036854775807 >> 1 ---
int(-4611686018427387904)
--- testing: -9223372036854775807 >> -1 ---
-int(-1)
+bool(false)
--- testing: -9223372036854775807 >> 7 ---
int(-72057594037927936)
--- testing: -9223372036854775807 >> 9 ---
int(-18014398509481984)
--- testing: -9223372036854775807 >> 65 ---
-int(-4611686018427387904)
+int(-1)
--- testing: -9223372036854775807 >> -44 ---
-int(-8796093022208)
+bool(false)
--- testing: -9223372036854775807 >> 2147483647 ---
int(-1)
--- testing: -9223372036854775807 >> 9223372036854775807 ---
@@ -296,15 +296,15 @@ int(-9223372036854775808)
--- testing: -9.2233720368548E+18 >> 1 ---
int(-4611686018427387904)
--- testing: -9.2233720368548E+18 >> -1 ---
-int(-1)
+bool(false)
--- testing: -9.2233720368548E+18 >> 7 ---
int(-72057594037927936)
--- testing: -9.2233720368548E+18 >> 9 ---
int(-18014398509481984)
--- testing: -9.2233720368548E+18 >> 65 ---
-int(-4611686018427387904)
+int(-1)
--- testing: -9.2233720368548E+18 >> -44 ---
-int(-8796093022208)
+bool(false)
--- testing: -9.2233720368548E+18 >> 2147483647 ---
int(-1)
--- testing: -9.2233720368548E+18 >> 9223372036854775807 ---
@@ -312,19 +312,19 @@ int(-1)
--- testing: 0 >> 9223372036854775807 ---
int(0)
--- testing: 0 >> -9223372036854775808 ---
-int(0)
+bool(false)
--- testing: 0 >> 2147483647 ---
int(0)
--- testing: 0 >> -2147483648 ---
-int(0)
+bool(false)
--- testing: 0 >> 9223372034707292160 ---
int(0)
--- testing: 0 >> -9223372034707292160 ---
-int(0)
+bool(false)
--- testing: 0 >> 2147483648 ---
int(0)
--- testing: 0 >> -2147483649 ---
-int(0)
+bool(false)
--- testing: 0 >> 4294967294 ---
int(0)
--- testing: 0 >> 4294967295 ---
@@ -334,27 +334,27 @@ int(0)
--- testing: 0 >> 9223372036854775806 ---
int(0)
--- testing: 0 >> 9.2233720368548E+18 ---
-int(0)
+bool(false)
--- testing: 0 >> -9223372036854775807 ---
-int(0)
+bool(false)
--- testing: 0 >> -9.2233720368548E+18 ---
-int(0)
+bool(false)
--- testing: 1 >> 9223372036854775807 ---
int(0)
--- testing: 1 >> -9223372036854775808 ---
-int(1)
+bool(false)
--- testing: 1 >> 2147483647 ---
int(0)
--- testing: 1 >> -2147483648 ---
-int(1)
+bool(false)
--- testing: 1 >> 9223372034707292160 ---
-int(1)
+int(0)
--- testing: 1 >> -9223372034707292160 ---
-int(1)
+bool(false)
--- testing: 1 >> 2147483648 ---
-int(1)
---- testing: 1 >> -2147483649 ---
int(0)
+--- testing: 1 >> -2147483649 ---
+bool(false)
--- testing: 1 >> 4294967294 ---
int(0)
--- testing: 1 >> 4294967295 ---
@@ -364,27 +364,27 @@ int(0)
--- testing: 1 >> 9223372036854775806 ---
int(0)
--- testing: 1 >> 9.2233720368548E+18 ---
-int(1)
+bool(false)
--- testing: 1 >> -9223372036854775807 ---
-int(0)
+bool(false)
--- testing: 1 >> -9.2233720368548E+18 ---
-int(1)
+bool(false)
--- testing: -1 >> 9223372036854775807 ---
int(-1)
--- testing: -1 >> -9223372036854775808 ---
-int(-1)
+bool(false)
--- testing: -1 >> 2147483647 ---
int(-1)
--- testing: -1 >> -2147483648 ---
-int(-1)
+bool(false)
--- testing: -1 >> 9223372034707292160 ---
int(-1)
--- testing: -1 >> -9223372034707292160 ---
-int(-1)
+bool(false)
--- testing: -1 >> 2147483648 ---
int(-1)
--- testing: -1 >> -2147483649 ---
-int(-1)
+bool(false)
--- testing: -1 >> 4294967294 ---
int(-1)
--- testing: -1 >> 4294967295 ---
@@ -394,27 +394,27 @@ int(-1)
--- testing: -1 >> 9223372036854775806 ---
int(-1)
--- testing: -1 >> 9.2233720368548E+18 ---
-int(-1)
+bool(false)
--- testing: -1 >> -9223372036854775807 ---
-int(-1)
+bool(false)
--- testing: -1 >> -9.2233720368548E+18 ---
-int(-1)
+bool(false)
--- testing: 7 >> 9223372036854775807 ---
int(0)
--- testing: 7 >> -9223372036854775808 ---
-int(7)
+bool(false)
--- testing: 7 >> 2147483647 ---
int(0)
--- testing: 7 >> -2147483648 ---
-int(7)
+bool(false)
--- testing: 7 >> 9223372034707292160 ---
-int(7)
+int(0)
--- testing: 7 >> -9223372034707292160 ---
-int(7)
+bool(false)
--- testing: 7 >> 2147483648 ---
-int(7)
---- testing: 7 >> -2147483649 ---
int(0)
+--- testing: 7 >> -2147483649 ---
+bool(false)
--- testing: 7 >> 4294967294 ---
int(0)
--- testing: 7 >> 4294967295 ---
@@ -424,27 +424,27 @@ int(0)
--- testing: 7 >> 9223372036854775806 ---
int(0)
--- testing: 7 >> 9.2233720368548E+18 ---
-int(7)
+bool(false)
--- testing: 7 >> -9223372036854775807 ---
-int(3)
+bool(false)
--- testing: 7 >> -9.2233720368548E+18 ---
-int(7)
+bool(false)
--- testing: 9 >> 9223372036854775807 ---
int(0)
--- testing: 9 >> -9223372036854775808 ---
-int(9)
+bool(false)
--- testing: 9 >> 2147483647 ---
int(0)
--- testing: 9 >> -2147483648 ---
-int(9)
+bool(false)
--- testing: 9 >> 9223372034707292160 ---
-int(9)
+int(0)
--- testing: 9 >> -9223372034707292160 ---
-int(9)
+bool(false)
--- testing: 9 >> 2147483648 ---
-int(9)
---- testing: 9 >> -2147483649 ---
int(0)
+--- testing: 9 >> -2147483649 ---
+bool(false)
--- testing: 9 >> 4294967294 ---
int(0)
--- testing: 9 >> 4294967295 ---
@@ -454,27 +454,27 @@ int(0)
--- testing: 9 >> 9223372036854775806 ---
int(0)
--- testing: 9 >> 9.2233720368548E+18 ---
-int(9)
+bool(false)
--- testing: 9 >> -9223372036854775807 ---
-int(4)
+bool(false)
--- testing: 9 >> -9.2233720368548E+18 ---
-int(9)
+bool(false)
--- testing: 65 >> 9223372036854775807 ---
int(0)
--- testing: 65 >> -9223372036854775808 ---
-int(65)
+bool(false)
--- testing: 65 >> 2147483647 ---
int(0)
--- testing: 65 >> -2147483648 ---
-int(65)
+bool(false)
--- testing: 65 >> 9223372034707292160 ---
-int(65)
+int(0)
--- testing: 65 >> -9223372034707292160 ---
-int(65)
+bool(false)
--- testing: 65 >> 2147483648 ---
-int(65)
---- testing: 65 >> -2147483649 ---
int(0)
+--- testing: 65 >> -2147483649 ---
+bool(false)
--- testing: 65 >> 4294967294 ---
int(0)
--- testing: 65 >> 4294967295 ---
@@ -484,27 +484,27 @@ int(0)
--- testing: 65 >> 9223372036854775806 ---
int(0)
--- testing: 65 >> 9.2233720368548E+18 ---
-int(65)
+bool(false)
--- testing: 65 >> -9223372036854775807 ---
-int(32)
+bool(false)
--- testing: 65 >> -9.2233720368548E+18 ---
-int(65)
+bool(false)
--- testing: -44 >> 9223372036854775807 ---
int(-1)
--- testing: -44 >> -9223372036854775808 ---
-int(-44)
+bool(false)
--- testing: -44 >> 2147483647 ---
int(-1)
--- testing: -44 >> -2147483648 ---
-int(-44)
+bool(false)
--- testing: -44 >> 9223372034707292160 ---
-int(-44)
+int(-1)
--- testing: -44 >> -9223372034707292160 ---
-int(-44)
+bool(false)
--- testing: -44 >> 2147483648 ---
-int(-44)
---- testing: -44 >> -2147483649 ---
int(-1)
+--- testing: -44 >> -2147483649 ---
+bool(false)
--- testing: -44 >> 4294967294 ---
int(-1)
--- testing: -44 >> 4294967295 ---
@@ -514,27 +514,27 @@ int(-1)
--- testing: -44 >> 9223372036854775806 ---
int(-1)
--- testing: -44 >> 9.2233720368548E+18 ---
-int(-44)
+bool(false)
--- testing: -44 >> -9223372036854775807 ---
-int(-22)
+bool(false)
--- testing: -44 >> -9.2233720368548E+18 ---
-int(-44)
+bool(false)
--- testing: 2147483647 >> 9223372036854775807 ---
int(0)
--- testing: 2147483647 >> -9223372036854775808 ---
-int(2147483647)
+bool(false)
--- testing: 2147483647 >> 2147483647 ---
int(0)
--- testing: 2147483647 >> -2147483648 ---
-int(2147483647)
+bool(false)
--- testing: 2147483647 >> 9223372034707292160 ---
-int(2147483647)
+int(0)
--- testing: 2147483647 >> -9223372034707292160 ---
-int(2147483647)
+bool(false)
--- testing: 2147483647 >> 2147483648 ---
-int(2147483647)
---- testing: 2147483647 >> -2147483649 ---
int(0)
+--- testing: 2147483647 >> -2147483649 ---
+bool(false)
--- testing: 2147483647 >> 4294967294 ---
int(0)
--- testing: 2147483647 >> 4294967295 ---
@@ -544,40 +544,39 @@ int(0)
--- testing: 2147483647 >> 9223372036854775806 ---
int(0)
--- testing: 2147483647 >> 9.2233720368548E+18 ---
-int(2147483647)
+bool(false)
--- testing: 2147483647 >> -9223372036854775807 ---
-int(1073741823)
+bool(false)
--- testing: 2147483647 >> -9.2233720368548E+18 ---
-int(2147483647)
+bool(false)
--- testing: 9223372036854775807 >> 9223372036854775807 ---
int(0)
--- testing: 9223372036854775807 >> -9223372036854775808 ---
-int(9223372036854775807)
+bool(false)
--- testing: 9223372036854775807 >> 2147483647 ---
int(0)
--- testing: 9223372036854775807 >> -2147483648 ---
-int(9223372036854775807)
+bool(false)
--- testing: 9223372036854775807 >> 9223372034707292160 ---
-int(9223372036854775807)
+int(0)
--- testing: 9223372036854775807 >> -9223372034707292160 ---
-int(9223372036854775807)
+bool(false)
--- testing: 9223372036854775807 >> 2147483648 ---
-int(9223372036854775807)
---- testing: 9223372036854775807 >> -2147483649 ---
int(0)
+--- testing: 9223372036854775807 >> -2147483649 ---
+bool(false)
--- testing: 9223372036854775807 >> 4294967294 ---
-int(1)
+int(0)
--- testing: 9223372036854775807 >> 4294967295 ---
int(0)
--- testing: 9223372036854775807 >> 4294967293 ---
-int(3)
+int(0)
--- testing: 9223372036854775807 >> 9223372036854775806 ---
-int(1)
+int(0)
--- testing: 9223372036854775807 >> 9.2233720368548E+18 ---
-int(9223372036854775807)
+bool(false)
--- testing: 9223372036854775807 >> -9223372036854775807 ---
-int(4611686018427387903)
+bool(false)
--- testing: 9223372036854775807 >> -9.2233720368548E+18 ---
-int(9223372036854775807)
-===DONE===
- \ No newline at end of file
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
index ad53fea9d1..35ca0a618d 100644
--- a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
+++ b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
@@ -1,9 +1,5 @@
--TEST--
Test >> operator : various numbers as strings
---SKIPIF--
-<?php
-if ((65<<65)==0) die("skip this test is for Intel only");
-?>
--FILE--
<?php
@@ -17,7 +13,7 @@ error_reporting(E_ERROR);
foreach ($strVals as $strVal) {
foreach($strVals as $otherVal) {
echo "--- testing: '$strVal' >> '$otherVal' ---\n";
- var_dump(bin2hex($strVal>>$otherVal));
+ var_dump($strVal>>$otherVal);
}
}
@@ -26,395 +22,395 @@ foreach ($strVals as $strVal) {
===DONE===
--EXPECT--
--- testing: '0' >> '0' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '65' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '0' >> '1.2' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '0' >> 'abc' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '0' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '0' >> '3.4a' ---
-string(2) "30"
+int(0)
--- testing: '0' >> 'a5.9' ---
-string(2) "30"
+int(0)
--- testing: '65' >> '0' ---
-string(4) "3635"
+int(65)
--- testing: '65' >> '65' ---
-string(4) "3332"
+int(0)
--- testing: '65' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '65' >> '1.2' ---
-string(4) "3332"
+int(32)
--- testing: '65' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '65' >> 'abc' ---
-string(4) "3635"
+int(65)
--- testing: '65' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '65' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '65' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '65' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '65' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '65' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '65' >> '3.4a' ---
-string(2) "38"
+int(8)
--- testing: '65' >> 'a5.9' ---
-string(4) "3635"
+int(65)
--- testing: '-44' >> '0' ---
-string(6) "2d3434"
+int(-44)
--- testing: '-44' >> '65' ---
-string(6) "2d3232"
+int(-1)
--- testing: '-44' >> '-44' ---
-string(4) "2d31"
+bool(false)
--- testing: '-44' >> '1.2' ---
-string(6) "2d3232"
+int(-22)
--- testing: '-44' >> '-7.7' ---
-string(4) "2d31"
+bool(false)
--- testing: '-44' >> 'abc' ---
-string(6) "2d3434"
+int(-44)
--- testing: '-44' >> '123abc' ---
-string(4) "2d31"
+int(-1)
--- testing: '-44' >> '123e5' ---
-string(4) "2d31"
+int(-1)
--- testing: '-44' >> '123e5xyz' ---
-string(4) "2d31"
+int(-1)
--- testing: '-44' >> ' 123abc' ---
-string(4) "2d31"
+int(-1)
--- testing: '-44' >> '123 abc' ---
-string(4) "2d31"
+int(-1)
--- testing: '-44' >> '123abc ' ---
-string(4) "2d31"
+int(-1)
--- testing: '-44' >> '3.4a' ---
-string(4) "2d36"
+int(-6)
--- testing: '-44' >> 'a5.9' ---
-string(6) "2d3434"
+int(-44)
--- testing: '1.2' >> '0' ---
-string(2) "31"
+int(1)
--- testing: '1.2' >> '65' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '1.2' >> '1.2' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '1.2' >> 'abc' ---
-string(2) "31"
+int(1)
--- testing: '1.2' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> '3.4a' ---
-string(2) "30"
+int(0)
--- testing: '1.2' >> 'a5.9' ---
-string(2) "31"
+int(1)
--- testing: '-7.7' >> '0' ---
-string(4) "2d37"
+int(-7)
--- testing: '-7.7' >> '65' ---
-string(4) "2d34"
+int(-1)
--- testing: '-7.7' >> '-44' ---
-string(4) "2d31"
+bool(false)
--- testing: '-7.7' >> '1.2' ---
-string(4) "2d34"
+int(-4)
--- testing: '-7.7' >> '-7.7' ---
-string(4) "2d31"
+bool(false)
--- testing: '-7.7' >> 'abc' ---
-string(4) "2d37"
+int(-7)
--- testing: '-7.7' >> '123abc' ---
-string(4) "2d31"
+int(-1)
--- testing: '-7.7' >> '123e5' ---
-string(4) "2d31"
+int(-1)
--- testing: '-7.7' >> '123e5xyz' ---
-string(4) "2d31"
+int(-1)
--- testing: '-7.7' >> ' 123abc' ---
-string(4) "2d31"
+int(-1)
--- testing: '-7.7' >> '123 abc' ---
-string(4) "2d31"
+int(-1)
--- testing: '-7.7' >> '123abc ' ---
-string(4) "2d31"
+int(-1)
--- testing: '-7.7' >> '3.4a' ---
-string(4) "2d31"
+int(-1)
--- testing: '-7.7' >> 'a5.9' ---
-string(4) "2d37"
+int(-7)
--- testing: 'abc' >> '0' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '65' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: 'abc' >> '1.2' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: 'abc' >> 'abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> '3.4a' ---
-string(2) "30"
+int(0)
--- testing: 'abc' >> 'a5.9' ---
-string(2) "30"
+int(0)
--- testing: '123abc' >> '0' ---
-string(6) "313233"
+int(123)
--- testing: '123abc' >> '65' ---
-string(4) "3631"
+int(0)
--- testing: '123abc' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '123abc' >> '1.2' ---
-string(4) "3631"
+int(61)
--- testing: '123abc' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '123abc' >> 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123abc' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '123abc' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '123abc' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '123abc' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '123abc' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '123abc' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '123abc' >> '3.4a' ---
-string(4) "3135"
+int(15)
--- testing: '123abc' >> 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '123e5' >> '0' ---
-string(6) "313233"
+int(123)
--- testing: '123e5' >> '65' ---
-string(4) "3631"
+int(0)
--- testing: '123e5' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '123e5' >> '1.2' ---
-string(4) "3631"
+int(61)
--- testing: '123e5' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '123e5' >> 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123e5' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '123e5' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '123e5' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '123e5' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '123e5' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '123e5' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '123e5' >> '3.4a' ---
-string(4) "3135"
+int(15)
--- testing: '123e5' >> 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '123e5xyz' >> '0' ---
-string(6) "313233"
+int(123)
--- testing: '123e5xyz' >> '65' ---
-string(4) "3631"
+int(0)
--- testing: '123e5xyz' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '123e5xyz' >> '1.2' ---
-string(4) "3631"
+int(61)
--- testing: '123e5xyz' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '123e5xyz' >> 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123e5xyz' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '123e5xyz' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '123e5xyz' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '123e5xyz' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '123e5xyz' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '123e5xyz' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '123e5xyz' >> '3.4a' ---
-string(4) "3135"
+int(15)
--- testing: '123e5xyz' >> 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: ' 123abc' >> '0' ---
-string(6) "313233"
+int(123)
--- testing: ' 123abc' >> '65' ---
-string(4) "3631"
+int(0)
--- testing: ' 123abc' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: ' 123abc' >> '1.2' ---
-string(4) "3631"
+int(61)
--- testing: ' 123abc' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: ' 123abc' >> 'abc' ---
-string(6) "313233"
+int(123)
--- testing: ' 123abc' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: ' 123abc' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: ' 123abc' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: ' 123abc' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: ' 123abc' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: ' 123abc' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: ' 123abc' >> '3.4a' ---
-string(4) "3135"
+int(15)
--- testing: ' 123abc' >> 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '123 abc' >> '0' ---
-string(6) "313233"
+int(123)
--- testing: '123 abc' >> '65' ---
-string(4) "3631"
+int(0)
--- testing: '123 abc' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '123 abc' >> '1.2' ---
-string(4) "3631"
+int(61)
--- testing: '123 abc' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '123 abc' >> 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123 abc' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '123 abc' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '123 abc' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '123 abc' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '123 abc' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '123 abc' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '123 abc' >> '3.4a' ---
-string(4) "3135"
+int(15)
--- testing: '123 abc' >> 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '123abc ' >> '0' ---
-string(6) "313233"
+int(123)
--- testing: '123abc ' >> '65' ---
-string(4) "3631"
+int(0)
--- testing: '123abc ' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '123abc ' >> '1.2' ---
-string(4) "3631"
+int(61)
--- testing: '123abc ' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '123abc ' >> 'abc' ---
-string(6) "313233"
+int(123)
--- testing: '123abc ' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '123abc ' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '123abc ' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '123abc ' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '123abc ' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '123abc ' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '123abc ' >> '3.4a' ---
-string(4) "3135"
+int(15)
--- testing: '123abc ' >> 'a5.9' ---
-string(6) "313233"
+int(123)
--- testing: '3.4a' >> '0' ---
-string(2) "33"
+int(3)
--- testing: '3.4a' >> '65' ---
-string(2) "31"
+int(0)
--- testing: '3.4a' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: '3.4a' >> '1.2' ---
-string(2) "31"
+int(1)
--- testing: '3.4a' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: '3.4a' >> 'abc' ---
-string(2) "33"
+int(3)
--- testing: '3.4a' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: '3.4a' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: '3.4a' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: '3.4a' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: '3.4a' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: '3.4a' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: '3.4a' >> '3.4a' ---
-string(2) "30"
+int(0)
--- testing: '3.4a' >> 'a5.9' ---
-string(2) "33"
+int(3)
--- testing: 'a5.9' >> '0' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '65' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '-44' ---
-string(2) "30"
+bool(false)
--- testing: 'a5.9' >> '1.2' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '-7.7' ---
-string(2) "30"
+bool(false)
--- testing: 'a5.9' >> 'abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '123abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '123e5' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '123e5xyz' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> ' 123abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '123 abc' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '123abc ' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> '3.4a' ---
-string(2) "30"
+int(0)
--- testing: 'a5.9' >> 'a5.9' ---
-string(2) "30"
-===DONE===
+int(0)
+===DONE=== \ No newline at end of file