PHP Ds / Stack isEmpty () function

PHP

Syntax :
boolpublic DsStack::isEmpty (void) 
Parameter: This function takes no parameters.Return Value : This function returns a boolean value True if the stack is empty, otherwise it returns False.Below programs illustrate the function Ds / Stack::isEmpty() :Program 1 :  
// PHP illustration program
// isEmpty() function 
// Create a stack instance $stack = new DsStack();  
// Check if the stack is empty var_dump ( $stack -> isEmpty());  
// Push items onto the stack $stack -> push ( "Welcome" ); $stack -> push ( "to" ); $stack -> push ( "GfG" );  
// Check if the stack is empty again var_dump ( $stack -> isEmpty());  
?>
Exit :
bool (true) bool (false) 
Program 2 :  
// PHP illustration program // isEmpty() function 
// Create a stack instance $stack = new DsStack();  
// Check if the stack is empty var_dump ( $stack -> isEmpty());  
// Put elements with mixed values ​​on the stack $stack -> push ( "Welcome" ); $stack -> push ( "to" ); $stack -> push ( "GfG" ); $stack -> push (10); $stack -> push (5.5);  
// Check if the stack is empty again var_dump ( $stack -> isEmpty());  
?>
Exit :
bool (true) bool (false) 
Link : http://php.net/manual/en/ds-stack.isempty.php