Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PHP 101
Search
Hidayet Doğan
February 27, 2014
Programming
1
750
PHP 101
Hidayet Doğan
February 27, 2014
Tweet
Share
More Decks by Hidayet Doğan
See All by Hidayet Doğan
Swoole ile Asenkron PHP
hdogan
0
790
Asenkron PHP
hdogan
0
1.6k
PHP Senfoni Orkestrası: Composer
hdogan
1
430
PHP ile Soket Programlama ve Ağ Servisleri
hdogan
5
4.3k
CakePHP ile Pasta Pişirmek
hdogan
1
890
Web Uygulamalarında Güvenlik
hdogan
1
500
Phalcon - Eklenti olarak sunulan PHP çatısı - PHP Günleri 2013#1
hdogan
5
1.6k
İnsanlar için PHP
hdogan
0
550
Phalcon - Eklenti olarak sunulan PHP çatısı
hdogan
2
2.3k
Other Decks in Programming
See All in Programming
Devvox Belgium - Agentic AI Patterns
kdubois
1
120
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
1k
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
530
CSC509 Lecture 05
javiergs
PRO
0
300
Swift Concurrency - 状態監視の罠
objectiveaudio
2
520
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
290
CSC509 Lecture 04
javiergs
PRO
0
300
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
250
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
880
CSC509 Lecture 06
javiergs
PRO
0
260
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
230
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Thoughts on Productivity
jonyablonski
70
4.9k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Automating Front-end Workflow
addyosmani
1371
200k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
189
55k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Mobile First: as difficult as doing things right
swwweet
224
10k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
How to train your dragon (web standard)
notwaldorf
97
6.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Transcript
PHP 101 Hidayet Doğan
Merhaba! 1995 Tübitak Bilgisayar Kulubü Linux, BASIC, C, Perl 1998
Merhaba PHP! 1999 İş Hayatı: Yazılım + Sistem 2000 İş Hayatı: Yazılım + Yönetim Fotoğraf: Onur Canalp
PHP 101 Nedir? Tarihçe Neden? Giriş Çatılar (Framework) Kaynaklar Sorular
Nedir?
Nedir? Betik Dili (Scripting Language) Sunucu Taraflı (Server Side) HTML
İçine Gömülebilir (HTML Embedded) Açık Kaynak
Tarihçe
Tarihçe 1994 Rasmus Lerdorf (Personal Home Page Tools, FI) 1995
PHP Tools, Personal Home Page Construction Kit 1996 PHP/FI 2.0 1998 PHP: Hypertext Preprocessor (PHP 3) 1998 70.000 web sitesi 2000 PHP 4 (Zend Engine)
Tarihçe 2004 PHP 5 (Zend Engine 2) 2008 PHP 4
geliştirilmesi (desteği) durduruldu. 2009 PHP 5.3 2012 PHP 5.4 2013 PHP 5.5 2014 250.000.000 web sitesi
Tarihçe <!--include header.html--> <!--getenv HTTP_USER_AGENT--> <!--ifsubstr $exec_result MSIE--> <p>Internet Explorer
kullanmasaydın iyiydi...</p> <!--endif--> <!--include footer.html-->
Tarihçe <?php include ‘header.php’; if (substr($_SERVER[‘HTTP_USER_AGENT’], ‘MSIE’)) { echo ‘<p>Internet
Explorer kullanmasaydın iyiydi...</p>’; } include ‘footer.php’; ?>
Neden?
Neden? Kariyer: 170 ilan*, 1500-8000 TL maaş Binlerce hazır fonksiyon,
eklenti, kütüphane Yaygınlık * Şubat 2014
Giriş
Menü 1 adet PHP yorumlayıcı 1 adet web sunucusu Tercihen
1 adet veritabanı sunucusu 1 adet editör
Tablot Menü apt-get install lamp-server^ Zend Server MAMP BitNami MAMP
Stack WampServer XAMPP BitNami WAMP Stack
Tablot Menü apt-get install lamp-server^ Zend Server MAMP BitNami MAMP
Stack WampServer XAMPP BitNami WAMP Stack
Kurallar • <?php ile başlar ?> ile biter. • İfadeler
; ile bitirilir.
Değişkenler $ ile başlar. Harf veya _ ile başlar. Büyük,
küçük harfe duyarlı. = ile atanır. $php
Değişkenler Sayılar (Integers), Ondalıklı Sayılar (Float/Double) Metinler (Strings) Diziler (Arrays)
Nesneler (Objects)
Sayılar ve Metinler <?php $yas = 20; $borc = 72.5;
$isim = ‘Ahmet’; $isim = “Mehmet”; ?>
Diziler <?php $notlar = array(30, 40, 27, 60); $notlar =
[30, 40, 27, 60]; $notlar = array(’vize’ => 30, ’final’ => 60); $notlar = [’vize’ => 30, ’final’ => 60]; ?>
Sınıflar <?php class Ogrenci { public $isim; protected $puan; private
$para; } ?> <?php $ahmet = new Ogrenci(); $ahmet->isim = ‘Ahmet’; ?>
Kalkulus 101 <?php $a = 12; $b = 56.5; $c
= $a + $b; ?> <?php $a = 12; $b = 5; $c = $a % $b; ?> <?php $a = 12; $b = 5; $c = ($a - $b) / 2; ?>
Sınama <?php $a = 12; $b = 7; $c =
$a > $b; $c = $a < $b; $c = $a && $b; $c = $a || $b; $c = $a == $b; ?> true false
Koşullar <?php $maas = 1750; if ($maas < 1000) {
echo ‘Fakir’; } elseif ($maas < 3000) { echo ‘Orta direk’; } else { echo ‘Zengin’; ?> <?php $dil = 1; switch ($dil) { case 1: echo ‘Türkçe’; break; default: echo ‘Diğer’; break; } ?>
Fonksiyonlar <?php function selam_soyle($isim) { echo ‘Selam ‘ . $isim;
} ?> <?php selam_soyle(‘Hidayet’); selam_soyle(‘Ramazan’); selam_soyle(‘Engür’); ?>
Fonksiyonlar <?php function selam_soyle($isim) { return ‘Selam ‘ . $isim;
} ?> <?php echo selam_soyle(‘Hidayet’); echo selam_soyle(‘Ramazan’); echo selam_soyle(‘Engür’); ?>
Eğlence <?php $a = date_sunrise(time(), SUNFUNS_RET_STRING, 39.91, 32.85, 90, 3);
echo ‘Bugün Ankara\’da güneşin doğuş saati: ‘ . $a; ?>
Çatılar (Framework)
Çatılar (Framework) Laravel Yii Framework Symfony Zend Framework CakePHP Phalcon
(Eklenti)
Kaynaklar
Kaynaklar http://php.net http://www.phptherightway.com http://www.planet-php.org http://www.reddit.com/r/PHP http://phpsecurity.readthedocs.org http://packagist.org
Kaynaklar http://ab.org.tr http://inet-tr.org.tr http://kamp.linux.org.tr http://groups.google.com/group/php-egitimleri http://php-tr.com
Sorular
Teşekkürler! http://hi.do http://github.com/hdogan http://tr.linkedin.com/in/hdogan @hdogan http://speakerdeck.com/hdogan Hidayet Doğan