Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHP 101
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hidayet Doğan
February 27, 2014
Programming
780
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHP 101
Hidayet Doğan
February 27, 2014
More Decks by Hidayet Doğan
See All by Hidayet Doğan
Swoole ile Asenkron PHP
hdogan
0
850
Asenkron PHP
hdogan
0
1.6k
PHP Senfoni Orkestrası: Composer
hdogan
1
460
PHP ile Soket Programlama ve Ağ Servisleri
hdogan
5
4.4k
CakePHP ile Pasta Pişirmek
hdogan
1
910
Web Uygulamalarında Güvenlik
hdogan
1
540
Phalcon - Eklenti olarak sunulan PHP çatısı - PHP Günleri 2013#1
hdogan
5
1.7k
İnsanlar için PHP
hdogan
0
580
Phalcon - Eklenti olarak sunulan PHP çatısı
hdogan
2
2.5k
Other Decks in Programming
See All in Programming
App Intentsのビルドプロセスを支える技術
kntkymt
0
210
AIとGame Jamで、ゲームを完成させた話
takahirosaeki
0
120
業務時間外もAIに働いてもらう話
colorful12
3
10k
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
1.1k
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
typoなんかねぇよ
raspython3
0
690
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
130
Family mrubyの進捗
kishima
1
110
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
200
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
5.8k
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
470
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Being A Developer After 40
akosma
91
590k
Claude Code のすすめ
schroneko
67
230k
Ethics towards AI in product and experience design
skipperchong
2
370
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
590
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
202
76k
エンジニアに許された特別な時間の終わり
watany
108
250k
Producing Creativity
orderedlist
PRO
348
41k
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