note 111486 modified in function.class-alias by danbrown

From: Date: Mon, 04 Mar 2013 17:51:52 +0000
Subject: note 111486 modified in function.class-alias by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193837@lists.php.net to get a copy of this message
At first, you might wonder that: <?php class A {}; class_alias('A', 'B'); ?> is equivalent to: <?php class A {}; class B extends A {}; ?> class_alias is NOT equivalent to class extending! Private methods/properties are unseen in child classes, but in alias classes they are. --was-- //At first, you might wonder that: //<?php class A {}; class_alias('A', 'B'); ?> // //is equivalent to: //<?php class A {}; class B extends A {}; ?> class_alias is NOT equivalent to class extending! Private methods/properties are unseen in child classes, but in alias classes they are. http://php.net/manual/en/function.class-alias.php

« previous php.notes (#193837) next »