Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Create Object and get its type

Mon Oct 27, 2008 12:40 pm

Code:
<?php
  
class employee {
      var
$emp_code;
      var
$name;
      var
$address;
      var
$department;
      var
$sex;
      var
$date_of_birth;
      var
$salary;
  }

  
$dave = new employee;
  
$alice = new employee;

  echo
gettype ($dave)," \n";
  echo
gettype ($alice), " \n";
  
?>




Post a reply
  Related Posts  to : Create Object and get its type
 Create object instance from class Name by reflection     -  
 Type Conversion     -  
 Type conversions     -  
 range of the char type     -  
 Testing the Type of a Variable     -  
 Data Type in Programming     -  
 range of data type     -  
 set MIME type in link     -  
 Boolean type constant     -  
 String type default value     -  

Topic Tags

PHP OOP