بطبط

رجع لباقي المحاضرات
محاضرة 2

Fundamentals of PHP

أساسيات لغة PHP: المتغيرات، أنواع البيانات، والجمل الشرطية.

يلا نشوف الملخص

Lecture 2: Fundamentals of PHP

Overview: This lecture covers the basics of PHP, a server-side scripting language embedded in HTML.

  • Introduction to PHP:
    • PHP manages dynamic content, databases, session tracking, and builds e-commerce sites.
    • It integrates with databases like MySQL, PostgreSQL, Oracle, etc.
    • PHP performs system functions, handles HTML forms, adds/modifies databases, accesses cookies, and can encrypt data.
  • Environment Setup:
    • Requires a server (e.g., Apache), a database (e.g., MariaDB), and PHP.
    • Easy-to-install bundles include Wamp, XAMPP, and Laragon.
  • Basic PHP Syntax:
    • A PHP script begins with <?php and ends with ?>.
    • Variables: Start with a $ sign. The name must start with a letter or underscore, cannot start with a number, contains only alphanumeric characters and underscores, and is case-sensitive.
  • Output Statements:
    • echo and print are used to output text and variables to the screen and are mostly identical.
  • Data Types:
    • String, Integer, Float (double), Boolean, Array, Object, NULL, Resource.
    • The var_dump() function returns the data type and the exact value of a variable.
  • Math Built-in Functions:
    • pi(), min(), max(), and round().
  • Conditional Statements:
    • If Statements: Executes code if a specified condition evaluates to true.
    • Switch Statement: Chooses one of many blocks of code to execute. Uses the break keyword to stop execution and a default block if no matches are found.

في نقطة مش واضحة؟ بطبط موجود!

اسأل بطبط عنها
بطبط
</>تم التصميم والتنفيذ بقسم تكنولوجيا المعلومات
تحت إدارة وإشراف

جامعة برج العرب التكنولوجية

جميع الحقوق محفوظة © BATBAT 2026