پي‌إتش‌پي

(تم التحويل من بي‌إتش‌بي)

PHP لغة برمجة مفتوحة المصدر تستخدم لتطوير و برمجة تطبيقات الويب ، التركيب النحوي للـ البي اتش بي يشبه كثيراً التركيب النحوي للغة الـ C هذا بالإضافه إلى انها تعمل على منصات متعدده مثل لينكس و ويندوز بالإضافه إلى انها تعتبر من لغات البرمجة كائنية التوجه (OOP), كون لغة البي اتش بي مفتوحة المصدر و مجانيه هذا السبب جعلها تنتشر بشكل كبير على الانترنت حيث اصبحت معظم مواقع الانترنت و التطبيقات تُكتب بهذه اللغة و مثال على ذلك مشروع الموسوعة الحرة من ويكيبيديا كما ان مجتمع المصدر المفتوح متعاون بالإضافه إلى انه زاخر بالشيفرات البرمجيه الجاهزه للاستخدام و الدراسه حيث تخضع اغلب هذه الشيفرات إلى رخصات المصدر المفتوح.

پي‌إتش‌پي
PHP
Paradigmimperative, object-oriented, Procedural, reflective
Designed byRasmus Lerdorf
Developerمجموعة پ.إتش.پ
First appeared1995 (1995)[1]
الإصدار المستقر
5.3.3 / 22 يوليو 2010; منذ 13 سنة (2010-07-22
Typing disciplineDynamic, weak
Implementation languageC
OSCross-platform
Licenseترخيص PHP
Filename extensions.php, .phtml .php5 .phps
Websitewww.php.net
Major implementations
Zend Engine, Roadsend PHP, Phalanger, Quercus, Project Zero, HipHop
Influenced by
C, Perl, Java, C++, Tcl[1]
Influenced
PHP4Delphi

ينظر الكثير من مطوري المواقع إلى لغة PHP كبديل للغة ASP المنتجه من قبل شركة مايكروسوفت و JSP المنتجة من صن ميكروسيستيمز. تقوم شركة صن حالياً بدعم لغة الـ PHP على الرغم من أنها منافسة للـ JSP إلا أنها تدعمها خصوصاً بعد أن أخذت صن على عاتقها دعم المصادر المفتوحة و دعمت من قبل نظام التشغيل لينكس.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

التاريخ

PHP/FI

     
Rasmus Lerdorf, who wrote the original Common Gateway Interface component, and Andi Gutmans and Zeev Suraski, who rewrote the parser that formed PHP 3

ظهرت هذه اللغة سنة 1995 على يد راسموس لردورف كانت تسمى وقتها بـ PHP/FI و في الحقيقه لم تكن لغة برمجه وقتها و انما كانت مجموعه من التطبيقات التي كُتبت بإستخدام لغة Perl اطلق راسموس اسم Personal Home Page Tools على هذه التطبيقات و لانه احتاج إلى تطبيقات اكثر فائده قام راسموس بكتابة تطبيق اكبر بإستخدام لغة C حيث كانت هذه التطبيقات تتصل بقواعد البيانات بعد كتابتها بـ لغة السي كما انها كانت تسمح للمستخدمين من خلالها تطوير تطبيقات مواقع ديناميكيه بسيطه .

اختار راسموس ان تكون الشيفره المصدريه الخاصه بـ PHP/FI متوفره للجميع . كانت PHP/FI وقتها بسيطه جداً وكانت تحوي على بعض الوظائف المتوفره بالاصدارات الحاليه من اللغه ، كما ان المتغيرات بها كانت مشابهه و بشكل كبير للغة Perl ، في عام 1997 تم اطلاق الاصدار 2.0 من PHP/FI حيث بلغ عدد مستخدميها آنذاك 50,000 نطاق.

PHP 3

في عام 1997 تم اعادة كتابة PHP/FI على يد زئڤ سوراسكي و أندي گوتمانز بعدما وجدوا ان PHP/FI 2.0 ليست قويه بما فيه الكفايه من اجل كتابة تطبيق تجاره الكترونيه و الذي كانوا يعملون عليه كـ مشروع تخرّج لجامعتهم ، احد اهم الميزات التي تميزت بها PHP 3 عن سابقتها انها اصبحت قابله للتوسّع و نتيجة لذلك توفر مع اللغه العديد من المكتبات مثل قواعد البيانات ، كما انه تم اضافة دعم للبرمجه كائنية التوجه OOP في نفس الاصدار .

PHP 4

في عام 1998 بدأ زئڤ سوراسكي و أندي گوتمانز بإعادة كتابة اساس لغة PHP و كان الهدف من ذلك هو تحسين الاداء للبرامج المُعقده و الضخمه ، المحرك الجديد الذي ظهر تم تسميته بـ ZEND و الاسم مأخود من اوائل حروف مطوريه ، و بالتالي اعتمدت PHP 4.0 على هذا المحرك حيث تم الاعلان عن هذا الاصدار في عام 2000 حيث احتوى على مجموعه جديده من الميزات مثل الجلسات و غيرها

PHP 5

احدث اصدار من الـ PHP و تم الاعلان عنه في عام 2004 .وهناك اصدارات جديدة من الممكن مشاهدتها في الموقع الرسمي : www.php.net

الترخيص

ان لغة الب اتش بي لغة برمجة مجانية تم اصدارها تحت رخصة الب اتش بي و التي تنص علي التالي: يجب عدم استخدام الاسم بي اتش بي للترويج عن اي منتج من انتاج هذه البرمجية دون استصدار اذن مكتوب مسبقاُ

مما يتعارض مع تعريف الرخصة العامة للاستخدام بسبب وجود قيود علي استخدام مصطلح بي اتش بي.

تاريخ الاصدارات

المعنى
احمر نسخة غير مدعومة حالياً
أخضر نسخة ما تزال مدعومة
ازرق نسخة مستقبلية
Version Release date Supported until[2] Notes
1.0 8 يونيو 1995 Officially called "Personal Home Page Tools (PHP Tools)". This is the first use of the name "PHP".[3]
2.0 1 نوفمبر 1997 Officially called "PHP/FI 2.0". This is the first release that could actually be characterised as PHP, being a standalone language with many features that have endured to the present day.
3.0 6 يونيو 1998 20 أكتوبر 2000[2] Development moves from one person to multiple developers. Zeev Suraski and Andi Gutmans rewrite the base for this version.[3]
4.0 22 مايو 2000 23 يونيو 2001[2] Added more advanced two-stage parse/execute tag-parsing system called the Zend engine.[4]
4.1 10 ديسمبر 2001 12 مارس 2002[2] Introduced "superglobals" ($_GET, $_POST, $_SESSION, etc.)[4]
4.2 22 أبريل 2002 6 سبتمبر 2002[2] Disabled register_globals by default. Data received over the network is not inserted directly into the global namespace anymore, closing possible security holes in applications.[4]
4.3 27 ديسمبر 2002 31 مارس 2005[2] Introduced the command-line interface (CLI), to supplement the CGI.[4][5]
4.4 11 يوليو 2005 7 أغسطس 2008[2] Fixed a memory corruption bug, which required breaking binary compatibility with extensions compiled against PHP version 4.3.x.[6]
5.0 13 يوليو 2004 5 سبتمبر 2005[2] Zend Engine II with a new object model.[7]
5.1 24 نوفمبر 2005 24 أغسطس 2006[2] Performance improvements with introduction of compiler variables in re-engineered PHP Engine.[7] Added PHP Data Objects (PDO) as a consistent interface for accessing databases.[8]
5.2 2 نوفمبر 2006 6 يناير 2011[2] Enabled the filter extension by default. Native JSON support.[7]
5.3 30 يونيو 2009 14 أغسطس 2014[2] Namespace support; late static bindings, jump label (limited goto), closures, PHP archives (phar), garbage collection for circular references, improved Windows support, sqlite3, mysqlnd as a replacement for libmysql as underlying library for the extensions that work with MySQL, fileinfo as a replacement for mime_magic for better MIME support, the Internationalization extension, and deprecation of ereg extension.
5.4 1 مارس 2012 3 سبتمبر 2015[2] Trait support, short array syntax support. Removed items: register_globals, safe_mode, allow_call_time_pass_reference, session_register(), session_unregister() and session_is_registered(). Built-in web server.[9] Several improvements to existing features, performance and reduced memory requirements.
5.5 20 يونيو 2013 10 July 2016[10] Support for generators, finally blocks for exceptions handling, OpCache (based on Zend Optimizer+) bundled in official distribution.[11]
5.6 28 أغسطس 2014 31 ديسمبر 2018[10] Constant scalar expressions, variadic functions, argument unpacking, new exponentiation operator, extensions of the use statement for functions and constants, new phpdbg debugger as a SAPI module, and other smaller improvements.[12]
6.x Not released N/A Abandoned version of PHP that planned to include native Unicode support.[13][14]
7.0 3 ديسمبر 2015[15] 3 ديسمبر 2018[16] Zend Engine 3 (performance improvements[17] and 64-bit integer support on Windows[18]), uniform variable syntax,[19] AST-based compilation process,[20] added Closure::call(),[21] bitwise shift consistency across platforms,[22] ?? (null coalesce) operator,[23] Unicode code point escape syntax,[24] return type declarations,[25] scalar type (integer, float, string and boolean) declarations,[26] <=> "spaceship" three-way comparison operator,[27] generator delegation,[28] anonymous classes,[29] simpler and more consistently available CSPRNG API,[30] replacement of many remaining internal PHP "errors" with the more modern exceptions,[31] and shorthand syntax for importing multiple items from a namespace.[32]
7.1 1 December 2016 1 December 2019[10] void return type,[33] class constant visibility modifiers[34]
7.2 30 November 2017 30 November 2020[10] Object parameter and return type hint[35], Libsodium extension[36], Abstract method overriding[37], Parameter type widening[38]
7.3 12 December 2018 (Expected)[39] 12 December 2021 (Expected) Flexible Heredoc and Nowdoc syntax[40], support for references and array deconstruction with list()[41], PCRE2 support[42], hrtime() function[43]


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

الاستخدام

 
A broad overview of the LAMP software bundle, displayed here together with Squid.

غالباً ما تعمل لغة پي إتش پي على مزود ويب، معتبرة كود بي إتش بي كداخل وتحرر صفحات الويب كخارج.

وقد اصبح بناء اللامب مشهوراً جداً في صناعة الويب كطريقة برمجيات ويب آمنة، غير مكلفة، ويمكن الاعتماد عليها. بي إتش بي مشار إليها كحرف الباء في لامب بجانب لينكس(ل)، اباتشي(ا) وماي اس كيو ال(م). وقد ظهرت أيضاً بناءات أخرى كوامب مستبدلة لينكس بـ ويندوز(و)، و مامب مستبدله لينكس بـ ماك او اس. يمكن استخدام بي إتش بي مع نسبة كبيرة من انظمة ادارة قواعد البيانات،

 
Dynamic web page: example of server-side scripting (PHP and MySQL).

ويعمل على كثير من سيرفرات الويب المشهورة، ومتوفر للكثير من أنظمة التشغيل المختلفة. تلك الليونة مكنت بي إتش بي من الانتشار على الكثير من خوادم الانترنت حول العالم، فأكثر من 18 مليون عنوان موقع تعمل على خوادم منزل عليها بي إتش بي.

مثال على برامج بي إتش بي مشهوره لخوادم الانترنت تشمل بي إتش بي بي بي phpBB، جوملا joomla، وورد بريس Wordpress و ميدياويكي MediaWiki.

البداية في ال PHP نستطيع كتاب الكود على أي محرر نصوص وصفظه في لاحقه PHP يجب أن نضع هذا الملف ضمن سيرفر فاذا أردنا أن نجعل جهازنا عبارة عن سيرفر يجب أن ننسخ برنامج معين Appserv مثلا ننسخ الملف ضمن مجلد www الموجود داخل البرنامج ثم نكتب في المستعرض الذي لدينا localhost\file name.php file name هو اسم الملف والذي يكون اختياريا

تطبيقات تم برمجتها بإستخدام الـ PHP :

انظر أيضا

الهوامش

  1. ^ أ ب Rasmus Lerdorf began assembling C code originally written for CGI scripts into a library and accessing the library's functions, including SQL queries, through HTML-embedded commands in 1994; by 1995 the commands had taken the shape of PHP code that would be familiar of users of the language today. Lerdorf, Rasmus (2007-04-26). "PHP on Hormones - history of PHP presentation by Rasmus Lerdorf given at the MySQL Conference in Santa Clara, California" (mp3). The Conversations Network. Retrieved 2009-12-11. Every day I would change the language drastically, and it didn't take very long, so by 1995, mid-1995 or so, PHP looked like this. This isn't that far from what PHP looks like today, actually. {{cite web}}: External link in |quote= (help)
  2. ^ أ ب ت ث ج ح خ د ذ ر ز س "Unsupported Branches". php.net. Retrieved 2015-11-14.
  3. ^ أ ب خطأ استشهاد: وسم <ref> غير صحيح؛ لا نص تم توفيره للمراجع المسماة about PHP
  4. ^ أ ب ت ث "PHP: PHP 4 ChangeLog". The PHP Group. 2008-01-03. Retrieved 2008-02-22.
  5. ^ "Using PHP from the command line". PHP Manual. The PHP Group. Retrieved 2009-09-11.
  6. ^ "PHP 4.4.0 Release Announcement". PHP Mannual. The PHP Group. Retrieved 2013-11-24.
  7. ^ أ ب ت "PHP: PHP 5 ChangeLog". The PHP Group. 2007-11-08. Retrieved 2008-02-22.
  8. ^ "PHP manual: PDO". The PHP Group. 2011-11-15. Retrieved 2011-11-15.
  9. ^ "Built-in web server". Retrieved March 26, 2012.
  10. ^ أ ب ت ث "Supported Versions". php.net. Retrieved 2017-12-13.
  11. ^ "PHP 5.5.0 changes". php.net. Retrieved 2015-03-03.
  12. ^ "Migrating from PHP 5.5.x to PHP 5.6.x". php.net. Retrieved 2014-03-24.
  13. ^ "Resetting PHP 6". There have been books on the shelves purporting to cover PHP 6 since at least 2008. But, in March 2010, the PHP 6 release is not out — in fact, it is not even close to out. Recent events suggest that PHP 6 will not be released before 2011 — if, indeed, it is released at all.
  14. ^ "PHP 7 moves full speed ahead". Recent versions of PHP have been part of the 5.x release series, but there will be no PHP 6. "We're going to skip [version] 6, because years ago, we had plans for a 6, but those plans were very different from what we're doing now," Gutmans said. Going right to version 7 avoids confusion.
  15. ^ خطأ استشهاد: وسم <ref> غير صحيح؛ لا نص تم توفيره للمراجع المسماة php7final
  16. ^ خطأ استشهاد: وسم <ref> غير صحيح؛ لا نص تم توفيره للمراجع المسماة releaseprocess
  17. ^ خطأ استشهاد: وسم <ref> غير صحيح؛ لا نص تم توفيره للمراجع المسماة phpng
  18. ^ "PHP: rfc:size_t_and_int64_next". php.net. Retrieved 16 December 2014.
  19. ^ خطأ استشهاد: وسم <ref> غير صحيح؛ لا نص تم توفيره للمراجع المسماة uvs
  20. ^ "PHP: rfc:abstract_syntax_tree". php.net. Retrieved 16 December 2014.
  21. ^ "PHP: rfc:closure_apply". php.net. Retrieved 16 December 2014.
  22. ^ "PHP: rfc:integer_semantics". php.net. Retrieved 16 December 2014.
  23. ^ "PHP: rfc:isset_ternary". php.net. Retrieved 16 December 2014.
  24. ^ "RFC: Unicode Codepoint Escape Syntax". 2014-11-24. Retrieved 2014-12-19.
  25. ^ خطأ استشهاد: وسم <ref> غير صحيح؛ لا نص تم توفيره للمراجع المسماة return-types
  26. ^ خطأ استشهاد: وسم <ref> غير صحيح؛ لا نص تم توفيره للمراجع المسماة scalar-types
  27. ^ "Combined Comparison (Spaceship) Operator". php.net. Retrieved 2015-05-21.
  28. ^ "PHP RFC: Generator Delegation". php.net. Retrieved 2015-05-21.
  29. ^ "PHP RFC: Anonymous Classes". php.net. Retrieved 2015-05-21.
  30. ^ "PHP RFC: Easy User-land CSPRNG". php.net. Retrieved 2015-05-21.
  31. ^ "PHP RFC: Exceptions in the engine (for PHP 7)". php.net. Retrieved 2015-05-21.
  32. ^ "PHP RFC: Group Use Declarations". php.net. Retrieved 2015-05-21.
  33. ^ "PHP: rfc:void_return_type". php.net. 2015-11-09. Retrieved 2015-11-14.
  34. ^ "PHP: rfc:class_constant_visibility". php.net. 2015-10-27. Retrieved 2015-12-08.
  35. ^ "PHP: rfc:object-typehint". wiki.php.net.
  36. ^ "PHP: rfc:libsodium". wiki.php.net.
  37. ^ "PHP: rfc:allow-abstract-function-override". wiki.php.net.
  38. ^ "PHP: rfc:parameter-no-type-variance". wiki.php.net.
  39. ^ "PHP: todo:php73". wiki.php.net.
  40. ^ "PHP: rfc:flexible_heredoc_nowdoc_syntaxes". wiki.php.net.
  41. ^ "PHP: rfc:list_reference_assignment". wiki.php.net.
  42. ^ "PHP: rfc:pcre2-migration". wiki.php.net.
  43. ^ "PHP: hrtime - Manual". php.net.

وصلات خارجية