├── .DS_Store
├── LICENSE
├── README.md
├── index.md
├── introduction.md
├── namespace.md
├── operator.md
├── php.md
└── why-php.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nahid/Absolute-PHP/8b316a5121a9a09f0df9585a6eade4c1bda4e39f/.DS_Store
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | CC0 1.0 Universal
2 |
3 | Statement of Purpose
4 |
5 | The laws of most jurisdictions throughout the world automatically confer
6 | exclusive Copyright and Related Rights (defined below) upon the creator and
7 | subsequent owner(s) (each and all, an "owner") of an original work of
8 | authorship and/or a database (each, a "Work").
9 |
10 | Certain owners wish to permanently relinquish those rights to a Work for the
11 | purpose of contributing to a commons of creative, cultural and scientific
12 | works ("Commons") that the public can reliably and without fear of later
13 | claims of infringement build upon, modify, incorporate in other works, reuse
14 | and redistribute as freely as possible in any form whatsoever and for any
15 | purposes, including without limitation commercial purposes. These owners may
16 | contribute to the Commons to promote the ideal of a free culture and the
17 | further production of creative, cultural and scientific works, or to gain
18 | reputation or greater distribution for their Work in part through the use and
19 | efforts of others.
20 |
21 | For these and/or other purposes and motivations, and without any expectation
22 | of additional consideration or compensation, the person associating CC0 with a
23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
25 | and publicly distribute the Work under its terms, with knowledge of his or her
26 | Copyright and Related Rights in the Work and the meaning and intended legal
27 | effect of CC0 on those rights.
28 |
29 | 1. Copyright and Related Rights. A Work made available under CC0 may be
30 | protected by copyright and related or neighboring rights ("Copyright and
31 | Related Rights"). Copyright and Related Rights include, but are not limited
32 | to, the following:
33 |
34 | i. the right to reproduce, adapt, distribute, perform, display, communicate,
35 | and translate a Work;
36 |
37 | ii. moral rights retained by the original author(s) and/or performer(s);
38 |
39 | iii. publicity and privacy rights pertaining to a person's image or likeness
40 | depicted in a Work;
41 |
42 | iv. rights protecting against unfair competition in regards to a Work,
43 | subject to the limitations in paragraph 4(a), below;
44 |
45 | v. rights protecting the extraction, dissemination, use and reuse of data in
46 | a Work;
47 |
48 | vi. database rights (such as those arising under Directive 96/9/EC of the
49 | European Parliament and of the Council of 11 March 1996 on the legal
50 | protection of databases, and under any national implementation thereof,
51 | including any amended or successor version of such directive); and
52 |
53 | vii. other similar, equivalent or corresponding rights throughout the world
54 | based on applicable law or treaty, and any national implementations thereof.
55 |
56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of,
57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
59 | and Related Rights and associated claims and causes of action, whether now
60 | known or unknown (including existing as well as future claims and causes of
61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum
62 | duration provided by applicable law or treaty (including future time
63 | extensions), (iii) in any current or future medium and for any number of
64 | copies, and (iv) for any purpose whatsoever, including without limitation
65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
66 | the Waiver for the benefit of each member of the public at large and to the
67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver
68 | shall not be subject to revocation, rescission, cancellation, termination, or
69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work
70 | by the public as contemplated by Affirmer's express Statement of Purpose.
71 |
72 | 3. Public License Fallback. Should any part of the Waiver for any reason be
73 | judged legally invalid or ineffective under applicable law, then the Waiver
74 | shall be preserved to the maximum extent permitted taking into account
75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
76 | is so judged Affirmer hereby grants to each affected person a royalty-free,
77 | non transferable, non sublicensable, non exclusive, irrevocable and
78 | unconditional license to exercise Affirmer's Copyright and Related Rights in
79 | the Work (i) in all territories worldwide, (ii) for the maximum duration
80 | provided by applicable law or treaty (including future time extensions), (iii)
81 | in any current or future medium and for any number of copies, and (iv) for any
82 | purpose whatsoever, including without limitation commercial, advertising or
83 | promotional purposes (the "License"). The License shall be deemed effective as
84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the
85 | License for any reason be judged legally invalid or ineffective under
86 | applicable law, such partial invalidity or ineffectiveness shall not
87 | invalidate the remainder of the License, and in such case Affirmer hereby
88 | affirms that he or she will not (i) exercise any of his or her remaining
89 | Copyright and Related Rights in the Work or (ii) assert any associated claims
90 | and causes of action with respect to the Work, in either case contrary to
91 | Affirmer's express Statement of Purpose.
92 |
93 | 4. Limitations and Disclaimers.
94 |
95 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
96 | surrendered, licensed or otherwise affected by this document.
97 |
98 | b. Affirmer offers the Work as-is and makes no representations or warranties
99 | of any kind concerning the Work, express, implied, statutory or otherwise,
100 | including without limitation warranties of title, merchantability, fitness
101 | for a particular purpose, non infringement, or the absence of latent or
102 | other defects, accuracy, or the present or absence of errors, whether or not
103 | discoverable, all to the greatest extent permissible under applicable law.
104 |
105 | c. Affirmer disclaims responsibility for clearing rights of other persons
106 | that may apply to the Work or any use thereof, including without limitation
107 | any person's Copyright and Related Rights in the Work. Further, Affirmer
108 | disclaims responsibility for obtaining any necessary consents, permissions
109 | or other rights required for any use of the Work.
110 |
111 | d. Affirmer understands and acknowledges that Creative Commons is not a
112 | party to this document and has no duty or obligation with respect to this
113 | CC0 or use of the Work.
114 |
115 | For more information, please see
116 |
117 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # পিএইচপি এন্ড ওয়েব ডেভলপমেন্ট
2 | একটি পূর্নঙ্গ পিএইচপি ভিত্তিক ওয়েব ডেভলপমেন্ট এর বই।
3 |
4 |
5 |
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | # সূচীপত্র
2 |
3 | - [সূচনা](#introduction)
4 | - [এ বইটিই কেন](#why-is-this-book)
5 | - [এ বইটি কি আমার জন্যে](#is-for-me)
6 | - [কেন এ বইটি অন্য বইয়ের থেকে আলাদা](#why-this-book-is-different)
7 | - [ওয়েবসাইট ও ওয়েবসাইকেল](#link)
8 | - [ওয়েবসাইট কি](#link)
9 | - [ব্রাউজার কি এবং কেন](#link)
10 | - [কিভাবে ওয়েবসাইট কাজ করে](#link)
11 | - [ডায়নামিক ও স্টেটিক ওয়েবসাইট](#link)
12 | - [ওয়েবসাইট ও ওয়েব অ্যাপ্লিকেশন](#link)
13 | - [ওয়েব অ্যাপ্লিকেশনই কি সফটওয়্যার](#link)
14 | - [ওয়েবসাইট/ওয়েব অ্যাপ্লিকেশন ডেভলপের জন্য কি জানতে হবে](#link)
15 | - [পিএইচপি ল্যাংগুয়েজ](#link)
16 | - [পিএইচপি](#introduction)
17 | - [পরিচিতি](#why-is-this-book)
18 | - [পিএইচপি কেন](#why-this-book-is-different)
19 | - [ওয়েব সার্ভার এবং পিএইচপিঃ পার্থক্য কি?]()
20 | - [ইনস্টলেশন](#why-this-book-is-different)
21 | - [PHP এর ব্যবহার](#introduction)
22 | - [এমবেডিং PHP](#why-is-this-book)
23 | - [সার্ভারের সাথে PHP](#is-for-me)
24 | - [Compiled নাকি Interpreted](#why-this-book-is-different)
25 | - [প্রথম কোড](#introduction)
26 | - [Hello World লিখি](#why-is-this-book)
27 | - [যেভাবে PHP কোড লেখা শুরু করবো](#is-for-me)
28 | - [স্টেটমেন্ট](#why-this-book-is-different)
29 | - [কোড কমেন্ট](#why-this-book-is-different)
30 | - [এবার Hello World বুঝে লিখবো](#why-this-book-is-different)
31 | - [echo নাকি print](#why-this-book-is-different)
32 | - [PHP CLI](#)
33 | - [ভেরিয়েবল](#introduction)
34 | - [ভেরিয়বল কি এবং কেন](#why-is-this-book)
35 | - [ডাটা টাইপ](#is-for-me)
36 | - [স্ট্যাটিক টাইপ নাকি ডাইনামিক টাইপ? স্ট্রং টাইপ নাকি উইক টাইপ?]()
37 | - [কনস্ট্যান্ট](#why-this-book-is-different)
38 | - [অপারেটর, অপারেন্ড ও অপারেশন](#introduction)
39 | - [এসাইনমেন্ট অপারেটর](#why-is-this-book)
40 | - [অরিথমেটিক অপারেটর](#is-for-me)
41 | - [কম্বাইনড এসাইনমেন্ট অপারেটর](#why-this-book-is-different)
42 | - [ইনক্রিমেন্ট অথবা ডিক্রিমেন্ট অপারেটর](#why-this-book-is-different)
43 | - [লজিক্যাল অপারেটর](#why-this-book-is-different)
44 | - [বিটওয়াইজ অপারেটর](#why-this-book-is-different)
45 | - [অপারেটরের অগ্রাধিকার](#why-this-book-is-different)
46 | - [এডিশনাল লজিক্যাল অপারেটর](#why-this-book-is-different)
47 | - [কন্ডিশনস](#introduction)
48 | - [If কন্ডিশন ](#why-is-this-book)
49 | - [Switch স্টেটমেন্ট](#is-for-me)
50 | - [ভিন্ন উপায়ে কন্ডিশন](#why-this-book-is-different)
51 | - [মিক্সড মুড](#why-this-book-is-different)
52 | - [টার্নারি অপারেটর](#why-this-book-is-different)
53 | - [অনুশীলন](#)
54 | - [পূনরাবৃত্তি (লুপ)](#introduction)
55 | - [for লুপ ](#why-is-this-book)
56 | - [while লুপ ](#is-for-me)
57 | - [do while লুপ](#why-this-book-is-different)
58 | - [foreach লুপ ](#why-this-book-is-different)
59 | - [ভিন্ন পদ্ধতিতে লুপ](#why-this-book-is-different)
60 | - [break](#why-this-book-is-different)
61 | - [continue](#why-this-book-is-different)
62 | - [goto ](#why-this-book-is-different)
63 | - [অনুশীলন](#)
64 | - [স্ট্রিং](#introduction)
65 | - [কিভাবে স্ট্রিং লিখে](#why-is-this-book)
66 | - [সিঙ্গেল কোয়েট ও ডাবল কোয়েটের পার্থক্য](#is-for-me)
67 | - [স্ট্রিং যুক্ত করা](#why-this-book-is-different)
68 | - [ক্যারেক্টার এসকেপিং](#why-this-book-is-different)
69 | - [জনপ্রিয় স্ট্রিং মেথডসমূহ](#)
70 | - [এ্যারে](#introduction)
71 | - [সাধারন এ্যারে](#why-is-this-book)
72 | - [এসোসিয়েটিভ এ্যারে](#is-for-me)
73 | - [এ্যারের লেখার স্টাইল](#why-this-book-is-different)
74 | - [বহুমাত্রিক এ্যারে](#why-this-book-is-different)
75 | - [জনপ্রিয় অ্যারে মেথডসমূহ](#)
76 | - [অনুশীলন](#)
77 | - [ফাংশন](#introduction)
78 | - [ফাংশন লেখা ](#why-is-this-book)
79 | - [ফাংশনকে কল করা](#is-for-me)
80 | - [ফাংশনের প্যারামিটার](#why-this-book-is-different)
81 | - [ডিফল্ট প্যারামিটার](#why-this-book-is-different)
82 | - [প্যারামিটারের লিষ্ট](#why-this-book-is-different)
83 | - [Return ভ্যালু](#why-this-book-is-different)
84 | - [রিকার্সিভ ফাংশন ](#why-this-book-is-different)
85 | - [স্কোপ ও সময়সীমা ](#why-this-book-is-different)
86 | - [ক্লোজার(Closure)](#)
87 | - [Helper Function](#)
88 | - [Regular Expression](#)
89 | - [অনুশীলন](#)
90 | - [Work multiple Files, require_once, require and include](#)
91 | - [PHP এর সাথে ডাটাবেস](#introduction)
92 | - [ডাটাবেস কি](#why-is-this-book)
93 | - [ডাটাবেস কেন](#is-for-me)
94 | - [কিছু ডাটাবেস কোয়েরী](#is-for-me)
95 | - [PHP থেকে ডাটাবেস সার্ভার কানেকশন](#is-for-me)
96 | - [PHP থেকে ডাটাবেস কোয়েরী](#is-for-me)
97 | - [ডাটা নিয়ে কাজ](#link)
98 | - [বাস্তবিক ব্যবহার](#link)
99 | - [Session](#)
100 | - [Cache and Cookie Handling](#)
101 | - [Security নিয়ে কিছু কথা](#)
102 | - [OOP](#introduction)
103 | - [OOP কি](#link)
104 | - [কেন OOP ব্যবহার করবো](#link)
105 | - [OOP এর ফিচার সমূহ](#link)
106 | - [Class](#introduction)
107 | - [Class কি](#link)
108 | - [Class কেন](#link)
109 | - [যেভাবে class লিখবো](#link)
110 | - [Instantiate কি](#link)
111 | - [Method ও Properties কে জানি](#link)
112 | - [Object কাকে বলে](#link)
113 | - [Object এর ব্যবহার](#link)
114 | - [অনুশীলন](#)
115 | - [Magic Method](#)
116 | - [Namespace](#link)
117 | - [Namespace এর প্রয়োজনীয়তা](#link)
118 | - [কোথায় Namespace ব্যবহার হবে](#link)
119 | - [উত্তরাধীকার - Inheritance](#introduction)
120 | - [কেন এই Inheritance](#link)
121 | - [কিভাবে লিখবো](#link)
122 | - [প্যারেন্ট class ও চাইল্ড class](#link)
123 | - [অনুশীলন](#)
124 | - [Code Visibility অথবা Encapsulation](#introduction)
125 | - [Encapsulation এর প্রয়োজনীয়তা](#link)
126 | - [কেন Encapsulation ব্যবহার করবো](#link)
127 | - [অনুশীলন](#)
128 | - [Polymorphism](#introduction)
129 | - [Polymorphism কেন](#link)
130 | - [Polymorphism এর ব্যবহার](#link)
131 | - [অনুশীলন](#)
132 | - [Interface](#)
133 | - [Static Method](#)
134 | - [Traits](#)
135 | - [Error and Exception Handling](#)
136 | - [Files and I/O](#)
137 | - [PHP Gotchas and Weird parts](#)
138 | - [কিছু Data Structure](#)
139 | - [কিছু Algorithm](#)
140 | - [Time Complexity](#)
141 | - [Optimization ](#)
142 | - [PHP Profiler](#)
143 | - [অনুশীলন](#)
144 | - [Online Judge](#)
145 | - [What is Online Judge](#)
146 | - [How to solve a problem](#)
147 | - [Why we practice in online judge](#)
148 | - [Popular Online Judge](#)
149 | - [Dependency Management](#)
150 | - [Composer](#)
151 | - [Testing](#)
152 | - [Style Guide, PSR, PHPDOC](#)
153 | - [Popular Frameworks Overview](#)
154 | - [Popular Libraries Overview](#)
155 | - [Popular Design Pattern](#)
156 | - [Other useful resources](#)
157 | - [শেষের কিছু কথা](#)
158 | - [উত্তর](#)
159 |
160 |
161 |
--------------------------------------------------------------------------------
/introduction.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/namespace.md:
--------------------------------------------------------------------------------
1 | # নেমস্পেস (Namespace) :
2 |
3 | নেমস্পেস মূলত ক্লাস, ইন্টারফেইস, কন্সট্যান্ট , ফাংশন ইত্যাদির নাম একই হলে যে কনফ্লিক্ট সমস্যা হয় সেই সমস্যা থেকে মুক্তি পেতে ব্যবহার করা হয় । পিএইচপি ৫.৩.০ ভার্সন থেকে নেমস্পেস সুবিধা চালু করেছে।
4 |
5 | # নেমস্পেস (Namespace) তৈরি করা :
6 |
7 | নেমস্পেস ডিফাইন করতে প্রথমে namespace কিওয়ার্ড এবং তারপর নেমস্পেস এর নাম দিতে হয় । নেমস্পেস ডিক্লেয়ার করা শুরু হতে হবে পিএইচপি ফাইলের একেবারে উপর থেকে অর্থাৎ অন্য যে কোন কোডের আগে ।
8 |
9 | ```
10 |
18 | ```
19 | # নেমস্পেস (Namespace) ব্যবহার করা :
20 |
21 | নেমস্পেস ব্যবহার করতে প্রথমে use কিওয়ার্ড এবং তারপর নেমস্পেস এর নাম দিতে হয় । প্রথমেই নিশ্চিত হতে হবে আমাদের কোড যে নেমস্পেস আছে তা বর্তমান ফাইল থেকে এ্যাক্সেস করা যায় কিনা । যেমন: যদি নেমস্পেস অন্য কোন ফাইলে হয় তবে অবশ্যই সেটি ইনক্লুড করে নিতে হবে । তবে বাস্তবে বেশীরভাগ ক্ষেত্রেই আমরা অটোলোডার ব্যবহার করে নেমস্পেস থেকে কোড ইম্পোর্ট করতে পারবো । সেক্ষেত্রে ম্যানুয়ালি ইনক্লুড করা লাগবে না ।
22 |
23 | ```
24 | ) প্রতীকটি greater than অপারেটর যা পিএইচপিকে দুটি মান তুলনা করতে বলে।
4 |
5 | # Example
6 |
7 | $x + $y এখানে $x $y অপারেন্ড এবং + অপারেটর |
8 |
9 | অনেক অপারেটর আছে যারা শুধু একটি অপারেন্ড এর উপর কাজ করে যেমন ++ (increment অপরেটর) বা ! (not অপারেটর) ইত্যাদি, এসব অপারেটরকে ইউনারি (Unary) অপারেটর বলে।
10 |
11 | অনেক অপারেটর আছে যারা দুটি অপারেন্ড এর উপর কাজ করে যেমন + (Addition বা plus অপরেটর) বা - (Subtraction বা minus অপারেটর) ইত্যাদি, এসব অপারেটরকে বাইনারি (Binary) অপারেটর বলে। বেশির ভাগ অপারেটর বাইনারি অপারেটর।
12 |
13 | অনেক অপারেটর আছে যারা তিনটি অপারেন্ড এর উপর কাজ করে যেমন ? :, এসব অপারেটরকে Ternary অপারেটর বলে।
14 |
15 | # Different Types Operator
16 |
17 | PHP তে বিভিন্ন ধরণের অপারেটর আছে । যেমন
18 |
19 | # Arithmetic বা গানিতিক অপারেটর
20 |
21 |
22 | | উদাহরন | অপারেটরের নাম |ব্যাখ্যা |
23 | | :------- | :---- | :--- |
24 | | $x + $y | Addition বা যোগ | $x এবং $y এর যোগ করতে ব্যবহৃত হয়েছে |
25 | | $x - $y | Subtraction বা বিয়োগ | $x থেকে $y বিয়োগ করতে ব্যবহার হয়েছে |
26 | | $x * $y | Multiplication বা গুন | $x এবং $y এর গুনন করা হয়েছে |
27 | | $x / $y | Division বা ভাগ | $x কে $y দিয়ে ভাগ করা হয়েছে |
28 | | $x % $y | Modulus (মডুলাস) | $x কে $y দিয়ে ভাগ করার পর অবশিষ্টাংশ |
29 | | $x ** $y | Exponentiation বা সূচকীয় | $x কে $y তম power সেট করতে ব্যবহার হয় |
30 |
31 |
32 |
33 |
34 | # Example :
35 |
36 | $x = 10;
37 | $y = 4;
38 | echo ($x + $y); // 0utputs: 14
39 |
40 |
41 | echo ($x - $y); // 0utputs: 6
42 |
43 |
44 | echo ($x * $y); // 0utputs: 40
45 |
46 |
47 | echo ($x / $y); // 0utputs: 2.5
48 |
49 |
50 | echo ($x % $y); // 0utputs: 2
51 |
52 |
53 | echo ($x ** $y); // 0utputs: 10000
54 |
55 |
56 |
57 | # Assignment বা আরোপন অপারেটর:
58 |
59 | | উদাহরন | অপারেটরের নাম |ব্যাখ্যা |
60 | | :------- | :---- | :--- |
61 | | $x = $y | এসাইন | $y এর value $x এ এসাইন করা হয়েছে |
62 | | $x -= $y | বিয়োগ এবং এসাইন | $x থেকে $y বিয়োগ করে $x এ এসাইন করা হয়েছে |
63 | | $x *= $y | গুন এবং এসাইন | $x এবং $y গুন করে $x এ এসাইন করা হয়েছে |
64 | | $x /= $y | ভাগ এবং এসাইন | $x কে $y দিয়ে ভাগ করে $x এ এসাইন করা হয়েছে |
65 | | $x % $y | Modulus (মডুলাস) এবং এসাইন | $x কে $y দিয়ে ভাগ করার পর অবশিষ্টাংশ $x এ এসাইন করা হয়েছে |
66 |
67 | # Example :
68 |
69 | $x = 10;
70 | echo $x; // Outputs: 10
71 |
72 | $x = 20;
73 | $x += 30;
74 | echo $x; // Outputs: 50
75 |
76 | $x = 50;
77 | $x -= 20;
78 | echo $x; // Outputs: 30
79 |
80 | $x = 5;
81 | $x *= 25;
82 | echo $x; // Outputs: 125
83 |
84 | $x = 50;
85 | $x /= 10;
86 | echo $x; // Outputs: 5
87 |
88 | $x = 100;
89 | $x %= 15;
90 | echo $x; // Outputs: 10
91 |
92 | # comparision অপারেটর:
93 |
94 | | উদাহরন | অপারেটরের নাম | ব্যাখ্যা |
95 | | :---------- | :---- | :--- |
96 | | $x == $y | Equal | TRUE হবে যদি $x এবং $y সমান হয়|
97 | | $x === $y | Identical| TRUE হবে যদি $x এবং $y সমান হয়, এবং তাদের টাইপ একই হয় যেমন দুটোই স্ট্রিং বা পূর্নসংখ্যা হলে|
98 | | $x != $y | Not equal| TRUE হবে $x এর সমান $y না হয় |
99 | | $x <> $y | Not equal| TRUE হবে $x এর সমান $y না হয় |
100 | | $x !== $y | Not identical| TRUE হবে $x এর সমান $y না হয়, অথবা তাদের টাইপ একই না হয়। যেমন একটা স্ট্রিং এবং আরেকটা পূর্নসংখ্যা|
101 | | $x < $y | Less than | TRUE হবে যদি $x ছোট হয় $y এর চেয়ে|
102 | | $x > $y | Greater than| TRUE হবে $x বড় হয় $y এর চেয়ে|
103 | | $x <= $y | Less than or equal to| TRUE হবে যদি $x ছোট অথবা সমান হয় $y এর|
104 | | $x >= $y | Greater than or equal to TRUE হবে $x বড় অথবা সমান হয় $y এর|
105 |
106 |
107 | # logical অপারেটর:
108 |
109 | | উদাহরন | অপারেটরের নাম |ব্যাখ্যা |
110 | | :------- | :---- | :--- |
111 | |$x and $y | And | TRUE হবে যদি $x এবং $y দুটোই TRUE রিটার্ন করে।|
112 | |$x or $y | Or| TRUE হবে যদি $x অথবা $y এর যেকোন একটি TRUE হয়|
113 | |$x xor $y | Xor| TRUE হবে যদি $x অথবা $y এর যেকোনটি TRUE হয়, তবে দুটোই হবেনা |
114 | |! $x| Not | TRUE হবে যদি $x TRUE রিটার্ন না করে (বা TRUE না হয়) |
115 | |$x && $y | And| TRUE হবে যদি $x এবং $y দুটোই TRUE রিটার্ন করে |
116 | |$x || $y | Or | TRUE হবে যদি $x অথবা $y এর যেকোন একটি TRUE হয়|
117 |
118 |
119 |
120 |
121 | # Bitwise (বিটওয়াইজ) অপারেটর :
122 |
123 |
124 | | উদাহরন | অপারেটরের নাম | ব্যাখ্যা |
125 | | :------- | :---- | :--- |
126 | |$x & $y | And | ঐ বিটগুলি যেটা $x এবং $y দুটোর মধ্যেই (সেট করা) আছে|
127 | |$x | $x | Or| ঐ বিটগুলি যা হয় $x অথবা $y এ (সেট করা) আছে|
128 | |$x ^ $y | Xor| TRUE হবে যদি $x অথবা $y এর যেকোনটি TRUE হয়, তবে দুটোই হবেনা |
129 | |~ $x| Not| ঐ বিটগুলি যেগুলি $x এ সেট করা নেই |
130 | |$x << $y | Shift left | $x কে $y সংখ্যকবার ২ দিয়ে গুন করবে |
131 | |$x >> $y | Shift right | $x কে $y সংখ্যকবার ২ দিয়ে ভাগ করবে|
132 |
133 |
134 | # Array অপারেটর :
135 |
136 | | উদাহরন | অপারেটরের নাম | ব্যাখ্যা |
137 | | :-------- | :----------- | :--- |
138 | |$x + $y| Union| $x এবং $y দুটি অ্যারে যোগ করা হয়েছে|
139 | |$x == $y| Equality| TRUE হবে যদি $x এবং $y অ্যারে দুটির একই key/value থাকে|
140 | |$x === $y| Identity| TRUE হবে যদি $x এবং $y অ্যারে দুটির key/value একই ক্রমানুসারে থাকে এবং তাদের type ও একই হয় |
141 | |$x != $y| Inequality| TRUE হবে যদি $x অ্যারেটি $y এর সমান না হয়|
142 | |$x <> $y| Inequality| TRUE হবে যদি $x এবং $y সমান না হয়|
143 | |$x !== $y| Non-identity| TRUE হবে যদি $x এবং $y এর সবকিছু সমান না হয়। key/value, type ইত্যাদি সবসহ সমান না হলে|
144 |
145 | # Increment/decrement অপারেটর :
146 |
147 | | উদাহরন | অপারেটরের নাম | ব্যাখ্যা |
148 | | :-------- | :----------- | :--- |
149 | |++$x | Pre-increment | $x এর মান এক বাড়ে, এরপর $x রিটার্ন হবে|
150 | |$x++ |Post-increment | আগে $x রিটার্ন হবে, এরপর $x এর মান এক বাড়বে|
151 | |--$x | Pre-decrement | $x এর মান এক কমবে, এরপর $x রিটার্ন করবে|
152 | |$x-- | Post-decrement |আগে $x রিটার্ন করবে, এরপর $x এর মান এক করে কমবে|
153 |
154 | # String অপারেটর :
155 |
156 | | উদাহরন | অপারেটরের নাম | ব্যাখ্যা |
157 | | :-------- | :----------- | :--- |
158 | |$txt1 . $txt2 |Concatenation| $txt1 এবং $txt2 একত্রীকরণ|
159 | |$txt1 .= $txt2| Concatenation assignment | $txt1 এবং $txt2 যুক্ত করা |
160 |
161 |
162 |
163 |
164 |
--------------------------------------------------------------------------------
/php.md:
--------------------------------------------------------------------------------
1 | # PHP
2 | PHP হলো একটি ওপেনসোর্স সার্ভারসাইড স্ক্রিপটিং ল্যাংগুয়েজ যা বিশেষ করে ওয়েব ভিত্তিক কাজের জন্য ডিজাইন করা হয়েছে। বর্তমানে ওয়েব ডেভলপমেন্টের কাজে ব্যবহৃত সবথেকে জনপ্রিয় ল্যাংগুয়েজগুলোর মধ্যে PHP একটি। মজার ব্যপার হচ্ছে যেহেতু PHP একটি স্ক্রিপটিং ল্যাংগুয়েজ অর্থাৎ এটি HTML এর সাথে embed করে কাজ করতে পারে। তাই আপনি এটিকে HTML এর ভিতরেও লিখতে পারবেন, যেমনঃ
3 |
4 | ```
5 |
6 |
7 | Today
8 |
9 |
10 |
13 |
14 |
15 | ```
16 |
17 | > এখানে উল্লেখ্য PHP কোড এক্সিকিউট করাতে হলে অবশ্যই ফাইল এক্সটেনসন `.php` হতে হবে। এ বিষয়ে আমরা **পিএইচপি কোড** অধ্যায়ে জানবো
18 |
19 | ### পরিচিতি
20 | ১৯৯৪ সালে [Rasmus Lerdorf](https://twitter.com/rasmus) প্রথম PHP ডেভলপ করেন। তখন PHP দ্বারা *Personal Home Page* বোঝানো হতো কিন্তু এখন একে **PHP:Hypertext Preprocessor** নামে ডাকা হয়। PHP মূলত C ল্যাংগুয়েজ দ্বারা ডেভলপ করা হয়েছে। এটি ভাবার কোনো কারন নেই যে PHP Rasmus Lerdorf একাই তৈরী করেছেন, যেহেতু এটি একটি ওপেনসোর্স প্রোজেক্ট তাই এর হাজার হাজার [কন্ট্রিবিউটর](http://php.net/credits.php) রয়েছে। তবে হ্যা PHP কে এখন অফিসিয়ালি মেনটেইন করে PHP Group. বর্তমানে Facebook ও PHP কে ডেভলপ করছে যাকে বলা হয় [Hack](http://hacklang.org/).
21 |
22 | PHP হলো ইন্টারপ্রেডেড ল্যাংগুয়েজ অর্থাৎ এটি প্রোগামকে প্রত্যেকবার রিকুয়েষ্টে টপ টু বটম parse করে এবং সে অনুযায়ী আউটপুট প্রদান করে। যেহেতু ও প্রত্যেক বারই কোডের কোথায় ভুল অথবা ইরর আছে সেটিকে খুজে তাই PHP'র কোড parse করতে সময় একটু বেশি লাগে।
23 |
24 | PHP কে Command line এও ব্যবহার করা যায়। অর্থাশ আপনি Terminal অথবা Command Prompt এ এটিকে কমান্ডের মাধ্যমে এটিকে ব্যবহার করতে পারবেন, যাকে বলা হয় CLI(Command-Line Interface).
25 |
26 | আমরা প্রথমেই জেনেছি PHP একটি সার্ভারসাইড ল্যাংগুয়েজ। হুম, কিন্তু প্রশ্ন হলো সার্ভারসাইড জিনিসটা কি?
27 | আমরা যখন কোনো সাইট ব্রাউজ করি তখন আসলে কি ঘটনা ঘটে? হ্যা আমরা যখনই কোনো নতুন একটা লিংকে যাই এর অর্থ হচ্ছে তখন সার্ভারের কাছে আমরা একটি রিকুয়েষ্ট পাঠাই। সার্ভার সে রিকুয়েষ্টটি গ্রহন করে ও সার্ভারে যে প্রোগ্রামিং ল্যাংগুয়েজ দেয়া থাকে সেটি দিয়ে এই রিকুয়েষ্টটিকে প্রসেস করে। এবং প্রসেস শেষে আমাদের কাছে একটি HTML রেসপন্স পাঠায়। (যা আমরা ওয়েবসাইট ও প্রসেস অধ্যায়ে জেনেছি)। কোনো ওয়েবসাইট ব্রাউজ করার জন্য আপনাকে আপনার কম্পিউটারে কোনো প্রোগ্রামিং ল্যাংগুয়েজ ইনস্টল করে নিতে হয়না কারন সমস্থ প্রসেসগুলো সার্ভারে ইনস্টল করা প্রোগ্রামিং ল্যাংগুয়েজই হ্যান্ডল করে থাকে। যেহেতু এই প্রসেসগুলো সার্ভারে ইন্সটলকৃত ল্যাংগুয়েজ হ্যান্ডল করে থাকে তাই এই সকল ল্যাংগুয়েজকে সার্ভারসাইড ল্যাংগুয়েজ বলা হয়। আর PHP কখনো ক্লায়েন্টসাইডে অর্থাৎ ইউজারের কম্পিউটারে কাজ করে না এটি শুধু সার্ভারে প্রসেস হয় তাই PHP কেও সার্ভারসাইড ল্যাংগুয়েজ বলা হয়।
28 |
29 |
--------------------------------------------------------------------------------
/why-php.md:
--------------------------------------------------------------------------------
1 | # পিএইচপি কেন?
2 | এটি খুবই গুরুত্বপূর্ন একটি প্রশ্ন আমি কেন PHP ব্যবহার করবো? যেহেতু আপনার হাতের নাগালেই নানান ধরনের Progaramming Language রয়েছে তাহলে PHP’ই কেন? সবাই কেনই বা PHP নিয়ে এতো মাতামাতি করে? কেনই বা PHP কে ভালোবাসবেন?
3 |
4 | হ্যা এ সবগুলো প্রশ্নেরই অনেকগুলো উত্তর রয়েছে, তবে আমি এখানে কোন ল্যাংগুয়েজ ভালো বা কোনটি খারাপ সেটি নিয় কথা বলবো না। আমি কথা বলবো PHPকে কি কারনে আপনি পছন্দের তালিকায় রাখতে পারেন বা ওয়েব ডেভলপমেন্টে PHPকে কেন পছন্দের প্রথমেই রাখতে পারেন সে বিষয়ে।
5 |
6 | এখানে বলে নেই PHP কেন ব্যবহার করবেন বা এটা কেন প্রথম পছন্দ এটি সম্পূর্ন নির্ভর করে আপনার কাজের ক্ষেত্রের উপরে। সব কাজের জন্য অবশ্যই পিএইচপি উপযুক্ত নয়।
7 |
8 | ## যে কারনে PHP কে নির্বাচন করবেনঃ
9 |
10 | #### ওয়েবের জন্য ডিজাইনড
11 |
12 | PHP প্রোগ্রামিং ল্যাংগুয়েটি বিশেষভাবে ডেভলপ করা হয়েছে ওয়েবভিত্তিক কাজের জন্য অর্থাৎ ওয়েবসাইট বা ওয়েব অ্যাপ্লিকেশন ডেভলপের জন্য। তাই আপনি ওয়েব অ্যাপ্লিকেশন ডেভলপার হিসেবে প্রথম পছন্দে রাখতেই পারেন।
13 |
14 | #### সহজেই শুরু করা যায়
15 |
16 | ল্যাংগুয়েজ হিসেবে PHP কিছুটা সহজ আর এটি শুরু করাটাও অন্যন্য ল্যাংগুয়েজের তুলনায় PHP অনেকটা সহজ। আর এর রয়েছে শেখার জন্য অসংখ্য রিসোর্স ও টিউটোরিয়াল যা আপনাকে সহজেই ল্যাংগুয়েজটি শিখতে সাহায্য করবে।
17 |
18 | #### ওপেনসোর্স
19 |
20 | সমস্থ PHP প্রোজেক্টটাই হলো ওপেনসোর্স তাই বিশ্বের লাখো ডেভলপাররা প্রতিনিয়ত এটিকে উন্নত করছে। তাছাড়া PHP অ্যাপ্লিকেশন ডেভলপের জন্যও রয়েছে নানান রকমের ওপেনসোর্স টুলস যা দিয়ে আপনি খুব সহজেই PHP ভিত্তিক অ্যাপ্লিকেশন তৈরী করতে পারবেন। PHP এর সকল টুলস গুলো ওপেনসোর্স হওয়ায় এর খরচ খুবই কম তাই এটির সার্ভার খরচও সীমিত।
21 |
22 | #### ডাটাবেস
23 |
24 | PHPতে জনপ্রিয় সকল ডাটাবেস ল্যাংগুয়েজই সাপোর্ট করে। যেমনঃ MySQL, MSSQL, PostgresSQL, SQLite. তবে এটিতে সবথেকে বেশি ব্যবহার হয় MySQL.
25 |
26 | #### কমিউনিটি
27 |
28 | কোনো একটি ল্যাংগুয়েজে কাজ করার জন্য যেটি খুব বেশি প্রয়োজন হয় সেটি হলো একটি কমিউনিটি। আর PHP তে রয়েছে একটি শক্তিশালী কমিউনিটি, যেখানে বিশ্বের লাখ লাখ প্রোগ্রামার’রা আপনাকে সাহায্য করার জন্য সর্বদা প্রস্তুত।
29 |
30 | #### বিশাল ডকুমেন্টেশন
31 |
32 | PHP এর ডকুমেন্টেশনকে আপনি PHP’র জন্য গুগল বলতে পারেন। কি নেই এতে PHP কে জানার জন্য। আর সাথে রয়েছে প্রোগ্রামারদের কন্ট্রিবিউশন।
33 |
34 | তাই ওয়েব অ্যাপ্লিকেশন ডেভলপের জন্য এককথায় বলা যায় PHP এর জুড়ি নেই।
35 |
36 |
--------------------------------------------------------------------------------