PHP

PHP

PHP: Hypertext Preprocessor adalah bahasa skrip yang dapat ditanamkan atau disisipkan ke dalam HTML. PHP banyak dipakai untuk memrogram situs web dinamis. PHP dapat digunakan untuk membangun sebuah CMS.

Sejarah PHP

Pada awalnya PHP merupakan kependekan dari Personal Home Page (Situs personal). PHP pertama kali dibuat oleh Rasmus Lerdorf pada tahun 1995. Pada waktu itu PHP masih bernama Form Interpreted (FI), yang wujudnya berupa sekumpulan skrip yang digunakan untuk mengolah data formulir dari web.

Selanjutnya Rasmus merilis kode sumber tersebut untuk umum dan menamakannya PHP/FI. Dengan perilisan kode sumber ini menjadi sumber terbuka, maka banyak pemrogram yang tertarik untuk ikut mengembangkan PHP.

Pada November 1997, dirilis PHP/FI 2.0. Pada rilis ini, interpreter PHP sudah diimplementasikan dalam program C. Dalam rilis ini disertakan juga modul-modul ekstensi yang meningkatkan kemampuan PHP/FI secara signifikan.

Pada tahun 1997, sebuah perusahaan bernama Zend menulis ulang interpreter PHP menjadi lebih bersih, lebih baik, dan lebih cepat. Kemudian pada Juni 1998, perusahaan tersebut merilis interpreter baru untuk PHP dan meresmikan rilis tersebut sebagai PHP 3.0 dan singkatan PHP diubah menjadi akronim berulang PHP: Hypertext Preprocessing.

Pada pertengahan tahun 1999, Zend merilis interpreter PHP baru dan rilis tersebut dikenal dengan PHP 4.0. PHP 4.0 adalah versi PHP yang paling banyak dipakai pada awal abad ke-21. Versi ini banyak dipakai disebabkan kemampuannya untuk membangun aplikasi web kompleks tetapi tetap memiliki kecepatan dan stabilitas yang tinggi.

Pada Juni 2004, Zend merilis PHP 5.0. Dalam versi ini, inti dari interpreter PHP mengalami perubahan besar. Versi ini juga memasukkan model pemrograman berorientasi objek ke dalam PHP untuk menjawab perkembangan bahasa pemrograman ke arah paradigma berorientasi objek.

Contoh program

Program Hello World

Program Hello World yang ditulis menggunakan PHP adalah sebagai berikut:

<?php
    echo "Hello World";
?>

Program bilangan Fibonacci

Berikut ini adalah contoh program yang relatif lebih kompleks yang ditulis dengan menggunakan PHP. Contoh program ini adalah program untuk menampilkan 20 bilangan pertama dari deret bilangan Fibonacci.

<?php
function fibonacci_seq( $panjang ) {
   for( $l = array(0,1), $i = 2, $x = 0; $i < $panjang; $i++ )
        $l[] = $l[$x++] + $l[$x];
   return $l;
}

fibonacci_seq(20);
// Angka "20" dapat diganti sesuai keinginan
?>

Kelebihan PHP Dari Bahasa Pemrograman Lain

Beberapa kelebihan PHP dari bahasa pemrograman web, antara lain:

  1. ‘Bahasa pemrograman PHP adalah sebuah bahasa script yang tidak melakukan sebuah kompilasi dalam penggunaanya.’
  2. ‘Web Server yang mendukung PHP dapat ditemukan dimana – mana dari mulai apache, IIS, Lighttpd, hingga Xitami dengan konfigurasi yang relatif mudah.’
  3. ‘Dalam sisi pengembangan lebih mudah, karena banyaknya milis – milis dan developer yang siap membantu dalam pengembangan.’
  4. ‘Dalam sisi pemahamanan, PHP adalah bahasa scripting yang paling mudah karena memiliki referensi yang banyak.’
  5. ‘PHP adalah bahasa open source yang dapat digunakan di berbagai mesin (Linux, Unix, Macintosh, Windows) dan dapat dijalankan secara runtime melalui console serta juga dapat menjalankan perintah-perintah system.’

Tipe data

PHP memiliki 8 (delapan) tipe data yaitu :

  1. Integer
  2. Double
  3. Boolean
  4. String
  5. Object
  6. Array
  7. Null
  8. Nill
  9. Resource

source

Komentar
  1. grosir baju bayi mengatakan:

    Wow, wonderful blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is magnificent, as well as the content!. Thanks For Your article about PHP Secarik Kertasâ„¢ .

  2. Short funny quotes mengatakan:

    I think this is one of the most significant info for me. And i’m glad reading your article. But should remark on some general things, The website style is perfect, the articles is really nice : D. Good job, cheers

  3. remove scalp residue mengatakan:

    I just want to tell you that I am very new to blogs and truly liked this web site. Very likely I’m want to bookmark your blog post . You surely have really good writings. Many thanks for sharing with us your blog site.

  4. Melda Bullerwell mengatakan:

    Well I think you’re correct about this, but I’m not sure I see the point in the article. What was your intent for the audience? Who was this written for?

  5. Read More Here mengatakan:

    Hey! Wonderful post! Please do tell us when we can see a follow up!

  6. Read More mengatakan:

    Thanks for any other informative site. Where else may just I get that type of information written in such a perfect way? I have a challenge that I’m just now running on, and I have been on the look out for such information.

  7. details mengatakan:

    I experimented with viewing your blog with my ipod touch and the format doesnt seem to be correct. Might wanna check it out on WAP as well as it seems most smartphone layouts are not really working with your website.

  8. liberty reserve mengatakan:

    This is the reverse PHP Secarik Kertasâ„¢ blog for anyone who wants to essay out out almost this substance. You attending so overmuch its most exhausting to present with you (not that I real would want…HaHa). You definitely put a new rotation on a topic thats been backhand near for eld. Pleasant congest, simply great!

  9. intangible mengatakan:

    Virtually all of the commentary on this particular blog page dont make sense.

  10. Keith Mayor mengatakan:

    Just what I was searching for, appreciate it for putting up.

  11. philadelphia truck accident attorney – Helpful Considerations

  12. intangible mengatakan:

    This blog has got a lot of really helpful information on it! Thanks for informing me!

  13. kreatyna fakty mengatakan:

    We’ve just one caveat to be able to site: how come so very little seems through your post? I like looking at you, nevertheless i just pointed out that there are more if you ask me. What’s this specific? Take care

  14. machine carbon fiber mengatakan:

    You could certainly see your enthusiasm in the work you write. The world hopes for even more passionate writers such as you who aren’t afraid to say how they believe. Always go after your heart. “Man is the measure of all things.” by Protagoras.

  15. supletivo em salvador mengatakan:

    Hi there, great blog site on-line, the big 1. Driving a car might have another web site? Were happy to visit all of them, and i also mistook your current view about additional matters than these included below. Inform me, thank you upfront.

  16. chairmat info mengatakan:

    Strange , your site turns up with a black color to it, what color is the primary color on your webpage?

  17. knee braces mengatakan:

    Although I really like this post, I believe there was an punctuational error close towards the finish with the third paragraph.

  18. view site mengatakan:

    I was wanting to know if you ever thought of changing the layout of your website? It is very well written; I enjoy what youve got to state. But maybe you can create a little more in the way of content so people can connect with it better. Youve got an awful lot of text for only having one or two pictures. Maybe you could space it out better?

  19. final phase fat loss mengatakan:

    After I open up your Rss feed it seems to be a ton of garbage, is the issue on my side?

  20. try chair mats mengatakan:

    The look for your site is a tad off in Epiphany. Even So I like your weblog. I may have to install a normal browser just to enjoy it.

  21. inside chair mat mengatakan:

    Weird , your site shows up with a black hue to it, what color is the primary color on your web-site?

  22. return to site mengatakan:

    The design for the weblog is a little bit off in Epiphany. Even So I like your site. I may need to use a normal browser just to enjoy it.

  23. Nydia Pausch mengatakan:

    I visited a lot of website but I conceive this one contains something special in it.

  24. You made some decent points there. I regarded on the web for the issue and found most people will go together with together with your website.

  25. muzyka elektroniczna mengatakan:

    Hello there, You’ve done an excellent job filbutrw. I will definitely digg it and personally suggest to my friends. I’m confident they’ll be benefited from this site.

Beri Komentar Disini

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s