1. Trang chủ
  2. » Công Nghệ Thông Tin

Web technologies and e-services: Lecture 3.2 - Dr. Thanh Chung Dao

12 6 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 12
Dung lượng 429,78 KB

Nội dung

Web technologies and e-services: Lecture 3.2 provide students with knowledge about: object oriented programming in PHP; defining (declaring) a class; accessing properties and methods; constructors and destructors; PHP sessions;... Please refer to the content of document.

25/03/2021 IT4409: Web Technologies and e-Services 2020-1 Advanced PHP Instructor: Dr Thanh-Chung Dao Slides by Dr Binh Minh Nguyen Department of Information Systems School of Information and Communication Technology Hanoi University of Science and Technology Content • • • • Objects Defining objects Inheritance Sessions and session variables 25/03/2021 Object oriented programming in PHP • • PHP, like most modern programming languages (C++, Java, Perl, JavaScript, etc.), supports the creation of objects Creating an object requires you to first define an object class (containing variables and/or function definitions) and then using the “new” keyword to create an instance of the object class (Note that the object must be defined before you instantiate it.) Defining (declaring) a class • Use the “class” keyword which includes the class name (case-insensitive, but otherwise following the rules for PHP identifiers) Note: The name “stdClass” is reserved for use by the PHP interpreter

Ngày đăng: 29/10/2022, 06:40