1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Commit Graph

165 Commits

Author SHA1 Message Date
Marcus Boerger 7a5240e846 - MFH missing bits and pieces of the partial sync with head
# This time i added:
# ZEND_FE_RESET_VARIABLE
# ZEND_FE_RESET_REFERENCE
# and dapted parser,compiler,executor,interfaces to handle these flags
# their purpose is to be able to pass whetehr foreach is done by ref to
# the current() handler so that it can error out in case it is not capable
# to comply to the requested return signature/protocol/semantics (weyp).
2006-05-11 21:07:39 +00:00
Ilia Alshanetsky e7f6a3fab2 As per agreement during PDM, remove the E_STRICT deprecation notice from
"var".
2006-03-12 16:52:18 +00:00
Andi Gutmans 61e93ccfe8 - Update copyright notices to 2006 2006-01-04 23:53:05 +00:00
Dmitry Stogov cc50a96139 Fixed bug #34873 (Segmentation Fault on foreach in object) 2005-10-17 07:57:00 +00:00
Marcus Boerger 967413c58c - MFH Fix Bug #34243 ReflectionClass::getDocComment() returns no result 2005-09-21 09:56:51 +00:00
foobar 916815b779 Bump up the year 2005-08-03 13:30:58 +00:00
Dmitry Stogov 343af548a6 Fixed SIGSEGV on 'global ${"{$blah}_ID"};' 2005-07-04 13:24:46 +00:00
Dmitry Stogov 0a44789bf3 Fixed bug #30961 (Wrong linenumber in ReflectionClass getStartLine()) 2005-06-08 06:49:01 +00:00
Zeev Suraski d33500ee20 Thought I committed it ages ago... Anyway, without further delays, the final
__halt_compiler() patch
2005-06-04 16:16:19 +00:00
Dmitry Stogov 1a72341328 Added array type hinting. (This patch requires full re-make) 2005-05-26 13:46:17 +00:00
Marcus Boerger a29f5391db - Cleanup foreach handling 2005-02-11 22:26:45 +00:00
Dmitry Stogov fc96c7f7fa foreash($a as $key => $val) optimization
Removed temorary array creation on each iteration.
2005-02-07 16:09:54 +00:00
Marcus Boerger 2d13dd0ef0 - Remove part of the cleanup which causes a problem with unnormal code
like tests/lang/040.phpt
# However there is a memleak introduced somewhen after august 04 for such
# code now, 5.0 and 4.3 are fine though.
2005-02-07 15:22:38 +00:00
Marcus Boerger 662cd8262e - Cleanup foreach statement 2005-02-05 14:01:59 +00:00
Andi Gutmans db507dd153 - Commit the variable fetch optimization.
- Extensions which delete global variables need to use new special function
- delete_global_variable() (I'm about to rename it) to remove them.
- Will post to internals@ or via commit messages if there's anything else.
2004-10-04 19:54:35 +00:00
Sebastian Bergmann 6ccbb6b51b ZTS fix. 2004-09-16 05:43:29 +00:00
Andi Gutmans d8efe626b5 - Fix bug #27669 (Dmitry).
Fixes:
<?
        class A
        {
                function hello()
                {
                        echo "Hello World\n";
                }
        }
        $y[0] = 'hello';
        A::$y[0]();
?>
2004-09-16 00:40:38 +00:00
Marcus Boerger dc7cb19993 - Remove all for now
# - the optimization part can be done in apc or compareable products
# - NULL can be reintroduced later when needed
2004-08-02 16:38:09 +00:00
Sara Golemon d96e7a170c Revert goto opcode 2004-07-29 17:45:31 +00:00
Sara Golemon 5865b3680a Add goto operator by popular request. 2004-07-29 15:23:47 +00:00
Marcus Boerger 86d46f7cc1 - Speed up by making null/false/true reserved word which allows to drop
an opcode (FETCH_CONSTANT) for every usage.
2004-07-16 06:50:57 +00:00
Andi Gutmans 173782b73e - Fix bug #27283 - Exceptions where the last catch() statement was sometimes
- skipped.
2004-04-20 14:14:55 +00:00
Stanislav Malyshev 1293330175 check writability on =& too 2004-03-28 16:37:57 +00:00
Marcus Boerger 50ee116f08 Clearify the different method/class flags (as discussed with Andi). 2004-03-09 16:38:37 +00:00
Marcus Boerger 059c533b4a Fix __METHOD__ (noticed by Davey Sahfik) 2004-02-26 19:59:49 +00:00
Andi Gutmans 4f05437e08 - Improve precendence:
<?php

$obj->foo = "Blah";

if (!$obj instanceof StdClass) {
    print "No";
} else {
    print "Yes";
}
2004-02-23 18:17:16 +00:00
Andi Gutmans 4a14e5c30d - Decrease precedence of instanceof so that the following is true:
php -r 'var_export((object)1 instanceof stdClass);';
Patch by Jan Lehnardt
2004-02-23 08:40:39 +00:00
Marcus Boerger c6cbafa273 Fix: <interface> [extends <interface> [, <ineterface>]* ] 2004-02-11 22:13:39 +00:00
Zeev Suraski c5d842279c Reinstate early-binding for classes.
Note that this is available for downwards compatibility only - and it doesn't
work if you use new features (namely, interfaces).  Generally, people should
declare their classes before using them, but we just didn't want hell to break
loose (c)
2004-02-04 16:30:15 +00:00
Zeev Suraski 9e60cb553f Rewrote exception support. Fixes a few limitations and bugs in the old
implementation, and allows exceptions to 'fire' much earlier than before.

Instructions on how to use the new mechanism will follow on internals@
shortly...

Note - this (most probably) breaks the current implementation of
set_exception_handler()
2004-02-03 12:17:09 +00:00
Zeev Suraski 8e30d96ad8 Redesign the clone() feature to fix some fundamental flaws in the previous
implementation.

Using clone directly is now done using
$replica = clone $src;

Clone methods must now be declared as follows:
function __clone($that)
{
}

Clone methods in derived classes can call the __clone method of their parent
classes using parent::__clone($that)
2004-02-02 12:28:19 +00:00
Andi Gutmans ac5d5c7f35 - Re-allow conditional class declerations. Needless to say that I also
- think it's not great coding.. Use polymorphism instead :)
2004-01-11 19:37:15 +00:00
Andi Gutmans 6b87194bd9 - - A belated happy holidays (by two years) 2004-01-08 08:23:23 +00:00
Marcus Boerger 885eafac61 Fixed bug #26065 (Crash when nesting classes) 2003-12-27 22:59:49 +00:00
Andi Gutmans 535653ee8e - Nuke another rule (thanks to Jan for noticing this) 2003-12-19 14:39:17 +00:00
Andi Gutmans f9f19c99b3 - Nuke unused code 2003-12-19 13:35:42 +00:00
Andi Gutmans c0df450203 - Add E_STRICT, to be used to warn purists (like Jani :) 2003-11-18 09:25:04 +00:00
Andi Gutmans 530789987f - Head up! I'm reverting the patch which allows for expressions in constant
- declerations. Allowing the access of other constants in this code is
- flawed. We are reverting back to PHP 4's static scalars.
- Don't worry if you get the following msg when compiling:
- "zend_language_parser.y contains 3 useless nonterminals and 22 useless rules"
- I didn't nuke the code in case we have some brilliant ideas after beta 2
2003-10-28 23:44:23 +00:00
Andi Gutmans df033b58a0 - Nuke const in function parameters. I just can't remember why this exists
- and it seems no one else remembers either. It has no semantic meaning.
2003-10-19 08:38:48 +00:00
Zeev Suraski 2ab30d7133 Allow foo::$bar() 2003-10-09 13:44:44 +00:00
Zeev Suraski f8bbafd604 ntroduce infrastructure for supplying information about arguments,
including:

- Whether or not to pass by ref (replaces the old arg_types, with arg_info)
- Argument name (for future use, maybe introspection)
- Class/Interface name (for type hints)
- If a class/interface name is available, whether to allow a null instance

Both user and builtin functions share the same data structures.

To declare a builtin function that expects its first arg to be an instance
of class 'Person', its second argument as a regular arg, and its third by
reference, use:

ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0)
    ZEND_ARG_OBJ_INFO(0, someone, Person, 1)
    ZEND_ARG_PASS_INFO(0)
    ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();

and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family
of macros.

The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref.

The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat
the arguments for which there's no explicit information as pass by reference
or not.
The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
2003-08-03 17:40:44 +00:00
Zeev Suraski 03b6af07eb Support references in foreach()
Syntax:
  foreach ($arr as &$val)
  foreach ($arr as $key => &$val)
2003-07-24 12:38:33 +00:00
Zeev Suraski cbec89a358 Fix complex expressions for class names in NEW 2003-06-22 10:50:43 +00:00
Zeev Suraski f263aecc8e Simplify 2003-06-22 10:12:25 +00:00
Marcus Boerger c8bebdaf67 WS 2003-06-21 21:56:44 +00:00
Marcus Boerger 60c7abac61 Add final classes 2003-06-21 21:56:06 +00:00
Stanislav Malyshev 8cd9792375 Fix bug #23384 - static class::constant constants should now
work in static & array expressions.
2003-06-15 13:58:50 +00:00
James Cox f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Zeev Suraski 8d2a4e04ae Fix bogus implicit declarations of properties (squash bug #23671) 2003-06-09 13:51:53 +00:00
Stanislav Malyshev f7f5a5ea6b MEGA-patch: namespaces are R.I.P. 2003-06-02 12:13:11 +00:00