Re: [PHP-DEV] Re: Patch: getters/setters syntax Implementation

2011-12-06 Thread Sebastian Krebs
Hi 2011/12/6 Rasmus Schultz > On Tue, Dec 6, 2011 at 3:45 AM, Christian Kaps >wrote: > > > Hi, > > > > I also find this syntax confusing and I think it has a huge WTF factor. > > > > Some thoughts about the syntax: > > - At the first glance, it isn't clear which visibility the getter or > > set

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-22 Thread Sebastian Krebs
2011/12/22 Dmitri Snytkine > The return type hinting is probably the biggest thing happening in php in a > long time. > Is this too good to be true? > > With return type hinting I can see a huge improvenets in php IDEs in > spotting errors. Also it will be much easier to auto generate wsdl files

Re: [PHP-DEV] Re: internals Digest 4 Feb 2012 09:08:29 -0000 Issue 2549

2012-02-04 Thread Sebastian Krebs
Hi, Am 04.02.2012 19:13, schrieb Clint M Priest: -Original Message- From: Rasmus Schultz [mailto:ras...@mindplay.dk] Sent: Saturday, February 04, 2012 10:01 AM To: internals@lists.php.net Subject: [PHP-DEV] Re: internals Digest 4 Feb 2012 09:08:29 - Issue 2549 Why can't the read-

Re: [PHP-DEV] [RFC] Enum proposal (yet another)

2012-02-22 Thread Sebastian Krebs
2012/2/22 Charlie Somerville > Right, but enums could possibly be a lot richer than class constants are > now. > > They could be a type where the only values are what's defined in the enum. > This could be used with type hinting: > >enum Foo { >A, >B, >C >} > >

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-22 Thread Sebastian Krebs
Hi, Am 22.02.2012 20:04, schrieb Larry Garfield: On 2/22/12 12:37 PM, Peter Lind wrote: I would also support this. There's a myriad reasons why something may return NULL or FALSE when you expect it to return an object, some of them even legitimate. Any function/method whose documentation line

Re: [PHP-DEV] [RFC] Enum proposal (yet another)

2012-02-22 Thread Sebastian Krebs
Am 22.02.2012 22:22, schrieb Ángel González: On 22/02/12 09:37, Sebastian Krebs wrote: class MyEnum { const FOO = 'foo'; const BAR = 'bar'; private $value; public function __construct ($value) { if (!in_array($value, array(self::FOO, s

Re: [PHP-DEV] [RFC] Enum proposal (yet another)

2012-02-23 Thread Sebastian Krebs
Am 23.02.2012 20:01, schrieb Ángel González: On 23/02/12 00:09, Stas Malyshev wrote: Hi! Sidenote, according your examples above on how you want call functions: Considered using normal constants? How can I do type hinting with them? You should not. PHP is not a strictly typed language, so i

Re: [PHP-DEV] [RFC] Enum proposal (yet another)

2012-02-23 Thread Sebastian Krebs
Am 23.02.2012 21:21, schrieb Ángel González: I don't see your point, Sebastian. And | $studipNamedVariable = Databases::Mysql; | // ... much code | database_select($stupidNamedVariable, $sql); is better? The problem here seems to be more the developer, that avoids the use of constants, then l

Re: [PHP-DEV] New Feature: Fully qualified class name resolution as scalar with class keyword

2012-04-14 Thread Sebastian Krebs
Am 14.04.2012 23:14, schrieb Marco Pivetta: I used to implement `public static function getClass() { return get_called_class(); }`, so I really like this one, makes it also easier for IDEs when refactoring code :) I was wondering about `class A { const CLASS = 'hello'; }` but that would cause an

Re: [PHP-DEV] Function boolval()

2012-04-28 Thread Sebastian Krebs
Am 28.04.2012 06:27, schrieb Kalle Sommer Nielsen: Hi 2012/4/27 Jille Timmermans: Hi, I suggest we add a function boolval(). It simply converts the given argument to a boolean, like strval(), intval() and floatval(). I already have an implementation ready[1]. Why? * It is missing in the curre

Re: [PHP-DEV] readfile() memory usage

2012-05-11 Thread Sebastian Krebs
Hi, 2012/5/11 Simon Schick > Hi, Everyone > > FYI: If you just want to check something before serving a file to the > client, you can also use something called xsendfile. > > Apache: https://tn123.org/mod_xsendfile/ > lighttpd: It's build in :) > nginx: http://wiki.nginx.org/XSendfile It's nam

Re: [PHP-DEV] Resume keyword

2012-06-21 Thread Sebastian Krebs
2012/6/20 Michael Morris > [/snip] > > An example for additional clarity. > > set_exception_handler(function ($e) { > echo $e->getMessage(); > // Don't know if this is correct - but should be able to illustrate here > if ($e->getCode() == E_NOTICE & E_STRICT) { >resume null; > } > > echo

Re: [PHP-DEV] List comprehensions and generator expressions for PHP

2012-06-28 Thread Sebastian Krebs
Hi, Whats the difference to the (already existing) function array_map() (except the syntax and one more new keyword)? > $firstNames = array_map(function($user){return $user->firstname;}, $users); Don't want to rewrite every example you gave, but you probably see my point. Regards, Sebastian 20

Re: [PHP-DEV] List comprehensions and generator expressions for PHP

2012-06-28 Thread Sebastian Krebs
Regards, Sebastian > > David > > > On 28/06/2012, at 10:43 PM, Sebastian Krebs wrote: > > > Hi, > > > > Whats the difference to the (already existing) function array_map() > (except > > the syntax and one more new keyword)? > > > >>

Re: [PHP-DEV] Make try/catch brackets optinal

2012-07-19 Thread Sebastian Krebs
Hi, 2012/7/19 Paul Dragoonis > Why is your try block only going to contain 1 line, and that's > throwing an exception?? > > try > throw new Exception('foobar'); > catch(Exception $e) > > > Braces are a good thing, they give structure and stop people from > mis-reading things and writing bugs, th

Re: [PHP-DEV] Make try/catch brackets optinal

2012-07-19 Thread Sebastian Krebs
2012/7/19 Rafael Dohms > On Thu, Jul 19, 2012 at 12:03 PM, Charlie Somerville < > char...@charliesomerville.com> wrote: > > > This has code readability problem written all over it. When maintaining > it > > also has problems, like with the bracket-less if's. > > You would need to add brackets if

Re: [PHP-DEV] [RFC] Supports 'finally' keyword for PHP exceptions

2012-07-24 Thread Sebastian Krebs
Hi, What should a return value in 'finally' mean? Regards, Sebastian 2012/7/24 Rafael Kassner > Thanks Laruence. > > If I perform something like this: > > function test() { > try { > return 2; > } catch (Exception $e) { > } finally { > return 3; > } > } > > What

[PHP-DEV] [RFC] Supports 'finally' keyword for PHP exceptions

2012-07-24 Thread Sebastian Krebs
Sorry ... to the list instead. -- Forwarded message -- From: Sebastian Krebs Date: 2012/7/24 Subject: Re: [PHP-DEV] [RFC] Supports 'finally' keyword for PHP exceptions To: Laruence Hi, 2012/7/24 Laruence > On Tue, Jul 24, 2012 at 7:41 PM, Alexey Zakhle

Re: [PHP-DEV] Inline typecasting / typehinting for classes and interfaces

2012-08-15 Thread Sebastian Krebs
2012/8/15 Stan Vass > But "variable" typehints >> don't serve any such purpose. Actually, one could even say that they >> don't serve *any* purpose, short of providing the IDE with type >> information, because your code would work just as well even without >> the type check. If the type were wron

Re: [PHP-DEV] Proposal: use SomeClass::staticMethod

2012-08-15 Thread Sebastian Krebs
Hi, because it fits into the context (even if it's slightly offtopic): Can I throw in, that I would like to see autoloading for functions? :) Regards, Sebastian 2012/8/15 Nikita Popov > On Wed, Aug 15, 2012 at 12:59 PM, Giedrius Dubinskas > wrote: > > Hello Internals! > > > > I'm just on and

Re: [PHP-DEV] Proposal: use SomeClass::staticMethod

2012-08-15 Thread Sebastian Krebs
2012/8/15 Giedrius Dubinskas > On Wed, Aug 15, 2012 at 2:19 PM, Yahav Gindi Bar > wrote: > > On Wed, Aug 15, 2012 at 2:09 PM, Paul Dragoonis > wrote: > >> > >> Comments inline. > >> > >> On Wed, Aug 15, 2012 at 11:59 AM, Giedrius Dubinskas > >> wrote: > >> > Hello Internals! > >> > > >> > I'm

Re: [PHP-DEV] Proposal: use SomeClass::staticMethod

2012-08-15 Thread Sebastian Krebs
t; Giedrius Dubinskas > > On Wed, Aug 15, 2012 at 2:26 PM, Sebastian Krebs > wrote: > > Hi, > > > > because it fits into the context (even if it's slightly offtopic): Can I > > throw in, that I would like to see autoloading for functions? :) > > > &g

Re: [PHP-DEV] Proposal: use SomeClass::staticMethod

2012-08-16 Thread Sebastian Krebs
2012/8/15 Giedrius Dubinskas > On Wed, Aug 15, 2012 at 4:54 PM, Sebastian Krebs > wrote: > > 2012/8/15 Giedrius Dubinskas > > > >> On Wed, Aug 15, 2012 at 2:19 PM, Yahav Gindi Bar > >> wrote: > >> > On Wed, Aug 15, 2012 at 2:09 PM, Paul Dragoo

Re: [PHP-DEV] Inline typecasting / typehinting for classes and interfaces

2012-08-16 Thread Sebastian Krebs
Hi, after reading this mail: Is it just me or is a userspace implementation really that trivial? function ensure($object, $class) { if ($object instanceof $class) { return $object; } throw new InvalidArgumentException(sprintf('Object is not of type %s', $class)); } And then in

[PHP-DEV] Combined assignment operator for short ternary

2012-08-17 Thread Sebastian Krebs
Hi, Don't know, how complicated this is (and also someone (not me) must implement it, because I can't :X), but to be in sync with the operators the short ternary operator should be usable in conjunction with the assignment like the other binary operators. Don't know, if anybody understands me

Re: [PHP-DEV] Combined assignment operator for short ternary

2012-08-19 Thread Sebastian Krebs
Am 19.08.2012 00:20, schrieb Andrew Faulds: On 18/08/12 03:36, Tjerk Meesters wrote: Sent from my iPhone On 18 Aug, 2012, at 5:41 AM, Sebastian Krebs wrote: Hi, Don't know, how complicated this is (and also someone (not me) must implement it, because I can't :X), but to be in

Re: [PHP-DEV] re: removing an item from an array

2012-08-20 Thread Sebastian Krebs
Am 20.08.2012 19:00, schrieb Andrew Faulds: On 20/08/12 17:47, Herman Radtke wrote: May be we should have something like array_delete_if($array, function($v, $k=null) { if ($v == 300) return true; }) So array_filter? I'll use it or like for deleting, but the point of this thread is "intuitiv

Re: [PHP-DEV] Official Userland Library (was: removing an item from an array)

2012-08-21 Thread Sebastian Krebs
Hi, Nice to see my name not only in my signature ;) I've not much to say right now, but what you wrote was slightly in my mind, when I wrote the other mail. I'll keep an eye on it (at least ;)). Regards, Sebastian 2012/8/20 Lars Schultz > Am 20.08.2012 19:43, schrieb Se

Re: [PHP-DEV] Official Userland Library (was: removing an item from an array)

2012-08-21 Thread Sebastian Krebs
2012/8/21 Andrew Faulds > On 21/08/12 21:44, Lars Schultz wrote: > >> Am 20.08.2012 22:51, schrieb Andrew Faulds: >> >>> On 20/08/12 21:43, Lars Schultz wrote: >>> It's a ridiculous argument, IMO. Nothing you could add to core couldn't >>> be implemented in userland code somehow. (yes, that's hyp

Re: [PHP-DEV] Official Userland Library (was: removing an item from an array)

2012-08-22 Thread Sebastian Krebs
p the Userland Standard Library with the > PHP distribution. > With Composer (again ;)) every project defines the dependencies themself, thus no additional distribution required. > > -- > Christoph Hochstrasser > > ❖ http://twitter.com/hochchristoph ❖ http://christophh.net ❖ > https://git

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-23 Thread Sebastian Krebs
Hi, From my users point of view: I would like to see it. Maybe not in this implementation/syntax, especially because it hasn't a special syntax (but imo it should to make the impact more obvious/prominent). With the joint points as string and the common function call I can imagine it can get

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-23 Thread Sebastian Krebs
cept, but I'm afraid, that it could lead to scary construction, where noone can trace, what happens when and why. Also as I mentioned I don't even have any better idea ;) Regards, Sebastian > > 2012/8/23 Sebastian Krebs > >> Hi, >> >> From my users point of vi

[PHP-DEV] Re: Combined assignment operator for short ternary

2012-08-24 Thread Sebastian Krebs
= 'bar'; would trigger a notice like | $foo['xy'] = $foo['xy'] ?: 'bar'; would do. Regards, Sebastian Am 17.08.2012 23:41, schrieb Sebastian Krebs: Hi, Don't know, how complicated this is (and also someone (not me) must implement it, because I can&#

Re: [PHP-DEV] Combined assignment operator for short ternary

2012-08-24 Thread Sebastian Krebs
Am 24.08.2012 23:11, schrieb Ferenc Kovacs: On Fri, Aug 17, 2012 at 11:41 PM, Sebastian Krebs mailto:krebs@gmail.com>> wrote: Hi, Don't know, how complicated this is (and also someone (not me) must implement it, because I can't :X), but to be in sync with t

Re: [PHP-DEV] Re: Combined assignment operator for short ternary

2012-08-24 Thread Sebastian Krebs
Am 25.08.2012 01:00, schrieb Stas Malyshev: Hi! To point that out: I _don't_ want to change the behaviour, which means | $foo['xy'] ?:= 'bar'; would trigger a notice like | $foo['xy'] = $foo['xy'] ?: 'bar'; Then I personally don't see much point in it. Saving a couple of keystrokes IMHO is

Re: [PHP-DEV] Combined assignment operator for short ternary

2012-08-25 Thread Sebastian Krebs
Am 25.08.2012 18:38, schrieb Ferenc Kovacs: would this trigger a notice if $foo is not defined? if yes, then it would be different from the current behavior of the ternary operator. Couldn't believe it, thus I tested it myself snip Don't know, what you are ta

Re: [PHP-DEV] Re: Combined assignment operator for short ternary

2012-08-25 Thread Sebastian Krebs
Am 25.08.2012 01:53, schrieb Nikita Popov: On Sat, Aug 25, 2012 at 1:49 AM, Sebastian Krebs wrote: Hi, It's like with any other compound operator: A _real_ reason isn't there. But saying "It's not worth it" is something I can live with (even if I don't know

Re: [PHP-DEV] Combined assignment operator for short ternary

2012-08-25 Thread Sebastian Krebs
Am 26.08.2012 01:57, schrieb Ferenc Kovacs: > So you are saying that your (teams) IDE doesn't tell you the method > signature which contains also the default values? > I guess that the fact that many of the php core functions have optional > arguments and non null default

Re: [PHP-DEV] PHP build-in HTTP server and the HEAD method

2012-09-12 Thread Sebastian Krebs
Hi, As far as I can see everything works as expected: Because HEAD-requests should not send any content, you don't get any. Regards, Sebastian 2012/9/12 Ivan Enderlin @ Hoa > Hello, > > It is probably me but it seems like the build-in HTTP server does not well > support the HEAD method. Here i

Re: [PHP-DEV] [RFC] Abstract final classes

2014-11-27 Thread Sebastian Krebs
Hi, 2014-11-27 4:47 GMT+01:00 guilhermebla...@gmail.com < guilhermebla...@gmail.com>: > Hi, > > I worked on an implementation of a somehow controversial concept that > exists in hack and C#: abstract final classes. > > https://wiki.php.net/rfc/abstract_final_class > > The example is a little bi

Re: [PHP-DEV] New function: spl_object_id() or spl_object_handle()

2014-11-28 Thread Sebastian Krebs
2014-11-28 2:13 GMT+01:00 Bostjan Skufca : > Hello everyone, > > this is a proposal to add new function to PHP core: spl_object_id() > > > The story: > > Recently I was debugging some larger libraries and sorely missed a function > that would return an object ID. A function called spl_obj

Re: [PHP-DEV] an configure option to "enable-all"

2012-09-16 Thread Sebastian Krebs
Am 16.09.2012 22:20, schrieb Hannes Magnusson: On Sun, Sep 16, 2012 at 8:50 PM, Michael Felt wrote: Hi. My apologies if I missed an "obvious clue" somewhere, but I am looking for a configure option to enable nearly everything - to be supplemented by select disable statements. In the past I hav

Re: [PHP-DEV] an configure option to "enable-all"

2012-09-17 Thread Sebastian Krebs
2012/9/17 jpauli > > > > I'm confused.. --enable-all is already supported, just like > --disable-all ? > > > > -Hannes > > AFAIR no :) We have a --disable-all , but no --enable-all. > > I'm +1 to add such an option if possible :) > > Julien.P > I don't like the idea, because once --enable-all is

Re: [PHP-DEV] Re: RFC: Implementing a core anti-XSS escaping class

2012-09-18 Thread Sebastian Krebs
2012/9/19 Tomas Creemers > Hi all, > > > > If this is going to be implemented as a class, what is the advantage > of instantiation for this? Unless I'm missing it, I would propose that > the functions are made static. > > In other words, I would prefer this: > > echo Escaper::escapeHtml('test');

Re: [PHP-DEV] RFC: alternative callback syntax

2012-09-18 Thread Sebastian Krebs
2012/9/19 Steve Clay > Hello, > > https://wiki.php.net/rfc/**alternative_callback_syntaxis > a proposal for a simple alternative syntax for creating function > callbacks. > > The basics: Given a function/method call, replace the argument list

Re: [PHP-DEV] Re: RFC: Implementing a core anti-XSS escaping class

2012-09-19 Thread Sebastian Krebs
2012/9/19 Tomas Creemers > On Wed, Sep 19, 2012 at 8:34 AM, Sebastian Krebs > wrote: > > > > > > 2012/9/19 Tomas Creemers > >> > >> Hi all, > >> > >> > >> > >> If this is going to be implemented as a class, what i

Re: [PHP-DEV] Re: RFC: Implementing a core anti-XSS escaping class

2012-09-19 Thread Sebastian Krebs
2012/9/19 Tomas Creemers > On Wed, Sep 19, 2012 at 8:34 AM, Sebastian Krebs > wrote: > > > > > > 2012/9/19 Tomas Creemers > >> > >> Hi all, > >> > >> > >> > >> If this is going to be implemented as a class, what i

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

2012-10-09 Thread Sebastian Krebs
2012/10/9 Christian Kaps > Hi, > > typehinting should definitely be available for this feature. But I have > another question. Why not go more consistent with the rest of the language? > I have mentioned this previously as the first proposal comes up on the > list. In my opinion the AS3 getter an

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

2012-10-11 Thread Sebastian Krebs
2012/10/11 Clint Priest > Why is everyone so dead set against read-only and write-only? > my opinion 1. public read-only $hours { get { /* .. */ } set { /* .. */ } } And now? That this is even possible is reason enough for me. Especially now the engine must take care about this incon

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

2012-10-11 Thread Sebastian Krebs
2012/10/11 Clint Priest > Rather than go to the trouble of finding a reasonable way to hold a vote > on these issues, is there anyone against the following changes: > > 1) Eliminate the ability for an accessor to be called via > $o->__getHours(), the accessor functions will be completely unavaila

Re: [PHP-DEV] Changing the default value of "true" for CURLOPT_SSL_VERIFYHOST

2012-10-25 Thread Sebastian Krebs
2012/10/25 crankypuss > On 10/24/2012 11:34 PM, Sherif Ramadan wrote: > >> On Thu, Oct 25, 2012 at 1:03 AM, JJ wrote: >> >>> Hey all - I'd like start a discussion around pull request 221 >>> (https://github.com/php/php-**src/pull/221 >>> ). >>> >>> In sho

Re: [PHP-DEV] Re: [PHP-WEBMASTER] Why isn't `spl_autoload` called for functions?

2012-11-05 Thread Sebastian Krebs
2012/11/5 Peter Cowburn > Pushing to internals list. > > On 5 November 2012 20:41, Levi Morrison wrote: > > I hear people complaining about this out in user-land all the time, but > > I've never seen anyone from internals respond. With practically everyone > > using an autoloader these days, it

Re: [PHP-DEV] Re: [PHP-WEBMASTER] Why isn't `spl_autoload` called for functions?

2012-11-06 Thread Sebastian Krebs
2012/11/6 Laupretre François > > I've asked this question for a while (one, or two years ago or so). > > Must say, that I didn't remember the answer, but I would like to see > > autoloading for namespace-constants and functions too :) > > I proposed extending the autoload mechanism to functions a

Re: [PHP-DEV] Re: [PHP-WEBMASTER] Why isn't `spl_autoload` called for functions?

2012-11-07 Thread Sebastian Krebs
2012/11/7 Laupretre François > > De : sebastian.krebs.ber...@gmail.com > > > I hope you find more support on this than I had. Technically > > speaking, > > > it would be easy to extend autoloading to functions and constants. It > > > can even be done without BC breaks, combining 'old-style' and '

Re: [PHP-DEV] [RFC] Implement a LoggerInterface to PHP

2012-11-08 Thread Sebastian Krebs
2012/11/8 Anthony Ferrara > Florin, > > On Thu, Nov 8, 2012 at 6:42 AM, Florin Razvan Patan > wrote: > > > Hello, > > > > > > After a talk on the Symfony framework here: > > https://github.com/symfony/symfony/issues/5911 > > Long story short, the point that @Seldaek suggestion to have a common >

Re: [PHP-DEV] Object comparison

2012-11-09 Thread Sebastian Krebs
Hi, Maybe it goes way to far, but there is a PECL-extension [1], that allows to overload every(?) operator. However, it seems to be unmaintained for 6 years now and will probably not work anymore, but it may be usable as a starting point. Python provides this too [2] Regards, Sebastian [1] http

Re: [PHP-DEV] Autoload Functions RFC in 5.5?

2012-11-10 Thread Sebastian Krebs
2012/11/10 Laupretre François > Given the strong opposition of core devs against this feature in the past, > I want a vote on the RFC before I start working on a patch. > > Before this vote can take place, as you note, we need to solve the > function fallback issue: in theory, we should call the

Re: [PHP-DEV] Autoload Functions RFC in 5.5?

2012-11-11 Thread Sebastian Krebs
2012/11/11 Patrick E. > Hi, > > > use My\Math > > Math\sin(); > > very intuitive. > And it would be a bit like Python Modules, > where you import symbols (including "global" variables of the module) > of modules: > > import math > print math.sin(math.pi) > > Const autoload would also make sense,

Re: [PHP-DEV] RFC: ext/mysql deprecation

2012-11-20 Thread Sebastian Krebs
2012/11/20 Lester Caine > Pierre Joye wrote: > >> https://www.google.de/search?**q=php+mysqli+tutorial >> > Which gives About 273,000 results and the first of them are causing more > confusion with PDO alternative. > > BUT newcomers know nothing

Re: [PHP-DEV] DateTime::modify('now') is ignored, why?

2012-11-26 Thread Sebastian Krebs
2012/11/26 Ivan Enderlin @ Hoa > Hi internals, > > I would to modify a \DateTime object to the current time, thus I wrote > this: > > $d = new \DateTime('+1 hour'); > $d->modify('now'); > > It did not work. Why? Because the documentation (http://php.net/datetime.* > *formats.relative

Re: [PHP-DEV] Improve DateTime Class

2012-12-10 Thread Sebastian Krebs
Hi, are you mabe just looking for $date->add(new DateInterval('P15D')); ? 2012/12/10 Christian Stoller > Hi internals, > > what do you think about improving the modification functionality of the > DateTime class. I always get a cold shiver, when I write something like > this: > $date = new

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Sebastian Krebs
2013/1/6 Yahav Gindi Bar > On Mon, Jan 7, 2013 at 12:41 AM, Marco Pivetta wrote: > > > > > I think that our work is to isolate each annotation so it'll be easy to > >> access, then, it'll be easy enough to write the code that creates > "complex > >> annotations", such as constructors and so on,

Re: [PHP-DEV] FW: Functionality request/proposal

2013-01-14 Thread Sebastian Krebs
2013/1/14 Johannes Schlüter > On Mon, 2013-01-14 at 04:10 +, Paulo Henrique Torrens wrote: > > Hi, > > > > I'm currently interested in two features I'd like to see in PHP; how do > I proceed to request/propose them? I'd be glad to help implementing them as > well, if necessary. > > > > > > On

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

2013-01-14 Thread Sebastian Krebs
2013/1/14 Alexander Lissachenko > Hi! It's my first letter here ) > > I want to suggest a small improvement for ReflectionMethod->invoke() > and ReflectionMethod->invokeArgs() methods to support LSB for > overridden static methods. Currently, for invoking static methods > first argument should be

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

2013-01-14 Thread Sebastian Krebs
h 2 lines more comments). Also I don't know, what you mean by "call this method somewhere in the closure"; which closure?!? I guess you are in fact looking for regular instance methods. > > 2013/1/14 Sebastian Krebs : > > > > > > > > 2013/1/14

Re: [PHP-DEV] [VOTE] Property Accessors for 5.5

2013-01-22 Thread Sebastian Krebs
2013/1/22 Lester Caine > Clint Priest wrote: > >> There seems to be a lot of userland support for this proposal from people >> who >> don't have voting rights. >> > > And what about the userland people who don't want the additional > complexity who don't have voting rights? Don't use it. Regard

Re: [PHP-DEV] HEADS UP: Upcoming Feature Freeze for PHP 5.5.0

2013-01-25 Thread Sebastian Krebs
2013/1/25 Thomas Bley > > One thing I can guarantee is that if we add it to core in its current > > condition it will delay 5.5 by 6+ months if not longer. > > I think it is fine if APC doesn't support all features of PHP. When > there is a clear documentation, everybody can decide if he skips so

Re: [PHP-DEV] I think that "Function naming inconsistency" bug deservers more attention

2013-01-25 Thread Sebastian Krebs
2013/1/25 Pierre Joye > hi, > > On Fri, Jan 25, 2013 at 3:37 PM, Martin Keckeis > wrote: > > Hello, > > > > you are right Damian. > > > > Also today on a german page: > > > http://it-republik.de/php/news/Machen-wir-das-Namensschema-der-PHP-Funktionen-einheitlich%21-066539.html > > > > Relating t

Re: [PHP-DEV] Proposal: php://memory/ (& ://temp/)

2013-01-31 Thread Sebastian Krebs
2013/1/31 Chris Wright > > I propose the following syntax: > > > > php://memory/ > > php://temp//maxmemory: > > I would very much like to see this as well. > > Would this also allow you to open multiple pointers to the same bucket? > > For example would this work? > > > $fp = fopen('ph

Re: [PHP-DEV] Proposal: php://memory/ (& ://temp/)

2013-01-31 Thread Sebastian Krebs
2013/1/31 Ivan Enderlin @ Hoa > > On 31/01/13 12:00, Sebastian Krebs wrote: > >> 2013/1/31 Chris Wright >> >> I propose the following syntax: >>>> >>>> php://memory/ >>>> php://temp//maxmemory:<**size> >>>&

Re: [PHP-DEV] (non)growing memory while creating anoymous functions via eval()

2013-02-03 Thread Sebastian Krebs
2013/2/3 Sebastian Bergmann > Am 03.02.2013 18:07, schrieb Sebastian Bergmann: > > Can you explain why you are using eval() instead of a real anonymous > > function? Thanks! > > Please ignore my email; I mixed up create_function() and eval(). Then > again, your code still does not make sense to

Re: [PHP-DEV] RFC mysqlnd.localhost_override

2013-02-12 Thread Sebastian Krebs
2013/2/12 Asbjørn Sannes > > https://wiki.php.net/rfc/**mysqlnd_localhost_override > > I propose we introduce a new option called mysqlnd.localhost_override > which enables a system administrator or php distributor to configure how > localhost

Re: [PHP-DEV] File system watcher/monitoring

2013-02-14 Thread Sebastian Krebs
2013/2/14 Ivan Enderlin @ Hoa > Hello Julien, > > > On 14/02/13 15:29, Julien Pauli wrote: > >> On Thu, Feb 14, 2013 at 3:03 PM, Ivan Enderlin @ Hoa < >> ivan.ender...@hoa-project.net> wrote: >> >> Hi internal, >>> >>> A missing feature in PHP is a file system watcher/monitoring available >>> fo

Re: [PHP-DEV] File system watcher/monitoring

2013-02-15 Thread Sebastian Krebs
2013/2/15 Ivan Enderlin @ Hoa > On 15/02/13 14:20, Sebastian Krebs wrote: > >> 2013/2/15 Ivan Enderlin @ Hoa >> >> Hi Stas, >>> >>> >>> On 14/02/13 22:37, Stas Malyshev wrote: >>> >>> Hi! >>>> >>>>

Re: [PHP-DEV] PHP 6 : a new API ?

2013-02-20 Thread Sebastian Krebs
2013/2/20 Klaus Ufo > Hi there ! > > We all know that the current PHP API has flaws. Maybe we could use > namespaces to build a new coherent PHP API ? Like : > > - \arr > - \num > - \str > > and so on. Advantages : > > - no more global functions > Just to throw that in: Even if you pack them int

Re: [PHP-DEV] Pull request for array_filter() improvement

2013-02-21 Thread Sebastian Krebs
2013/2/21 Tjerk Anne Meesters > Hi, > > I found myself wanting a feature of array_filter() with which I can perform > filtering based on the array key instead of the value. > > To scratch this itch, I decided to dive into C again and just add the > feature. My proposal is to add a third argument

Re: [PHP-DEV] rfc:trailing-comma-function-args

2013-02-22 Thread Sebastian Krebs
2013/2/22 Rasmus Schultz > I've been thinking about this RCF for a while now: > > https://wiki.php.net/rfc/trailing-comma-function-args > > It just doesn't seem necessary - the only time I've ever found something > like this to be necessary, is when a function takes closures or other very > long

Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-25 Thread Sebastian Krebs
2013/2/25 Jens Riisom Schultz > Hi everybody, > > I have read up on this, and done some testing. > > First up, my findings with PHP5.5 alpha5: > > namespace spacy; > > class classy { > public static function fqcn() { > /* This works but is not useful enough: */ >

Re: [PHP-DEV] RFC Autoboxing Draft

2013-02-25 Thread Sebastian Krebs
2013/2/25 Nils Andre > Hi Everyone on the list, I have no RFC Karma here so far, so I post this to > the list at first. There has been ongoing discussion about new APIs and so > fort, so this is a suggestion for language cleanup by Autoboxing. I'd > really appreciate comments. > > == Introduction

Re: [PHP-DEV] Allow (...)->foo() expressions not only for `new`

2013-02-26 Thread Sebastian Krebs
2013/2/26 Lazare Inepologlou > Hello Nikita, > > 2013/2/25 Nikita Popov > > > Hi internals! > > > > PHP 5.4 added support for expressions of the kind (new Foo)->bar(), (new > > Foo)->bar and (new Foo)['bar']. > > > > > I guess it must have been discussed, but Is there any technical reason or > c

Re: [PHP-DEV] I would like to write an RFC for the addition of an internal keyword

2013-02-27 Thread Sebastian Krebs
2013/2/27 Jens Riisom Schultz > Hi, > > I just want to get a feel for whether the following idea would be > instantly rejected (for example I get the feeling that adding keywords is a > big deal): > > Often, when writing frameworks, you need to make public or protected > functionality or classes

Re: [PHP-DEV] Add get_object_constants and get_class_constants

2013-02-27 Thread Sebastian Krebs
2013/2/27 Frank Schenk > Hi Crypto Compress, > > big congratz to that name, your mummy Hash Compress and your daddy Image > Compress must be very proud! > > SCNR > > Am 02/27/2013 03:54 PM, schrieb Crypto Compress: > > Hello Mike, > > > > thank you! It is a useful feature to me. > > > > class MyB

Re: [PHP-DEV] I would like to write an RFC for the addition of an internal keyword

2013-02-27 Thread Sebastian Krebs
2013/2/27 Steve Clay > On 2/27/13 3:18 AM, Nikita Nefedov wrote: > >> I, for one, think it should be solved on the IDE side. I used a lot of >> Doctrine's internal >> methods lately and if they would be not accessible I wouldn't be able to >> do a lot of things. >> Of course internal methods/clas

Re: [PHP-DEV] I would like to write an RFC for the addition of an internal keyword

2013-02-28 Thread Sebastian Krebs
2013/2/28 Jens Riisom Schultz > Hi everyone, > > (I got "hooked off" this discussion, so I have tried to keep up by reading > the digest... This makes it impossible for me to correctly interleave my > comments, so I'll just "top post" or whatever the term is) (I'm sure this > has been mentioned b

Re: [PHP-DEV] Memory warning hook

2013-03-05 Thread Sebastian Krebs
2013/3/5 Lazare Inepologlou > 2013/3/5 Tom Boutell > > > Can't you do this already? memory_limit can be fetched via ini_read, > > and together with memory_get_usage you should be able to check for > > this sort of thing. Admittedly having to parse memory_limit (which can > > be in various units)

Re: [PHP-DEV] [RFC] unset(): return bool if the variable has existed

2013-03-07 Thread Sebastian Krebs
2013/3/7 Stas Malyshev > Hi! > > > RFC updated. > > > > Any other comments about this RFC? > > Could you provide a use case for this - which practical value this has? > > It also still contains factually incorrect claim that unset() is a > function and that there's some "inconsistency" in the fac

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

2013-03-15 Thread Sebastian Krebs
2013/3/15 Steve Clay > I'm sure this question has been discussed before, so if anyone can point > to me to links or briefly recap I'd appreciate it. > > Why can't we make $someCallable() always work? E.g. http://3v4l.org/FLpAq > > I understand the problem of $obj->foo() where ->foo is a callable

Re: [PHP-DEV] Allow all callables to be called directly

2013-03-15 Thread Sebastian Krebs
2013/3/15 Steve Clay > My subject was misleading. I didn't mean to suggest call_user_func() be > removed, just be made unnecessary by direct call syntax. > > This should make the inconsistency clearer: http://3v4l.org/L8Yvq > > On 3/15/13 10:21 AM, Sebastian Krebs wrote:

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

2013-03-15 Thread Sebastian Krebs
2013/3/15 Stas Malyshev > Hi! > > > why not enable then this "getCallback()();"? > > There's an RFC for that: https://wiki.php.net/rfc/fcallfcall > but it has some edge cases which I didn't have time to figure out yet. > In the long run I think it would be great :) Earlier I also realized, that

Re: [PHP-DEV] property de-referencing

2013-04-30 Thread Sebastian Krebs
2013/5/1 Rasmus Schultz > Any PHP dev who works with a mainstream framework does this daily, but the > frameworks rely on strings for property-names. > > Take this example from the Symfony manual, for example: > > > class Task > { > protected $task; > > pro

Re: [PHP-DEV] Re: Importing namespaced functions

2013-05-02 Thread Sebastian Krebs
Hi, Are you going to cover autoloading of functions too? Regards, Sebastian 2013/5/2 Igor Wiedler > Hi internals, > > Since there's been no major objection to this proposed RFC, I will go > ahead and create it on the wiki. I will amend it to address some of the > points that were discussed so

Re: [PHP-DEV] Re: Importing namespaced functions

2013-05-02 Thread Sebastian Krebs
ause it isn't such a big deal to simply use the prefixed one, so the benefit seems quite small to me :X use MyFoo\Bar\MathFunctions as math; $x = math\sin($y); Just saying :) Regards, Sebastian > > On May 2, 2013, at 11:40 PM, Sebastian Krebs wrote: > > > Hi,

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Thomas Anderson > If you do user_error('whatever') it'll show, as the line number for that > error, the line number on which that user_error() call is made. It'd be > nice if you could control the line number and file name that was displayed. > eg. > > function test() { > user_erro

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Bob Weinand > > Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs : > > > On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson > wrote: > > > >> If you do user_error('whatever') it'll show, as the line number for that > >> error, the line number on which that user_error() call is made. It'd be > >

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Thomas Anderson > > > On Tue, May 7, 2013 at 2:04 PM, Sebastian Krebs wrote: > >> >> >> >> 2013/5/7 Thomas Anderson >> >>> If you do user_error('whatever') it'll show, as the line number for that >>> error, th

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Bob Weinand > > Am 7.5.2013 um 21:07 schrieb Sebastian Krebs : > > > > > 2013/5/7 Bob Weinand > >> >> Am 7.5.2013 um 18:25 schrieb Ferenc Kovacs : >> >> > On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson >> wrote: >> &

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Sebastian Krebs
2013/5/7 Bob Weinand > > Am 7.5.2013 um 22:11 schrieb Stas Malyshev : > > > Hi! > > > >> And today we have the problem that we cannot use in any useful manner > >> trigger_error in libraries, when we don't know where the error > >> originates from. You debug today trigger_error's in libraries wit

Re: [PHP-DEV] supporting the final keyword for properties

2013-05-28 Thread Sebastian Krebs
2013/5/28 Amaury Bouchard > 2013/5/28 Maciek Sokolewicz > > > It’s a good idea in general but what about having it for variables as > >> well? Could open interesting possibilities for an optimizer. > >> > >> final $foo = "str"; > >> $foo = "bar"; // bails out > >> > >> Don't we already have tha

Re: [PHP-DEV] supporting the final keyword for properties

2013-05-28 Thread Sebastian Krebs
2013/5/28 Amaury Bouchard > 2013/5/28 Sebastian Krebs > >>print($$b); >>> >> >> print(constant($b)); >> > > It's definitely different. In your example you have to know that you are > manipulating constants only. > > And in y

Re: [PHP-DEV] RFC Proposal: New assign value operator

2013-06-26 Thread Sebastian Krebs
2013/6/26 Robert Stoll > As far as I see it, it is kind of an operator overload mechanism for the > assign operator. > This can be useful for small utility classes such as Money, Email etc. > > An example was given: > $price = new MoneyValue(); > $price := 29.99; > > Instead of writing something

  1   2   >