Commit graph

30 commits

Author SHA1 Message Date
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Zeev Suraski
67e0138c0d Future-proof email addresses... 2018-11-01 18:30:28 +02:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

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-14 12:56:38 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Joe Watkins
9b89b09b24
Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed #75996: Add the right urls to the header of mt_rand.
2018-03-27 22:10:34 +02:00
Joe Watkins
fc6cbc3eaa
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed #75996: Add the right urls to the header of mt_rand.
2018-03-27 22:09:42 +02:00
TATAR Balazs Janos
ac4d9fd055
Fixed #75996: Add the right urls to the header of mt_rand. 2018-03-27 22:09:08 +02:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Remi Collet
bd44a2cb05 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  better fix for #75514
2017-11-28 17:43:15 +01:00
Remi Collet
2b07102897 better fix for #75514 2017-11-28 17:42:43 +01:00
Remi Collet
9e3bd1b288 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  NEWS
  Fixed bug #75514 mt_rand returns value outside [$min,$max]+ on 32-bit
2017-11-13 10:22:51 +01:00
Remi Collet
e704e1e8c2 Fixed bug #75514 mt_rand returns value outside [$min,$max]+ on 32-bit 2017-11-13 10:21:46 +01:00
Nikita Popov
fd07302024 Fixed bug #75170
This change may result in different mt_rand/rand sequences being
generated on 64-bit systems for a specific seed.

See also https://externals.io/message/100229.
2017-09-07 20:04:38 +02:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Sara Golemon
a23f08a33c Use new param API in standard 2016-12-30 17:28:55 -08:00
Leigh
9a9004318f Preserve BC for rand() AND mt_rand() where min > max 2016-08-10 23:32:32 +01:00
Leigh
2ece5decb7 Swap min/max if min > max 2016-08-08 22:31:59 +01:00
Leigh
99e3bb1430 Allow min > max for mt_rand(). Bug #72784 2016-08-08 22:16:27 +01:00
Leigh
5bf39267ee mt_rand 32/64-bit consistency 2016-08-06 11:15:26 +01:00
Remi Collet
f9ce8aa75b Minor revert of be3640150c
On 32bits this may cause php to hangs forever.
2016-08-03 14:27:46 +02:00
Leigh
027375d4c3 Fix legacy mode RAND_RANGE and 32/64-bit consistency 2016-07-16 16:50:20 +00:00
Leigh
69e7d8dcd5 Make mode selection part of mt_srand()
The mode of operation is intrinsically linked to seeding, so this makes a lot of sense
2016-07-07 15:14:06 +01:00
Leigh
1f5cfea087 Fix RAND_RANGE for mt_rand 2016-07-05 12:13:38 +01:00
Leigh
7981a294bd Fix mt_rand impl. Provide legacy impl. access. 2016-07-05 11:54:07 +01:00
Leigh
eba6e7ce9a Split rand and mt_rand into separate files 2016-07-05 11:16:37 +01:00