<?php $age = 20 ; $age1 = 25 ; if ( $age >= 18 && $age <= 21 ) { echo "You are Eligible<br>" ; } if ( $age >= 18 || $age <= 21 ) { echo "You are Eligible<br>" ; } //Below condition is True So that "Not Operator(!)" will return False condition if (!( $age >= 18 )) { echo "You are Eligible<br>" ; } //Below condition is False So that "Not Operator(!)" will return True condition if (!( $age <= 18 )) { echo "You are Eligible<br>" ; } //If both condition is "True" OR "False" at that time xor will return "False" and if one condition is //"True" and s...
<?php //There are many Get Functions in PHP as shown below: //get_class, get_parent_class, get_class_methods, get_class_vars, get_object_vars, get_called_class, //get_declared_classes, get_declared_interfaces, get_declared_traits, class_alias class ParentClass { function name () { echo "Class Name : " . get_class ( $this ) . "<br>" ; //Print the particualr Class Name //Print the particular Parent Class Name as shown below: echo "Parent Class Name : " . get_parent_class ( $this ) . "<br>" ; } } class ChildClass extends ParentClass { function __construct () {} function myfunction () {} function myfunction2 () {} } $obj = new ChildClass (); $obj -> name (); echo "Class Name is : " . get_class ( $obj ) . "<br>" ; echo "Paren...
Comments
Post a Comment