Skip to content

Revert pull request 3 #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ea58b54
Re-do a lot of it using a conditional define, and legacy type informa…
ircmaxell Jul 1, 2013
89aea2f
Refactor file.c to use new string types
ircmaxell Jul 1, 2013
66845fb
More work, get strings working, sort-of...
ircmaxell Jul 1, 2013
6e008d4
It compiles. Sort-of. In a way. Yeah. But nothing works. Sigh
ircmaxell Jul 2, 2013
91abad1
Better test coverage
ircmaxell Jul 2, 2013
3db6b51
Get basic language tests to all pass (minus xfails)
ircmaxell Jul 2, 2013
f4c4fe4
Get core test suite to really pass, fully. Woot
ircmaxell Jul 2, 2013
ca0e018
windows fixes
weltling Jul 4, 2013
890345e
fix spl_autoload_*
weltling Jul 4, 2013
bf18c56
trivial fixes to spl
weltling Jul 4, 2013
8db3e37
trivial fixes to ext\standard
weltling Jul 4, 2013
3744ff7
Merge pull request #1 from weltling/string_size_refactor_take_2
ircmaxell Jul 5, 2013
acd85d4
strig size_t fixes to zend_alloc.*
weltling Jul 9, 2013
03ed6fc
string sze_t fix for internal strings
weltling Jul 10, 2013
309d3b5
Merge branch 'string_size_refactor_take_2' of https://github.com/ircm…
weltling Jul 10, 2013
59d95c1
Merge branch 'master' of https://github.com/php/php-src into string_s…
weltling Jul 10, 2013
42c8f29
fix 's' vs 'S' for datetime
weltling Jul 11, 2013
7331e4c
Merge branch 'master' of https://github.com/php/php-src into string_s…
weltling Jul 11, 2013
a9b623a
huge fix to spl and more
weltling Jul 11, 2013
e17ef23
fixes to url processing stuff
weltling Jul 11, 2013
8f7abf4
fix base64 stuff
weltling Jul 11, 2013
5ae81ec
fix uuencode
weltling Jul 11, 2013
6bd00ed
Merge pull request #2 from weltling/string_size_refactor_take_2
ircmaxell Jul 15, 2013
eb5ab08
fixes to zend_ini and output
weltling Jul 17, 2013
c292a18
fixes to xp_socket.c
weltling Jul 17, 2013
06fe769
fixes to plain stream wrapper
weltling Jul 17, 2013
cc3ec29
fixes to SAPI.c
weltling Jul 17, 2013
9703f57
more fixes to streams
weltling Jul 17, 2013
d4c546b
fixes to zend
weltling Jul 17, 2013
46e07a6
Merge branch 'master' of https://github.com/php/php-src into string_s…
weltling Jul 18, 2013
03cae61
fixes after merging master
weltling Jul 18, 2013
dc0b9d7
Merge branch 'master' of https://github.com/php/php-src into string_s…
weltling Jul 29, 2013
cd955c1
fixes to main/
weltling Jul 29, 2013
62c1f41
more for cli sapi
weltling Jul 29, 2013
88960bb
more fixes to string.c
weltling Jul 29, 2013
a95f8db
fixes for types to ext/standard with types ... some stuff is broken now
weltling Jul 29, 2013
6478088
Merge branch 'master' of https://github.com/php/php-src into string_s…
weltling Aug 13, 2013
0773ab4
changes to dns.c
weltling Aug 13, 2013
2d63270
Merge pull request #3 from weltling/string_size_refactor_take_2
ircmaxell Aug 13, 2013
1a069d5
Revert "Merge pull request #3 from weltling/string_size_refactor_take_2"
ircmaxell Aug 13, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions CODING_STANDARDS
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,7 @@ The file labelled 'EXPERIMENTAL' should include the following
information::

Any authoring information (known bugs, future directions of the module).
Ongoing status notes which may not be appropriate for Git comments.

In general new features should go to PECL or experimental branches until
there are specific reasons for directly adding it to the core distribution.
Ongoing status notes which may not be appropriate for SVN comments.

Aliases & Legacy Documentation
-----------------------------------
Expand Down
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,7 @@ Installation
set of HTTP headers. The headers it did return are:
10. Windows: I've followed all the instructions, but still can't get
PHP and IIS to work together!
11. When running PHP as CGI with IIS, OmniHTTPD or Xitami, I get
11. When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami, I get
the following error: Security Alert! PHP CGI cannot be accessed
directly..
12. How do I know if my php.ini is being found and read? It seems like
Expand Down Expand Up @@ -2007,7 +2007,7 @@ cgi error:
And for IIS4 you need to tell it that PHP is a script engine.
Also, you will want to read this faq.

When running PHP as CGI with IIS, OmniHTTPD or Xitami, I get the
When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami, I get the
following error: Security Alert! PHP CGI cannot be accessed
directly..
You must set the cgi.force_redirect directive to 0. It defaults
Expand Down
15 changes: 3 additions & 12 deletions Makefile.global
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ all: $(all_targets)
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@echo

build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)

build-binaries: $(PHP_BINARIES)
Expand Down Expand Up @@ -115,19 +115,10 @@ clean:
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*

distclean: clean
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
rm -f php5.spec main/build-defs.h scripts/phpize
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html
rm -f ext/iconv/php_have_bsd_iconv.h ext/iconv/php_have_glibc_iconv.h ext/iconv/php_have_ibm_iconv.h ext/iconv/php_have_iconv.h ext/iconv/php_have_libiconv.h ext/iconv/php_iconv_aliased_libiconv.h ext/iconv/php_iconv_supports_errno.h ext/iconv/php_php_iconv_h_path.h ext/iconv/php_php_iconv_impl.h
rm -f ext/phar/phar.phar ext/phar/phar.php
if test "$(srcdir)" != "$(builddir)"; then \
rm -f ext/phar/phar/phar.inc; \
fi
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f

.PHONY: all clean install distclean test
Expand Down
13 changes: 0 additions & 13 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@ PHP NEWS
. Implemented internal operator overloading
(RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)

- Session:
. Fixed Bug #65315 (session.hash_function silently fallback to default md5)
(Yasuo)
. Implemented Request #54649 (Create session_serializer_name()). (Yasuo)
. Implemented Request #17860 (Session write short circuit). (Yasuo)
. Implemented Request #20421 (session_abort() and session_reset() function).
(Yasuo)
. Implemented Request #11100 (session_gc() function). (Yasuo)

- mysqlnd:
. Disabled flag for SP OUT variables for 5.5+ servers as they are not natively
supported by the overlying APIs. (Andrey)

- OPcache:
. Added an optimization pass to convert FCALL_BY_NAME into DO_FCALL.
(Laruence, Dmitry)
Expand Down
39 changes: 39 additions & 0 deletions README.EXTENSIONS
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
that broke both source and binary compatibility. If you are
maintaining a third party extension, here's how to update it:

If this was your old module entry:

zend_module_entry foo_module_entry = {
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
STANDARD_MODULE_PROPERTIES
};

Here's how it should look if you want your code to build with PHP
4.1.0 and up:

zend_module_entry foo_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
#if ZEND_MODULE_API_NO >= 20010901
FOO_VERSION, /* extension version number (string) */
#endif
STANDARD_MODULE_PROPERTIES
};

If you don't care about source compatibility with earlier PHP releases
than 4.1.0, you can drop the #if/#endif lines.
155 changes: 155 additions & 0 deletions README.PHP4-TO-PHP5-THIN-CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
1. strrpos() and strripos() now use the entire string as a needle. Be aware
that the existing scripts may no longer work as you expect.

EX :
<?php
var_dump(strrpos("ABCDEF","DEF"));
var_dump(strrpos("ABCDEF","DAF"));
?>

Will give you different results. The former returns 3 while the latter
returns false rather than the position of the last occurrence of 'D'.
The same applies to strripos().

2. Illegal use of string offsets causes E_ERROR instead of E_WARNING.

EX :
<?php
$a = "foo";
unset($a[0][1][2]);
?>

Fatal error: Cannot use string offset as an array in ... on line 1

3. array_merge() was changed to accept only arrays. If a non-array variable is
passed, a E_WARNING will be thrown for every such parameter. Be careful
because your code may start emitting E_WARNING out of the blue.

4. Be careful when porting from ext/mysql to ext/mysqli. The following
functions return NULL when no more data is available in the result set
(ext/mysql's functions return FALSE).

- mysqli_fetch_row()
- mysqli_fetch_array()
- mysqli_fetch_assoc()

5. PATH_TRANSLATED server variable is no longer set implicitly under
Apache2 SAPI in contrast to the situation in PHP 4, where it is set to the
same value as the SCRIPT_FILENAME server variable when it is not populated
by Apache. This change was made to comply with the CGI specification.
Please refer to bug #23610 for further information.

6. Starting PHP 5.0.0 the T_ML_CONSTANT constant is no longer defined by the
ext/tokenizer extension. If error_reporting is set to E_ALL notices will
be produced. Instead of T_ML_CONSTANT for /* */ the T_COMMENT constant
is used, thus both // and /* */ are resolved as the T_COMMENT constant.
However the PHPDoc style comments /** */ ,which starting PHP 5 are parsed
by PHP, are recongnized as T_DOC_COMMENT.

7. $_SERVER should be populated with argc and argv if variables_order
includes "S". If you have specifically configured your system to not
create $_SERVER, then of course it shouldn't be there. The change was to
always make argc and argv available in the CLI version regardless of the
variables_order setting. As in, the CLI version will now always populate
the global $argc and $argv variables.

8. In some cases classes must be declared before used. It only happens only
if some of the new features of PHP 5 are used. Otherwise the behaviour is
the old.
Example 1 (works with no errors):
<?php
$a = new a();
class a {
}
?>

Example 2 (throws an error):
<?php
$a = new a();
interface b{
}
class a implements b {
}
?>

Output (example 2) :
Fatal error: Class 'a' not found in /tmp/cl.php on line 2

9. get_class() starting PHP 5 returns the name of the class as it was
declared which may lead to problems in older scripts that rely on
the previous behaviour - the class name is lowercased. Expect the
same behaviour from get_parent_class() when applicable.
Example :
<?php
class FooBar {
}
class ExtFooBar extends FooBar{}
$a = new FooBar();
var_dump(get_class($a), get_parent_class($a));
?>

Output (PHP 4):
string(6) "foobar"
string(9) "extfoobar"

Output (PHP 5):
string(6) "FooBar"
string(9) "ExtFooBar"
----------------------------------------------------------------------
Example code that will break :
//....
function someMethod($p) {
if (get_class($p) != 'helpingclass') {
return FALSE;
}
//...
}
//...
Possible solution is to search for get_class() and get_parent_class() in
all your scripts and use strtolower().

10. get_class_methods() returns the names of the methods of a class as they
declared. In PHP4 the names are all lowercased.
Example code :
<?php
class Foo{
function doFoo(){}
function hasFoo(){}
}
var_dump(get_class_methods("Foo"));
?>
Output (PHP4):
array(2) {
[0]=>
string(5) "dofoo"
[1]=>
string(6) "hasfoo"
}
Output (PHP5):
array(2) {
[0]=>
string(5) "doFoo"
[1]=>
string(6) "hasFoo"
}

11. Assignment $this is impossible. Starting PHP 5.0.0 $this has special
meaning in class methods and is recognized by the PHP parser. The latter
will generate a parse error when assignment to $this is found
Example code :
<?php
class Foo {
function assignNew($obj) {
$this = $obj;
}
}
$a = new Foo();
$b = new Foo();
$a->assignNew($b);
echo "I was executed\n";
?>
Output (PHP 4):
I was executed
Output (PHP 5):
PHP Fatal error: Cannot re-assign $this in /tmp/this_ex.php on line 4

2 changes: 1 addition & 1 deletion README.STREAMS
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Opening Streams
===============
In most cases, you should use this API:

PHPAPI php_stream *php_stream_open_wrapper(const char *path, const char *mode,
PHPAPI php_stream *php_stream_open_wrapper(char *path, char *mode,
int options, char **opened_path TSRMLS_DC);

Where:
Expand Down
28 changes: 14 additions & 14 deletions README.SUBMITTING_PATCH
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This document describes how to submit an enhancement or patch for PHP.
It's easy!

You don't need any login accounts or special access to download,
build, debug and begin submitting PHP or PECL code, tests or
build, debug and begin submitting PHP, PECL or PEAR code, tests or
documentation. Once you've followed this README and had several
patches accepted, commit privileges are often quickly granted.

Expand All @@ -16,8 +16,8 @@ http://phpadvent.org/2008/less-whining-more-coding-by-elizabeth-smith
Online Forums
-------------
There are several IRC channels where PHP developers are often
available to discuss questions. They include #php.pecl and #php.doc
on the EFNet network and #php-dev-win on FreeNode.
available to discuss questions. They include #php.pecl, #php.doc and
#pear on the EFNet network and #php-dev-win on FreeNode.


PHP Patches
Expand Down Expand Up @@ -78,7 +78,7 @@ of type 'text/*' are accepted.
PECL Extension Patches: http://pecl.php.net/
--------------------------------------------
If you are fixing broken functionality in a PECL extension then create
a bug or identify an existing bug at http://bugs.php.net/. A bug
a bug or identify an existing bug at http://pecl.php.net/bugs/. A bug
can be used to track the patch progress and prevent your changes
getting lost in the PHP mail archives.

Expand Down Expand Up @@ -114,15 +114,15 @@ http://pear.php.net/manual/en/guide-developers.php

How to create your PHP, PHP Documentation or PECL patch
-------------------------------------------------------
PHP and most PECL packages use Git for revision control. Some PECL
packages use Subversion (SVN) Read http://www.php.net/git.php for help
on using Git to get and build PHP source code. We recommend to look
at our workflow on https://wiki.php.net/vcs/gitworkflow and our FAQ
https://wiki.php.net/vcs/gitfaq.
PHP and PECL use Subversion (SVN) for revision control. Read
http://www.php.net/svn.php for help on using SVN to get and build PHP
source code. We recommend using a Sparse Directory checkout described
in http://wiki.php.net/vcs/svnfaq. If you are new to SVN, read
http://svnbook.red-bean.com.

Generally we ask that bug fix patches work on the current stable PHP
development branches and on "master". New PHP features only need to
work on "master".
development branches and on "trunk". New PHP features only need to
work on "trunk".

Read CODING_STANDARDS before you start working.

Expand All @@ -134,15 +134,15 @@ comprehensive.

After testing is finished, create a patch file using the command:

git diff > your_patch.txt
svn diff > your_patch.txt

For ease of review and later troubleshooting, submit individual
patches for each bug or feature.


Checklist for submitting your PHP or PECL code patch
----------------------------------------------------
- Update git source just before running your final 'diff' and
- Update SVN source just before running your final 'diff' and
before testing.
- Add in-line comments and/or have external documentation ready.
Use only "/* */" style comments, not "//".
Expand Down Expand Up @@ -175,7 +175,7 @@ about these questions:

What happens when your PHP or PECL patch is applied
---------------------------------------------------
Your name will likely be included in the Git commit log. If your
Your name will likely be included in the SVN commit log. If your
patch affects end users, a brief description and your name might be
added to the NEWS file.

Expand Down
2 changes: 1 addition & 1 deletion TSRM/tsrm_virtual_cwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,7 @@ CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC) /* {{{ */
}
/* }}} */

CWD_API int virtual_rename(const char *oldname, const char *newname TSRMLS_DC) /* {{{ */
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC) /* {{{ */
{
cwd_state old_state;
cwd_state new_state;
Expand Down
2 changes: 1 addition & 1 deletion TSRM/tsrm_virtual_cwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC);
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
CWD_API int virtual_rename(const char *oldname, const char *newname TSRMLS_DC);
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
Expand Down
Loading