php-general Digest 15 Aug 2012 12:09:45 -0000 Issue 7923

2012-08-15 Thread php-general-digest-help
php-general Digest 15 Aug 2012 12:09:45 - Issue 7923 Topics (messages 318701 through 318705): Re: Reading class variable value always returns NULL 318701 by: Reto Kaiser Re: PHP session variables 318702 by: tamouse mailing lists Two ways to obtain an object property

Re: [PHP] PHP session variables

2012-08-15 Thread tamouse mailing lists
On Aug 14, 2012 1:36 AM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Aug 13, 2012 8:01 AM, Robert Cummings rob...@interjinn.com wrote: On 12-08-10 04:42 PM, Tedd Sperling wrote: On Aug 10, 2012, at 1:21 PM, Ege Sertçetin sertce...@itu.edu.tr wrote: Hi. My question will

[PHP] Two ways to obtain an object property

2012-08-15 Thread phplist
This relates to a minor dilemma I come across from time and time, and I'm looking for advice on pros and cons and best practice. Last night I encountered it again. Within a site I have a User object, and within page code would like to have if ($crntUser-isASubscriber) {...} There seems to be

Re: [PHP] Two ways to obtain an object property

2012-08-15 Thread Sebastian Krebs
Hi, 2012/8/15 phplist phpl...@myword.co.uk This relates to a minor dilemma I come across from time and time, and I'm looking for advice on pros and cons and best practice. Last night I encountered it again. Within a site I have a User object, and within page code would like to have if

Re: [PHP] How to catch an exception using SoapClient.

2012-08-15 Thread Ellis Antaya
like any other exception ... using a try catch block ;) Ellis 110010100001 Unfortunately, no one can be told what The Matrix is. You have to see it for yourself. twitter.com/floverdevel facebook.com/ellis.antaya google.com/profiles/ellis.antaya linkedin.com/in/ellisantaya On Mon, Aug 6,

Re: [PHP] Reading class variable value always returns NULL

2012-08-15 Thread Reto Kaiser
So here's some new observations on the instance variables being NULL. As far as we found out this is the sequence of events: 1. Apache (MPM) received request A which executes a php script. 2. Within this script during the unserialization of an object an exception is thrown. 3. This exception is

Re: [PHP] Reading class variable value always returns NULL

2012-08-15 Thread Philipp Gysin
As a little clarification: The Apache server in question is configured as a MPM prefork. On Wed, Aug 15, 2012 at 4:28 PM, Reto Kaiser r...@cargomedia.ch wrote: So here's some new observations on the instance variables being NULL. As far as we found out this is the sequence of events: 1.

Re: [PHP] Two ways to obtain an object property

2012-08-15 Thread Paul M Foster
On Wed, Aug 15, 2012 at 09:28:28AM +0100, phplist wrote: This relates to a minor dilemma I come across from time and time, and I'm looking for advice on pros and cons and best practice. Last night I encountered it again. Within a site I have a User object, and within page code would like to

Re: [PHP] Two ways to obtain an object property

2012-08-15 Thread Andrew Ballard
On Wed, Aug 15, 2012 at 11:33 AM, Paul M Foster pa...@quillandmouse.com wrote: On Wed, Aug 15, 2012 at 09:28:28AM +0100, phplist wrote: This relates to a minor dilemma I come across from time and time, and I'm looking for advice on pros and cons and best practice. Last night I encountered it

Re: [PHP] PHP session variables

2012-08-15 Thread Andrew Ballard
On Fri, Aug 10, 2012 at 11:56 AM, Tedd Sperling t...@sperling.com wrote: On Aug 10, 2012, at 11:45 AM, Tedd Sperling t...@sperling.com wrote: On Aug 9, 2012, at 5:16 PM, Jim Lucas li...@cmsws.com wrote: You are relying on PHP's loose typing. This is a poor check. session_id() returns a

Re: [PHP] Two ways to obtain an object property

2012-08-15 Thread David Harkness
On Wed, Aug 15, 2012 at 1:28 AM, phplist phpl...@myword.co.uk wrote: I can have a User object method getSubscriberStatus() which sets $this-isASubscriber. But to use this I would have to run the method just before the if statement. Or I could have a method isASubscriber() which returns the

Re: [PHP] PHP session variables

2012-08-15 Thread Tedd Sperling
On Aug 14, 2012, at 11:01 AM, Robert Cummings rob...@interjinn.com wrote: I'm not sure if you're making a joke, but your changes have no effect. You've merely explicitly stated the optional parameter's default value. What I had meant was to change the following: ?php $starttime =

Re: [PHP] PHP session variables

2012-08-15 Thread Tedd Sperling
Andrew: Your points are well taken -- thanks. However, my only concern is given this: for($i=1; $i 1000; $i++) { if (!defined('SID')) { echo __LINE__, '::session_start()br'; session_start(); } } The php manual (

Re: [PHP] PHP session variables

2012-08-15 Thread Robert Cummings
On 12-08-15 03:19 PM, Tedd Sperling wrote: Rob: Again thanks. Sorry, I totally missed your point. In my defense I commonly use the value returned from microtime() as a string and not as a float. The code that followed my microtime( false ); demo broke the string and recombined it into a

Re: [PHP] PHP session variables

2012-08-15 Thread Andrew Ballard
On Wed, Aug 15, 2012 at 3:24 PM, Tedd Sperling t...@sperling.com wrote: Your points are well taken -- thanks. I've seen a lot of people code that way, so it's easy to miss. In your original code, that first statement was calling session_start() 1,000 times. This is because the first time