--TEST-- Bug #80972: Memory exhaustion on invalid string offset --FILE-- getMessage(), \PHP_EOL; } /* This same bug also permits to modify the first byte of a string even if * the offset is invalid */ try { /* This must not affect the string value */ $string["wrong"] = "f"; } catch (\Throwable $e) { echo $e->getMessage() . \PHP_EOL; } var_dump($string); ?> --EXPECT-- Float casted to string compile Cannot access offset of type string on string Cannot access offset of type string on string string(34) "Here is some text for good measure"