diff --git a/Zend/tests/offset_array.phpt b/Zend/tests/offset_array.phpt new file mode 100644 index 00000000000..a7e2f21b1c2 --- /dev/null +++ b/Zend/tests/offset_array.phpt @@ -0,0 +1,47 @@ +--TEST-- +using different variables to access array offsets +--FILE-- + +--EXPECTF-- +int(2) +int(1) + +Notice: Undefined index: in %s on line %d +NULL + +Notice: Undefined index: run away in %s on line %d +NULL +int(2) +int(1) + +Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d +int(%d) + +Warning: Illegal offset type in %s on line %d +NULL + +Warning: Illegal offset type in %s on line %d +NULL +Done diff --git a/Zend/tests/offset_bool.phpt b/Zend/tests/offset_bool.phpt new file mode 100644 index 00000000000..9bf8a89da76 --- /dev/null +++ b/Zend/tests/offset_bool.phpt @@ -0,0 +1,37 @@ +--TEST-- +using different variables to access boolean offsets +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +Done diff --git a/Zend/tests/offset_long.phpt b/Zend/tests/offset_long.phpt new file mode 100644 index 00000000000..c65a5ba3f8d --- /dev/null +++ b/Zend/tests/offset_long.phpt @@ -0,0 +1,37 @@ +--TEST-- +using different variables to access long offsets +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +Done diff --git a/Zend/tests/offset_null.phpt b/Zend/tests/offset_null.phpt new file mode 100644 index 00000000000..9364f0a2e52 --- /dev/null +++ b/Zend/tests/offset_null.phpt @@ -0,0 +1,37 @@ +--TEST-- +using different variables to access null offsets +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +Done diff --git a/Zend/tests/offset_object.phpt b/Zend/tests/offset_object.phpt new file mode 100644 index 00000000000..b570fd2a2f6 --- /dev/null +++ b/Zend/tests/offset_object.phpt @@ -0,0 +1,11 @@ +--TEST-- +accessing object dimension +--FILE-- + +--EXPECTF-- +Fatal error: Cannot use object of type stdClass as array in %s on line %d diff --git a/Zend/tests/offset_string.phpt b/Zend/tests/offset_string.phpt new file mode 100644 index 00000000000..63f92c5fd81 --- /dev/null +++ b/Zend/tests/offset_string.phpt @@ -0,0 +1,64 @@ +--TEST-- +using different variables to access string offsets +--FILE-- + +--EXPECTF-- +string(1) "i" +string(1) "S" +string(1) "S" +string(1) "S" +string(1) "i" +string(1) "S" + +Warning: Illegal offset type in %s on line %d +string(1) "%s" + +Warning: Illegal offset type in %s on line %d + +Notice: Object of class stdClass could not be converted to int in %s on line %d +string(1) "%s" + +Warning: Illegal offset type in %s on line %d +string(1) "i" +Done +--UEXPECTF-- +unicode(1) "i" +unicode(1) "S" +unicode(1) "S" +unicode(1) "S" +unicode(1) "i" +unicode(1) "S" + +Warning: Illegal offset type in %s on line %d +unicode(1) "%s" + +Warning: Illegal offset type in %s on line %d + +Notice: Object of class stdClass could not be converted to int in %s on line %d +unicode(1) "%s" + +Warning: Illegal offset type in %s on line %d +unicode(1) "i" +Done