<?php
if(@__TRAIT__ == '__TRAIT__'){
echo 'magic __TRAIT__ constant NOT defined';
//insert this code where needed, remember that because they are MAGIC constants defining __TRAIT__ is completely useless
}else{
echo 'magic __TRAIT__ constant IS defined';
}