Home  >  Article  >  Backend Development  >  2015.03.19---PHP XCAP development, PHP XML export, PHP array operations, PHP reflection mechanism

2015.03.19---PHP XCAP development, PHP XML export, PHP array operations, PHP reflection mechanism

WBOY
WBOYOriginal
2016-08-08 09:27:29852browse

Today’s tasks:
1. :


$r = ReflectionClass($obj); // Get the reflection of the object
$r->getProperties(); // Get the property list
$getter = $r->getMethod("get".ucfirst (curr_pro)); // Traverse the attributes and get the getter method
$getter->invoke($obj); // Call the geeter method

to export the xml effect





Size: 13.8 KB

  • 2015.03.19---PHP XCAP development, PHP XML export, PHP array operations, PHP reflection mechanism
  • Size: 11 KB
  • 2015.03.19---PHP XCAP development, PHP XML export, PHP array operations, PHP reflection mechanism
  • Size: 2.9 KB
  • 2015.03.19---PHP XCAP development, PHP XML export, PHP array operations, PHP reflection mechanismView image attachment
  • The above introduces 2015.03.19---PHP XCAP development, PHP XML export, PHP array operations, PHP reflection mechanism, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn