$simpleString = "Bogus String Text";
echo isset($simpleString->wrong)?"bug\n":"ok\n";
-echo isset($simpleString["wrong"])?"bug\n":"ok\n";
+echo isset($simpleString["wrong"])?"ok\n":"bug\n";
echo isset($simpleString[-1])?"bug\n":"ok\n";
echo isset($simpleString[0])?"ok\n":"bug\n";
echo isset($simpleString["0"])?"ok\n":"bug\n";
echo isset($simpleString["17"])?"bug\n":"ok\n";
echo isset($simpleString["wrong"][0])?"bug\n":"ok\n";
echo $simpleString->wrong === null?"ok\n":"bug\n";
-echo $simpleString["wrong"] === null?"ok\n":"bug\n";
+echo $simpleString["wrong"] === "B"?"ok\n":"bug\n";
echo $simpleString["0"] === "B"?"ok\n":"bug\n";
$simpleString["wrong"] = "f";
-echo $simpleString["0"] === "B"?"ok\n":"bug\n";
+echo $simpleString["0"] === "f"?"ok\n":"bug\n";
?>
--EXPECTF--
bool(false)
bool(false)
bool(false)
bool(false)
-bool(false)
-bool(false)
+bool(true)
+bool(true)
ok
ok
ok
Notice: Trying to get property of non-object in %sbug31098.php on line %d
ok
-
-Notice: Trying to get string index from a string in %sbug31098.php on line %d
ok
ok
-
-Notice: Trying to get string index from a string in %sbug31098.php on line %d
ok
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
- if (Z_TYPE_P(offset) == IS_STRING) {
- char *strval;
- long lval;
-
- strval = Z_STRVAL_P(offset);
- if (is_numeric_string(strval, Z_STRLEN_P(offset), &lval, NULL, 0) == IS_LONG) {
- ZVAL_LONG(&tmp, lval);
- offset = &tmp;
- }
- } else if (offset->type != IS_LONG) {
+ if (offset->type != IS_LONG) {
tmp = *offset;
zval_copy_ctor(&tmp);
convert_to_long(&tmp);