一

{"type":"编程笔记"}


  • Home

  • Archives
  • Search

php function get_class() in superclass

Posted on 2009-03-08   |   In php

php function get_class()在类继承使用时需要特别注意。

<?phpabstract class bar {    public function __construct() {        var_dump(get_class($this));        var_dump(get_class());    }}class foo extends bar {}new foo;?>

The above example will output:

string(3) "foo"string(3) "bar"

References

  1. http://cn.php.net/manual/en/function.get-class.php
howto maven2 download java source jar package
regular expression of ip4
  • Table of Contents
  • Overview
yuweijun

yuweijun

492 posts
12 categories
RSS
GitHub Twitter
  1. 1. References
© 2021 yuweijun
Powered by Hexo
Theme - NexT.Mist.KISS