Re: [PHP-DEV] date.timezone E_WARNING -- Really necessary? What's the rationale?

2013-05-29 Thread Richard Lynch
On Thu, May 23, 2013 3:10 pm, Stas Malyshev wrote: >> I'm probably not the typical PHP user; I spend 99% of my PHP time >> using the CLI (and not web SAPIs). >> This means that I frequently run PHP without an .ini file. As a > > I'm not sure how this follows - CLI is capable of using ini file just

Re: [PHP-DEV] Cannot call constructor

2013-05-29 Thread Richard Lynch
First, thanks for all the comments! Responding in-line to myself to address everything so far in this thread: On Thu, May 23, 2013 4:24 pm, Richard Lynch wrote: > Consider this common scenario: > > I use some OOP library, that is a "black box" and I like it that way. This was

[PHP-DEV] Cannot call constructor

2013-05-23 Thread Richard Lynch
Consider this common scenario: I use some OOP library, that is a "black box" and I like it that way. As part of the integration, I need to extend one of the library's classes: class App_bar extends Library_foo{ function __construct(){ //do whatever I need to do here. } } So I write this

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-06-11 Thread Richard Lynch
On Mon, June 11, 2012 2:13 pm, Stas Malyshev wrote: >> And then one would expect some rather complex logic to compute -N >> for >> $var[-N] > > I don't see much of complex logic here, but $a[2] = 'a' would create a > new array element if it does not exist, while $a[-2] can't. Not a big > issue, but

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-06-11 Thread Richard Lynch
On Mon, June 4, 2012 2:08 pm, Marc Easen wrote: > I have submitted a patch to support negative indexs in strings, as per > the conversation adding them to arrays could possibly detract from the > syntactical sugar they are indented to be. > > In summary: > > An alternative to: > $var = 'abc'; > ech

Re: [PHP-DEV] Question about parser implementation details

2012-05-24 Thread Richard Lynch
On Sun, April 1, 2012 7:19 am, Florian Anderiasch wrote: > I'd appreciate any hints on how to tackle this serious concern. If this actually wasn't an April Fool's joke... Never ignore the user contributed notes after doing a search like: http://php.net/roman http://us3.php.net/manual/en/functio

Re: [PHP-DEV] Catchable - marking methods just like static?

2012-05-22 Thread Richard Lynch
On Tue, April 3, 2012 9:02 pm, Alan Knowles wrote: > I just saw Daniel changing some of the PEAR classes to use Exceptions, > and it's pretty clear that this could cause havoc with the end users. > The problem being that there is no 'soft' landing for the migration > process. If I understand set_e

Re: [PHP-DEV] 2/3 = ??? Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-22 Thread Richard Lynch
On Tue, May 22, 2012 1:51 pm, Sanford Whiteman wrote: >> Apparently, we are not the only ones confused by edge cases: > >> http://en.wikipedia.org/wiki/Supermajority > > Can you point to where there's any suggestion of using the ceiling > (rounding up) instead of requiring whole persons? In fact, t

Re: [PHP-DEV] php interpreter

2012-05-22 Thread Richard Lynch
On Wed, May 9, 2012 5:05 pm, Xin Tong wrote: > I am new to php runtime. i am doing some research on runtime > interpreter. can anyone please tell me where the interpreter of the > php runtime is ? which file ? and does the php runtime has a JIT > compiler ? I believe the interpreter is built out

[PHP-DEV] 2/3 = ??? Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-22 Thread Richard Lynch
On Mon, May 21, 2012 5:22 pm, Sanford Whiteman wrote: > Ah, this is why one should trust a coder over a butler: > > http://www.ask.com/answers/112530521/5-people-are-voting-what-is-2-3-s-of-a-majority Regarding the 2/3 super-majority rule... I thought I'd check the non-authorative but always inte

Re: [PHP-DEV] Re: [VOTE] Vote change for empty() RFC

2012-05-22 Thread Richard Lynch
On Sun, May 20, 2012 5:44 pm, Pierre Joye wrote: > On Sun, May 20, 2012 at 11:03 PM, Rafael Dohms > wrote: >> On Mon, May 14, 2012 at 1:16 PM, Anthony Ferrara >> wrote: >> >>> I had meant to reply to the list, but I had replied to Stas >>> directly. >>> I would be happy to change my vote from iss

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Richard Lynch
No offense intended, but if you've got so many OOP objects flying around that they are sucking down that much memory... You probably need to refactor your code and just "don't do that" Just my opinion. -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: h

Re: [PHP-DEV] Persist context across threads?

2012-05-21 Thread Richard Lynch
On Mon, May 14, 2012 1:47 pm, David Rueter wrote: > I am interested in preserving the complete PHP context for a thread > (globals, > variables, interpreter, etc.--everything) for later access from a > different > thread. > > What would be involved in this? It seems like: > > 1) Avoid calling ts_f

Re: [PHP-DEV] JPEG Upload

2012-05-05 Thread Richard Lynch
On Sat, May 5, 2012 1:52 pm, Ángel González wrote: I never said it was an iron-clad technique. Only that it would be harder to craft such an image. If your TOU that meta-data gets stripped, so be it. Or find a way to have (some of) your users have some level of trust. To: Tom (?) One doesn't al

Re: [PHP-DEV] JPEG Upload

2012-05-05 Thread Richard Lynch
On Sat, May 5, 2012 12:29 pm, Ferenc Kovacs wrote: > On Sat, May 5, 2012 at 6:32 PM, Richard Lynch wrote: > >> On Tue, April 10, 2012 1:13 pm, John Crenshaw wrote: >> >In >> > most systems you can upload *anything* with a .jpg extension and >> the >> &g

Re: [PHP-DEV] release process with git

2012-05-05 Thread Richard Lynch
On Tue, April 17, 2012 3:34 am, Martin Jansen wrote: > On 17.04.12 10:24, Bas van Beek wrote: >> Sounds like facilitating wrong security protocols to me. In this >> 365/24/7 environment, sysadmins should be willing and able to patch, >> fix >> and secure systems at any time. Weekend should be no ex

[PHP-DEV] Education

2012-05-05 Thread Richard Lynch
[soapbox] Several people in at least one thread (I can't remember) have stated: Education won't work. I must take objection to that. Not too long ago, a large number of people on this very list agreed that SQL Injection was a Big Problem, and if they all blogged about it, awareness would help.

Re: [PHP-DEV] Re: Disabling PHP tags by php.ini and CLI options

2012-05-05 Thread Richard Lynch
On Wed, April 11, 2012 12:25 am, Stas Malyshev wrote: > Hi! > >> I'm sure you have seen the same code in JSON hijack countermeasure. >> >> while(1){} > > I think you misunderstood what I means. What I meant is you can inject > code without the > improvement? > kill() function would be just an exam

[PHP-DEV] JPEG Upload

2012-05-05 Thread Richard Lynch
On Tue, April 10, 2012 1:13 pm, John Crenshaw wrote: >In > most systems you can upload *anything* with a .jpg extension and the > app will take it, so you can still include the file People don't use imagecreatefromjpeg() to be sure it isn't some ware or executable or PHP script disguised as a JPEG

Re: [PHP-DEV] [off] PHP: a fractal of bad design

2012-05-05 Thread Richard Lynch
On Tue, April 10, 2012 1:27 pm, Stas Malyshev wrote: > Hi! > >> Scroll down a bit; he gets into valid points about the == operator, >> for instance. It's not a useless post. He does cite too many things >> that he has to follow up himself by saying "this was fixed in PHP >> 5.x.y." If it was fixed,

Re: [PHP-DEV] [RFC] Optional PHP tags by php.ini and CLI options (Ver. 1.4)

2012-05-05 Thread Richard Lynch
On Wed, April 11, 2012 5:14 pm, Yasuo Ohgaki wrote: > I think my RFC confused people on this list due to improper > descriptions > and too much information. Sorry for the confusion. I revised the RFC > so > that most important points can be understood at a glance. > > https://wiki.php.net/rfc/nophp

Re: [PHP-DEV] Allow non-variable arguments to empty()

2012-05-05 Thread Richard Lynch
On Tue, April 10, 2012 5:53 pm, Nikita Popov wrote: > Another reason is that currently you get a very obscure error message > if you try to use empty() on a function return value: "Can't use > function return value in write context". Aha. Where did I try to write > to the return value?! On the lin

Re: [PHP-DEV] Allow non-variable arguments to empty()

2012-05-05 Thread Richard Lynch
On Thu, April 12, 2012 6:05 pm, Johannes Schlüter wrote: > On Wed, 2012-04-11 at 00:53 +0200, Nikita Popov wrote: >> >> Currently the empty() language construct only works on variables. >> You >> can write if (empty($array)) but not empty if >> (empty(getSomeArray()). > > I've mentioned this though

Re: [PHP-DEV] Re: internals Digest 18 Apr 2012 20:34:27 -0000 Issue 2671

2012-05-05 Thread Richard Lynch
On Wed, April 18, 2012 9:42 pm, Rasmus Schultz wrote: >> On 04/10/2012 06:20 PM, Adir Kuhn wrote: >> >>  "PHP Gotchas, how they came to be, and why we can't simply fix >> them" >> > > can't or won't? > > It seems that the requirement for backward compatibility, as with most > software, stands in th

[PHP-DEV] PHP extension versions

2012-05-05 Thread Richard Lynch
I'm terribly sorry, but I managed to delete the original while running through the thread to be sure I didn't duplicate comments, and my mailer won't let me respond to a deleted message. So this will appear as a new thread. #1 A standard for non-core extension version fields is a great idea. But

Re: [PHP-DEV] [RFC] Allow non-variable arguments to empty() and isset()

2012-05-05 Thread Richard Lynch
On Fri, May 4, 2012 2:10 pm, Kris Craig wrote: > On Fri, May 4, 2012 at 11:48 AM, Richard Lynch wrote: > >> On Wed, May 2, 2012 4:43 am, Pierre Joye wrote: >> >>> empty() on the other hand, tests if something is empty, and only >> if >> >>> it >

Re: [PHP-DEV] [RFC] Allow non-variable arguments to empty() and isset()

2012-05-04 Thread Richard Lynch
On Wed, May 2, 2012 4:43 am, Pierre Joye wrote: >>> empty() on the other hand, tests if something is empty, and only if >>> it >>> is empty. The result of an expression can be empty. >>> >> >> an expression can also have a value of null. > > And NULL is empty. No issue here. Expressions can also r

Re: [PHP-DEV] considering to remove ext/imap from master

2012-04-27 Thread Richard Lynch
On Fri, April 27, 2012 1:51 pm, Pierre Joye wrote: > hi! > > On Fri, Apr 27, 2012 at 8:40 PM, Stas Malyshev > wrote: > >> Alternative means rewriting all the code. On top of framework >> previously >> not used in the project, with different APIs, different approach to >> IMAP, etc. This is a large

Re: [PHP-DEV] Ability to assign new object to a class property.

2012-04-18 Thread Richard Lynch
On Sun, April 15, 2012 5:47 pm, Simon Schick wrote: > Just to add a random thought > When do you expect this code to be executed? > > class Foo { > static public $foo = new StdClass(); > } I may be too late to this party, but... For what it's worth, if the non-scalar initialization in cl

Re: [PHP-DEV] [RFC] skipping optional parameters

2012-04-18 Thread Richard Lynch
On Tue, April 17, 2012 6:23 pm, Jordi Boggiano wrote: > On 18.04.2012 00:54, Stas Malyshev wrote: >> One of the annoying things I've encountered in working with PHP was >> dealing with functions having long optional parameter lists, >> especially >> if you need to change only the last one - you hav

Re: [PHP-DEV] i hope using set_exception_handler and set_error_handler in php extension code.

2012-03-19 Thread Richard Lynch
On Fri, March 16, 2012 8:33 pm, langwan wrote: > i hope using set_exception_handler and set_error_handler in php > extension > code. > hi, all: > > i write php monitor extension now. > > 1. question > > i hope using set_exception_handler or set_error_handler in > PHP_RINIT_FUNCTION() > > for exampl

Re: [PHP-DEV] PHP5.4 'nannying'

2012-03-19 Thread Richard Lynch
On Sun, March 18, 2012 6:35 am, Reindl Harald wrote: > > > Am 18.03.2012 10:14, schrieb Lester Caine: >> I think what I am probably looking for is a clean guide as to how >> code SHOULD be written nowadays in order to avoid >> the nanny messages since it's certainly not my normal practice after >>

Re: [PHP-DEV] TSRMLS_* keywords in PHP source

2012-03-19 Thread Richard Lynch
On Mon, March 19, 2012 2:45 pm, Barbu Paul Gheorghe wrote: > What role does the keywords TSRMLS_CC, TSRMLS_DC, TSRMLS_D have when > passed > along with a argument in PHP's source? > For example in this random file: > > http://lxr.php.net/opengrok/xref/PHP_5_4/ext/intl/formatter/formatter_data.c > >

Re: [PHP-DEV] Let parse_str() parse more than max_input_vars args

2012-03-15 Thread Richard Lynch
On Thu, March 15, 2012 5:01 am, Ryan McCue wrote: > I'm not arguing that it should, I'm saying that in the INI it refers > to > the HTTP arguments, while in the code (via ini_set) it would not > affect > this. I think that could be confusing for users who don't realise the > script is only loaded a

Re: [PHP-DEV] set the PHP_INI_ENTRY_* values the same as for php.ini-production

2012-03-15 Thread Richard Lynch
On Wed, March 14, 2012 12:09 pm, Ferenc Kovacs wrote: > On Mon, Jul 25, 2011 at 12:34 PM, Richard Quadling > wrote: > >> On 23 July 2011 23:29, Ferenc Kovacs wrote: >> > I would propose that the defaul values(PHP_INI_ENTRY_*) and the >> > php.ini-production should be keep in sync as much as possib

Re: [PHP-DEV] Small question about performance

2012-03-15 Thread Richard Lynch
On Thu, March 15, 2012 9:21 am, Klaus Silveira wrote: > Hello internals, > > I've been involved in a discussion at the PHP Standards Group and we > recently had the following statement: > > *Say you had a loop, and inside that loop you wanted to modify a param >> **update the key:** >> **foreach($a

Re: [PHP-DEV] HEADS UP: 5.4 branch is open again

2012-03-13 Thread Richard Lynch
On Fri, March 2, 2012 4:26 am, Ferenc Kovacs wrote: > If we can agree upon the next version number beforehand, and we decide > that > we will go with the major release (be that php 6 or 7, whatever), we > don't > to do anything right now, we can branch the version from trunk/master, > when > the ti

Re: [PHP-DEV] Re: Git Migration: Status Update

2012-03-13 Thread Richard Lynch
On Wed, March 7, 2012 1:51 pm, Sebastian Bergmann wrote: > Am 07.03.2012 19:46, schrieb Kris Craig: >> As I and others have said already, using a Subversion branching >> model >> on Git just doesn't make any sense. > > How often does it have to be explained to you and others that we > would > lik

Re: [PHP-DEV] default charset confusion

2012-03-13 Thread Richard Lynch
On Mon, March 12, 2012 2:44 pm, Rasmus Lerdorf wrote: > But you can't necessarily hardcode the encoding if you are writing > portable code. That's a bit like hardcoding a timezone. In order to > write portable code you need to give people the ability to localize > it. If you wanted it portable, wo

Re: [PHP-DEV] Providing sandboxed versions of include and require language constructs

2012-03-12 Thread Richard Lynch
On Tue, March 6, 2012 3:30 am, Florian Anderiasch wrote: Security by blacklist almost always isn't security... You're bound to miss one of the functions you should have blacklisted, but didn't. Something like Drupal would be crippled by this because major extensions used by all rely on access t

Re: [PHP-DEV] Scalar Type Hinting

2012-03-12 Thread Richard Lynch
On Thu, March 8, 2012 5:13 am, Alain Williams wrote: > On Thu, Mar 08, 2012 at 11:06:56AM +0200, Arvids Godjuks wrote: >> > Type hints are meant to >> > filter input from external sources >> >> Correction, it should read like this: >> Type hints are _not_ meant to filter input from external sources

Re: [PHP-DEV] any blogs?

2012-03-12 Thread Richard Lynch
I can't recommend any blogs, per se, but Sara's book or even her articles on Zend.com as well as the php.net manual about internals at the end are a "must read" for understanding the internals... On Thu, March 8, 2012 6:22 am, adit adit wrote: > Let's try to stick only to the internals blogs, ok?

RE: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters

2012-03-12 Thread Richard Lynch
On Fri, March 9, 2012 5:58 pm, John Crenshaw wrote: > The reason you have to validate the input type in this case is because > even though it is a reference, we don't ACTALLY know that it isn't > supposed to contain an input (even though that would be against all > sane rules most of the time). La

Re: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters

2012-03-12 Thread Richard Lynch
On Fri, March 9, 2012 2:51 am, Nikita Popov wrote: > On Fri, Mar 9, 2012 at 3:58 AM, Ilia Alshanetsky > wrote: >> Anthony, >> >> My concern with this type of patch is that what you are proposing >> are >> not really hints, they are forced casts. As such they modify the >> data >> potentially leadi

Re: [PHP-DEV] CURL file posting

2012-03-12 Thread Richard Lynch
On Sun, March 11, 2012 6:29 pm, Stas Malyshev wrote: > Hi! > >> I'd sure like a PHP extension that didn't have this obvious and >> nasty bug: >> >> https://bugs.php.net/bug.php?id=46439 > > This doesn't look good. Documentation does say the @ prefix exists, > but > it has very high potential of cre

Re: [PHP-DEV] default charset confusion

2012-03-12 Thread Richard Lynch
On Mon, March 12, 2012 1:49 am, Rasmus Lerdorf wrote: > What we really need is what we added in PHP 6. A runtime encoding ini > setting that is distinct from the output charset which we can use > here. The usual argument against another php.ini setting, other than "too many already" is the difficu

RE: [PHP-DEV] PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting)

2012-03-01 Thread Richard Lynch
On Thu, March 1, 2012 2:38 am, John Crenshaw wrote: >> You might consider those scripts poor programming practice. We all >> do. >> But PHP is the language of the unwashed masses, and that was, and >> is, >> part of why it is hugely popular. Somebody who barely understands >> programming can pound

Re: [PHP-DEV] question about Zend MM

2012-03-01 Thread Richard Lynch
WILD GUESS ALERT! I'm guessing that this is for byte-alignment on big-endian versus little-endian... So it's more like and as masks to flip-flop bytes by some binary logic / magic. The -1 is to "wrap" the byte to binary inversion. You might want to grep the code and see how th

[PHP-DEV] PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting)

2012-02-29 Thread Richard Lynch
On Wed, February 29, 2012 7:16 pm, John Crenshaw wrote: > I'm beginning to think that the type hinting question is too closely > related to the dirty secrets of type juggling to resolve them > separately. You may have to either discard consistency, or else fix > the problem of silent bizarre conver

Re: [PHP-DEV] Scalar type hinting

2012-02-29 Thread Richard Lynch
On Wed, February 29, 2012 6:55 pm, Kris Craig wrote: > If not, I'll go ahead and draft an RFC for these proposed amendments > sometime today or tomorrow when I get a spare moment. If anyone has > any > thoughts on this, please share them! Thanks! This is not an official answer. I don't have time

Re: [PHP-DEV] Scalar type hinting

2012-02-29 Thread Richard Lynch
On Tue, February 28, 2012 5:17 pm, Kris Craig wrote: Some cases I would find interesting to be explained: (using 'streak' for strong and/or weak, feel free to separate the two) streak int $i = 123.456; //Common idiom for floor() streak int $i = "123.456"; //In contrast to previous streak int $i

Re: [PHP-DEV] [Draft RFC] Object Casting and Assignment Handlers

2012-02-29 Thread Richard Lynch
On Tue, February 28, 2012 8:40 pm, Anthony Ferrara wrote: > https://wiki.php.net/rfc/object_cast_magic Suggestion: Rename __castTo as __castObject, to be parallel to engine Question: Is there no need to implement the get() function in userland? It "feels" wrong for 1/3 to be missing, but I probab

Re: [PHP-DEV] Scalar type hinting

2012-02-28 Thread Richard Lynch
On Tue, February 28, 2012 3:31 am, Arvids Godjuks wrote: > I really liked what the O'Raily wrote here: > http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html Please note that the author was a bass player in a band wanting to sell CDs online when the five (5) choices we

Re: [PHP-DEV] Scalar type hinting

2012-02-28 Thread Richard Lynch
On Mon, February 27, 2012 2:08 pm, Johannes Schlüter wrote: > On Mon, 2012-02-27 at 21:05 +0100, Gustavo Lopes wrote: >> On Mon, 27 Feb 2012 20:09:08 +0100, Johannes Schlüter >> wrote: >> >> > On Mon, 2012-02-27 at 13:05 -0600, Richard Lynch wrote: >> >>

Re: [PHP-DEV] Scalar type hinting

2012-02-28 Thread Richard Lynch
On Mon, February 27, 2012 4:34 pm, Kris Craig wrote: > I think this is the main reason for differentiating between "strong" > (or > whatever word is appropriate) and "weak." The developer may very well > want > their script to blow-up in such a case. I believe I actually "get it" now... You want

Re: [PHP-DEV] Object Casting - An Alternative to Type Hinting

2012-02-28 Thread Richard Lynch
On Mon, February 27, 2012 11:05 pm, Anthony Ferrara wrote: > class Foo { > public $value = 1; > } > class Bar { > public $value = 1; > public function __castTo($type) { > return $this->value; > } > public function __assign($value) { > $this->value = $value; >

Re: [PHP-DEV] pecl, zts, non-zts, fastcgi and Apache

2012-02-28 Thread Richard Lynch
On Mon, February 27, 2012 6:46 pm, Christopher Jones wrote: > > > On 02/27/2012 01:12 PM, William A. Rowe Jr. wrote: >> On 2/27/2012 6:58 AM, jpauli wrote: > >>> Recently we had a bug with the new Apache 2.4 API where apxs >>> doesn't answer >>> about the MPM configuration anymore, leading to a ZTS

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

2012-02-28 Thread Richard Lynch
On Mon, February 27, 2012 5:21 pm, Ángel González wrote: > On 27/02/12 19:22, Richard Lynch wrote: >>>> I'm not so sure about that. In a well-written web application, you >>>> would >>>> typically convert them on the first layer, when receiving from

Re: [PHP-DEV] Possibility to add finally to try/catch?

2012-02-28 Thread Richard Lynch
On Tue, February 28, 2012 8:22 am, Kiall Mac Innes wrote: > +1000 > > This is a feature that I've always wanted in PHP, My main reason being > to > reduce code duplication. eg > > try { > $fh = fopen($filename); > > // Do some work on the file + encounter an error. > throw new Exception

Re: [PHP-DEV] Possibility to add finally to try/catch?

2012-02-28 Thread Richard Lynch
https://bugs.php.net/bug.php?id=36779 Not to say that "finally" shouldn't be added, but I don't think this lock inside a loop is a particularly compelling example... Either that loop is going to wait a whole lot for an exclusive lock at every iteration, or the locks aren't exclusive and could be

Re: [PHP-DEV] RFC: PHP 6 include E_NOTICE in default php.ini

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 1:33 pm, Kris Craig wrote: > I think it's a good idea, though I'm not sure it should be done in the > production one as well. I'm not sure, but I think these errors are > generally suppressed in production because of potential security > concerns > involved in making thos

Re: [PHP-DEV] Scalar type hinting

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 1:22 pm, Kris Craig wrote: > Now that you've voiced your opposition, can we please dedicate this > topic > to discussing how this can be done? If you think we're wasting our > time, > then ok; it's our time to waste. I'd be happy to take you up on your > challenge to try

Re: [PHP-DEV] Scalar type hinting

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 1:15 pm, Kris Craig wrote: > Now, to rewind a bit past the latest chunk of "I hate this idea" > posts > > I'd like to suggest a new term: "strong". > > This term would be similar to "weak", except with a few key > differences: > >- Weak would behave very much like

Re: [PHP-DEV] Scalar type hinting

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 11:38 am, Anthony Ferrara wrote: > Discussed to death. Yet only one time before (discussing a specific > patch)... Did you go back to the old, old, old PHP list (and was it PHP-dev back then?), before it split into php-general and php-internals and php-*, back when there

Re: [PHP-DEV] Scalar type hinting

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 10:45 am, Ángel González wrote: > On 27/02/12 17:19, Richard Lynch wrote: >> PRESUMPTION: >> >> *ANY* strict datatype could also be NULL, to represent a failure >> condition... >> >> Otherwise, when you are out of RAM: >>

Re: [PHP-DEV] Object Casting - An Alternative to Type Hinting

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 9:20 am, Anthony Ferrara wrote: >> I have to say that no matter how much a luv my OOP, turning every >> built-in type into an Object is just a Bad Idea... >> >> It's a form of bloat on RAM and CPU with minimal added value, imho. > Re-read what I had written. I never said

Re: [PHP-DEV] $_PARAMETERS Super Global Object

2012-02-27 Thread Richard Lynch
On Fri, February 24, 2012 5:15 pm, Larry Garfield wrote: > On 2/24/12 4:55 PM, Jeremiah Dodds wrote: > >>> Except that per HTTP, GET and POST are completely different >>> operations. One >>> is idempotent and cacheable, the other is not idempotent and not >>> cacheable. >>> I very much care whic

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

2012-02-27 Thread Richard Lynch
>> I'm not so sure about that. In a well-written web application, you >> would >> typically convert them on the first layer, when receiving from the >> web. >> On next usages, your int variables are usually ints already. Afraid not. It turns out that PHP, on 32-bit hardware, converting large BIGI

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

2012-02-27 Thread Richard Lynch
On Sat, February 25, 2012 7:58 pm, Kris Craig wrote: > On Sat, Feb 25, 2012 at 4:54 PM, Stas Malyshev > wrote: > >> Hi! >> >> >> I'm well aware that this has been discussed before, Stas. However, >>> you're mischaracterizing those previous conversations. It has >>> never >>> been proven that opt

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

2012-02-27 Thread Richard Lynch
On Fri, February 24, 2012 4:33 pm, Kris Craig wrote: > I hear that a lot; i.e. "If you want static typing, use Java." > > Unfortunately, that dismissive answer has not worked too well over the > years, has it? People are still clamoring for this, and I think > making > some very valid arguments th

Re: [PHP-DEV] $_PARAMETERS Super Global Object

2012-02-27 Thread Richard Lynch
On Fri, February 24, 2012 4:48 pm, Ronald Chmara wrote: > On Fri, Feb 24, 2012 at 2:40 PM, Larry Garfield > wrote: >>> To me, it's just a request for some content, and in a REST API >>> that's >>> read-only, I just don't care if the consumer sends their request as >>> GET or POST.  I'll cheerfully

Re: [PHP-DEV] $_PARAMETERS Super Global Object

2012-02-27 Thread Richard Lynch
On Fri, February 24, 2012 4:40 pm, Larry Garfield wrote: > On 2/24/12 4:34 PM, Richard Lynch wrote: >> On Fri, February 24, 2012 4:16 pm, Larry Garfield wrote: >>> On 2/24/12 3:28 PM, Richard Lynch wrote: > Except that per HTTP, GET and POST are completely different >

Re: [PHP-DEV] [RFC] APXS LoadModule Option in configure

2012-02-27 Thread Richard Lynch
On Fri, February 24, 2012 6:14 pm, Kris Craig wrote: > No, it happens and it's even clearly documented in APXS. > > Basically, if you specify the "-a" option in APXS, it overwrites your > httpd.conf (or apache.conf or whatever it is on your system) and adds > the > LoadModule line to it. In PHP's

Re: [PHP-DEV] Cannot build ext/intl on Fedora 15

2012-02-27 Thread Richard Lynch
On Sun, February 26, 2012 1:19 pm, Tom Boutell wrote: > Bump - this is still a live issue on Ubuntu 11.10, for instance. > > I just hacked my Ubuntu PHP-from-source installer to touch up the > Makefile by prepending -lstdc++ to EXTRA_LIBS. That does the job. > > Which I knew more about autoconf, I'

Re: [PHP-DEV] Scalar type hinting

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 8:29 am, Michael Morris wrote: > Both of these must be > declared formally (otherwise PHP assumes scalar) I believe you mean "dynamic" or "loose" datatyping. Scalar would imply that you couldn't do this: array $a = array(); //force $a to always be array, and never anyth

Re: [PHP-DEV] bugs.php.net & php 6

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 9:37 am, Simon Schick wrote: > The development of the unicode-as-default-charset should really be > done > within the next release coming after 5.4 > I heared somewhere that it's nearly done ... > I would have happily seen it in 5.4 but as this release is late right > now

[PHP-DEV] RFC: PHP 6 include E_NOTICE in default php.ini

2012-02-27 Thread Richard Lynch
As promised in another thread, I have created a formal RFC on the topic of including E_NOTICE in the default php.ini.* files. Please note that I am specifically not proposing E_STRICT nor E_DEPRECATED in this RFC, as I believe the each need to be considered on their own merits, and not lumped into

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c

2012-02-27 Thread Richard Lynch
On Mon, February 27, 2012 2:31 am, Laruence wrote: > On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov > wrote: >> Hi Laruence, >> >> The attached patch looks wired. The patch on top of it (r323563) >> makes it >> better. However, in my opinion it fixes a common problem just in a >> single >> place.

Re: [PHP-DEV] bugs.php.net & php 6

2012-02-27 Thread Richard Lynch
On Sun, February 26, 2012 2:03 am, Stas Malyshev wrote: > Just discovered that our stock "php 4 support discontinued" message in > bugs looks like: > > We are sorry, but we can not support PHP 4 related problems anymore. > Momentum is gathering for PHP 6, and we think supporting PHP 4 will > lead t

Re: [PHP-DEV] Object Casting - An Alternative to Type Hinting

2012-02-27 Thread Richard Lynch
On Sun, February 26, 2012 8:45 pm, Anthony Ferrara wrote: >> Or operator-overlading to the rescue? :-) > > Not quite. Especially because with operator overloading done at this > level (how it would be implemented in PHP) it's almost impossible to > make it consistent: > > class string { > publ

Re: [PHP-DEV] Object Casting - An Alternative to Type Hinting

2012-02-27 Thread Richard Lynch
On Sun, February 26, 2012 9:48 am, Anthony Ferrara wrote: I have to say that no matter how much a luv my OOP, turning every built-in type into an Object is just a Bad Idea... It's a form of bloat on RAM and CPU with minimal added value, imho. No matter which way you twist this pretzel: -1 --

Re: [PHP-DEV] $_PARAMETERS Super Global Object

2012-02-24 Thread Richard Lynch
On Fri, February 24, 2012 4:16 pm, Larry Garfield wrote: > On 2/24/12 3:28 PM, Richard Lynch wrote: > Because GET and POST are not even remotely the same thing and treating > them as completely interchangeable is a bug in the first place. We'll have to agree to disagree here. To m

Re: [PHP-DEV] [RFC] APXS LoadModule Option in configure

2012-02-24 Thread Richard Lynch
On Mon, February 20, 2012 7:02 pm, Kris Craig wrote: > Opening discussion on RFC pertaining to adding a new option to the > configure script with regard to how/whether APXS touches the > httpd.conf > file. > > This is my first RFC post so please go easy on me if I screwed-up on > procedure in any w

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

2012-02-24 Thread Richard Lynch
On Thu, February 23, 2012 1:21 pm, Kris Craig wrote: >1. Is strict typing something that we should seriously consider >implementing at some point in the foreseeable future? No. If you want that, PHP is not the language for you, so just go use Java and JSP. I'm not being rude nor abusive:

Re: [PHP-DEV] PHP Script Compile System

2012-02-24 Thread Richard Lynch
On Wed, February 22, 2012 3:45 am, Flavius Aspra wrote: > On 02/22/2012 07:29 AM, Rasmus Lerdorf wrote: >> complicated optimization passes or any of those things > > Would such things be welcome/needed in the engine or as an extension? Note that he said "complicated" :-) There are many trivial /

Re: [PHP-DEV] PHP Script Compile System

2012-02-24 Thread Richard Lynch
On Tue, February 21, 2012 11:49 pm, Deepak Balani wrote: > I am think(actually drafting) about the compilation system of PHP > scripts. > I want to make a native C extension which is able to compile the > scripts in > the Zend Engines opcodes and execute directly when called. > > The extension may

Re: [PHP-DEV] $_PARAMETERS Super Global Object

2012-02-24 Thread Richard Lynch
On Wed, February 22, 2012 9:10 am, Michael Morris wrote: > $_REQUEST does nothing of the sort, and it's use is dangerous in > RESTful architecture. $_REQUEST is a smash together of $_GET, $_POST > and $_COOKIE, in that order but the php.ini directive can change it. > Hence there's no way of knowin

Re: [PHP-DEV] $_PARAMETERS Super Global Object

2012-02-24 Thread Richard Lynch
On Wed, February 22, 2012 8:57 am, Michael Morris wrote: > Before writing up a full RFC I want to put out a feeler on something. > Currently we have several input parameter objects, chief among them > $_GET, $_POST, $_REQUEST, $_SERVER (for the client HTTP headers). All > of them are arrays and le

Re: [PHP-DEV] pecl, zts, non-zts, fastcgi and Apache

2012-02-24 Thread Richard Lynch
On Fri, February 24, 2012 1:52 pm, Tom Boutell wrote: > 2. Why does php turn on thread-safety for mod_php at all on Linux, > given that it apparently still doesn't work very well with various > extensions in a genuinely multithreaded situation, slows things down, > takes more memory, and leads to p

Re: [PHP-DEV] [RFC] Deprecate and remove /e modifier from preg_replace

2012-02-18 Thread Richard Lynch
A couple people I respect a heck of a lot have voted against, but I've heard no technical explanation of "why" from them... I voted "Yes" because I've never found a need for /e at all, personally. Not sure my vote even counts, so feel free to nuke it. :-) Or maybe I'm just not smart enough to emp

Re: [PHP-DEV] Feasibility of additional support around constants.

2010-11-08 Thread Richard Lynch
On Mon, November 8, 2010 6:33 am, Richard Quadling wrote: > 1 - Validating that the value received is in a collection of known > constants. This would allow for new constants to be added without the > layer having to be amended to verify the value. If it isn't in the > group - it's invalid. Genera

Re: [PHP-DEV] PDO_DBLIB Native PHP Type binding

2010-11-04 Thread Richard Lynch
On Thu, November 4, 2010 9:09 pm, Stanley Sufficool wrote: > On Thu, Nov 4, 2010 at 5:37 PM, Richard Lynch wrote: >> On Wed, November 3, 2010 8:52 pm, Stanley Sufficool wrote: I realize as the guy who has to deal with the driver code and what it should do for people not following t

Re: [PHP-DEV] PDO_DBLIB Native PHP Type binding

2010-11-04 Thread Richard Lynch
On Wed, November 3, 2010 8:52 pm, Stanley Sufficool wrote: > Before I gut PDO_DBLIB one more time to implement native parameter > binding for stored procedures, what are the thoughts on returning the > column values from the database as the native PHP type when possible? > Currently everything is r

Re: [PHP-DEV] rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON

2010-11-01 Thread Richard Lynch
On Fri, October 29, 2010 7:47 pm, admin wrote: > WTF is T_PAAMAYIM_NEKUDOTAYIM? > > This has to be THE most asked question by new php developers when they > come across it. Can we please change the token name to T_DOUBLE_COLON > so I don't have to hear about it constantly? > > Those that disagree

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

2010-10-23 Thread Richard Lynch
On Thu, October 21, 2010 6:04 pm, Tim Steiner wrote: > Greetings, > > I'm currently trying to troubleshoot an intermittent problem on one of > our servers. After some time of running just fine (usually a couple > of > hours), scripts will start throwing the warning "Attempt to assign > property o

Re: [PHP-DEV] Skipping of defaulted parameters.

2010-10-20 Thread Richard Lynch
On Wed, October 20, 2010 6:58 am, Richard Quadling wrote: > foo(10,, 30); // Parse error. I thought this used to work... > I would argue that by having a null in the arguments, the intent is to > NOT supply a value and have the default value used in the function. Unfortunately, no. There are ti

Re: [PHP-DEV] Named parameters

2010-10-18 Thread Richard Lynch
On Mon, October 18, 2010 2:45 am, mathieu.suen wrote: > On 10/15/2010 07:26 PM, G M wrote: >> Okay so I am thinking about submitting a patch to PHP that would >> enable you to call functions like this: >> >> stuff(1, 2, 'separator' => '', 'clean' => true); When I suggested this to Ze'ev in PHP 3

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

2010-10-07 Thread Richard Lynch
On Thu, October 7, 2010 12:56 am, Nathan Nobbe wrote: > abstract class AbstractServer {} > class ConcreteServer extends AbstractServer {} > > abstract class AbstractClient { > abstract function doStuff(AbstractServer $o); > } > > class ConcreteClient extends AbstractClient { > function doStuff

Re: [PHP-DEV] RFC: Comparable interface

2010-10-06 Thread Richard Lynch
On Tue, October 5, 2010 5:44 am, Gustavo Lopes wrote: > On Tue, 05 Oct 2010 04:31:14 +0100, Richard Lynch > wrote: > >> On Sun, October 3, 2010 12:34 pm, Gustavo Lopes wrote: >>> * The current behavior for >, <, etc. is completely useless. It's >>> u

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Richard Lynch
On Sun, October 3, 2010 6:27 pm, Stas Malyshev wrote: >> It looks like a sub optimal choice to have used string constants >> instead of integer. However it could be still possible to define new >> constants as numeric. It is then possible to do whatever needs to be >> done as post or pre ops for th

  1   2   3   4   5   >