Re: [PHP] Class instance pointers

2011-11-29 Thread cimodev
Am 29.11.2011 16:56, schrieb Tim Streater:
 Is there any benefit to setting a pointer to a class instance to null before 
 returning from a function? As in:

 function myfunc ()
  {
  $p = new myclass ();
  // do stuff
  $p = null;
  }

 Thanks.



No!
In this case the GC will do that for you :)

regards, cimodev

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



[PHP] How to install ext/intl on Mac OSX (NumberFormatter and so on)

2010-11-21 Thread cimodev
Hallo

Apple is shipping PHP 5.3.3 on Mac OSX Darwin without the PECL-Extension
ext/intl.

So i tried to install ext/intl with pecl install intl.

The Error Message is:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/intl/collator/collator_class.c:92:
error: duplicate ‘static’
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/intl/collator/collator_class.c:96:
error: duplicate ‘static’
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/intl/collator/collator_class.c:101:
error: duplicate ‘static’
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/intl/collator/collator_class.c:107:
error: duplicate ‘static’
make: *** [collator/collator_class.lo] Error 1
ERROR: `make' failed


phpize output is:

Configuring for:
PHP Api Version: 20090626
Zend Module Api No:  20090626
Zend Extension Api No:   220090626

gcc -v:

gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~105/src/configure --disable-checking
--enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10-
--host=x86_64-apple-darwin10 --target=i686-apple-darwin10
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)

Has anyone good tips for solving this?