706 Commits

Author SHA1 Message Date
Remi Collet
05049db61d display extension version in phpinfo 2019-05-23 10:34:19 +02:00
Remi Collet
af5ae31706 add minimal .gitignire 2019-05-23 10:09:54 +02:00
Remi Collet
0e01fe6fd6 set version to 1.0.0-dev (instead of PHP_VERSION) 2019-05-23 10:08:30 +02:00
Remi Collet
03972c9d04 add LICENSE file 2019-05-23 10:07:36 +02:00
Nikita Popov
2044c06d94 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-25 16:43:33 +01:00
Nikita Popov
9bca6431be Merge branch 'PHP-7.2' into PHP-7.3 2019-03-25 16:43:21 +01:00
Nikita Popov
e845320128 Fixed bug #72175
Make sure we don't close the connection we're trying to reuse...
2019-03-25 16:41:21 +01:00
Fabien Villepinte
a00304d418 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Peter Kokot
ad0a83a3b8 Remove HAVE_STRFTIME
Function strftime is part of the C89 standard [1] and current systems
don't need to check for its presence anymore.

Additionally, checks for strftime function in tests have been removed
since the PHP strftime function is now always available.

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 19:42:29 +01:00
c9s
6dd99ff5a7 Remove function_table var from the caller
function_table var is not used in call_user_function macro anymore
hence replace the usage with NULL
2019-03-11 10:00:39 +01:00
Peter Kokot
37425b5d92 Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot
9051f19768 Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
Changes:
- PHP_TM_GMTOFF removed
- HAVE_TM_GMTOFF replaced with HAVE_STRUCT_TM_TM_GMTOFF
- HAVE_TM_ZONE replaced with HAVE_STRUCT_TM_TM_ZONE
- HAVE_TZNAME removed

The PHP_TM_GMTOFF macro can be replaced with Autoconf's AC_CHECK_MEMBERS
that defines the HAVE_STRUCT_TM_TM_GMTOFF symbol instead of the
HAVE_TM_ZONE.

The HAVE_TZNAME symbol is not used in current code. The obsolete
HAVE_TM_ZONE symbol has been replaced with more proper
HAVE_STRUCT_TM_TM_ZONE. These are defined by the AC_STRUCT_TIMEZONE
macro.
2019-03-04 12:13:12 +01:00
Peter Kokot
60fc212c58 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
ac41db6819 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Gabriel Caruso
31a4994044 Clean up unnecessary ternary expressions and simplify some returns
- Simplify conditions
- Use ZEND_HASH_APPLY_* instead of hard-coded booleans
- Use ZEND_NORMALIZE_BOOL
- Drop sign in favor of ZEND_NORMALIZE_BOOL
2018-12-03 01:22:14 +01:00
Peter Kokot
bcfc2bce46 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:33:09 +02:00
Peter Kokot
3f2d4d0055 Merge branch 'PHP-7.3'
* PHP-7.3:
  Sync leading and final newlines in *.phpt sections
  Sync leading and final newlines in *.phpt sections
  Sync leading and final newlines in *.phpt sections
2018-10-15 04:32:49 +02:00
Peter Kokot
40a345e4a7 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
0ca0257075 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Sync leading and final newlines in *.phpt sections
  Sync leading and final newlines in *.phpt sections
2018-10-15 04:31:53 +02:00
Peter Kokot
f71eab9e4d 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:31:31 +02:00
Peter Kokot
001f29604c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync leading and final newlines in *.phpt sections
2018-10-15 04:30:40 +02:00
Peter Kokot
b814621c56 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:29:24 +02:00
Peter Kokot
2156c9449d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Peter Kokot
cbec6699a2 Merge branch 'PHP-7.3'
* PHP-7.3:
  Trim trailing whitespace in *.phpt
  Trim trailing whitespace in *.phpt
  Trim trailing whitespace in *.phpt
2018-10-14 19:45:40 +02:00
Peter Kokot
6559df8784 Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
206ef0a863 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Trim trailing whitespace in *.phpt
  Trim trailing whitespace in *.phpt
2018-10-14 19:44:33 +02:00
Peter Kokot
8157a8853c Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
a7168ad889 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Trim trailing whitespace in *.phpt
2018-10-14 19:43:39 +02:00
Peter Kokot
9982f6786d Trim trailing whitespace in *.phpt 2018-10-14 19:43:12 +02:00
Gabriel Caruso
30f237b519 Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
e7b7b804e0 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
9fd71c1af4 Merge branch 'PHP-7.3'
* PHP-7.3:
  Trim trailing whitespace in source code files
  Trim trailing whitespace in source code files
  Trim trailing whitespace in source code files
2018-10-13 14:16:48 +02:00
Peter Kokot
646b40fb8d Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
c0f942962a Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Trim trailing whitespace in source code files
  Trim trailing whitespace in source code files
2018-10-13 14:15:15 +02:00
Peter Kokot
27c879d413 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
cd169782b7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Trim trailing whitespace in source code files
2018-10-13 14:13:37 +02:00
Peter Kokot
28af08d54b Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Gabriel Caruso
b6666b7548 Fix some misspellings 2018-08-12 16:15:45 +02:00
Peter Kokot
582a6195cd Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files:
- ext/*/config*.m4
- configure.ac
- acinclude.m4
2018-07-29 03:43:45 +02:00
Gabriel Caruso
1ec30c2b33 Use variables that already received ZEND_NUM_ARGS() 2018-07-22 15:54:00 -03:00
Gabriel Caruso
cadc94c921 Fix failing test upstream
There was a trailing tab when a error message was generated. Removing
it, test is passing now.
2018-07-15 23:40:00 -03:00
Dmitry Stogov
a87428a9e3 Use zval_ptr_dtor() imstead of zval_dtor() 2018-07-05 17:55:54 +03:00
Dmitry Stogov
08a5729632 Use zval_ptr_dtor_nogc() instead of zval_dtor() inplaces where circular-references are not possible 2018-07-05 15:25:55 +03:00
Dmitry Stogov
c877ab3e85 Use zval_ptr_dtor() instead of legacy zval_dtor(), to destroy unused values returned from PHP functions (they may be circular data structures). 2018-07-05 14:09:47 +03:00
Dmitry Stogov
4f651defe9 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Kalle Sommer Nielsen
52f9f08f26 Fixed bug #76443 (php+php_interbase.dll crash on module_shutdown) 2018-06-11 11:50:39 +02:00
Dmitry Stogov
3329c6d58b Removed "dead" code (zend_hash_update() never fails) 2018-06-01 11:58:57 +03:00
Dmitry Stogov
0beaefea9b Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Gabriel Caruso
902aa05ed0 remove support for string|unicode in tests 2018-02-22 08:11:30 +01:00
Gabriel Caruso
fbeea9d0c1 Refactoring duplicated ZPP with a switch 2018-02-19 08:33:18 +01:00