# 1.2 Syntax (Yazım Kuralları)

## **Temel PHP Sözdizimi**

* Bir PHP betiği belge içinde herhangi bir yere yerleştirilebilir. Bir PHP betiği : *ile başlar ve biter.* **Not:** PHP deyimleri noktalı virgül (;) ile biter.

```php
<?php
// PHP kodu buraya gider
?>
```

## **PHP Büyük/Küçük Harf Duyarlılığı**

* PHP'de anahtar sözcükler, sınıflar, işlevler ve kullanıcı tanımlı işlevler büyük/küçük harfe duyarlı değildir. Örnek ; `ECHO`, :`echo` ile aynıdır!!

```php
<!DOCTYPE html>
<html>
<body>

<?php
ECHO "HEllO BOOTCAMP2024<br>";
echo "HEllO BOOTCAMP2024<br>";
EcHo "HEllO BOOTCAMP2024<br>";
?>

</body>
</html>
```

> \[!NOTE] **Not:** Fakat; Tüm değişken adları büyük/küçük harfe duyarlıdır!

Örnek; `$COLOR` şununla aynı *değildir*:`$color`

```php
<!DOCTYPE html>
<html>
<body>

<?php$color = "Beyaz";
echo "Benim Şemsiyem " . $color . "<br>";
echo "Benim Arabam " . $COLOR . "<br>";
echo "En Sevdiğim Renk " . $coLOR . "<br>";
?>

</body>
</html>
```

## Alıştırma

S1)Bir PHP betiği şu şekilde başlar ve biter:

```php
a) <? 
     //PHP code  
   ?>

b)   <?php  
     //PHP code 
    ?>

 c)  <?php  
     //PHP code 
    ?php>
```

S2)"Merhaba Dünya" çıktısını almak için aşağıdaki kodun eksik kısmını ekleyin.

```php
 [] "Hello World";
```

S3) Lütfen tek satırlı kodu çalıştırın

```php
<?php 
     echo "Merhabadünya"[ ]
?>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yavuzlar.org/egitim/00x0-php-nedir/00x2-syntax-yazim-kurallari.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
