{"id":1959,"date":"2016-10-03T15:24:06","date_gmt":"2016-10-03T15:24:06","guid":{"rendered":"http:\/\/www.kodcafe.com\/?p=1959"},"modified":"2016-10-03T15:24:06","modified_gmt":"2016-10-03T15:24:06","slug":"php-de-function-fonksiyon-kullanimi","status":"publish","type":"post","link":"http:\/\/www.kodcafe.com\/?p=1959","title":{"rendered":"Php de Function (Fonksiyon) Kullan\u0131m\u0131"},"content":{"rendered":"<p>Php en \u00f6nemli k\u0131s\u0131mlardan bir function yani fonksiyon veya i\u015flev diyebiliriz.. Neden \u00f6nemli \u00e7\u00fcnk\u00fc bir kod blo\u011funda her defas\u0131nda ayn\u0131 i\u015flemi yapmak \u00e7ok zaman al\u0131r lakin bu i\u015flemleri fonksiyon blo\u011funda tek bir seferde yapt\u0131rmam\u0131z hem zaman hemde i\u015fleyi\u015f a\u00e7\u0131s\u0131ndan \u00f6nemlidir..<\/p>\n<p>\u00d6rneklerle a\u00e7\u0131klayal\u0131m.. ;<br \/>\n<!--more--><\/p>\n<pre lang=\"php\">\n <?php\n\n  deneme(\"galatasaray\");\n\n function deneme($deger)  \/\/deneme isminde fonksiyon olu\u015fturuldu.. \n {                       \/\/ buradaki de\u011fer function i\u00e7i de\u011fi\u015fkendir.. \n \techo $deger;         \/\/ deneme ismindeki function de\u011fer de\u011fi\u015fkenine galatasaray g\u00f6nderildi \n }                       \/\/ echo ile de\u011fer de\u011fi\u015fkenine atanan de\u011feri yazd\u0131rd\u0131k..\n?>\n<\/pre>\n<p>bir ba\u015fka \u00f6rnek de function dan de\u011fer d\u00f6nd\u00fcrelim.. Mesala iki say\u0131n\u0131n toplam\u0131n\u0131n yar\u0131s\u0131n\u0131 bize geri g\u00f6ndersin..<\/p>\n<pre lang=\"php\">\n<?php\n\n$sayi1=\"10\";\n$sayi2=\"20\";\n\n$sonuc= toplama($sayi1,$sayi2);\necho $sonuc;\n\n function toplama($s1,$s2) \n {          \n \n  $sonuc= ($s1+$s2)\/2;\n  return $sonuc;\n             \n }                      \n?><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Php en \u00f6nemli k\u0131s\u0131mlardan bir function yani fonksiyon veya i\u015flev diyebiliriz.. Neden \u00f6nemli \u00e7\u00fcnk\u00fc bir kod blo\u011funda her defas\u0131nda ayn\u0131 i\u015flemi yapmak \u00e7ok zaman al\u0131r lakin bu i\u015flemleri fonksiyon blo\u011funda tek bir seferde yapt\u0131rmam\u0131z hem zaman hemde i\u015fleyi\u015f a\u00e7\u0131s\u0131ndan \u00f6nemlidir.. \u00d6rneklerle a\u00e7\u0131klayal\u0131m.. ;<\/p>\n","protected":false},"author":1,"featured_media":101,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,5],"tags":[318,328,333],"class_list":["post-1959","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","category-programlama","tag-php-2","tag-php-function-fonksiyon-kullanimi","tag-php-toplama-yaptirma"],"_links":{"self":[{"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/posts\/1959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1959"}],"version-history":[{"count":0,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/posts\/1959\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1959"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}