Commit Graph

522 Commits

Author SHA1 Message Date
Marcus Boerger
1e17ebe047 Put the code where it belongs - fixes a warning and confusion 2003-08-17 12:27:33 +00:00
Marcus Boerger
9c68f33b51 Implement a TBD: JMP to the end of foreach 2003-08-17 12:17:34 +00:00
Sascha Schumann
b29b4441db Restrict scope of inline functions to compile unit
Submitted by: Jason Greene <jason@inetgurus.net>
2003-08-15 21:02:35 +00:00
Marcus Boerger
de32c1de56 Fix ZTS 2003-08-04 19:57:53 +00:00
Stanislav Malyshev
a3dc90d8d0 use get_obj_zval_ptr 2003-08-04 10:30:42 +00:00
Stanislav Malyshev
4d51526350 Fix #24884 - clone $this 2003-08-04 09:10:52 +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
8b4bd4a8ec Clean up. extended_value can only contain either ZEND_UNSET_DIM or
ZEND_UNSET_OBJ.
2003-08-03 08:23:25 +00:00
Zeev Suraski
9d7122fb53 Generalize fetch_class 2003-08-03 08:21:08 +00:00
Marcus Boerger
4fa6eac1f8 Fix warning 2003-08-02 11:39:15 +00:00
Zeev Suraski
accd6b623b Finish the array overloading patch 2003-07-31 09:06:11 +00:00
Zeev Suraski
d95a6916de Cleanup 2003-07-31 08:24:55 +00:00
Andi Gutmans
8264eedc48 - Fix problem with hash when updating same bucket with data of different
sizes one after another.
- Fix number of arguments to read_dimension.
2003-07-30 19:47:39 +00:00
Zeev Suraski
68fa4e50f8 Get rid of an opcode 2003-07-30 17:49:27 +00:00
Zeev Suraski
f41f62c2ff Support overloading of $foo["bar"] += "baz" 2003-07-30 17:40:54 +00:00
Zeev Suraski
c0b46739ca Improve array overloading - support unset($foo["bar"]) 2003-07-30 17:12:06 +00:00
Stanislav Malyshev
1cc89effdb clean the right one 2003-07-27 14:02:46 +00:00
Stanislav Malyshev
9fa2d52310 make clone and throw coexist peacefully 2003-07-27 13:20:31 +00:00
Stanislav Malyshev
c3c136ea4b fix #24635: clean hash before putting into cache 2003-07-27 12:46:14 +00:00
Zeev Suraski
b54ae17904 Fix logic and comments in ASSIGN_DIM 2003-07-24 16:51:35 +00:00
Zeev Suraski
0610515703 Fix assignments to numeric array indices 2003-07-24 12:56:05 +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
e25d5e7f7a Fix binary safety in foreach() keys (fixes bug #24783) 2003-07-24 08:36:39 +00:00
Stanislav Malyshev
237116aa27 Remove namespace leftovers 2003-07-23 08:58:46 +00:00
Zeev Suraski
cf90932a05 Improve infrastructure of numeric handling of elements in symbol tables.
When you want to work with a symbol table, and you don't know whether you
have a numeric ("string that looks like a number") or a string element in
your hands, use zend_symtable_*() functions, in place of zend_hash_*()
functions.
2003-07-22 16:06:07 +00:00
Zeev Suraski
6a50660cfe Fix isset()/empty() for non-trivial object elements
(API change - read_property now accepts an extra element)
Fixes bug #24436
2003-07-22 13:49:33 +00:00
Zeev Suraski
754529920d Revert fix for #24729, and refix 2003-07-21 07:42:15 +00:00
Marcus Boerger
98963e3c75 Go with a better fix for #24729 2003-07-21 07:13:26 +00:00
Marcus Boerger
8ac334289a Bugfix #24729 = new ; causes crash when is not set 2003-07-20 20:45:59 +00:00
Marcus Boerger
7bbe6080f2 Fix uncloneable objetcs 2003-07-20 17:46:21 +00:00
Zeev Suraski
3a898f6d4e More cleanup for assign-op handling of objects 2003-07-16 08:57:08 +00:00
Zeev Suraski
d9fb6b672a initial refactoring for assign-op handling of objects 2003-07-08 11:52:21 +00:00
Zeev Suraski
3cfa6a68f4 Add get_dim callback 2003-07-07 10:53:27 +00:00
Zeev Suraski
ed97b9fb6e Fix naming convention 2003-07-07 10:47:25 +00:00
Derick Rethans
d16f0a6333 - Help Zeev fixing ghosts :) 2003-07-07 10:16:05 +00:00
Zeev Suraski
938c0fbc19 Initial support for overloading of array syntax for objects (very initial) 2003-07-07 09:00:36 +00:00
Stanislav Malyshev
8f0234160a enable Classname() constructor to be called via parent::__constructor() 2003-07-03 12:03:11 +00:00
Zeev Suraski
eb224d4a5f Throughly fix scoping change. Fixes, among other things, bug #24403 2003-07-02 17:48:18 +00:00
Zeev Suraski
d245c52e0c Fix for bug #22367.
Heads up - this will break syntactical compatiblity, return($foo) will
not work with functions that return references - return $foo should be used
instead.  It never worked well before, and caused all sorts of odd bugs.
It *might* be possible to support this specifically, albeit unlikely
2003-07-02 15:06:10 +00:00
Marcus Boerger
40dd3f4f88 __clone might not be defined 2003-07-01 21:30:21 +00:00
Marcus Boerger
a04cba504f Fix __clone visibility 2003-07-01 20:02:27 +00:00
Andi Gutmans
288dacca0c - ZE coding style requires if ( instead of if( 2003-06-30 20:22:35 +00:00
Zeev Suraski
53acb1814e Semantically it's a refcount increase, not a lock... 2003-06-30 13:51:48 +00:00
Zeev Suraski
6f9d0da2e5 Fix 'global' implementation (fixes, at least, bug #24396 2003-06-30 13:47:12 +00:00
Zeev Suraski
bc4c7c6a6d Fix crash :) 2003-06-23 22:14:38 +00:00
Stanislav Malyshev
c3fb1eac15 FIx leak 2003-06-23 14:48:59 +00:00
Zeev Suraski
cbec89a358 Fix complex expressions for class names in NEW 2003-06-22 10:50:43 +00:00
Stanislav Malyshev
b48a86581a no need to init zval - assignment will init 2003-06-16 15:43:40 +00:00
Stanislav Malyshev
f205abb3f8 Fix bug #22592 - cascading assignments to string offsets 2003-06-16 15:41:02 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00