1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Commit Graph

15 Commits

Author SHA1 Message Date
Peter Kokot b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot 782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Nikita Popov f4a9da389b Deprecate non-string needles in string search functions
Part of https://wiki.php.net/rfc/deprecations_php_7_3.
2018-07-21 22:34:09 +02:00
Christoph M. Becker 727b422ad9 Fix #72948: Uncatchable "Catchable" fatal error for class to string conversions
E_RECOVERABLE errors are reported as "Catchable fatal error". This is
misleading, because they actually can't be caught via try-catch statements.
Therefore we change the wording to "Recoverable fatal error" as suggested by
Nikita.
2016-09-03 13:05:37 +02:00
Andrea Faulds c3c0f531a2 Scalar type hints with ZPP casting rules 2015-02-10 15:48:04 +00:00
Veres Lajos 8d86597d73 non living code related typo fixes 2013-08-04 16:05:36 -07:00
Xinchen Hui 0fd3572f4e Fixed bug #64432 (more empty delimiter warning in strX methods) 2013-03-21 11:14:10 +08:00
Stanislav Malyshev e52517d610 standardise and clean up string functions parameter parsing 2009-08-13 06:44:50 +00:00
Zoe Slattery 11d43ac5d2 fixing incorrect --CLEAN-- sections 2009-04-16 12:28:03 +00:00
Felipe Pena 8c76a00f93 New tests and fix tests (new error message) 2008-02-01 13:41:19 +00:00
Raghubansh Kumar 4b731b1af0 fix tests 2007-11-09 12:02:42 +00:00
Antony Dovgal 38c37bb61f fix tests 2007-09-30 14:37:33 +00:00
Raghubansh Kumar 3a97c49489 New version of addcslashes.phpt, md5_file.phpt, str_replace.phpt, substr.phpt, chr_ord.phpt, strpos.phpt, strstr.phpt, trim1.phpt, implode1.phpt, str_repeat.phpt, substr_count.phpt 2007-05-12 10:15:02 +00:00
Marcus Boerger d94136fc30 - Remove unused blocks 2004-05-19 08:45:46 +00:00
Ilia Alshanetsky d6775c5c3f Added tests for strstr(), strpos() and substr_count() functions. 2002-10-07 21:07:42 +00:00