Commit Graph

341 Commits

Author SHA1 Message Date
Dmitry Stogov
4d2a575db2 Stop using internal array/object pointer in foreach by reference according to https://wiki.php.net/rfc/php7_foreach 2015-02-12 14:36:04 +03:00
Dmitry Stogov
97fe15db43 Fix "forech" statemt behaviour according to https://wiki.php.net/rfc/php7_foreach
Squashed commit of the following:

commit 1e41295097
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Sat Jan 31 07:28:58 2015 +0300

    Generalize HashTableIterator API to allows its usage without involvement of HashTable.nInternalPonter

commit 5406f21b11
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:43 2015 +0300

    Reduced alghorithms complexity

commit b37f1d58d2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:30 2015 +0300

    Fixed test name

commit fb2d079645
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:05 2015 +0300

    API cleanup

commit 08302c0d6d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 14:20:46 2015 +0300

    Make array_splice() to preserve foreach hash position

commit cc4b7be41e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 12:24:31 2015 +0300

    Make internal function, operation on array passed by reference, to preserve foreach hash position

commit 5aa9712b0a
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 09:49:35 2015 +0300

    Implement consistent behavior for foreach by value over plain object

commit 4c5b385ff5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 07:56:37 2015 +0300

    More careful iterators update.

commit 721fc9e80d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jan 29 21:43:28 2015 +0300

    Added new test

commit 15a23b1218
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jan 29 21:05:02 2015 +0300

    Reimplement iteration magic with HashTableIterators (see https://wiki.php.net/rfc/php7_foreach#implementation_details)

commit 10a3260b1f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jan 29 21:04:44 2015 +0300

    New test

commit eef80c5837
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 16:52:21 2015 +0300

    Fixed foreach by reference iteration over constant array

commit 61e7391873
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 14:59:54 2015 +0300

    Fixed temporary variable re-allocation pass

commit 92e90c09f0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 12:44:57 2015 +0300

    Fixed operand destruction in case of exceptions in iterator

commit dd2a36a207
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 10:02:34 2015 +0300

    Use GET_OP1_ZVAL_PTR_DEREF() (IS_TMP_VAR and IS_CONST can't be IS_REFERENCE)

commit 4638f7b914
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 07:43:28 2015 +0300

    Change "foreach" statement behavior (this is just a PoC yet)

    - "foreach by value" don't relay on internal array/object pointer and doesnt perform array duplication. It just locks it incrementing reference counter. If the original array is modified by some code, the copy on write is performed and "foreach" still work with the old copy.

    - it makes no difference if array given to "foreach by value" is reference itself

    - "foreach by reference" still use internal array/object pointer and should work similar to PHP-5. (This id not completely implemented)
2015-02-12 13:57:12 +03:00
Nikita Popov
cb9c99ebd0 Remove preg_replace /e modifier 2015-01-26 21:00:23 +01:00
Nikita Popov
4d3e4d3bf9 Remove assignment of new by reference 2015-01-26 21:00:22 +01:00
Andrea Faulds
5f29b98051 Error on invalid octal (fixes PHPSadness #31)
Further error checks
2015-01-17 18:50:28 +00:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Andrea Faulds
bae46f307c Unicode Codepoint Escape Syntax 2014-12-19 00:40:59 +00:00
Anatol Belski
3d68d843cb Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed bug #65230 setting locale randomly broken
2014-12-06 12:01:09 +01:00
Anatol Belski
1b4d5ad46a Fixed bug #65230 setting locale randomly broken 2014-12-06 11:59:43 +01:00
Veres Lajos
4b9535341a typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-19 20:23:00 +00:00
Nikita Popov
e756333bbb Remove <% and <script language="php"> tags
As per https://wiki.php.net/rfc/remove_alternative_php_tags.

Removes:
 * <% opening tag
 * %> closing tag
 * <%= short opening tag
 * /<script\s+language\s*=\s*(php|"php"|'php')\s*>/i opening tag
 * /</script>/i closing tag
 * asp_tags ini directive
2014-10-05 21:57:05 +02:00
Dmitry Stogov
2e1b8ba4b7 Moved checks and error reporting related to static methods from DO_FCALL inti INTI_FCALL* opcodes that may really deal with static methods. (In some rare cases it may lead to different order of warning messages). 2014-10-04 14:55:44 +04:00
Nikita Popov
5831cca957 Mark three foreach tests as XFAIL
A lot of work is needed to properly handle all foreach edge cases,
which is not going to happen anytime soon. So marking these tests
as XFAIL for now.
2014-10-03 22:02:02 +02:00
Andrea Faulds
2d069f640e Merge branch 'coalesce_operator'
* coalesce_operator:
  Extended coalesce operator test case for ordering/short-circuiting
  Ensure not evaluated twice
  Added test
  Initial coalesce operator implementation
2014-09-28 00:07:04 +01:00
Andrea Faulds
ec39802e4e Extended coalesce operator test case for ordering/short-circuiting 2014-09-23 16:28:02 +01:00
Andrea Faulds
12b15e5ca4 Merge branch 'master' into integer_semantics 2014-09-21 00:29:48 +01:00
Florian MARGAINE
8eb7e7bf7f Merge branch 'master' into issue-67910
Conflicts:
	README.PARAMETER_PARSING_API
	ext/gmp/tests/001.phpt
2014-09-20 10:09:21 +02:00
Florian MARGAINE
cf0303e782 Replaces php5 with php7, without whitespace changes. 2014-09-20 10:01:44 +02:00
Andrea Faulds
157da54e82 Ensure not evaluated twice 2014-09-16 19:32:01 +01:00
Andrea Faulds
a1711cee17 Added test 2014-09-16 19:20:15 +01:00
Andrea Faulds
db72160e5a Merge branch 'master' into integer_semantics
Conflicts:
	Zend/zend_operators.h
2014-09-16 13:45:06 +01:00
Nikita Popov
828fe35381 Fix string increment 2014-09-05 12:45:42 +02:00
Andrea Faulds
59f6cec3dd Updated 32-bit << test 2014-08-19 21:28:26 +01:00
Andrea Faulds
821ca32a6f Updated << 64-bit tests 2014-08-19 20:21:24 +01:00
Andrea Faulds
6a58f270d8 Updated >> 64-bit tests 2014-08-19 20:21:23 +01:00
Andrea Faulds
2f5e508e39 Fixed 32-bit test 2014-08-19 20:21:23 +01:00
Andrea Faulds
4fb5a983a3 Fixed 64-bit tests 2014-08-19 20:21:22 +01:00
Nikita Popov
904a83a137 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	ext/opcache/Optimizer/optimize_func_calls.c
2014-08-16 22:31:13 +02:00
Nikita Popov
71675a4bf8 Merge remote-tracking branch 'php-src/phpng' into ast
Conflicts:
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_language_parser.y

Incomplete merge!
2014-08-16 21:55:08 +02:00
Nikita Popov
7d8383149a Fix list() test wrt new assignment order 2014-08-15 18:25:58 +02:00
Nikita Popov
c4460dd162 Restore old evaluation order
${a()}[b()][c()] = d() will now evaluate in order a, b, c, d.
2014-08-15 17:10:06 +02:00
Dmitry Stogov
3bd32efb3e Behavoir of func_get_arg() and func_get_args() was changed in PHP7.
Now they show current values of variables corresponded to passed arguments instead of originally passed values.
2014-08-15 11:39:50 +04:00
Andrea Faulds
fe894c2154 PHP_INT_MIN and _MAX tests 2014-08-01 17:01:17 +01:00
Remi Collet
a93b87f988 Skip those test which fails on ARM architecture
Add minimal tests for all arch.
2014-01-20 14:42:28 +01:00
Remi Collet
140d2ef4f0 dos2unix 2014-01-20 14:39:05 +01:00
Jeff Welch
72a8489a12 Fixed tests that fail with non-default serialize_precision configurations.
See:

 * https://bugs.php.net/bug.php?id=64760
 * 4dc4302
2013-11-20 06:17:34 +09:00
Yasuo Ohgaki
d04bcb8969 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update NEWS
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
2013-10-29 17:28:35 +09:00
Yasuo Ohgaki
4dc4302a30 Fixed Bug 64760 var_export() does not use full precision for floating-point numbers 2013-10-29 17:24:23 +09:00
Anatoliy Belsky
7d7ff76659 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Two tests deactivated until #63688 was fixed
2012-12-05 09:58:04 +01:00
Anatoliy Belsky
73e66ff1bd Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Two tests deactivated until #63688 was fixed
2012-12-05 09:57:36 +01:00
Anatoliy Belsky
94cbd6374a Two tests deactivated until #63688 was fixed 2012-12-05 09:55:49 +01:00
Xinchen Hui
1b9e0de2cc Remove executable permission on inc 2012-10-10 10:44:34 +08:00
Xinchen Hui
610c7fbe7b Remove executable permission on phpt 2012-10-10 10:27:49 +08:00
Xinchen Hui
69a4301f6c Merge branch 'PHP-5.3' into PHP-5.4 2012-10-10 10:45:07 +08:00
Xinchen Hui
e081c55fb5 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-10 10:31:31 +08:00
Xinchen Hui
4e5e8c9da0 Merge branch 'PHP-5.4' 2012-10-10 10:45:34 +08:00
Xinchen Hui
4b152e5470 Merge branch 'PHP-5.4' 2012-10-10 10:32:38 +08:00
Nikita Popov
1b5b839312 Drop obsolete test 2012-09-01 20:10:12 +02:00
Gustavo Lopes
53351d087d Merge branch 'generators'
* generators: (70 commits)
  Fix typos
  Fix segfault when traversing a by-ref generator twice
  Make sure that exception is thrown on rewind() after closing too
  Remove implementation stubs for yield delegation
  Fix several issues and allow rewind only at/before first yield
  Run finally if generator is closed before finishing
  Finally with return now works in generators too
  Add dedicated opcode for returns from a generator
  Disallow serialization and unserialization
  Fix zts build (typo)
  Drop Generator::close() method
  Forgot to add test
  Support trivial finally in generators (no yield, no return)
  Fix implementation of Iterator interface
  Add T_YIELD in tokenizer_data.c
  Throw error also for return occuring before yield
  Fix throwing of exceptions within a generator
  Remove reference restrictions from foreach
  Require parenthesis around yield expressions
  Add some more tests
  ...
2012-09-01 19:07:20 +02:00
Xinchen Hui
b5d2c3174f Merge branch 'PHP-5.4' 2012-08-31 11:25:21 +08:00