<?php class Tests { const ELEMENTS = []; public function __construct() {} public static function test( $element ) { if ( empty( static::ELEMENTS[ $element ] ) ) { return false; } return true; } } var_dump( Tests::test( 'example' ) );
You have javascript disabled. You will not be able to edit any code.