Commit Graph

1630 Commits

Author SHA1 Message Date
Timm Friebe
d7156c1b31 Also verify nesting with dynamically called static methods 2014-07-06 15:12:15 +02:00
Timm Friebe
9dbc91f2ff Handle ZEND_INIT_NS_FCALL_BY_NAME nesting 2014-07-06 15:10:50 +02:00
Timm Friebe
7cd8ecb33f QA: Refactor: Split tests a bit to make them more comprehendable 2014-07-06 15:05:47 +02:00
Timm Friebe
ff66e59731 Support nested static calls 2014-07-06 14:58:44 +02:00
Timm Friebe
df908275f6 Handle ZEND_EXT_FCALL_END, skipping if necessary
Verified with running tests with new "-e" run-tests arg:
$ make test TESTS=Zend/tests/*-on-non-objects-*phpt TEST_PHP_ARGS=-e
# Tests passed    :   11 (100.0%)

$ make test TESTS=Zend/tests/*-on-non-objects-*phpt
# Tests passed    :   11 (100.0%)

Before, this would cause a SEGV. Thanks @nikic for raising this concern
2014-07-06 14:48:42 +02:00
Timm Friebe
e0cf63f4be Verify non-CV-operands also work
See discussion https://github.com/php/php-src/pull/647#issuecomment-48050551
2014-07-06 12:55:27 +02:00
Timm Friebe
dc68aa32bc Only allocate NULL return value if it's actually used 2014-07-06 12:50:32 +02:00
Timm Friebe
a782f697df Also handle nested function calls via variable 2014-07-06 12:44:02 +02:00
Timm Friebe
17b3791a01 Handle nesting correctly
See feedback by @nikic, https://github.com/php/php-src/pull/647#issuecomment-48050551
2014-07-06 12:27:04 +02:00
Nikita Popov
1ea4b17af2 Merge branch 'PHP-5.5' into PHP-5.6 2014-07-02 17:36:27 +02:00
Nikita Popov
d9ebd0f3d6 Fix bug #67497: eval with parse error causes segfault in generator 2014-07-02 17:33:31 +02:00
Bob Weinand
1163a7ce24 Mark test as XFAIL until fixed 2014-07-02 17:25:47 +02:00
Bob Weinand
33699a4dab Messed up syntax of tests 2014-07-02 12:43:27 +02:00
Bob Weinand
09d1a8aaab Add tests for constant expression arrays
Adding one failing (!) test for now about circular constant references embedded in a constant AST, must be fixed before PHP 5.6 release.
2014-07-02 12:33:46 +02:00
Dmitry Stogov
acfbb7b6dc Merge branch 'master' into test
* master: (67 commits)
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  Revert "Fix Bug #67530 	error_log=syslog ignored"
  --enable-fpm for the travis build
  fix the last fpm NEWS entry, the other bug is related, but not the same what we fixed here
  NEWS
  NEWS
  Fix bug #67091: make install fails to install libphp5.so on FreeBSD 10.0
  adding NEWS entry for the fix for bug #65641
  Updated NEWS file for recent phpdbg fixes
  Fixed issue krakjoe/phpdbg#94 - List behavior is inconsistent
  Fix issue krakjoe/phpdbg#97 - list now appends a newline if there is none The prompt should always ensure it is on a newline
  Fixed test
  Inform about back command existence in help - Fixes krakjoe/phpdbg#100 No way to list the current stack/frames
  Fix issue krakjoe/phpdbg#98 break if does not seem to work
  Fix issue krakjoe/phpdbg#99 register function has the same behavior as run
  Fix readline/libedit (Thanks to @remicollet)
  Replace incorrect `E` command with `ev` in watch help
  Fix typo in `finish` help
  ...

Conflicts:
	Zend/zend_ast.c
	Zend/zend_highlight.c
	Zend/zend_indent.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/info.c
2014-07-01 00:19:41 +04:00
Nikita Popov
e198132542 Drop addition of weird \ prefix for FQ consts
Also fixes a resolution bug
2014-06-28 18:24:59 +02:00
Xinchen Hui
9d49492fd6 Fixed bug #67368 (Memory leak with immediately dereferenced array in class constant) 2014-06-24 13:53:05 +08:00
Ferenc Kovacs
53158f2c32 testcase for 67468 (only for debug build, as I could not create a stable segfault without loading other exts like pgsql) 2014-06-23 10:10:17 +02:00
Nikita Popov
657762ee2b AST stage 2.4 2014-06-21 18:54:13 +02:00
Nikita Popov
0ec49bba22 AST stage 1.9
Expressions (mostly) use the AST
2014-06-19 13:48:35 +02:00
Dmitry Stogov
b108267f2c Merge branch 'master' into phpng
* master: (41 commits)
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  NEWS
  Fix Request #67453 Allow to unserialize empty data.
  Update copyright year to 2014
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
  Fix patch for bug #67436
  fix failed test
  Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
  Added tests for bug 67436
  Fixed wrong XFAIL test - already fixed
  Fix typo in Bug #67406 NEWS entry
  Fix typo in Bug #67406 NEWS entry
  ...

Conflicts:
	Zend/zend_compile.c
	ext/session/session.c
	ext/standard/array.c
	ext/standard/http_fopen_wrapper.c
	tests/classes/bug63462.phpt
2014-06-18 17:50:27 +04:00
Bob Weinand
7cef3a57ad Merge branch 'PHP-5.5' into PHP-5.6 2014-06-16 00:42:50 +02:00
Bob Weinand
03ee0ddc5f Merge branch 'PHP-5.4' into PHP-5.5 2014-06-16 00:41:46 +02:00
Levi Morrison
6c9c44905e Added tests for bug 67436 2014-06-15 16:31:39 -06:00
Nikita Popov
258a733ed2 AST-based compiler: Stage 1 2014-06-14 15:22:18 +02:00
Dmitry Stogov
dd1c68e67f Merge branch 'master' into phpng
* master: (77 commits)
  NEWS entry for Fix potential segfault in dns_get_record()
  NEWS entry for "Fix potential segfault in dns_get_record()"
  NEWS entry for Fix potential segfault in dns_get_record(
  Fix potential segfault in dns_get_record()
  Revert "Add optional second arg to unserialize()"
  5.5.15 now
  update NEWS
  Fix bug #66127 (Segmentation fault with ArrayObject unset)
  5.4.31 next
  Add NEWS. This doesn't need UPGRADING (or an RFC), IMO.
  Fix broken test.
  Add a mime type map generation script and update the header.
  Move the mime type map out of php_cli_server.c for easier generation.
  Replace the CLI server's linear search for extensions with a hash table.
  fix test
  Remove unused included file
  NEWS
  NEWS
  NEWS
  Fixed Bug #67413 	fileinfo: cdf_read_property_info insufficient boundary chec
  ...

Conflicts:
	Zend/zend_closures.c
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/spl/spl_array.c
	ext/standard/basic_functions.c
	ext/standard/dns.c
	ext/standard/var.c
2014-06-12 05:07:33 +04:00
Boro Sitnikovski
cfccdc6362 Bug 64744
Show the type of the non-object for more descriptive errors
2014-06-08 19:14:58 -07:00
Stanislav Malyshev
8f527fbf14 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug 666222
  Fix bug 666222
2014-06-08 19:02:24 -07:00
Levi Morrison
f47976dd9b Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.
2014-06-08 18:59:44 -07:00
Levi Morrison
e030efa4f6 Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-06-08 18:59:23 -07:00
Nikita Popov
c8aa51f825 Accept static member fetch in new variable (BC) 2014-06-06 17:05:14 +02:00
Dmitry Stogov
e4581fd6b8 GC doesn't count scalars and immutable arrays in the same way 2014-06-05 21:05:07 +04:00
Dmitry Stogov
3d87391cc0 Reference counters in PHPNG may have different values 2014-06-04 09:57:17 +04:00
Nikita Popov
8515b96e53 Handle FUNC_ARG fetches on temporaries 2014-05-31 20:15:55 +02:00
Nikita Popov
96b32ec532 Support isset() on temporaries 2014-05-31 20:05:03 +02:00
Nikita Popov
5c2120b6cf Forbid writing to temporary expressions 2014-05-31 19:41:39 +02:00
Nikita Popov
72b5e0cac0 Add another static member access test 2014-05-31 18:18:20 +02:00
Nikita Popov
f0ac7f7d7b Properly handle property read on const/tmp 2014-05-31 17:51:22 +02:00
Nikita Popov
c53a7ea4e5 Property handle calls on [] and '' consts/tmps 2014-05-31 17:37:30 +02:00
Nikita Popov
64e4c9eff1 Support directly calling closure 2014-05-31 17:18:37 +02:00
Nikita Popov
4ec505f9b5 Add two initial tests 2014-05-31 16:33:52 +02:00
Nikita Popov
c29d3b6e3e Update another test 2014-05-31 00:48:06 +02:00
Nikita Popov
c5920af515 Update two tests with new semantics 2014-05-31 00:40:32 +02:00
Nikita Popov
a8c1595012 LTR static member access 2014-05-30 22:33:03 +02:00
Nikita Popov
47e85b1b35 Improve class constant fetch fix
Dereference the cached constant for Test::TEST as well (and not just
self::TEST).

Also improve the phpt file to test this case as well - previously
this only manifested with opcache enabled, due to literal sharing.

Additionally the Z_TYPE_P != IS_REFERENCE assertion is now moved
into the TMP_VAR fetching code (as it applies to more than just
property assignments.)
2014-05-29 11:17:33 +02:00
Nikita Popov
d9a35c7e97 Fix class constant fetching
If a class is extended after the constant fetch has been cached
the cached value will be turned into a reference. On the next
fetch the polymorphic cache will return this reference, which
will be directly returned. The object assignment code then
dereferences this result and performs a shallow copy, which is
invalid for references. This subsequently leads to the constant
value being prematurely freed.

This is fixed by dereferencing the value returned from the
polymorphic cache. Furthermore the incorrect dereference from
in the object assignment code is replaced with an assertion that
we're dealing with a non-reference, so ensure that this kind of
problem cannot go unnoticed in the future.
2014-05-29 00:15:50 +02:00
Nikita Popov
4ee14c6f8d Fix ** operator with references 2014-05-26 18:17:55 +02:00
Nikita Popov
ff72c7bfd7 Add test for previous commit 2014-05-26 18:13:16 +02:00
Nikita Popov
9343f874cd Fix identical comparison of arrays with references
Also commit a test I forgot.
2014-05-09 15:46:43 +02:00
Dmitry Stogov
0c6a6f0fba Re-applyed Bob's patch with minor fixes 2014-05-07 15:03:56 +04:00
Dmitry Stogov
4ecc527976 Reverted Bob's patch (it breaks many tests when run with opcache and needs to be fixed first). 2014-05-07 03:26:13 +04:00
Bob Weinand
f3c1881f1d Re-added fix for bug #66015 and adapted for phpng branch 2014-05-06 14:59:03 +02:00
Dmitry Stogov
cd4b4dfc4d Merge branch 'master' into refactoring2
Conflicts:
	Zend/zend_hash.c
	ext/date/php_date.c
2014-05-05 13:02:43 +04:00
Nikita Popov
69b5ee61d0 Fixed bug #67169: []= after_array_splice incorrect
This fixes a regression I introduced in beta 1.
2014-05-02 12:49:51 +02:00
Timm Friebe
7041ef44a6 Add tests verifying method calls on non-objects work inside eval() 2014-04-28 21:48:08 +02:00
Timm Friebe
da1db5e688 Add tests for indirect calls to methods on non-objects
http://news.php.net/php.internals/73823
2014-04-28 21:44:24 +02:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Timm Friebe
a86e762166 Add test verifying chained method invocations 2014-04-20 12:47:18 +02:00
Timm Friebe
51a5e18433 Add example how framework code could convert E_RECOVERABLE -> exceptions 2014-04-19 15:32:16 +02:00
Timm Friebe
daf16d5683 Adjust expected outcome 2014-04-19 14:01:27 +02:00
Timm Friebe
bdb0cee222 Initial implementation 2014-04-19 14:01:16 +02:00
Anatol Belski
cfd20c90a5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  refixed the test related to bug #67072
  Improved the fix for bug #67072, thanks Nikita
2014-04-18 15:17:12 +02:00
Anatol Belski
d963cf94a5 refixed the test related to bug #67072 2014-04-18 15:16:09 +02:00
Stanislav Malyshev
ce4c78dd07 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed test case for 5328d42
2014-04-17 17:36:26 -07:00
Tjerk Meesters
5e988a888a Fixed test case for 5328d42 2014-04-17 17:36:03 -07:00
Dmitry Stogov
9629eea9e7 The test works out of the box 2014-04-14 22:43:33 +04:00
Ferenc Kovacs
20036525e2 Fix bug #66660: use str_efree instead of efree to handle interned empty strings correctly 2014-04-13 10:45:46 +02:00
Bob Weinand
ee2a7c7d41 Fixed disallowal of array usage in constants at run-time
Added at the same time the possibility of array dereferencing
to complete the set of features (useful application of arrays in constants)
2014-04-11 18:21:46 +02:00
Bob Weinand
f614fc6898 Fix bug #66015 by reverting "Removed operations on constant arrays." 2014-04-11 10:08:44 +02:00
Dmitry Stogov
c11dc75b4e Refactored IS_INDIRECT IS_VAR passing between opcodes to avoid reference counting 2014-04-04 19:01:53 +04:00
Dmitry Stogov
1968e6be65 Fixed tests (now objects are counted only once) 2014-03-20 11:54:24 +04:00
Tjerk Meesters
3d1fa4cb17 Allow T_POW in constant expressions 2014-03-07 09:14:27 +08:00
Dmitry Stogov
58918431e9 Fixed test 2014-03-04 23:30:56 +04:00
Nikita Popov
d3b484df82 Disallow use of positional args after unpacking
This commit disallows the use of trailing positional arguments
after argument unpacking was used. The following calls are no
longer valid:

    fn(...$array, $var);
    fn(...$array1, $var, ...$array2);

However, all of the following continue to be valid:

    fn($var, ...$array);
    fn(...$array1, ...$array2);
    fn($var, ...$array1, ...$array2);

The reason behind this change is a stack allocation issue pointed
out by Dmitry: As of PHP 5.5 the stack necessary for pushing
arguments is precomputed and preallocated, as such the individual
SEND opcodes no longer verify that there is enough stack space.
The unpacked arguments will occupy some of that preallocated
space and as such following positional arguments could write past
a stack page boundary.

An alternative resolution for this issue is to ensure that there
is enough space for the remaining arguments in the UNPACK opcode.
However making this allocation precise (rather than using a
conversative over-estimate) would require some effort. Given that
this particular aspect of the feature wasn't very popular in the
first place, it doesn't seem worth the effort.
2014-02-26 16:40:25 +01:00
Anatol Belski
5d0d88d1f2 fixed path separator in the tests 2014-02-21 00:23:01 +01:00
Sara Golemon
14c08ea362 Add more tests for __debugInfo() and fix leak 2014-02-20 12:10:00 -08:00
Sara Golemon
1e752ce9c5 Add __debugInfo() magic method
class Foo {
  private $val = 'Random, meaningless data';

  public function count() { return 42; }

  public function __debugInfo() {
    return ['count' => $this->count()];
  }
}

$f = new Foo;
var_dump($f);
2014-02-17 19:33:56 -08:00
Nikita Popov
31a2ac470c Fix argument unpacking across stack pages
If multiple unpacks were used (or mixed with normal arguments)
parts of the arguments could land on different stack pages. If
this occurs the arguments will now be copied to a new stack page.

The code used to do this is copied verbatim from the PHP 5.4 branch
and only modified to reduce the amount of inlined code.
2014-01-18 14:41:33 +01:00
Nikita Popov
2c47dfbaeb Implement argument unpacking
RFC: https://wiki.php.net/rfc/argument_unpacking
2014-01-11 12:42:08 +01:00
Nikita Popov
72a16851f4 Merge branch 'PHP-5.5' into PHP-5.6 2014-01-04 01:29:15 +01:00
Nikita Popov
d992a972c0 Merge branch 'PHP-5.4' into PHP-5.5 2014-01-04 01:24:54 +01:00
Nikita Popov
7e8e21df0c Fix bug #66286: Incorrect object comparison with inheritance
std_compare_objects immidiately returned 0 if the property tables
of both objects contain NULL at some index. Thus it would report
objects as equal even though properties following after that
differ.
2014-01-04 01:22:14 +01:00
Xinchen Hui
5eb8d9d700 Merge branch 'PHP-5.6' of https://git.php.net/push/php-src into PHP-5.6 2013-12-15 16:55:29 +08:00
Eric Stenson
330168a247 Fix tests expecting specific resource IDs
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself.  As a
result, these tests become false positives.

On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently.  This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines.  Also, added a test to exercise
the 'more_entropy' variant of uniqid().
2013-12-15 16:51:21 +08:00
Xinchen Hui
dde552f2ee Add Tests for #65784 in 5.5 2013-12-13 01:45:45 +08:00
Xinchen Hui
794a888a48 Fixed bug #65784 (Segfault with finally). 2013-12-13 00:16:08 +08:00
Bob Weinand
324291ebf2 Added one more test for constant scalar expressions 2013-12-11 19:17:07 +01:00
Remi Collet
45d8802441 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fixed Bug #66218 zend_register_functions breaks reflection
2013-12-10 16:10:20 +01:00
Remi Collet
9f4d1ee51c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed Bug #66218 zend_register_functions breaks reflection
2013-12-10 16:09:41 +01:00
Remi Collet
3e963f8eb4 Fixed Bug #66218 zend_register_functions breaks reflection
Functions registered using zend_register_functions instead of zend_module_entry.functions are not seen on reflection.

Ex: additional_functions from api_module_entry.
Ex: in CLI, dl, cli_set_process_title and cli_get_process_title

Note:
- also affects functions overrided in extension
  (should be be reported in extension, where overrided, not in original extension)
- also allow extension to call zend_register_functions for various list
  (instead of having a single bug list)
2013-12-10 16:07:16 +01:00
Dmitry Stogov
5a87b7ff39 Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: reference. Constant expessions have to be evaluated in context of defining class). 2013-12-10 14:19:17 +04:00
Ferenc Kovacs
562fa252ad Merge branch 'use-function' of git://github.com/igorw/php-src into igorw-use-function 2013-12-06 05:39:49 +01:00
Nikita Popov
b3546e64bd Merge branch 'PHP-5.5' into PHP-5.6 2013-12-01 13:45:22 +01:00
Nikita Popov
02dca18b90 Fix bug #65764
I'm not exactly sure whether this is the right way to fix it. The
question is whether Generator::throw() on a newborn generator (i.e.
a generator that is not yet at yield expression) should first advance to
the first yield and throw the exception there or whether it should
instead throw the exception in the caller's context.

The old behavior was to throw it at the start of the function (i.e.
the very first opcode), which causes issues like the one in #65764.
Effectively it's impossible to properly handle the exceptions in this
case.

For now I choose the variant where the generator advances to the
first yield before throwing, as that's consistent with how all other
methods on the Generator object currently behave. This does not
necessarily match the behavior in other languages, e.g. Python would throw
the exception in the caller's context. But then our send() method already
has this kind of deviation, so it stays internally consistent at least.
2013-12-01 13:37:56 +01:00
Nikita Popov
e2a8d7dc17 Merge branch 'PHP-5.5' into PHP-5.6 2013-11-30 13:40:17 +01:00
Nikita Popov
9589cae8cb Fixed bug #66041: list() fails to unpack yielded ArrayAccess object
Yield return values now use IS_VAR rather than IS_TMP_VAR. This
fixes the issue with list() and should also be faster as it avoids
doing a zval copy.
2013-11-30 13:08:31 +01:00
Bob Weinand
d36cf90291 Merge branch 'const_scalar_exprs' into PHP-5.6
Conflicts:
	Zend/zend_extensions.h
2013-11-28 13:41:42 +01:00
Dmitry Stogov
fcb98cbce8 Fixed tests 2013-11-27 21:04:00 +04:00
Dmitry Stogov
43e3933fa3 Removed deprecated AI_SET_PTR()s 2013-11-27 20:30:35 +04:00
Dmitry Stogov
a908afeaa5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #65969 (Chain assignment with T_LIST failure)

Conflicts:
	NEWS
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-11-27 14:56:18 +04:00
Dmitry Stogov
92b76680e9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #65969 (Chain assignment with T_LIST failure)

Conflicts:
	NEWS
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-11-27 14:39:40 +04:00
Dmitry Stogov
16d59aa171 Fixed bug #65969 (Chain assignment with T_LIST failure) 2013-11-27 14:26:34 +04:00
Igor Wiedler
24e0b99103 Merge remote-tracking branch 'upstream/PHP-5.6' into use-function
* upstream/PHP-5.6: (399 commits)
  Fixed issue #115 (path issue when using phar). Fixed issue #149 (Phar mount points not working with OPcache enabled).
  Added tests for PHAR/OPCahce incompatibilities
  Update NEWS
  Fixed bug #65947 (basename is no more working after fgetcsv in certain situation)
  Update NEWS
  Fixed Bug #66043 (Segfault calling bind_param() on mysqli)
  NEWS entry
  NEWS entry
  Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings
  bump API versions
  Add a couple more test cases to parse_url() tests
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
  Cleanup temp test file
  Revert "Fixed issue #115 (path issue when using phar)."
  Update LiteSpeed SAPI code to V6.4
  Fixed typo in Makefile.frag
  updated NEWS
  Remove outdate codes, make it clearer, although just a bit..
  Update NEWS
  ...

Conflicts:
	Zend/zend_compile.h
2013-11-08 19:14:58 -05:00
Bob Weinand
152898ff28 Moved arrays again to "static_scalar:" & little cleanup 2013-11-07 16:39:47 +01:00
Bob Weinand
ad967e1329 Added a few more operators 2013-11-03 01:58:39 +01:00
Bob Weinand
466c5dd1fe Fixed mem leaks, added tests and ternary operator 2013-10-31 18:21:37 +01:00
Nikita Popov
d51553e399 Merge branch 'PHP-5.5' 2013-10-16 18:39:13 +02:00
Nikita Popov
865f221627 Merge branch 'PHP-5.4' into PHP-5.5 2013-10-16 18:37:49 +02:00
bwoebi
4c0bb6d76e Fixed bug #65911 ($this not usable as static property)
In context of static accesses like classname::$this, the string
"$this" should not be handled like a $this variable, but as an
identifier for a static variable.
2013-10-16 18:33:14 +02:00
Igor Wiedler
602fef0e52 Clarify type of use in error messages 2013-10-14 23:32:11 +02:00
Igor Wiedler
e23ad4eeb2 Add "Done" output to distinguish hard from soft failures 2013-10-14 23:21:06 +02:00
Nikita Popov
cbf0683c6f Merge branch 'PHP-5.5' 2013-09-29 20:19:40 +02:00
Nikita Popov
6b68f44e6b Fix bug #64979: Wrong behavior of static variables in closure generators 2013-09-29 20:18:12 +02:00
Nikita Popov
9529b8f5c4 Merge branch 'PHP-5.5' 2013-09-29 18:01:42 +02:00
Nikita Popov
1d1fb69c8b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-29 18:01:18 +02:00
Nikita Popov
f0c926564c Fix bug #65322: compile time errors won't trigger auto loading
Also fixes duplicate bugs #54054 and #42098.

Furthermore this fixes incorrect error messages thrown from code
running inside an error handler when a compilation is in progress.
The error file and line are now correctly associated with the
file/line of the executor, rather than the compiler.
2013-09-29 17:58:25 +02:00
Nikita Popov
0d7a638866 Implement variadic function syntax
As per RFC: https://wiki.php.net/rfc/variadics
2013-09-26 18:39:17 +02:00
Xinchen Hui
825c1f239b Merge branch 'PHP-5.5' 2013-09-02 16:16:15 +08:00
Xinchen Hui
b2ee1b629e Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:16:07 +08:00
Xinchen Hui
6c48c6bc78 Typo.... 2013-09-02 16:15:52 +08:00
Xinchen Hui
f33bdf68b1 Merge branch 'PHP-5.5' 2013-09-02 16:03:10 +08:00
Xinchen Hui
dd1cbd140b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:02:59 +08:00
Xinchen Hui
ed038d2ee3 Add a XFAIL test for #64896 2013-09-02 16:02:24 +08:00
Gustavo André dos Santos Lopes
d515455589 Implement phase 1 of rfc/incompat_ctx
Just changing the error level of the message from E_STRICT to
E_DEPRECATED. This comes one version later than the timeline
mentioned in the RFC.

Oddly, there were no tests for this ‘feature’. I added a simple
one.
2013-09-02 01:53:06 +02:00
Anthony Ferrara
d7e3aca9c9 Fix issue with global fallback when not in global space 2013-08-30 11:53:57 -04:00
Xinchen Hui
a607a08e09 Merge branch 'PHP-5.5' 2013-08-30 11:23:24 +08:00
Xinchen Hui
e4fe53e200 Merge branch 'PHP-5.4' into PHP-5.5 2013-08-30 11:20:46 +08:00
Xinchen Hui
7da6498342 Fixed bug #60598 (cli/apache sapi segfault on objects manipulation) 2013-08-30 11:20:24 +08:00
Igor Wiedler
e14a769c56 Add test for conditional function declaration 2013-08-29 17:16:18 +02:00
Xinchen Hui
0ea00936be Merge branch 'PHP-5.5' 2013-08-29 14:02:53 +08:00
Xinchen Hui
f0cb67402f Merge branch 'PHP-5.4' into PHP-5.5 2013-08-29 14:01:54 +08:00
Adam Harvey
72027cd084 Fix bug #65579 (Using traits with get_class_methods causes segfault).
Specifically, this checks if there are trait aliases defined in the class scope
before attempting to dereference the first trait alias. This handles the case
where a trait alias was used in a child trait but no aliases exist in the
concrete class.
2013-08-28 20:33:42 -07:00
Igor Wiedler
6263f221ff Handle case sensivity of constants (nikic) 2013-08-25 16:21:51 +02:00
Igor Wiedler
84c8aa3691 self and parent are valid function and const names (nikic) 2013-08-25 15:08:26 +02:00
Igor Wiedler
bc473228c8 Adjust some test names, remove obsolete and duplicate tests (nikic) 2013-08-25 14:03:07 +02:00
Igor Wiedler
85d4cfb00d Disallow using functions/consts defined in the same file
* Keep track of defined function and const filenames
* Prohibit use function foo if function foo exists
* Prohibit use const foo if const foo exists
2013-08-25 00:02:46 +02:00
Igor Wiedler
5b18530e8c Add test cases for conflicting use and definition in same ns (stas) 2013-08-23 23:31:17 +02:00
Igor Wiedler
31d77053a1 More test cases for conflicting aliases 2013-08-22 15:51:26 +02:00
Igor Wiedler
2dbbb8ae4b Add test case for conflicting use and use function alias (stas) 2013-08-22 15:51:26 +02:00
Igor Wiedler
4adf49eeaf Import namespaced constants via new 'use const' sequence 2013-08-22 15:51:26 +02:00
Igor Wiedler
e1125a6a89 Correctly distinguish between functions and constants
So far 'use function' applied to both constants and functions. This
patch correctly separates the two.
2013-08-22 15:51:26 +02:00
Igor Wiedler
5dd41627be Add new 'use function' sequence for importing namespaced functions
This is specified as the use_function RFC:

* https://wiki.php.net/rfc/use_function
2013-08-22 15:51:25 +02:00
Stanislav Malyshev
42214b6474 Merge branch 'PHP-5.5'
* PHP-5.5:
  Use in preg_replace_callback() using variables by reference and test for bug #64979
  https://bugs.php.net/bug.php?id=64979
2013-08-18 15:19:27 -07:00
Marcel Araujo
265224778b Use in preg_replace_callback() using variables by reference and test for bug #64979 2013-08-18 15:18:30 -07:00
Marcel Araujo
47678c06c6 https://bugs.php.net/bug.php?id=64979 2013-08-18 15:09:43 -07:00
Stanislav Malyshev
68e8326e0e Merge branch 'PHP-5.5'
* PHP-5.5:
  non living code related typo fixes
2013-08-04 16:07:13 -07:00
Stanislav Malyshev
c793a65690 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  non living code related typo fixes

Conflicts:
	Zend/zend_compile.c
2013-08-04 16:06:24 -07:00
Veres Lajos
8d86597d73 non living code related typo fixes 2013-08-04 16:05:36 -07:00
Rasmus Lerdorf
0fce1b4f72 Merge commit '5753b74'
* commit '5753b74':
  Make sure test.php isn't coming in from the include_path
2013-08-02 11:48:07 -04:00
Rasmus Lerdorf
a85e71e655 Merge commit '5753b74' into PHP-5.5
* commit '5753b74':
  Make sure test.php isn't coming in from the include_path
2013-08-02 11:47:52 -04:00