note 112172 deleted from function.trait-exists by aharvey

From: Date: Fri, 24 May 2013 18:02:10 +0000
Subject: note 112172 deleted from function.trait-exists by aharvey
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-194915@lists.php.net to get a copy of this message
Note Submitter: mr dot ryansilalahi at gmail dot com ---- <?php trait common{ function shout(){ return 'hello world!'; } } class a{ use common; } class b{ use common; } if(trait_exists('common')) { echo (new a())->shout(); } if(trait_exists('common')) { echo (new b())->shout(); }

« previous php.notes (#194915) next »