Vance Lucas' Blog: Get Only Public Class Properties for the Curr...

You can't request more than 20 challenges without solving them. Your previous challenges were flushed.
Courtesy PHPDeveloper.org  Wed, 01/06/2010 - 10:06

On his blog today Vance Lucas has posted a method you can use to only get the properties of your class that are in the "public" scope.

PHP provides two built-in functions to retrieve properties of a given class '" get_object_vars and get_class_vars .

Both these functions behave the same exact way, one taking an object as a variable and the other taking a string class name.

The tricky thing about the two functions is...


 

More related items

PHPClasses.org: Another Serious Security Bug on PHP...
On the PHPClasses.org blog there's a new post detailing an issue that came up in the PHP 5.3.9 release that caused a large security issue (PHP 5.3.10 has, however, already been released to...

Etsy Code as Craft: Rasmus Lerdorf - PHP in 2012
In case you weren't able to make it (or missed the live stream) Rasmus Lerdorf gave a presentation last night at Etsy as a part of their "Code as Craft" series. They recorded the session and...

PHP OCI8 1.4.7 is available on PECL - Christopher...
Following on the heels of the PHP 5.3.9 release, I've bundled OCI8 1.4.7 for PECL. The PECL OCI8 1.4.7 code is the same as included in PHP 5.3.9. The release notes are here. There are several...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com