php-general Digest 9 Jan 2012 09:44:34 -0000 Issue 7641

Topics (messages 316220 through 316222):

questions from page "Reference Counting Basics"
        316220 by: Adi Mutu

Writing/submitting editorial article for PHP Solutions
        316221 by: Maciej Moscicki

ip2long and ipv6
        316222 by: Arno Kuhl

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---

Hello,

I was reading http://www.php.net/manual/en/features.gc.refcounting-basics.php, 
and i saw this:

"The xdebug_debug_zval() function does not show this, but you could see it by 
also displaying the memory pointer."

My question is, how can you get the memory pointer of a php variable? 

Thanks,
A.

--- End Message ---
--- Begin Message ---
Hello

My name is Maciej Moscicki and I represent Software Press company.
We are creating a new version of popular magazine PHP Solutions
(English version), which will be avilable online.
We are looking for specialists in PHP, who will be interested in
writing some articles in this subject.
May you be interested in sharing your knowledge with us?
Would you be interested in such cooperation?
Please send me more information about yourself and your experience in
this subject.
I am looking forward to hearing from you.

Best regards
Maciej Moscicki

--- End Message ---
--- Begin Message ---
My dev and test tools are windows based and the apps deployed on linux, and
it's been working well. But moving to win7 created problems because it uses
ipv6 and code for ratings is for ipv4. Specifically, using ip2long to save
the ip as an int (to prevent duplicate votes) doesn't work in test
(win7/php5.3). I've got a quick-n-dirty workaround ("::1" converted to "0")
but it seemed a good opportunity to add code to handle ipv6 properly when
it's deployed.

I found a reference to do that in the help
(http://php.net/manual/en/function.ip2long.php), but the referenced site no
longer exists. I also found a page where Daniel Brown mentions that user
notes referencing external sites are normally removed
(http://www.lmpx.com/nav/article.php/news.php.net/php.notes/177158/read/inde
x.html) but that the note added enough value to make an exception. I'd be
very grateful if anyone could please point me to any other record of this
code, or could post it if they have a copy.

Also, I'm assuming the code returns 2 ints because of the size of ipv6, and
it's fine to change my code to store that, but I'd like to know if there's a
standard way to store ip addresses in sql for quick lookup?

Cheers
Arno



--- End Message ---

Reply via email to