¡@

Home 

php Programming Glossary: myparentclass

What does new self(); mean in PHP?

http://stackoverflow.com/questions/2396415/what-does-new-self-mean-in-php

have to add it back to get the singleton behavior class MyParentClass class MyChildClass extends MyParentClass public static function.. behavior class MyParentClass class MyChildClass extends MyParentClass public static function getInstance return new self a MyChildClass.. the second situation the code would look like this class MyParentClass public static function getInstance return new self class MyChildClass..