freeCodeCamp/guide/arabic/php/basic-syntax/index.md

1.2 KiB

title localeTitle
Basic Syntax بناء الجملة الأساسي

بناء الجملة الأساسي

يمكن وضع نص PHP في أي مكان بالوثيقة.

يبدأ البرنامج النصي لـ PHP <?php وينتهي بـ ?>

أدناه ، لدينا مثال لملف PHP بسيط ، مع برنامج نصي PHP الذي يستخدم دالة PHP مدمجة "echo" لإخراج النص "Hello World!" على صفحة الويب

`` ``

أول صفحة PHP

The output of that would be :

أول صفحة PHP

مرحبا بالعالم!

`#### Note: PHP statements end with a semicolon (;).

Comments in PHP

PHP supports several ways of commenting: `

`# PHP Case Sensitivity

In PHP, all keywords (eg if, else, while, echo, etc.), classes, functions, and user-defined functions are NOT case-sensitive.

In the example below, all three echo statements below are legal (and equal): `

`### However; all variable names are case-sensitive.

In the example below, only the first statement will display the value of the $color variable (this is because $color, $COLOR, and $coLOR are treated as three different variables): `

`` ``