Saw this mentioned on one of the blogs comments today.
http://nuclearsquid.com/writings/git-new-workdir/
It may be an easier to use for those working with multiple branches of
PHP, and enjoy the multiple directory for each branch approach.. (aka
old svn..)
Regards
Alan
On Friday, April 13,
Hi!
> Just throwing this out there, but that code wouldn't be run on parse.
> It would be "queued" to run prior to the constructor on instantiation.
Why? You have perfectly good ctor, why not use it?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext.
Hi!
> What's proposed is really more closely related to the functionality of
> "global" since you're taking a non-local variable and making it accessible.
It is like global but with important difference - global inserts the
variable into current scope, with all consequences (modification, etc.).
Hi,
2012/4/14 Yasuo Ohgaki :
> Hi,
>
> 2012/4/14 Matthew Weier O'Phinney :
>> On 2012-04-13, Tom Boutell wrote:
>>> Wouldn't this be a significant performance hit when multiplied by
>>> every class file in a project?
>>
>> Typically, you'd cache the end-result of pre-processing, so that
>> subseq
Hi,
2012/4/14 Matthew Weier O'Phinney :
> On 2012-04-13, Tom Boutell wrote:
>> Wouldn't this be a significant performance hit when multiplied by
>> every class file in a project?
>
> Typically, you'd cache the end-result of pre-processing, so that
> subsequent requests can use the processed resul
I too am on the fence, but lean more towards not liking it. Here's why:
I'm on the fence about "use ((expression) as $foo)" -- I fully like the
idea of aliasing closure variables, but still thinking on the expression
syntax. It would be _inconsistent_ with how it works with namespaces
(which us
(Sorry if you receive this 5.3.11 related message two times)
Hi,
The second, and hopefully last, release candidate for 5.3.11 was
released for testing and can be downloaded here:
http://downloads.php.net/johannes/php-5.3.11RC2.tar.bz2
http://downloads.php.net/johannes/php-5.3.11RC2.tar.g
Stas,
> Because the engine doesn't run code when parsing class definitions so
> defaults should be constants (otherwise would also create a lot of
> trouble for bytecode caching as object are not cacheable).
Just throwing this out there, but that code wouldn't be run on parse.
It would be "queued
http://www.esecurityplanet.com/open-source-security/study-warns-of-security-flaws-in-open-source-components.html
This is EXACTLY why the prevailing mindset about central repositories needs
to change! Keeping it at PHP 5.1 doesn't provide more "stable" and
"reliable" code. It just keeps it vulne
On Fri, Apr 13, 2012 at 1:02 PM, Matthew Weier O'Phinney <
weierophin...@php.net> wrote:
> On 2012-04-13, Kris Craig wrote:
> > --f46d04447f47ae95ec04bd949e5f
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > On Fri, Apr 13, 2012 at 12:12 PM, John Crenshaw <
> johncrens...@priacta.com> wro
Hi!
> Why can't we create a new object and assign it to property like this?
Because the engine doesn't run code when parsing class definitions so
defaults should be constants (otherwise would also create a lot of
trouble for bytecode caching as object are not cacheable).
Use ctor for complex ini
On 2012-04-13, Kris Craig wrote:
> --f46d04447f47ae95ec04bd949e5f
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Fri, Apr 13, 2012 at 12:12 PM, John Crenshaw
> wrote:
>
> > > >
> > > > On top of this, there's an argument that you're not addressing: most
> > > > template engines in PHP eit
On 2012-04-13, Nicolas Grekas wrote:
> > Yes, the original used "$this->getFooBar()" -- but it could have been
> > "$someOtherObject->getFooBar()"
>
> Yep, you and Anthony are right, my comment was stupid...
>
> Then I have an other objection :)
>
> I'm not comfortable with mixing declarative line
On Fri, 13 Apr 2012 18:09:24 +0200, Stas Malyshev
wrote:
There are other situations where the result of the comparison may be
"inaccurate" -- in the sense that two strings may be constructed as
representing different numbers, but they compare equal.
* Comparing two different real numbers tha
On Fri, Apr 13, 2012 at 12:12 PM, John Crenshaw wrote:
> > >
> > > On top of this, there's an argument that you're not addressing: most
> > > template engines in PHP either directly consume PHP template files...
> > > or "compile" templates into... PHP template files. As such, sooner or
> > > late
Greetings, all;
This coming Monday, 16 April, 2012, between the hours of 18:00 and
20:00 EDT (22:00 to 00:00 GMT), the one of the primary php.net servers
will be undergoing a critical preventative maintenance operation. In
this two-hour maintenance window, we do expect a period of
interru
> Yes, the original used "$this->getFooBar()" -- but it could have been
> "$someOtherObject->getFooBar()"
Yep, you and Anthony are right, my comment was stupid...
Then I have an other objection :)
I'm not comfortable with mixing declarative lines with expressions:
function (..) use (..) is alwa
On Fri, Apr 13, 2012 at 21:29, Dmitri Snytkine
wrote:
> But why is it possible to assing a new array to a property like that but not
> a new instance of some class?
> Isn't a new array also requires some type of initialization?
Only static values are allowed, which means that the value requires
But why is it possible to assing a new array to a property like that but not a
new instance of some class?
Isn't a new array also requires some type of initialization?
Dmitri Snytkine
Web Developer
Ultra Logistics, Inc.
Phone: (888) 220-4640 x 2097
Fax: (888) 795-6642
E-Mail: dsnytk...@ultralogi
Hi,
On Fri, Apr 13, 2012 at 21:19, Dmitri Snytkine
wrote:
> I always wondered why can't we do something like this in php
>
> class MyClass{
>
> private $storage = new ArrayObject();
>
> public function __construct($v){
> // whatever
> }
>
> // rest of class
>
> }
>
> Why can't we create a new obj
I always wondered why can't we do something like this in php
class MyClass{
private $storage = new ArrayObject();
public function __construct($v){
// whatever
}
// rest of class
}
Why can't we create a new object and assign it to property like this?
Then when a new instance of MyClass is cr
> >
> > On top of this, there's an argument that you're not addressing: most
> > template engines in PHP either directly consume PHP template files...
> > or "compile" templates into... PHP template files. As such, sooner or
> > later, you'll have a class that includes a PHP template file, and
>
On 2012-04-13, Tom Boutell wrote:
> Wouldn't this be a significant performance hit when multiplied by
> every class file in a project?
Typically, you'd cache the end-result of pre-processing, so that
subsequent requests can use the processed results. In other words, you
incur the expense once per
Hi!
> Sadly when I proposed this many months ago my post was ignored. :-(
I've looked up your post
(http://marc.info/?l=php-internals&m=130348253124215&w=2 if anybody's
interested) and unfortunately I think it did not have due attention
because it mixed two issues - converting comparison that ==
On Fri, Apr 13, 2012 at 7:15 AM, Matthew Weier O'Phinney <
weierophin...@php.net> wrote:
> On 2012-04-13, Kris Craig wrote:
> > On Thu, Apr 12, 2012 at 8:24 PM, John LeSueur
> wrote:
> > > //a controller, maybe a class, maybe just a set of functions, but in a
> > > .phpp file
> > > function getL
On 04/13/2012 08:49 AM, Stas Malyshev wrote:
At now this is there should not alter of course. What really needed is
'named parameters'
That's entirely different topic.
https://wiki.php.net/rfc/namedparameters
--
Email: christopher.jo...@oracle.com
Tel: +1 650 506 8630
Blog: http://blog
On 04/13/2012 09:12 AM, Rasmus Lerdorf wrote:
On 04/13/2012 09:09 AM, Stas Malyshev wrote:
However I think it would make sense not to use this conversion in string
comparisons when we know it's lossy - it seems to be outside of the use
case for such comparisons and it seems apparent by now that
On Fri, Apr 13, 2012 at 5:45 AM, John LeSueur wrote:
>
>
> On Thu, Apr 12, 2012 at 11:13 PM, Kris Craig wrote:
>
>>
>>
>> On Thu, Apr 12, 2012 at 8:24 PM, John LeSueur wrote:
>>
>>>
>>> On Thu, Apr 12, 2012 at 9:00 PM, Kris Craig wrote:
>>>
On Thu, Apr 12, 2012 at 7:51 PM, John LeS
Hi!
> PHP's goal has always been KISS, but the decisions over the last few
> years run contrary to that. Most onerous is, where Javascript, Java
> and C have one scope resolution operator - a period - PHP has three
> (->, \, :: ). The only possible backwards compat fix to that is to
This is not
On 2012-04-13, Nicolas Grekas wrote:
> --f46d04016a77a386cf04bd8a62df
> Content-Type: text/plain; charset=ISO-8859-1
>
> > $closure = function () use ($this->getFooBar() as $foo) {
> > $foo->stuff();
> > }
>
> But this can already be written as :
>
> $closure = function () {
> $foo = $thi
On Wed, Apr 11, 2012 at 11:19 AM, Luke Scott wrote:
> I do agree with a lot of what was being said. But what can you do?
It would not be easy. I lack the skills required. And those who have
the skills lack the monumental time required. But PHP could do what
Adobe did with Actionscript. But it
On Fri, Apr 13, 2012 at 1:00 AM, Arvids Godjuks wrote:
> Kris.
>
> I can give you a real world example where that straight MVC with the. pphp
> if not breaks, then definetly becomes an ugly mess.
> I use Yii framework as my tool, it has some very nice tools for templating
> like widgets. Widgets p
On Thu, Apr 12, 2012 at 11:37 PM, David Muir wrote:
> On 13/04/12 15:13, Kris Craig wrote:
> > Again, the controller should NOT be a .phpp file. Likewise, your model
> > should NOT be hooking directly to the view. The controller hooks to the
> > model. The controller then sanitizes that and re
(I'm referring to the streams approach. You seem to be suggesting a
PECL extension with a fallback provision. It still sounds like
something no one will seriously use because they can't count on it
running fast on a given box, although it is a clever workaround.)
On Fri, Apr 13, 2012 at 1:28 PM, T
Wouldn't this be a significant performance hit when multiplied by
every class file in a project?
On Fri, Apr 13, 2012 at 10:15 AM, Matthew Weier O'Phinney
wrote:
> On 2012-04-13, David Muir wrote:
>> On 13/04/12 14:55, Stas Malyshev wrote:
>> > > If this is a pecl module library developers canno
On Fri, Apr 13, 2012 at 16:22, Pal Konyves wrote:
> Well, if you want to use empty in the above mentioned situations, you might
> need the change. I personally don't like using empty(). I use it only on
> arrays, that's because semantically fits: array is empty.
>
> In other situations I prefer co
On 04/13/2012 09:09 AM, Stas Malyshev wrote:
> However I think it would make sense not to use this conversion in string
> comparisons when we know it's lossy - it seems to be outside of the use
> case for such comparisons and it seems apparent by now that it is hard
> for people to understand why i
Hi!
> There are other situations where the result of the comparison may be
> "inaccurate" -- in the sense that two strings may be constructed as
> representing different numbers, but they compare equal.
>
> * Comparing two different real numbers that map to the same double
> precision numbe
Hi!
> I am not sure but it is too expensive only for memory. I don't think
> that current scope will be very big and operation for copying it very
That depends on the scope, it can be very big - e.g. global scope. But
more important is not that it is big by itself, but that it retains
variables
Well, if you want to use empty in the above mentioned situations, you might
need the change. I personally don't like using empty(). I use it only on
arrays, that's because semantically fits: array is empty.
In other situations I prefer comparing against the according return type
because it improve
On 2012-04-13, Kris Craig wrote:
> On Thu, Apr 12, 2012 at 8:24 PM, John LeSueur wrote:
> > //a controller, maybe a class, maybe just a set of functions, but in a
> > .phpp file
> > function getLoginPage()
> > {
> > //set up some data
> > //some people like to use plain .php for templates
On 2012-04-13, David Muir wrote:
> On 13/04/12 14:55, Stas Malyshev wrote:
> > > If this is a pecl module library developers cannot use it and trust
> > > that on php 5.n, it just works. That would fork the language in an
> > > undesirable way. It should be a core feature, no ini flag, no
> > > so
Hi,
On Fri, Apr 13, 2012 at 15:00, Nikita Popov wrote:
> On Fri, Apr 13, 2012 at 11:37 AM, Pal Konyves wrote:
>> I don't see the point of empty( function() ).
>>
>> You tipically use empty on values that holds information you want to use
>> later in the program flow (a string, an integer). That
On Fri, Apr 13, 2012 at 11:37 AM, Pal Konyves wrote:
> I don't see the point of empty( function() ).
>
> You tipically use empty on values that holds information you want to use
> later in the program flow (a string, an integer). That means you'd better
> extract it to a variable because you want
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> Please add all your questions here:
>
> https://wiki.php.net/vcs/gitfaq-usecases
>
> And let try to answer them one by one, for the best or recommended
> way to do something.
Thank you. makes sense to put it into the wiki and discuss it :).
First
Nicolas
>> $closure = function () use ($this->getFooBar() as $foo) {
>> $foo->stuff();
>> }
>
> But this can already be written as :
>
> $closure = function () {
> $foo = $this->getFooBar();
> $foo->stuff();
> }
Except that's not equivilant. getFooBar() in the first example is
called
On Thu, Apr 12, 2012 at 11:13 PM, Kris Craig wrote:
>
>
> On Thu, Apr 12, 2012 at 8:24 PM, John LeSueur wrote:
>
>>
>> On Thu, Apr 12, 2012 at 9:00 PM, Kris Craig wrote:
>>
>>>
>>>
>>> On Thu, Apr 12, 2012 at 7:51 PM, John LeSueur wrote:
>>>
On Thu, Apr 12, 2012 at 7:49 PM, Kris C
On Fri, Apr 13, 2012 at 2:02 AM, Xinchen Hui wrote:
> This $this is not that $this , plz thinking :
> $closuer->bindTo
>
> And $this become the new scope, but the alias still refer to the obj
> who own this closure.
That makes sense. Thanks.
--
PHP Internals - PHP Runtime Development Mailin
On Fri, Apr 13, 2012 at 12:42 AM, Galen Wright-Watson
wrote:
> Just to be clear, under the new behavior, calling "empty" or "isset" on
> undefined variables and undefined array indices shouldn't produce a notice
> when E_NOTICE is set, correct? Basically, the change isn't regressive.
Yup, that's r
On Fri, 13 Apr 2012 11:48:10 +0200, Pierre Joye
wrote:
On Fri, Apr 13, 2012 at 11:40 AM, marius adrian popa
wrote:
Something for the weekend (flamewar)
http://www.reddit.com/r/programming/comments/s6477/9223372036854775807_9223372036854775808/
http://news.ycombinator.com/item?id=3832069
Hi,
2012/4/13 Laruence :
> On Fri, Apr 13, 2012 at 4:19 PM, Yasuo Ohgaki wrote:
>> Hi,
>>
>> 2012/4/13 Verbitsky Alexander :
>>> On 04/12/2012 06:38 PM, Laruence wrote:
Hi:
I have made a RFC to allow user use T_AS in the closure declaration,
like:
function
It's PHP 5.4.1RC2 not RC1
On 2012-04-13, David Soria Parra wrote:
>
> Hello!
>
> Stas has packed PHP 5.4.1RC2 which you can find here:
>
> http://downloads.php.net/stas/
>
> The Windows team provides windows binaries which you find here:
>
> http://windows.php.net/qa/
>
> Please ensure th
Hello!
Stas has packed PHP 5.4.1RC2 which you can find here:
http://downloads.php.net/stas/
The Windows team provides windows binaries which you find here:
http://windows.php.net/qa/
Please ensure that the release is solid and all things behave
as expected! Please test this RC against
On 04/13/2012 11:36 AM, Stas Malyshev wrote:
Hi!
I'm at a bit of a loss as to why Laruence is claiming that allowing
closures to implicitly access variables in the outer scope requires
duplicating the symbol table.
Because variables need to be stored somewhere after the parent function
exits.
hi
No thanks, but read:
https://bugs.php.net/bug.php?id=54547
everything is in there.
We don't need more rant posts on this list :)
Cheers,
On Fri, Apr 13, 2012 at 11:40 AM, marius adrian popa wrote:
> Something for the weekend (flamewar)
> http://www.reddit.com/r/programming/comments/s6477/
> Hi!
>
> "The original reason for this restriction probably is that - in a way -
> it "doesn't make sense" to pass anything but a variable to empty()"
>
> I don't see the point of empty( function() ).
>
> You tipically use empty on values that holds information you want to use
> later in the progr
Hi!
As one, I have regular small but annoying issues with git. No big deal
or stoppers but they are mostly due to my lack of clue.
Following a little bit the questions and discussions on IRC, it seems
that we are many in the same situation. That's why I would like to
improve the FAQ and the workf
On Fri, Apr 13, 2012 at 4:19 PM, Yasuo Ohgaki wrote:
> Hi,
>
> 2012/4/13 Verbitsky Alexander :
>> On 04/12/2012 06:38 PM, Laruence wrote:
>>>
>>> Hi:
>>> I have made a RFC to allow user use T_AS in the closure declaration,
>>> like:
>>>
>>> function () use($long as $l,&$long as $r) {
>>>
Hi!
> I'm at a bit of a loss as to why Laruence is claiming that allowing
> closures to implicitly access variables in the outer scope requires
> duplicating the symbol table.
Because variables need to be stored somewhere after the parent function
exits.
> Is there any technical reason why it's
2012/4/13 Yasuo Ohgaki :
>
> I would rather have this.
> function FUNC($a, $b, $c) uses ($d, $e, $f) {}
> Then it would be consistent with anonymous function.
Oops.
It became consistent, but there would be no use
with PHP. As it cannot pollute global vars.
--
Yasuo Ohgaki
yohg...@ohgaki.net
--
I'm at a bit of a loss as to why Laruence is claiming that allowing
closures to implicitly access variables in the outer scope requires
duplicating the symbol table.
Is there any technical reason why it's not possible for scopes to retain a
pointer to their parent scopes so variables can be looked
Hi,
2012/4/13 Verbitsky Alexander :
> On 04/12/2012 06:38 PM, Laruence wrote:
>>
>> Hi:
>> I have made a RFC to allow user use T_AS in the closure declaration,
>> like:
>>
>> function () use($long as $l,&$long as $r) {
>>
>> }
>>
>> here is the RFC: https://wiki.php.net/rfc/use
On Fri, Apr 13, 2012 at 4:10 PM, Verbitsky Alexander
wrote:
> On 04/12/2012 06:38 PM, Laruence wrote:
>>
>> Hi:
>> I have made a RFC to allow user use T_AS in the closure declaration,
>> like:
>>
>> function () use($long as $l,&$long as $r) {
>>
>> }
>>
>> here is the RFC: http
On 04/12/2012 06:38 PM, Laruence wrote:
Hi:
I have made a RFC to allow user use T_AS in the closure declaration, like:
function () use($long as $l,&$long as $r) {
}
here is the RFC: https://wiki.php.net/rfc/useas
any ideas? thanks
Closure is a functional literal
Kris.
I can give you a real world example where that straight MVC with the. pphp
if not breaks, then definetly becomes an ugly mess.
I use Yii framework as my tool, it has some very nice tools for templating
like widgets. Widgets provide a container to put functionalit required by
multiple pages a
> $closure = function () use ($this->getFooBar() as $foo) {
> $foo->stuff();
> }
But this can already be written as :
$closure = function () {
$foo = $this->getFooBar();
$foo->stuff();
}
Here, $foo also only exists inside the closure.
> Also, remember that the closure is in fact an
"lol ... really REALLY stupid"
ps: I got baited
2012.04.13. 2:08, "Kris Craig" ezt írta:
> On Thu, Apr 12, 2012 at 5:02 PM, Arvids Godjuks >wrote:
>
> > You all know where the short_tags, register_globals, magic_quotes and
> other
> > stuff like that took the language and the problems it made.
67 matches
Mail list logo