Re: [PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net

>> Please test it carefully, and report any bugs in the bug system, but
>>
>>
>> only if you have a short reproducable test case. The next beta
>>
>>
>> will be released on Oct 13.
>>
>>
>> regards,
>>
>>
>> Stas and David
>>
> WHY post it four times??

a glitch with my mail server.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP 5.4.0beta1 released

2011-09-15 Thread Sharl.Jimh.Tsin
在 2011-09-16五的 03:50 +0200,d...@php.net写道:
> Hello!
> 
> 
> 
> 
> 
> Stas has packed PHP 5.4.0beta1 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 test it carefully, and report any bugs in the bug system, but
> 
> 
> only if you have a short reproducable test case. The next beta
> 
> 
> will be released on Oct 13.
> 
> 
> regards,
> 
> 
> Stas and David
> 
WHY post it four times??
-- 
Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)

Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Hello!





Stas has packed PHP 5.4.0beta1 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 test it carefully, and report any bugs in the bug system, but


only if you have a short reproducable test case. The next beta


will be released on Oct 13.


regards,


Stas and David

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Hello!





Stas has packed PHP 5.4.0beta1 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 test it carefully, and report any bugs in the bug system, but


only if you have a short reproducable test case. The next beta


will be released on Oct 13.


regards,


Stas and David

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Hello!





Stas has packed PHP 5.4.0beta1 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 test it carefully, and report any bugs in the bug system, but


only if you have a short reproducable test case. The next beta


will be released on Oct 13.


regards,


Stas and David

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP 5.4.0beta1 released

2011-09-15 Thread d...@php.net
Hello!





Stas has packed PHP 5.4.0beta1 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 test it carefully, and report any bugs in the bug system, but


only if you have a short reproducable test case. The next beta


will be released on Oct 13.


regards,


Stas and David

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Repetitive answers . . .

2011-09-15 Thread Joshua Stoutenburg
On Thu, Sep 15, 2011 at 5:46 PM, Jason Pruim
>
> I've always thought that getting a couple fairly similar answers to the same 
> question helped to validate the answer for someone who is in the early 
> process of learning ;)
>>
>> -nathan
>
>

Yeah, you know, I think you are right! I'd like to answer this
question the same way, even though half a dozen have already answered
it the same way.

But let me put a spin on it:

ammo = $ammo;
}

public function flingAt($target)
{
$target->flingAlert($this->ammo);
}
}


$me = new baboon($information);
$you = new baboon();
$me->flingAt($you);


// I hope everyone finds this more humorous than offensive.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Repetitive answers . . .

2011-09-15 Thread Jason Pruim

Jason Pruim
li...@pruimphotography.com



On Sep 15, 2011, at 3:22 AM, Nathan Nobbe wrote:

> On Wed, Sep 14, 2011 at 10:06 PM, Joshua Stoutenburg
> wrote:
> 
>> On Wed, Sep 14, 2011 at 11:59 AM, Govinda 
>> wrote:
 As for duplicate answers...,
>>> 
 [snip]
>>> 
>>> 
>>> Also newbies may tend to like the multiples answers.. for the different
>> perspectives, as Dan said, but also when they are exact dupe answers -
>> because then the newbie knows the answer is definitive.. and then stops
>> asking the list.. and starts doing what work is called for.
>>> 
>>> -Govinda
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>> 
>>> 
>> 
>> That's a good point.  The absence of objection to a provided answer
>> doesn't necessarily make it definitive since it could just be the
>> masses passed over the conversation.  Therefore, yes, duplicate
>> answers are a good thing.
>> 
>> Thanks everybody for your patience in helping this mailing list
>> newcomer understand how things work.
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 
> wait, it sounds like we could use another answer .., yes ppl like to answer
> things many times here, often with almost identical suggestions, and many
> spins on how to approach the problem, including alternative perspectives on
> life..; the ebb-&-flow of php-general ;)

I've always thought that getting a couple fairly similar answers to the same 
question helped to validate the answer for someone who is in the early process 
of learning ;)
> 
> -nathan


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Fwd: [PHP] Bug?

2011-09-15 Thread Tim Streater
On 15 Sep 2011 at 22:43, tamouse mailing lists  wrote: 

> For the floats, http://us2.php.net/operators.comparison makes it
> pretty clear (and this has been a well-known thing about floats as far
> back as Uni for me, in 1979).

The fact that floating point hardware has limited precision has been known ever 
since the first such hardware in the mid-1950's, in fact.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Fwd: [PHP] Bug?

2011-09-15 Thread tamouse mailing lists
Hit reply instead of reply-all /o\


-- Forwarded message --
From: tamouse mailing lists 
Date: Thu, Sep 15, 2011 at 4:39 PM
Subject: Re: [PHP] Bug?
To: Igor Escobar 


On Thu, Sep 15, 2011 at 4:07 PM, Igor Escobar  wrote:
> Anyone can explain this?
>
> https://gist.github.com/1220404

For the floats, http://us2.php.net/operators.comparison makes it
pretty clear (and this has been a well-known thing about floats as far
back as Uni for me, in 1979).

The string thing is noted in PHP as far back as 2004:

http://us2.php.net/manual/en/language.types.string.php#41986

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML enabled but not working

2011-09-15 Thread tamouse mailing lists
On Thu, Sep 15, 2011 at 3:20 PM, Matthew Pounsett  wrote:
>> echo "" | php

Not anything to do with the problem, but you can just write:

  php -r "print xml_parser_create('');"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Bug?

2011-09-15 Thread Igor Escobar
Thank you guys.


Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar 





On Thu, Sep 15, 2011 at 6:32 PM, Shawn McKenzie wrote:

> On 09/15/2011 04:07 PM, Igor Escobar wrote:
> > Anyone can explain this?
> >
> > https://gist.github.com/1220404
> >
> > Part of the code are in portuguese so...
> > iguais = equal
> > diferentes = different
> >
> > Regards,
> > Igor Escobar
> > *Software Engineer
> > *
> > + http://blog.igorescobar.com
> > + http://www.igorescobar.com
> > + @igorescobar 
> >
>
> 1. Obviously because of the issues with floating point precision these
> are stored as the same float, a la your next example.
>
> 2. Using bc math for binary calculations on string representations of a
> number overcomes the problems in 1.
>
> 3. This one is peculiar, but it seems that since they are numeric
> strings that they are being juggled to float for the comparison since
> using == there is no type checking.  Using === yields a different
> result, presumably because forcing a type check compares them as
> strings.  Use strcmp() to overcome this.
>
> 4. Do I need to explain this one?
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
>


[PHP] Re: Bug?

2011-09-15 Thread Shawn McKenzie
On 09/15/2011 04:07 PM, Igor Escobar wrote:
> Anyone can explain this?
> 
> https://gist.github.com/1220404
> 
> Part of the code are in portuguese so...
> iguais = equal
> diferentes = different
> 
> Regards,
> Igor Escobar
> *Software Engineer
> *
> + http://blog.igorescobar.com
> + http://www.igorescobar.com
> + @igorescobar 
> 

1. Obviously because of the issues with floating point precision these
are stored as the same float, a la your next example.

2. Using bc math for binary calculations on string representations of a
number overcomes the problems in 1.

3. This one is peculiar, but it seems that since they are numeric
strings that they are being juggled to float for the comparison since
using == there is no type checking.  Using === yields a different
result, presumably because forcing a type check compares them as
strings.  Use strcmp() to overcome this.

4. Do I need to explain this one?

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug?

2011-09-15 Thread Igor Escobar
I'm confused about the output of the code... very disturbed. But
@*augustohp
*  already respond the question on the gist thread (in portuguese) and
explained why those results.


Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar 





On Thu, Sep 15, 2011 at 6:17 PM, Daniel Brown  wrote:

> On Thu, Sep 15, 2011 at 17:07, Igor Escobar  wrote:
> > Anyone can explain this?
> >
> > https://gist.github.com/1220404
> >
> > Part of the code are in portuguese so...
> > iguais = equal
> > diferentes = different
>
> About this part are you confused?
>
> --
> 
> Network Infrastructure Manager
> http://www.php.net/
>


Re: [PHP] Bug?

2011-09-15 Thread Daniel Brown
On Thu, Sep 15, 2011 at 17:07, Igor Escobar  wrote:
> Anyone can explain this?
>
> https://gist.github.com/1220404
>
> Part of the code are in portuguese so...
> iguais = equal
> diferentes = different

About this part are you confused?

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Bug?

2011-09-15 Thread Igor Escobar
Anyone can explain this?

https://gist.github.com/1220404

Part of the code are in portuguese so...
iguais = equal
diferentes = different

Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar 


[PHP] XML enabled but not working

2011-09-15 Thread Matthew Pounsett

I seems to behaving issues with php5 on one particular server, and I haven't 
been able to find the issue.  Basically, php says XML is enabled, but xml 
functions are missing.

> php -i | grep "XML support"
libXML support => active

> echo "" | php
Fatal error: Call to undefined function xml_parser_create() in - on line 1

The machine in question is FreeBSD 8.2-RELEASE running the most recent ports of 
php5 and expat.

> php -v
PHP 5.3.8 with Suhosin-Patch (cli) (built: Sep 15 2011 13:58:49) 
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

> sudo portversion -v expat
expat-2.0.1_2   =  up-to-date with port 

What's baffling is that this is a basically identical configuration to another 
server where php is behaving just fine.  I haven't been able to find the 
variation yet.  

Anyone have any thoughts on what to look at?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] innerHTML triple quotes issue

2011-09-15 Thread Andrew Ballard
On Thu, Sep 15, 2011 at 5:01 AM, Grega Leskovšek  wrote:
>
> My Heavenly profession is being  onmouseover=' src=\"http://imagecache2.allposters.com/images/PF_New/102008/3070943.jpg\";
> alt =\"close to my heavenly face\" />'";?>'
> onmouseout="this.innerHTML='an angel'">an angel,
>
>
> I first tried this but got a mistake and then I tried to use php to
> settle this look above, but got parsing mistake.
>

It's easy to forget that, although you are embedding JavaScript in the
onmouseover and onmouseout attributes of the element, the content of
those attributes is still technically HTML, so the single and double
quotes as well as the tag angle brackets inside the attribute should
probably be the HTML entities (" ' < and >) instead of
the literal characters. This avoids the issue with nesting and
escaping quotes across three languages (PHP -> HTML -> Javascript).


Of course, when testing this, my first attempt worked in Firefox,
Opera, Safari and Chrome but failed in IE (version 8). (Go figure)

http://imagecache2.allposters.com/images/PF_New/102008/3070943.jpg";
/>'"
onmouseout="this.innerHTML='an angel'"
>
an angel



So then I tried a mixed approach and it seems to work in all of them:

http://imagecache2.allposters.com/images/PF_New/102008/3070943.jpg";
/>'"
onmouseout="this.innerHTML='an angel'"
>
an angel


YMMV

Andrew

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] lost return value during a static call

2011-09-15 Thread Richard Quadling
On 15 September 2011 14:01, chamila gayan  wrote:
> hi All,
>
> I'm seeing a weired behavior in following code http://pastebin.com/B5q8i1RY
>
> when it goes through 2 static methods, at some point it stops returning
> value to the calling method. (please see comments in-line).
>
> may be I'm doing this in a wrong way so your suggestions are  welcome. And I
> really appreciate if someone can explain how 'return' behaves with static
> methods specially when they are called recursively.   thanks a bunch
>
> chamila
>

New pastie http://pastebin.com/AnZ1r7yR
Output is ...
Z:\ppp.php 108parentclass::getChild 29parentclass::getChild
40parentclass::getArray 22parentclass::getChild
29parentclass::getChild 32parentclass::childload
6parentclass::childload 9childA::__construct 54childA::setA
67childA::setA 69childA::__construct 56parentclass::getChild 34childA
Object(   [a:childA:private] => 1)parentclass::getArray
24parentclass::getChild 42parentclass::getChild 44Z:\ppp.php
110Z:\ppp.php 112
Using PHP 5.3.9-dev on Win32.


-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] lost return value during a static call

2011-09-15 Thread Robert Williams

On Sep 15, 2011, at 6:03, "chamila gayan"  wrote:

> when it goes through 2 static methods, at some point it stops returning
> value to the calling method. (please see comments in-line).

The getArray() method and the 'else' portion of the getChild() method both lack 
a return statement, so they're basically just tossing out whatever value they 
come up with.

--
Bob Williams

Notice: This communication, including attachments, may contain information that 
is confidential. It constitutes non-public information intended to be conveyed 
only to the designated recipient(s). If the reader or recipient of this 
communication is not the intended recipient, an employee or agent of the 
intended recipient who is responsible for delivering it to the intended 
recipient, or if you believe that you have received this communication in 
error, please notify the sender immediately by return e-mail and promptly 
delete this e-mail, including attachments without reading or saving them in any 
manner. The unauthorized use, dissemination, distribution, or reproduction of 
this e-mail, including attachments, is prohibited and may be unlawful. If you 
have received this email in error, please notify us immediately by e-mail or 
telephone and delete the e-mail and the attachments (if any).

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] innerHTML triple quotes issue

2011-09-15 Thread Jen Rasmussen
Grega,

Do you HAVE TO use PHP to echo the output or can you just write it in HTML? It 
seems much simpler and if 
so... below will work. The code is not indented properly but I did this so you 
can see what's going on. 

HTML VERSION
My Heavenly profession is being
http://imagecache2.allposters.com/images/PF_New/102008/3070943.jpg\' />'" 
onmouseout="this.innerHTML='an angel'"
>
an angel

Hope that helps, cheers! 
Jen




-Original Message-
From: Grega Leskovšek [mailto:legr...@gmail.com] 
Sent: Thursday, September 15, 2011 4:01 AM
To: php-general
Subject: [PHP] innerHTML triple quotes issue

My Heavenly profession is being http://imagecache2.allposters.com/images/PF_New/102008/3070943.jpg\";
alt =\"close to my heavenly face\" />'";?>'
onmouseout="this.innerHTML='an angel'">an angel,


I first tried this but got a mistake and then I tried to use php to
settle this look above, but got parsing mistake.

although not fully liberated I came to work in this world for http://t1.gstatic.com/images?q=tbn:ANd9GcTaxIC0HvMMWTlZ2ozXMcwTsqRcStUXRWItISeVyDrVkzVtv2s-AVmn6v3x\";
alt =\"Lord Krishna in His garden of flowers, that's a spiritual world\" />'"
onmouseout="this.innerHTML='Lord Krishna\'s Realisation.'">Lord
Krishna's Realisation.


Could YOu please look a t my code and exlpain me what to do if I need
to use triple quotoes - we only have " and '  in onmouseover 1,
thisINNERHTML 2 and in src 3

Please help me!

♥♥♥ When the sun rises I receive and when it sets I forgive! ♥♥♥
˜♥ -> http://moj.skavt.net/gleskovs/ <- ♥ Always, Grega Leskovšek

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Stop PHP execution on client connection closed

2011-09-15 Thread Marco Lanzotti
Il 14/09/2011 19:34, Alex Nikitin ha scritto:
> Perhaps if I, or we can understand your application a little better,
> we could suggest better solutions, just remember that you are not the
> first person to have to solve these similar issues. I can help you if
> you want, glimpse over your database design and queries for a fresh
> look, i have fairly extensive php (and many other languages)
> programming experience, as well as database design and administration,
> system development and administration, optimization, security, caching
> (many other things, that don't directly pertain to this) though we
> should probably keep it off the list. 

Table and queries are very simple.
Table is like this:

CREATE TABLE `TABLE1` (
  `ID` int unsigned NOT NULL,
  `Service` char(2) NOT NULL,
  `Lang` char(2) NOT NULL,
  `Text1` varchar(100) DEFAULT NULL,
  `Char1` char(1) NOT NULL,
  `Date1` date NOT NULL,
  `Num1` int unsigned NOT NULL,
  `Num2` smallint unsigned NOT NULL,
  `Num3` smallint unsigned NOT NULL,
  `Num4` tinyint unsigned NOT NULL,
  `Num5` int unsigned NOT NULL,
  `Num6` tinyint NOT NULL,
  `Num7` int unsigned NOT NULL,
  PRIMARY KEY (`ID`,`Service`,`Lang`),
  KEY `index_1` (`Char1`),
  KEY `index_2` (`Date1`),
  KEY `index_3` (`Num1`),
  KEY `index_4` (`Num2`),
  KEY `index_5` (`Num3`),
  KEY `index_6` (`Num4`),
  KEY `index_7` (`Num5`),
  KEY `index_8` (`Num6`),
  KEY `index_9` (`Num7`),
  KEY `index_10` (`Text1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

And this is an example query:

SELECT COUNT(*)
FROM TABLE1
WHERE Char1='A'
AND Num2=10

The WHERE clause can contain any indexed column.

Bye,
Marco

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] lost return value during a static call

2011-09-15 Thread chamila gayan
hi All,

I'm seeing a weired behavior in following code http://pastebin.com/B5q8i1RY

when it goes through 2 static methods, at some point it stops returning
value to the calling method. (please see comments in-line).

may be I'm doing this in a wrong way so your suggestions are  welcome. And I
really appreciate if someone can explain how 'return' behaves with static
methods specially when they are called recursively.   thanks a bunch

chamila


RE: [PHP] Re: Sort problem

2011-09-15 Thread yeer tai


Yeah well, it is indeed sometimes, for someone a bit sleepy yet rather 
responsible hehe. Btw, m new here, need to get my head around soon i guess. 
Cheers. 



> From: marc.g...@gmail.com
> Date: Thu, 15 Sep 2011 07:54:00 -0400
> CC: php-general@lists.php.net
> Subject: Re: [PHP] Re: Sort problem
> 
> > use natsort.
> 
> For the "repetitive answers" specialists:  Is it possible that 15
> hours later someone is still only seeing the original question?
> 
> Marc
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
  

Re: [PHP] Re: Sort problem

2011-09-15 Thread Marc Guay
> use natsort.

For the "repetitive answers" specialists:  Is it possible that 15
hours later someone is still only seeing the original question?

Marc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Repetitive answers . . .

2011-09-15 Thread Nathan Nobbe
On Wed, Sep 14, 2011 at 10:06 PM, Joshua Stoutenburg
wrote:

> On Wed, Sep 14, 2011 at 11:59 AM, Govinda 
> wrote:
> >> As for duplicate answers...,
> >
> >> [snip]
> >
> >
> > Also newbies may tend to like the multiples answers.. for the different
> perspectives, as Dan said, but also when they are exact dupe answers -
> because then the newbie knows the answer is definitive.. and then stops
> asking the list.. and starts doing what work is called for.
> >
> > -Govinda
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> That's a good point.  The absence of objection to a provided answer
> doesn't necessarily make it definitive since it could just be the
> masses passed over the conversation.  Therefore, yes, duplicate
> answers are a good thing.
>
> Thanks everybody for your patience in helping this mailing list
> newcomer understand how things work.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
wait, it sounds like we could use another answer .., yes ppl like to answer
things many times here, often with almost identical suggestions, and many
spins on how to approach the problem, including alternative perspectives on
life..; the ebb-&-flow of php-general ;)

-nathan