Re: [PHP-DEV] Adding "numeric" type hint

2015-04-29 Thread Nathan Bruer
This has been a big issue that I have ran into many times in the past for large framework projects, instead of building it out with "strict" types like: int, float, string, exc... It makes more sense to allow a user to define a psudo-type themselves which PHP will pass the arguments into to be "cle

Re: [PHP-DEV] Ten years estimated Plan to replace PHP’s inconsistent API

2015-03-23 Thread Nathan wesley
> > > i didn't mention any break or things. also many languages are different > > Yes you did. You just proposed removing large part of PHP API. That > would break things, there can be no confusion about it. I just agree with you. we shouldn't :) the old API will stay no one will ever remove it.

Re: [PHP-DEV] Ten years estimated Plan to replace PHP’s inconsistent API

2015-03-23 Thread Nathan wesley
> > Hi! > > > This makes an opportunity to replace the old API with object oriented one > > preventing any kind of BC break. > > > > But instead of using this as an extension because of some limitations > like > > “string”->startsWith(‘s’); the API should be bundled with the engine (not > > written

Re: [PHP-DEV] Ten years estimated Plan to replace PHP’s inconsistent API

2015-03-21 Thread Nathan wesley
> > I think that, while attractive, using the same syntax for object methods > and scalar 'pseudo-'methods is too ambiguous. We just need to solve two > issues : intuitive order of arguments and nested call readability. We don't > need to implement the whole OO stuff for scalars. Except this detail

Re: [PHP-DEV] Ten years estimated Plan to replace PHP’s inconsistent API

2015-03-21 Thread Nathan wesley
This shouldn't be for PHP 7.0 ofcourse it's too late. it takes a lot of work and we don't want to get it wrong the second time :) but in any release before PHP 8 On Sat, Mar 21, 2015 at 10:25 AM, Pierre Joye wrote: > > On Mar 21, 2015 2:15 PM, "Levi Morrison" wrote: > > > > > I know that many

Re: [PHP-DEV] Ten years estimated Plan to replace PHP’s inconsistent API

2015-03-21 Thread Nathan wesley
How you don't think this is so important ? i stated this because it's so predictable that someone will say it. Firstly why it's "fake" ? i prefer "elegant" maybe not the PERFECT solution ? i suggest that you compare the two choices. and what would you chose if you're a new comer. Secondly this is

[PHP-DEV] Ten years estimated Plan to replace PHP’s inconsistent API

2015-03-20 Thread Nathan wesley
I know that many people talked about this over and over. Why it’s not possible to change the old PHP API ? The answer is always because it will make HUGE BC breaks I’ve seen this wonderful idea about scalar objects authored by nikic github https://github.com/nikic/scalar_objects. This will

Re: [PHP-DEV] [VOTE][RFC] Closure::apply() (re-opening)

2014-08-21 Thread Nathan Bruer
I suppose calling it statically a user would probably want to recycle the same function/closure, so binding/calling it real time would have little impact if done properly. On Wed, Aug 20, 2014 at 2:30 PM, Levi Morrison wrote: > On Wed, Aug 20, 2014 at 11:51 AM, Nathan wrote: > >

Re: [PHP-DEV] [VOTE][RFC] Closure::apply() (re-opening)

2014-08-20 Thread Nathan
The only thing I'd suggest is like I said in the last email is to make the syntax more like Closure::bind(Closure $closure, object $newThis, [mixed $newScope = 'static']) and make it Closure::apply(mixed $newObjectOrScope [, mixed ... $parameters]) $newObjectOrScope would then allow a user to suppl

Re: [PHP-DEV] [VOTE][RFC] Closure::call()

2014-08-18 Thread Nathan
I will +1 this as I have had to deal with some of these struggles, as a suggestion though: "Like the bind(To) methods, a static class cannot be bound (using →call will fail)" I would like to see this function work like Closure::bind()/Closure::bindTo() and give the option for the $newScope option

RE: [PHP-DEV] Method check - Can someone create a RFC for it?

2013-03-20 Thread nathan
> Hi, > > I'd like to suggest a new functionality for PHP. I don't know the internals, and i can't create a patch implementing this. I'm writing here in case someone likes this idea and write a RFC. > > We've had a problem recently where one of our developers forgot an "if". > > So instead of wr

RE: [PHP-DEV] Could we kill call_user_func?

2013-03-18 Thread nathan
> Angel, > > On 18/03/13 14:04, Julien Pauli wrote: > > > Also, AFAIR, call_user_func() doesn't work with functions using > > > references in args. Julien.Pauli > > AFAIK it does. > > Do you have an example where it doesn't? > > > > It definitely does not: > > http://3v4l.org/C8Kme > > And if

RE: [PHP-DEV] Memory warning hook

2013-03-05 Thread nathan
>This is not the same at all. When are you going to run this code? Memory >allocations happen all the time. What Nathan asked for is an event that is >triggered when the memory consumption reaches a >threshold. > >However, there is a different solution, which is better I

[PHP-DEV] Memory warning hook

2013-03-05 Thread nathan
Thoughts? Thanks, Software Developer Nathan Bruer

RE: [PHP-DEV] [Reflection] Improve logic of ReflectionMethod->invokeArgs() for static methods

2013-01-31 Thread nathan
very time. but if the "ReflectionMethod::invokeArgs()" function would allow the first argument to be a string of class or the object itself it wants to bind too it would save a new closure from having to be created for every hook being executed. (Sorry for the long code, but I wanted

RE: [PHP-DEV] C# properties vs. accessors RFC

2013-01-23 Thread nathan
>Personally, I don't see why 'default' can't be used: >class Foo { >public $bar { get; set; default 5; } } > >This solves the var_dump() problem, and if people want dynamic get returning something other than the property/field value, so be it. >C# does indeed have an internal field per propert

RE: [PHP-DEV] __init magic method

2013-01-22 Thread nathan
can see is the visibility (public/private/protected) of the function as it'd likely need to be public because it could never be auto-executed if anything else. Software Developer Nathan Bruer -Original Message- From: Johannes Schlüter [mailto:johan...@php.net] Sent: Tuesday, Januar

RE: [PHP-DEV] new Class ReflectionZVal

2013-01-07 Thread nathan
From: Derick Rethans [mailto:der...@php.net] Sent: Monday, January 07, 2013 11:22 AM To: nat...@starin.biz Cc: internals@lists.php.net Subject: Re: [PHP-DEV] new Class ReflectionZVal On Mon, 7 Jan 2013, nat...@starin.biz wrote: >> function __construct(&$variable); > That's inherently flawed, as

[PHP-DEV] new Class ReflectionZVal

2013-01-07 Thread nathan
ructure (like stated above) to call it's own garbage collector every once in a while to clean up those ReflectionZVal objects by checking the result of ReflectionZVal:: valueExists (). Is there anything obvious (limitation wise) that I am missing or is this RFC'able? Software Developer Nathan Bruer

Re: [PHP-DEV] Object comparison

2012-11-09 Thread Nathan Nobbe
-1; })); I'd expect the > comparison there to be roughly equivalent to if(spl_object_hash($v1) > spl_object_hash($v2)), no? Info on the default behavior here would be nice. -nathan

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-09 Thread Nathan Bruer
what is proposed, but we are not developing for C# we are developing for PHP which has its own syntax rules that differ from C#'s and my vote is to follow PHP's already in existent syntax format. --- -Nathan Bruer -Original Message- From: ekne...@gmail.com [mailto:ekne...@gmai

Re: [PHP-DEV] Revisit: zend_call_method() - n number of arguments

2011-10-23 Thread Nathan Nobbe
On Sun, Oct 23, 2011 at 12:50 AM, Stas Malyshev wrote: > Hi! > > > On 10/22/11 2:36 AM, Nathan Nobbe wrote: > >> Hi, >> >> Another old issue I'd like to rehash with the upcoming release around the >> corner [1]. >> >> I patched 5.4 alpha2 fo

Re: [PHP-DEV] Revisit: Traits requiring composing class to implement interface

2011-10-22 Thread Nathan Nobbe
further for folks who are interested in some semblance of multiple inheritance. If it's a nightmare to implement internally maybe it's best left alone, but if it is straightforward I say implement it and let folks take on 'all the problems of multiple inheritance' if they wish to; everyone else can just laugh at them if they wish to. Isn't that the PHP way? [1] http://www.issociate.de/board/post/478936/Multiple_Inheritance.html thanks, -nathan

[PHP-DEV] Revisit: zend_call_method() - n number of arguments

2011-10-22 Thread Nathan Nobbe
php-internals&m=123493017101177&w=2 [2] http://pastebin.com/zygKe9Y5 thanks, -nathan

[PHP-DEV] Revisit: Traits requiring composing class to implement interface

2011-10-22 Thread Nathan Nobbe
[2] http://marc.info/?l=php-internals&m=129188077704898 thanks, -nathan

Re: [PHP-DEV] Local PHP docs with search facility

2011-06-02 Thread Nathan Nobbe
$ pear install phpdocs/pman > $ pman mysql_connect > > That'll show the mysql_connect() documentation as a local man page. > not to shabby ;) and to Richard's question about search the -K option may be just the ticket. -nathan

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-12 Thread Nathan Nobbe
es around "Trait expresses a requirement for > the composing class" would help, it seems like useful theory... not > convinced it's worth the trouble. If you see the value in the abstract keyword in abstract classes or moreover interfaces in general, I'd consider the value of this feature equal. Of course not everyone uses abstract classes or interfaces :D -nathan

Re: [PHP-DEV] Traits and Properties

2010-12-11 Thread Nathan Nobbe
methods as they pertain to traits. As I'm sure you know: Regarding visibility modifiers, why not carry them over from the trait directly, private in the trait definition results in private in the class definition. Lastly, I'm not sure why you would want to discourage this usage, I would plan on adding properties in traits myself. -nathan

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 2:42 PM, Matthew Weier O'Phinney < weierophin...@php.net> wrote: > On 2010-12-10, Nathan Nobbe wrote: > > --0016e6d7e101e083a4049714bad3 > > Content-Type: text/plain; charset=UTF-8 > > > > On Fri, Dec 10, 2010 at 12:55 PM, Ma

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 12:39 PM, Chad Fulton wrote: > On Fri, Dec 10, 2010 at 10:39 AM, Nathan Nobbe > wrote: > > On Fri, Dec 10, 2010 at 11:04 AM, Chad Fulton > wrote: > >> > >> On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe > >> wrote: >

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 12:55 PM, Matthew Weier O'Phinney < weierophin...@php.net> wrote: > On 2010-12-10, Nathan Nobbe wrote: > > --0016e6dbe7fb8861a1049712ad63 > > Content-Type: text/plain; charset=UTF-8 > > > > On Fri, Dec 10, 2010 at 11:04 AM, Chad Ful

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Fri, Dec 10, 2010 at 11:04 AM, Chad Fulton wrote: > On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe > wrote: > > On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstahl > wrote: > > > >> First i have to say that I am not a PHP internals developer, but as a > us

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
sed with to be of a certain type or implement a certain interface' for the trait to do its job. -nathan

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Nathan Nobbe
On Thu, Dec 9, 2010 at 4:04 PM, Stefan Marr wrote: > Hi Nathan: > > > On 09 Dec 2010, at 23:42, Nathan Nobbe wrote: > > What I'm getting at is the scenario when a trait is designed to be used > in > > concert with the class in which it is being used. In this ca

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-09 Thread Nathan Nobbe
On Thu, Dec 9, 2010 at 1:09 AM, Stefan Marr wrote: > Hi Nathan: > > On 09 Dec 2010, at 08:44, Nathan Nobbe wrote: > > > Hi, > > > > I think traits will lend themselves to frequent runtime checking against > the > > type of class in which they were u

[PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-08 Thread Nathan Nobbe
/ performance costly; is there something i'm missing? thx, -nathan

Re: [PHP-DEV] Project Management

2010-12-01 Thread Nathan Nobbe
than I ever did svn, and actually ran svn 1.5 for a while with their merge-tracking, which doesn't work correctly without proper user interaction read: --reintegrate .. I'm not a core php dev, but I have dealt w/ a lot of version control, and frankly moving to git from svn was an even better move than cvs to svn, no doubt about it. -nathan

[PHP-DEV] Proposed - Integrated inner iterator support for Iterator classes

2010-11-25 Thread Nathan Nobbe
convert the ArrayIterator to a new userspace class InnerArrayIterator or some such, which implements InnerIterator, before returning it. Your thoughts appreciated! -nathan

[PHP-DEV] Re: Revise callback Psuedo-type to support new Closure class ?

2010-11-24 Thread Nathan Nobbe
Ummm... never mind! Sorry for the noise! -nathan On Wed, Nov 24, 2010 at 11:00 AM, Nathan Nobbe wrote: > Hi all, > > I had a thought this morning and would like some feedback. Don't you think > it would make sense to allow the callback psuedo-type to also allow the new >

[PHP-DEV] Revise callback Psuedo-type to support new Closure class ?

2010-11-24 Thread Nathan Nobbe
. PHP_EOL; } $aNumbers = array(5, 4, 3, 2, 1); array_walk($aNumbers, $fClosure); ?> Thoughts ? -nathan

[PHP-DEV] Another question on traits

2010-11-17 Thread Nathan Nobbe
what I wonder about is will it still work if a class implements an interface and uses a trait which provides the functions in said interface? An explicit way to leverage traits in the inheritance tree... Is that accurate, or will that not work either? thx, -nathan

Re: [PHP-DEV] rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON

2010-11-01 Thread Nathan Rixham
Stan Vass wrote: It's amazing to me this has become such a long discussion. The facts are simple: 1) People don't ask for the other parse errors even half as often as they as for T_PAAMAYIM_NEKUDOTAYIM 2) They do so because it looks like gibberish to them, so it looks unlikely to be a common

Re: [PHP-DEV] Intermittent problem: can't write to properties of $this

2010-10-22 Thread Nathan Nobbe
nt, I don't have enough knowledge of the internals to continue > tracking this bug down. Any help would be appreciated. > Tim, this sounds much more like a typical userspace issue than an internals one. You might have better luck getting help if you start out on the php-general list. -nathan

[PHP-DEV] Using child classes/interfaces as desired type hints

2010-10-06 Thread Nathan Nobbe
function doStuff(AbstractServer $o) {} } your feedback appreciated, -nathan

Re: [PHP-DEV] Bug in 5.3 __invoke() magic method?

2010-09-29 Thread Nathan Nobbe
here, only a single identifier is allowed which would map to either a scalar or a function object and in the later case would be invokable. the implementation in php make sense to me now. thanks for your time, -nathan

[PHP-DEV] Bug in 5.3 __invoke() magic method?

2010-09-29 Thread Nathan Nobbe
. a = new A(); $this->a(); } } $a = new A(); $a(); $b = new B(); ?> Output: A Fatal error: Call to undefined method B::a() in /Users/quickshiftin/gitRepos/timberline/ct-rip/test-callable.php on line 17 Expected Output: A A thx, -nathan

Re: [PHP-DEV] inheritance check too strict?

2010-08-20 Thread Nathan Rixham
Jonathan Bond-Caron wrote: On Fri Aug 20 06:54 AM, Jean-Sébastien H. wrote: No it's wrong. A Child is a Parent so we must be able to pass a Parent to the method equals() defined on Child. The declaration of the parent functions must always be valid in the children. Maybe my OO theory is

Re: [PHP-DEV] inheritance check too strict?

2010-08-19 Thread Nathan Rixham
postmas...@colder.ch wrote: - "Nathan Rixham" wrote: class Point2DManager { public function distanceBetween( Point2D $p1 , Point2D $p2 ) {}; } class Point3DManager extends Point2DManager { public function distanceBetween( Point3D $p1 , Point3D $p2 ) {}; }

Re: [PHP-DEV] inheritance check too strict?

2010-08-19 Thread Nathan Rixham
Chris Stockton wrote: Hello, On Thu, Aug 19, 2010 at 12:33 PM, Nathan Rixham wrote: Guys, this is going a bit nuts, let's swap all the Foo and Bar's for a real example - Zeev I've copied the way you specified above. I think your misunderstanding his position. To summarize m

Re: [PHP-DEV] inheritance check too strict?

2010-08-19 Thread Nathan Rixham
tanceBetween( Point3D $p1 , Point3D $p2 ) {}; } class Point3DManager extends Point2DManager { // Child extends Parent public function distanceBetween( Point2D $p1 , Point2D $p2 ) {}; } You're saying that makes sense and is no problem? honestly? Best, Nathan ps: no offence / nothing p

Re: [PHP-DEV] inheritance check too strict?

2010-08-19 Thread Nathan Rixham
Johannes Schlüter wrote: On Thu, 2010-08-19 at 01:13 -0700, Stas Malyshev wrote: Hi! I was under the impression that, in order for inheritance to provide proper polymorphism, overridden methods should share the parent's method signature, although they can have additional optional arguments. Yo

Re: [PHP-DEV] SPKAC support for openssl in PHP

2010-05-18 Thread Nathan Rixham
mentioned there will be an ever increasing need for this in PHP once HTML5 takes off (due to the KEYGEN element which is widely supported already) and FOAF+SSL which as I mentioned will be going through standardisation in the near future. Best, Nathan Sriram Natarajan wrote: I am curious as to

[PHP-DEV] SPKAC support for openssl in PHP

2010-05-18 Thread Nathan Rixham
[2] and it get's much worse if you want to use x509 v3 extensions, you have to go through a nasty process of using a bash script to gen a custom openssl.conf on the fly to use in the SPKAC request. Best, Nathan [1] http://en.wikipedia.org/wiki/Spkac [2] http://lists.whatwg.org/pipe

Re: [PHP-DEV] Dots and spaces in variable names are converted to underscores.

2010-01-31 Thread Nathan Rixham
; > I can't think of any such character, but what with i18n of DNS records > and whatnot these days, I am woefully ignorant of what might be in the > keys. > > I put that into the RFC already. > Thanks Richard, I was struggling to get to time to write this up - all seems fine to me and just as discussed on-list. Thanks again, Nathan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Dots and spaces in variable names are converted to underscores.

2010-01-21 Thread Nathan Rixham
Alexey Zakhlestin wrote: > On 21.01.2010, at 18:21, Richard Lynch wrote: >> For BC, I suppose PHP could have *both* 'a.b' and 'a_b', or yet >> another php.ini flag (sorry!) to choose the behaviour. > > -1 from me. > I don't think we need to keep backward compatibility for this. PHP-6 is a > major

Re: [PHP-DEV] Dots and spaces in variable names are converted to underscores.

2010-01-21 Thread Nathan Rixham
Tim Starling wrote: > Stan Vassilev wrote: >> I hope PHP6 will remove this processing as register_globals will be >> completely removed at that point. > > I'd be happy if it stayed like it is, for backwards compatibility. Sometimes forwards compatibility has to take precedence though. Linked da

[PHP-DEV] Dots and spaces in variable names are converted to underscores.

2010-01-20 Thread Nathan Rixham
#x27;s most beneficial to use subject / predicate URIs (eg http://xmlns.com/foaf/0.1/mbox) as form input names. also worth noting that if you send: you'll receive the following in php: $_POST[a_b] => array('c.d' => val) note no conversion of c.d to c_d regards, Natha

Re: [PHP-DEV] autoloading and undefined class constants

2009-07-05 Thread Nathan Nobbe
onst = NonExistentClass::NON_EXISTENT_CONSTANT; > } > catch(Exception $e) > { > echo "never happens" . PHP_EOL; > } > ?> > > Will output: > > autoloading > caught > autoloading > caught > autoloading > PHP Fatal error: Undefine

Re: [PHP-DEV] autoloading and undefined class constants

2009-07-05 Thread Nathan Nobbe
ke, would blow up w/ a fatal on all my installations. id post on php-general about it, but im more curious to see what internals folks think about it. -nathan

Re: [PHP-DEV] need inverted __sleep?

2009-06-01 Thread Nathan Rixham
y)$this) , array($exclude) ); } again thanks, and apologies Matt! Regards, Nathan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] need inverted __sleep?

2009-05-31 Thread Nathan Rixham
>__sleep());' array(2) { [0]=> string(1) "a" [3]=> string(1) "d" } On May 31, 2009, at 8:46 PM, Nathan Rixham wrote: Matt Wilson wrote: get_class_vars + array_diff cheers but nope; as the manual says "Returns an associative array of default public

Re: [PHP-DEV] need inverted __sleep?

2009-05-31 Thread Nathan Rixham
Matt Wilson wrote: get_class_vars + array_diff cheers but nope; as the manual says "Returns an associative array of default public properties of the class" need private and inherited private On May 31, 2009, at 8:04 PM, Nathan Rixham wrote: Hi All, hoping somebody can help me

[PHP-DEV] need inverted __sleep?

2009-05-31 Thread Nathan Rixham
ies of the instance. the only way I can see to get all the properties of the instance is to serialize($this) then parse the string, but that's just wrong and what would sleep return on the first call to serialize. any help greatly appreciated. regards, nathan -- PHP Internals - PHP Runt

[PHP-DEV] Re: Why does $_REQUEST exist?

2009-05-14 Thread Nathan Rixham
Michael Shadle wrote: To me, it basically creates some laziness and reintroduces a vector on the register_globals issue. I've been using $_GET $_POST $_COOKIE $_SESSION $_SERVER etc. since they were introduced, and have never had any problems. Was there a reasoning behind making a variable that

Re: [PHP-DEV] non static function called as static one

2009-03-11 Thread Nathan Nobbe
http://www.php.net/manual/en/language.oop5.basic.php >> >> $this is a reference to the calling object (usually the object to which >> the method belongs, but can be another object, if the method is called >> statically <http://www.php.net/manual/en/language.oop5.static.

Re: [PHP-DEV] non static function called as static one

2009-03-11 Thread Nathan Nobbe
der php5 classes/objects -> "the basics": http://www.php.net/manual/en/language.oop5.basic.php $this is a reference to the calling object (usually the object to which the method belongs, but can be another object, if the method is called statically <http://www.php.net/manual/en/language.oop5.static.php> from the context of a secondary object). -nathan

Re: [PHP-DEV] Re: Adding a property to an object

2009-02-20 Thread Nathan Nobbe
ith my first extension. i dunno, ive not worked with a lot of C api's so far, but i think id probly have struggled getting started w/o the book. -nathan

Re: [PHP-DEV] Adding/Updating ZVal Arrays to Object

2009-02-20 Thread Nathan Nobbe
On Fri, Feb 20, 2009 at 3:02 PM, Matthew C. Rice wrote: > Nathan, > >Thanks a bunch. That was exactly what I was looking for. word > Is there any place you would consider a good resource to learn/get > documentation for these functions? my secret weapon, http:/

Re: [PHP-DEV] Adding/Updating ZVal Arrays to Object

2009-02-20 Thread Nathan Nobbe
yMacroCommand)#1 (2) { ["facade:protected"]=> string(0) "" ["subCommands:private"]=> array(1) { [0]=> string(10) "SubCommand" } } hope this helps, -nathan

Re: [PHP-DEV] zend_call_method() - support for up to 4 parameters

2009-02-19 Thread Nathan Nobbe
er to read on pastebin). http://pastebin.com/m4fd58822 im sure it could be tweaked, but i think the main point is using an array rather than va_list to support the varialbe arg list. is this any better than the first one ? thanks, -nathan

[PHP-DEV] zend_call_method() - support for up to n params - no va_list

2009-02-18 Thread Nathan Nobbe
ets all the objectives. . support for n parameters . no emalloc calls . no va_list usage . zend_call_method() backwards compatible (lesser extent) your feedback appreciated, -nathan (and i did the diff in the right direction this time :D) --- zend_interfaces.ORIG.c2009-02-17 20

Re: [PHP-DEV] zend_call_method() - support for up to 4 parameters

2009-02-18 Thread Nathan Nobbe
ing macros rather than zend_call_method directly it wouldnt be too bad right? -nathan

[PHP-DEV] zend_call_method() - support for up to 4 parameters

2009-02-17 Thread Nathan Nobbe
ch w/ no emalloc or va_list against the latest 5.3 snapshot. what do you think? -nathan --- zend_interfaces.c2009-02-17 20:50:35.0 -0700 +++ zend_interfaces.ORIG.c2009-02-17 20:24:47.0 -0700 @@ -31,7 +31,7 @@ /* {{{ zend_call_method Only returns the returned zval if re

Re: [PHP-DEV] New function proposal: spl_class_vars / params / contents

2009-01-21 Thread Nathan Rixham
Christian Schneider wrote: Nathan Rixham wrote: seems to me that many of the new requests coming in, including my own stupid ones are because people want to build fast decent orm's in php - Having built an ORM system myself I can say that you don't need Reflection (or even o

Re: [PHP-DEV] New function proposal: spl_class_vars / params / contents

2009-01-21 Thread Nathan Rixham
Christian Schneider wrote: Lukas Kahwe Smith wrote: On 21.01.2009, at 12:00, Karsten Dambekalns wrote: On 21.01.2009 11:44 Uhr, Kenan R Sulayman wrote: I did propose the function because the construction in user-land is quite expensive; Reflection is expensive, indeed. The way we solved it f

[PHP-DEV] Re: maybe we could all?

2009-01-19 Thread Nathan Rixham
Nathan Rixham wrote: Project: PHP Common Objects and Datatypes wrong list - forget; meant for general! sorry - having a good week - and it's monday. *sigh* -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] maybe we could all?

2009-01-19 Thread Nathan Rixham
Project: PHP Common Objects and Datatypes method: for everybody who wishes to contribute, and for everybody to review, discuss and work on the same classes. what are they: classes we can all use, that have been discussed, reviewed and agreed between many great developers around the world. t

Re: [PHP-DEV] Really Need..

2009-01-18 Thread Nathan Rixham
Robin Burchell wrote: On Sun, Jan 18, 2009 at 9:39 PM, Nathan Rixham wrote: I've reworded my original mail completely maybe this one will have more feedback (or not) question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class properti

Re: [PHP-DEV] Really Need..

2009-01-18 Thread Nathan Rixham
Hannes Magnusson wrote: On Sun, Jan 18, 2009 at 17:42, Lukas Kahwe Smith wrote: On 17.01.2009, at 18:06, Nathan Rixham wrote: a: Optional Static Typing I'm finding an ever increasingly need to be able to staticly type properties, parameters, return types etc (in classes) I know there is

Re: [PHP-DEV] Really Need..

2009-01-18 Thread Nathan Rixham
first off; had a rather in-depth (but lacking when it comes to internal input) over on the general list; has been interesting. Lukas Kahwe Smith wrote: On 17.01.2009, at 18:06, Nathan Rixham wrote: a: Optional Static Typing I'm finding an ever increasingly need to be able to staticly

[PHP-DEV] Really Need..

2009-01-17 Thread Nathan Rixham
was a c dev I'd do it myself.. infact even considered learning c just for this task) Regards, Nathan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: open_basedir .htaccess relative path problem -BUGor Expected?

2009-01-12 Thread Nathan Rixham
Nathan Rixham wrote: Jani Taskinen wrote: Nathan Rixham wrote: with php.ini/vhosts.conf open_basedir set these values in .htaccess WILL NOT work php_flag log_errors on php_value error_log logfile.txt these values in vhosts.conf WILL work php_flag log_errors on php_value error_log logfile.txt

Re: [PHP-DEV] Re: open_basedir .htaccess relative path problem -BUG or Expected?

2009-01-12 Thread Nathan Rixham
Jani Taskinen wrote: Nathan Rixham wrote: with php.ini/vhosts.conf open_basedir set these values in .htaccess WILL NOT work php_flag log_errors on php_value error_log logfile.txt these values in vhosts.conf WILL work php_flag log_errors on php_value error_log logfile.txt

[PHP-DEV] Re: open_basedir .htaccess relative path problem - BUG or Expected?

2009-01-12 Thread Nathan Rixham
Nathan Rixham wrote: Hi All, Figured this was for internals before opening up a bug report. In php 5.2.8 on windows and linux (only ones tested so far) when you add in a value to open_basedir in either php.ini or a vhosts.conf file; *relative* paths suddenly do not work for the php_value

[PHP-DEV] open_basedir .htaccess relative path problem - BUG or Expected?

2009-01-12 Thread Nathan Rixham
big or not before I submit? regards, Nathan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] christmas decorations..

2009-01-07 Thread Nathan Rixham
I just threw the christmas tree out, came online and noticed that the decorations are still up on the php.net site; any idea when they're coming down? ho-ho-ho etc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] display_errors = on

2009-01-06 Thread Nathan Rixham
Marco Tabini wrote: On 6-Jan-09, at 11:49 AM, Ilia Alshanetsky wrote: I'm ok with doing for 5.3, most people when upgrade rarely look at the INI file especially if the update is done through a distribution's package management system. Not to barge in, but many people won't consider 5.2 -> 5

Re: [PHP-DEV] display_errors = on

2009-01-06 Thread Nathan Rixham
Ilia Alshanetsky wrote: While I whole heartedly agree with the idea, I am not sure its a good thing to do in 5.2 branch. I'd like to hear more feedback on that topic before making the decision. The only mitigating factor is that it will only affect new users since upgrading the release does not

Re: [PHP-DEV] Q on Primitives

2008-12-19 Thread Nathan Rixham
Robin Burchell wrote: Hmm. How would it break it? By leaving 'function' to mean variant, it's only adding new functionality by overriding types to replace 'function', which should have no issue with older code, surely? To clarify: current method declaration: function foo() public static functi

Re: [PHP-DEV] Q on Primitives

2008-12-19 Thread Nathan Rixham
Robin Burchell wrote: Just a random thought I have from reading over that: Would it not be more 'natural' to change 'function' to indicate a method with a variant return type, and allow e.g. 'int somefunc()' instead of 'function (int) somefunc()' to indicate an int return? it would break all

Re: [PHP-DEV] Q on Primitives

2008-12-18 Thread Nathan Rixham
Nathan Rixham wrote: Dave Ingram wrote: Cristian Rodríguez wrote: class MyTestClass { public function blah(Foo $f); public function blah(Bar $b); public function blah($v); } Looks like you are using the wrong language, you need JAVA instead. Yes, I'll admit it does look

Re: [PHP-DEV] Q on Primitives

2008-12-18 Thread Nathan Rixham
Dave Ingram wrote: Cristian Rodríguez wrote: class MyTestClass { public function blah(Foo $f); public function blah(Bar $b); public function blah($v); } Looks like you are using the wrong language, you need JAVA instead. Yes, I'll admit it does look like Java (or any C++-like OO

Re: [PHP-DEV] Q on Primitives

2008-12-18 Thread Nathan Rixham
Dave Ingram wrote: I remember that multiple signatures was said to have a possible very difficult implementation. However, a similar behaviour can be achieved by some instanceof(). I thought it probably would be awkward, but we do already have some type hinting that can also be accomplis

Re: [PHP-DEV] Q on Primitives

2008-12-18 Thread Nathan Rixham
2008/12/18 Dave Ingram > > Also, what about this case: > > class MyTestClass { > public function blah(Foo $f); > public function blah(Bar $b); > public function blah($v); > } > > I would argue that the most specific function should be called, but how > costly would that be to determine? What i

Re: [PHP-DEV] Q on Primitives

2008-12-17 Thread Nathan Rixham
Graham Kelly wrote: Hi, I think the reason there aren't more primitive types in PHP is because of the nature of the language. One of the main features of PHP over say, C (and even Java), is that the memory managment is completely transparent to the devloper. This means that it really shouldent m

[PHP-DEV] Q on Primitives

2008-12-17 Thread Nathan Rixham
Don't want to take up much of you're time, just wondered if anybody could point me to the reason why some primitives aren't in php. Would find it very very useful to have byte, short, long, float, double and char in php. (primarily byte and char). while I'm here I may as well also ask about f

[PHP-DEV] Re: Clarifying the resolution rules

2008-10-28 Thread Nathan Rixham
Stan Vassilev | FM wrote: Opinions about how disruptive a mandatory backslash for global symbols *in namespaces* would be, are welcome. Keep in mind that making the backslash optional will lead to code breakage (such as for above drop-in replacements, class autoloading etc.) and slower perform

[PHP-DEV] Re: namespace separator and whining

2008-10-26 Thread Nathan Rixham
Greg Beaver wrote: Hi all, Let me make this brief: there will be lots of complaining about the namespace separator. Stop. Now. It serves no possible useful purpose. If you want to discuss why this was chosen or suggest alternatives, feel free to write me *off-list*. I would be more than hap

Re: [PHP-DEV] Destructor Order

2008-10-23 Thread Nathan Rixham
Jani Taskinen wrote: Nathan Rixham wrote: just to add it in; in ejb3 in java you have PostConstruct and PreDestroy which are pretty useful; maybe something along the same lines could be implemented in PHP? Or perhaps you should just stick with Java? just a suggestion for some useful

Re: [PHP-DEV] Destructor Order

2008-10-23 Thread Nathan Rixham
rder is the correct way to deal with that issue necessarily, but I think that's the sort of use case it's intended to address. just to add it in; in ejb3 in java you have PostConstruct and PreDestroy which are pretty useful; maybe something along the same lines could be im

  1   2   >