The introspection functions are rarely used when building a stylesheet. However, they are valuable if something does not work properly - to figure out what's going on: like debugging functions.
The following table lists all introspection functions in Sass:
FunctionDescription & Examplecall(function, arguments...)Calls a function with arguments, and returns the result.content-exists()Checks whether the current mixin was passed a @content block.feature-exists(feature)Checks whether feature is supported by the current Sass implementation.
Example:
feature-exists("at-error");
Result: true
Example:
function-exists("nonsense")
Result: false
Example:
variable-exists(a)
Result: true
Example:
mixin-exists("important-text")
Result: true
Example:
type-of(15px)
Result: number
type-of(#ff0000)
Result: color
Example:
unit(15px)
Result: px
Example:
unitless(15px)
Result: false
unitless(15)
Result: true
Example:
variable-exists(b)
Result: true
The term PHP is an acronym for PHP: Hypertext Preprocessor. PHP is a server-side scripting language designed specifically for web development. It is open-source which means it is free to download and use. It is very simple to learn and use. The files have the extension “.php”.
Rasmus Lerdorf inspired the first version of PHP and participated in the later versions. It is an interpreted language and it does not require a compiler.
PHP | Reflection getModifierNames() Function
Improve Article
Save Article
Like Article
- Last Updated : 23 Aug, 2021
Improve Article
Save Article
The Reflection::getModifierNames() function is an inbuilt function in PHP which is used to return an array of the specified modifier names.
Syntax:
array Reflection::getModifierNames( int $modifiers )Parameters: This function accepts single parameter $modifiers which is Bitfield of the modifiers. Here the bitfield is a data structure consisting of a number of adjacent computer memory locations.
Return Value: This function returns an array of the specified modifier names.
Below programs illustrate the Reflection::getModifierNames() function in PHP:
Program 1:
php
<?php
// Declaring a class Testing
class Testing
{
public static0
public static2
public static4 public static5 public static6 public static7
{
final public0final public1final public2
final public4
final public4
final public6
final public7
final public8 final public9<?php0 <?php1<?php2<?php3<?php4<?php5
<?php6
<?php7
<?php8 <?php9// Declaring a class Testing0// Declaring a class Testing1final public8// Declaring a class Testing3
// Declaring a class Testing4
Output: public static
Program 2:
php
<?php
// Declaring a class Testing
class Testing
{
class2
public static2
class6 public static4 public static6 class9
{
final public0final public1final public2
final public4
final public4
final public6
Testing9
{0 final public9<?php0 <?php1<?php2<?php3{6<?php5
<?php6
<?php7
<?php8 <?php9// Declaring a class Testing0// Declaring a class Testing1{0// Declaring a class Testing3
// Declaring a class Testing4
Output: final public
Reference: //www.php.net/manual/en/reflection.getmodifiernames.php
My Personal Notes arrow_drop_up
Save