Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin tommcfarlin/00-class-exists.php Secret
Created Jul 20, 2017

Embed
What would you like to do?
<?php
if ( ! class_exists( 'My_Unique_Class' ) ) {
class My_Unique_Class {
// class implementation
}
}
<?php
if ( class_exists( 'My_Unique_Class' ) ) {
return;
}
class My_Unique_Class {
// class implementation
}
<?php
namespace TomMcFarlin;
class My_Unique_Class {
// class implementation
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.