[PHP] zend_auto_global_disable_jit missing in PHP 5.4.5

2012-06-04 Thread freeone3000
I'm working with a third-party PHP extension that makes a call to
zend_auto_global_disable_jit. However, in PHP5.4.5, there is no
zend_auto_global_disable_jit available, nor is it in its traditional
header. Commenting out all zend_auto_global_disable_jit calls causes
PHP to no longer recognize it as a valid extension, while leaving them
in attempts for an invalid method to be called.

The file in question is
https://github.com/mtorromeo/runkit/blob/master/runkit.c line 305. As
is relatively obvious, it's not part of a macro, and its removal
should not affect whether the library is a PHP extension or not -
perhaps it's based on PHP's static analysis? If it doesn't call the
function, it would access a global, possibly before the global has
been JIT initialized by the runtime. If this is the case, what is the
replacement function for PHP 5.4.5?

-- 
James Moore

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



[PHP] zend_auto_global_disable_jit missing in PHP 5.4.5

2012-06-04 Thread freeone3000
I'm working with a third-party PHP extension that makes a call to
zend_auto_global_disable_jit. However, in PHP5.4.5, there is no
zend_auto_global_disable_jit available, nor is it in its traditional
header. Commenting out all zend_auto_global_disable_jit calls causes
PHP to no longer recognize it as a valid extension, while leaving them
in attempts for an invalid method to be called.

The file in question is
https://github.com/mtorromeo/runkit/blob/master/runkit.c line 305. As
is relatively obvious, it's not part of a macro, and its removal
should not affect whether the library is a PHP extension or not -
perhaps it's based on PHP's static analysis? If it doesn't call the
function, it would access a global, possibly before the global has
been JIT initialized by the runtime. If this is the case, what is the
replacement function for PHP 5.4.5?

-- 
James Moore

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



Re: [PHP] disabled cookies

2012-06-04 Thread Matijn Woudt
On Tue, Jun 5, 2012 at 12:13 AM, Ashley Sheridan
 wrote:
> On Mon, 2012-06-04 at 17:53 -0400, Paul M Foster wrote:
>
>> On Sun, Jun 03, 2012 at 10:21:21PM +0100, Ashley Sheridan wrote:
>>
>> >
>> >
>> > Al  wrote:
>> >
>> > >Disabled cookies use to be a problem years ago.  What's your
>> > >experience these days.
>> > >
>> > >I need it for my session ID. As I read the docs, the old method of
>> > >appending it to the URL is a security issue.
>> > >
>> > >I can obviously save the ID in a temp file which can be read by all
>> > >the pages needing it.
>> > >
>> > >Al
>> > >
>> > >-- PHP General Mailing List (http://www.php.net/) To unsubscribe,
>> > >visit: http://www.php.net/unsub.php
>> >
>> > There is a new law been passed in the UK that makes non-essential
>> > cookies opt-in only, so you must get permission in order to use them.
>>
>> Good lord. I'm glad the U.S. Congress has not gotten together to pass
>> laws about how we build websites here. I'm not sure I could take
>> less-than-bright government bureaucrats telling me how to do the job of
>> programming. No offense, Ash, but you can keep your parliament.
>>
>> Paul
>>
>> --
>> Paul M. Foster
>> http://noferblatz.com
>> http://quillandmouse.com
>>
>
>
> Yeah, it's been such a pain, as nobody over here is quite sure how the
> hell it'll be enforced either, or if it even will be. It's also pretty
> vague as to just where the line gets drawn. The official government
> sites on this are pretty black and white, but don't clearly address the
> grey areas. I think this is definitely a case of the persons making the
> laws don't understand the technology involved, which sadly seems to be
> the case across a lot of tech laws being passed world-wide of late :(
>

Yep,  When this law was discussed, they were mostly talking about
completely banning cookies. Only later they figured out that there are
quite a few sites that can't live without cookies...

- Matijn

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



Re: [PHP] disabled cookies

2012-06-04 Thread Ashley Sheridan
On Mon, 2012-06-04 at 17:53 -0400, Paul M Foster wrote:

> On Sun, Jun 03, 2012 at 10:21:21PM +0100, Ashley Sheridan wrote:
> 
> > 
> > 
> > Al  wrote:
> > 
> > >Disabled cookies use to be a problem years ago.  What's your
> > >experience these days.
> > >
> > >I need it for my session ID. As I read the docs, the old method of
> > >appending it to the URL is a security issue.
> > >
> > >I can obviously save the ID in a temp file which can be read by all
> > >the pages needing it.
> > >
> > >Al
> > >
> > >-- PHP General Mailing List (http://www.php.net/) To unsubscribe,
> > >visit: http://www.php.net/unsub.php
> > 
> > There is a new law been passed in the UK that makes non-essential
> > cookies opt-in only, so you must get permission in order to use them.
> 
> Good lord. I'm glad the U.S. Congress has not gotten together to pass
> laws about how we build websites here. I'm not sure I could take
> less-than-bright government bureaucrats telling me how to do the job of
> programming. No offense, Ash, but you can keep your parliament.
> 
> Paul
> 
> -- 
> Paul M. Foster
> http://noferblatz.com
> http://quillandmouse.com
> 


Yeah, it's been such a pain, as nobody over here is quite sure how the
hell it'll be enforced either, or if it even will be. It's also pretty
vague as to just where the line gets drawn. The official government
sites on this are pretty black and white, but don't clearly address the
grey areas. I think this is definitely a case of the persons making the
laws don't understand the technology involved, which sadly seems to be
the case across a lot of tech laws being passed world-wide of late :(

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] disabled cookies

2012-06-04 Thread Paul M Foster
On Sun, Jun 03, 2012 at 10:21:21PM +0100, Ashley Sheridan wrote:

> 
> 
> Al  wrote:
> 
> >Disabled cookies use to be a problem years ago.  What's your
> >experience these days.
> >
> >I need it for my session ID. As I read the docs, the old method of
> >appending it to the URL is a security issue.
> >
> >I can obviously save the ID in a temp file which can be read by all
> >the pages needing it.
> >
> >Al
> >
> >-- PHP General Mailing List (http://www.php.net/) To unsubscribe,
> >visit: http://www.php.net/unsub.php
> 
> There is a new law been passed in the UK that makes non-essential
> cookies opt-in only, so you must get permission in order to use them.

Good lord. I'm glad the U.S. Congress has not gotten together to pass
laws about how we build websites here. I'm not sure I could take
less-than-bright government bureaucrats telling me how to do the job of
programming. No offense, Ash, but you can keep your parliament.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

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



Re: [PHP] 0.0.0.0 & iplong()

2012-06-04 Thread Matijn Woudt
On Mon, Jun 4, 2012 at 8:38 PM, jas  wrote:
> On 06/04/2012 11:33 AM, Matijn Woudt wrote:
>>
>> On Mon, Jun 4, 2012 at 6:54 PM, jas  wrote:
>>>
>>> Not sure if this is a bug or not...
>>>
>>> I have run into an error when performing a conditional using iplong() and
>>> the ~ bitwise operator
>>>
>>> $ip = '0.0.0.0';
>>> $mask = '24';
>>>
>>> $end = (ip2long($ip) || (~ip2long($mask))) + 1;
>>>
>>> PHP Fatal error:  Unsupported operand types
>>>
>>> I even tried to typecast the mask to (int)
>>>
>>
>> The error is probably not where you suspect it to be. ip2long will
>> return false for ip2long($mask), because $mask is not a valid IP
>> address. The ~ operator is not supported for false.
>>
>> - Matijn
>
>
> Strange... this works
>
> $ip = '10.0.2.0';
> $mask = '24';
>
> Anything using 0.0.0.0 fails using the bitmask to calculate valid CIDR
> ranges.
>

Yes, because with $ip being 0.0.0.0, the result of ip2long($ip) will
be zero. Zero evaluates to false when PHP is going to parse the ||
operator, and because of that, it continues to parse the rest.
When the result of ip2long($ip) is greater that zero, in case of some
other valid IP, it will evaluate to true and PHP will not even execute
the rest after the || because the result will be true anyway.
Did you mean to use a single | operator, as a bitwise OR?

- Matijn

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



Re: [PHP] 0.0.0.0 & iplong()

2012-06-04 Thread jas

On 06/04/2012 11:33 AM, Matijn Woudt wrote:

On Mon, Jun 4, 2012 at 6:54 PM, jas  wrote:

Not sure if this is a bug or not...

I have run into an error when performing a conditional using iplong() and
the ~ bitwise operator

$ip = '0.0.0.0';
$mask = '24';

$end = (ip2long($ip) || (~ip2long($mask))) + 1;

PHP Fatal error:  Unsupported operand types

I even tried to typecast the mask to (int)



The error is probably not where you suspect it to be. ip2long will
return false for ip2long($mask), because $mask is not a valid IP
address. The ~ operator is not supported for false.

- Matijn


Strange... this works

$ip = '10.0.2.0';
$mask = '24';

Anything using 0.0.0.0 fails using the bitmask to calculate valid CIDR 
ranges.


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



Re: [PHP] 0.0.0.0 & iplong()

2012-06-04 Thread Matijn Woudt
On Mon, Jun 4, 2012 at 6:54 PM, jas  wrote:
> Not sure if this is a bug or not...
>
> I have run into an error when performing a conditional using iplong() and
> the ~ bitwise operator
>
> $ip = '0.0.0.0';
> $mask = '24';
>
> $end = (ip2long($ip) || (~ip2long($mask))) + 1;
>
> PHP Fatal error:  Unsupported operand types
>
> I even tried to typecast the mask to (int)
>

The error is probably not where you suspect it to be. ip2long will
return false for ip2long($mask), because $mask is not a valid IP
address. The ~ operator is not supported for false.

- Matijn

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



[PHP] 0.0.0.0 & iplong()

2012-06-04 Thread jas

Not sure if this is a bug or not...

I have run into an error when performing a conditional using iplong() 
and the ~ bitwise operator


$ip = '0.0.0.0';
$mask = '24';

$end = (ip2long($ip) || (~ip2long($mask))) + 1;

PHP Fatal error:  Unsupported operand types

I even tried to typecast the mask to (int)

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



Re: [PHP] long running php script won't complete :(

2012-06-04 Thread Matijn Woudt
On Mon, Jun 4, 2012 at 5:57 PM, rene7705  wrote:
> Hi.
>
> I've got a piece of code that builds up a multi-meg test array for my
> opensourced http://mediabeez.ws/products/htmlMicroscope var_dump()
> improvement, and when I run it for longer than about 20 minutes, the
> browser just calls it quits.. :( Firefox, and chrome.
>
> I'd like to do this with a browser call, if all else fails I suppose I
> can run the generation of the test array from the commandline, but I
> prefer calling from the browser..
>
> So, I'm doing ob_start(), then start the main loop which does echo
> '.'; ob_flush(); flush();.
>
> I've got my KeepAliveTime set to 25 seconds, as per
> http://www.pctools.com/guides/registry/detail/891/
>
> And I'm calling this from my browser to the domain name that points
> back to the machine I run the browser on, latest wampserver on windows
> 7.
> Calling via localhost doesn't work somehow.
>
> Is there anything obvious I've missed?
>

Just to be sure, have you checked the Apache error logs for anything
obvious? (eg. out of memory?)
In case the browser closes the connection, you could use
ignore_user_abort [1] to be sure the script continues, though the
browser won't receive the result.

- Matijn

[1] www.php.net/manual/en/function.ignore-user-abort.php

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



Re: [PHP] Hungarian Notation interest with PHP

2012-06-04 Thread Tim Streater
On 04 Jun 2012 at 15:43, Mihamina Rakotomandimby  wrote: 

> I have a colleague stuck with this thing named "Hungarian Notation"
> http://goo.gl/xYv8O
>
> We try to define our internal coding standards, which is very close to
> the Symfony ones http://goo.gl/f2rcO
>
> But we're in conflict because the colleague really argue about his
> "Hungarian Notation".

This simply adds far too much noise to code. If I need to know what type a 
variable has, I'll look at its declaration, if any.

--
Cheers  --  Tim

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

[PHP] long running php script won't complete :(

2012-06-04 Thread rene7705
Hi.

I've got a piece of code that builds up a multi-meg test array for my
opensourced http://mediabeez.ws/products/htmlMicroscope var_dump()
improvement, and when I run it for longer than about 20 minutes, the
browser just calls it quits.. :( Firefox, and chrome.

I'd like to do this with a browser call, if all else fails I suppose I
can run the generation of the test array from the commandline, but I
prefer calling from the browser..

So, I'm doing ob_start(), then start the main loop which does echo
'.'; ob_flush(); flush();.

I've got my KeepAliveTime set to 25 seconds, as per
http://www.pctools.com/guides/registry/detail/891/

And I'm calling this from my browser to the domain name that points
back to the machine I run the browser on, latest wampserver on windows
7.
Calling via localhost doesn't work somehow.

Is there anything obvious I've missed?

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



Re: [PHP] Hungarian Notation interest with PHP

2012-06-04 Thread Matijn Woudt
On Mon, Jun 4, 2012 at 4:43 PM, Mihamina Rakotomandimby
 wrote:
> Hi all,
>
> I have a colleague stuck with this thing named "Hungarian Notation"
> http://goo.gl/xYv8O
>
> We try to define our internal coding standards, which is very close to the
> Symfony ones http://goo.gl/f2rcO
>
> But we're in conflict because the colleague really argue about his
> "Hungarian Notation".
>
> Have you got some ressources arguing against this? I ran out of mine to
> convince him...
>

Hungarion notation just doesn't make sense in PHP. You should not even
try to convince him, if he doesn't understand this, then you might be
better off finding another colleague ;)

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



[PHP] Re: Hungarian Notation interest with PHP

2012-06-04 Thread Tony Marston
"Mihamina Rakotomandimby"  wrote in message 
news:4fccc97a.1060...@rktmb.org...


Hi all,

I have a colleague stuck with this thing named "Hungarian Notation"
http://goo.gl/xYv8O

We try to define our internal coding standards, which is very close to the 
Symfony ones http://goo.gl/f2rcO


But we're in conflict because the colleague really argue about his 
"Hungarian Notation".


Have you got some ressources arguing against this? I ran out of mine to 
convince him...




Take a look at http://en.wikipedia.org/wiki/Hungarian_notation which shows 
that quite a few 'big' names are against it.


I personally hate it because it ties a variable to a particular type, which 
in PHP is useless as a variable is allowed to change its type 'on the fly'. 
Even in a strongly typed language it can cause problems - I remember many 
years ago having a variable called $numCustomerId because CustomerId was 
supposed to be numeric. Then it transpired that it could actually contain 
alpha characters, so it had to be a string and not a number. Changing all 
occurrences of $numCustomerId to $strCustomerId was a royal PITA, but it 
would have been totally confusing to allow alpha characters in a variable 
that was supposed to contain nothing but numbers.


--
Tony Marston

http://www.tonymarston.net
http://www.radicore.org 



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



Re: [PHP] Hungarian Notation interest with PHP

2012-06-04 Thread Mihamina Rakotomandimby

On 06/04/2012 05:58 PM, Ashley Sheridan wrote:

The two don't look to be mutually exclusive,


Sure, they're not.
It's not forbiden to "prefix" variables.


but Hungarian notation
doesn't make much sense to me for php. Php is a loose typed language,


That's the first point I told him. No way: for him it's syntaxically 
compliant.


:-)

--
RMA.

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



Re: [PHP] Hungarian Notation interest with PHP

2012-06-04 Thread Ashley Sheridan


Mihamina Rakotomandimby  wrote:

>Hi all,
>
>I have a colleague stuck with this thing named "Hungarian Notation"
>http://goo.gl/xYv8O
>
>We try to define our internal coding standards, which is very close to
>the Symfony ones http://goo.gl/f2rcO
>
>But we're in conflict because the colleague really argue about his
>"Hungarian Notation".
>
>Have you got some ressources arguing against this? I ran out of mine to
>
>convince him...
>
>--
>RMA.
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

The two don't look to be mutually exclusive, but Hungarian notation doesn't 
make much sense to me for php. Php is a loose typed language, and variables can 
(and do) change their types often. Consider even the internal php functions 
which can return booleans, or arrays or strings, all from the same function. 
Using Hungarian notation to give the dev a hint about the various types doesn't 
make much sense, and may give the dev a false sense of security.

Thanks,
Ash
http://ashleysheridan.co.uk

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



[PHP] Hungarian Notation interest with PHP

2012-06-04 Thread Mihamina Rakotomandimby

Hi all,

I have a colleague stuck with this thing named "Hungarian Notation"
http://goo.gl/xYv8O

We try to define our internal coding standards, which is very close to 
the Symfony ones http://goo.gl/f2rcO


But we're in conflict because the colleague really argue about his 
"Hungarian Notation".


Have you got some ressources arguing against this? I ran out of mine to 
convince him...


--
RMA.

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



Re: [PHP] disabled cookies

2012-06-04 Thread Lester Caine

Matijn Woudt wrote:

I wonder what browser you're using. I just read the IE10 privacy
policy, and it pretty much states the same, Microsoft can collect
private data from you. Opera, Firefox and Safari probably have
something similar.


Seamonkey ... on Linux
Still prefer a proper internet suit so I can simply open tabs from email links 
and compose html in-line as required.


But the point I was making was that I am restricted from linking to Google by my 
customers rules as it's considered a 'security risk' to sensitive personal data. 
We use OSM nowadays for mapping, and any site search is private to the server, 
not using the 'free' search services. If my actions fail a security audit I have 
to amend them ...


I had managed to avoid all of the 'social media' services, but am now having to 
'participate' simple to check out what cookies they are setting on sites that 
are not affected by security restrictions ...


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP] help with preg_match

2012-06-04 Thread Chris Purves
On 2012-06-03 22:37, Robert Williams wrote:
> On Jun 3, 2012, at 17:28, "Chris Purves"  wrote:
> 
>> I know that the text ends 'end', but I don't know what the Something,
>> something is.  I am using preg_match as follows:
>>
>> preg_match('/[^>]*end/',$curl_response,$matches);
>>
>> I want to match 'end' and everything before it that is not '>'.
> 
> You need to match something at the beginning. Try this:
> 
> preg_match('/>([^>]*end)/', $curl_response, $matches);
> 
> Assuming a match, you can then look to $matches[1] for your content.
> 

That did it.  In my case, I know that the first letter is capitalized, so I 
used:

preg_match('/[A-Z][^>]*end/', $curl_response, $matches);

Thanks for your help.


-- 
Chris Purves

"The eyes are the groin of the head." Dwight Schrute

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



[PHP] Re:

2012-06-04 Thread Al



On 6/3/2012 8:26 PM, Chris Purves wrote:

Hello,

I am trying to use preg_match to match something from an html file. Within the
html file is some text that looks like:

Something, something end

I know that the text ends 'end', but I don't know what the Something, something
is. I am using preg_match as follows:

preg_match('/[^>]*end/',$curl_response,$matches);

I want to match 'end' and everything before it that is not '>'.

The problem appears to be with the '>'. I have tried escaping (\>), but it
didn't make a difference. The php script hangs when it tries to run this 
function.




You didn't say the phrase is always enclosed in  tags; but I assume it is 
not. This will handle any tags.


Try this pattern "%<[^>]+>(.+)\s+end\s*you need it in the pattern.  Also, the \s are in case there are extra spaces.


Use print_r on your $matches.  If you expect more than one, then use 
preg_match_all()


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



Re: [PHP] disabled cookies

2012-06-04 Thread Matijn Woudt
On Mon, Jun 4, 2012 at 1:09 AM, Lester Caine  wrote:
> Ashley Sheridan wrote:
>>
>> How is Google Chrome a bigger security risk than the other popular
>> browsers, Fx and IE?
>>
>> I was under the impression it was more secure than either of those.
>
>
> License Conditions ... They may have removed the original landgrab section,
> but there is still a potential for Google to gather private information and
> this is an unacceptable risk when dealing with customers who deal with
> sensitive private data.
>
> In addition, intrusive advertising has no place in public service systems
> anyway ... Google maps and the like are similarly inappropriate since using
> them allows Google to track material that IS also sensitive. It is THIS
> tracking that the 'cookie law' was supposed to address, but the problem
> sites are not even covered by it ... WE are if we link to uncontrolled sites
> and services.
>

I wonder what browser you're using. I just read the IE10 privacy
policy, and it pretty much states the same, Microsoft can collect
private data from you. Opera, Firefox and Safari probably have
something similar.

You're probably better off being worried about the Google services,
though the same applies probably to the Bing en Yahoo search engines.
And you don't think that Bing Maps collects data about you?

Please don't forget that it is the advertising market that brought us
the free (in cash) internet. With the help of cookies giving us better
ads, the free internet has grown. People need to chill down a bit
about their privacy online. In the end, probably the only real danger
of your own privacy is your own facebook, myspace, google+, twitter,
linkedin, ... profile.

And last but not least, your personal information is probably at a lot
more places than the internet, quite a few stores have things like
membership cards, and guess what, they track you there. They know
exactly what you bought etc. And for example, here in the Netherlands,
we have a new public transportation system, called the 'OV-chipkaart',
which is basically a RFID card. There exists 2 types, anonymous and a
personal one. Now they can happily track where we are going with the
public transportation.

Personally, I find those last thing much worse than Google collecting
my search actions.

- Matijn

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



Re: [PHP] disabled cookies

2012-06-04 Thread Lester Caine

Ashley Sheridan wrote:


Lester Caine  wrote:


Ashley Sheridan wrote:

How is Google Chrome a bigger security risk than the other popular

browsers, Fx and IE?


I was under the impression it was more secure than either of those.


License Conditions ... They may have removed the original landgrab
section, but
there is still a potential for Google to gather private information and
this is
an unacceptable risk when dealing with customers who deal with
sensitive private
data.

In addition, intrusive advertising has no place in public service
systems anyway
... Google maps and the like are similarly inappropriate since using
them allows
Google to track material that IS also sensitive. It is THIS tracking
that the
'cookie law' was supposed to address, but the problem sites are not
even covered
by it ... WE are if we link to uncontrolled sites and services.



Ok, but don't confuse the browser with the services Google offers. The two are 
very separate, and its confusing to mention the services in an argument about 
the browser.


I'm just working to rules that are applied to me by the security departments of 
the customers *I* am dealing with. While you might think that there should be a 
distinct separation between the two areas, the recent 'rationalisation' of 
Google privacy notices eroded that separation again ... Google can do what they 
like and can change the rules again when they see fit.


We are at a point where the 'cookies' laws have become a requirement simply to 
ensure that we KNOW what is being gathered and why.


The question I asked in an earlier thread has not had an answer ... are there 
any good open source add-ins for php that allow us to manage this area in Europe?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP] Using default argument values in the middle of the argument list

2012-06-04 Thread ma...@behnke.biz


324...@mail.muni.cz hat am 1. Juni 2012 um 21:52 geschrieben:

> Hi,
>
> as I accidentally found out that PHP allows default argument values
> to occur not only at the end of parameter list:
>
> function ( Classname $a, Classname $b = null, Classname $c ) ...
>
> Unfortunately, documentation does not state what is supposed to happen in
> such situation.
> It appears $b can be an instance of Classname or a null.


You can find anything on that topic on the type hint section.
If you use type hinting:

Classname $a,

$a can only be instance of Classname, nothing else. But if you want to allow
null as well, you have to write

Classname $a = null,

Don't mistake this as default value! It is _meant_ as "Classname or null" are
allowed.

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