Basic PHP Tutorials

This series of tutorials teaches you the basics of PHP, one of the most popular programming languages for building dynamic web pages.

1 How to set up PHP in Windows

2 How to set up PHP in MacOS

3 How to set up PHP in Ubuntu

4 How to upgrade PHP to the latest version in Windows

5 How to upgrade PHP in MacOS

6 Why should you use PHP for web development?

7 Fix PHP error: Cannot load XAMPP PHP – OCI8 extension in Unknown on line 0

8 PHP not working in Windows? Here are the fixes

9 PHP not working in MacOS? Here are the solutions

10 PHP: ‘Hello, World!’ Example

11 How to Upgrade PHP Versions on Ubuntu

12 3 Ways to Check PHP Version

13 PHP Data Types Cheat Sheet

14 3 Ways to Make Comments in PHP: Best Practices for Readable Code

15 How to declare variables in PHP

16 How to define constants in PHP

17 Where is the php.ini file located in Windows, MacOS, and Ubuntu?

18 PHP: Best configuration for php.ini

19 PHP: Where is the error log file located?

20 PHP: How to Enable/Disable Error Reporting (3 Ways)

21 PHP: How to Enable/Disable Warnings and Notices

22 PHP: How to use .env file to store environment variables

23 Best practices for naming variables in PHP

24 PHP keywords and reserved words you should know

25 Variable Scope in PHP: Local, Global, Static

26 Variable References in PHP: Explanation with Examples

27 PHP var_dump() Function: Explanation with Examples

28 PHP echo vs print: What's the Difference?

29 PHP: How to get type of a variable at runtime

30 Boolean data type in PHP

31 How to use Enum in PHP

32 Mastering if-else statements in PHP

33 Mastering switch-case statements in PHP

34 Mastering Try-Catch Statements in PHP

35 Mastering 'for' loops in PHP

36 Mastering 'foreach' loops in PHP

37 Mastering 'while' Loops in PHP

38 Mastering Ternary Operator in PHP

39 Understanding NULL in PHP

40 How to define and call functions in PHP

41 How to use callback functions in PHP

42 PHP: Define Function with Variable Number of Arguments

43 PHP: Define function with default arguments

44 PHP: Define function that returns multiple values (3 ways)

45 Using Anonymous Functions in PHP

46 Using 'declare' construct in PHP

47 Using 'exit' and 'die' constructs in PHP

48 Using ‘goto’ Construct in PHP

49 PHP: How to include code from another file

50 Using Type Hinting in PHP: A Complete Guide

51 High Order Functions in PHP: A Practical Guide (6 Examples)

52 Using printf() and sprintf() in PHP

53 PHP: How to pass an array to a function as multiple arguments

54 How to Check if a Function Exists in PHP

55 Solving PHP Error: Expecting ‘,’ or ‘;’

56 3 Ways to Check if a Variable is NULL in PHP

57 Fixing PHP Error: Unexpected T_STRING

58 Truthy and Falsy Values in PHP: A Complete Guide

59 Fixing PHP Error: Unexpected end of file

60 PHP: Using 'break' and 'continue' in loops

61 Null Coalescing Operator in PHP: Embracing Graceful Defaults

62 Optional Type Declarations in PHP: Enhancing Code Reliability

63 Closure in PHP: A Complete Guide

64 Arrow Functions in PHP: A Complete Guide

65 Comparison Operators in PHP: A Complete Guide

66 Casting Operators in PHP: A Practical Guide

67 PHP: 3 Ways to Get City/Country from IP Address

68 PHP: How to use 'instanceof' operator

69 PHP: require(), require_once(), include(), include_once()

70 How to Get Current Date and Time in PHP

71 PHP: How to ping a server/website and get the response time

72 How to format date and time in PHP

73 How to get the current timestamp in PHP

74 PHP: Convert UTC time to local time and vice versa

75 PHP: Convert UTC timestamp to local timestamp and vice versa

76 PHP: Convert timestamp to date time and vice versa

77 PHP: Convert date time to time ago and vice versa

78 PHP: Get an array of dates between two dates

79 PHP: How to subtract days from a date

80 PHP: How to compare two dates

81 PHP: How to Check if a Date is in a Valid Format

82 PHP: How to convert a string to date time

83 PHP: Check if two dates are equal

84 PHP: Check if two date ranges overlap

85 Working with Daylight Saving Time in PHP

86 PHP: How to sort an array of dates in DESC/ASC order

87 PHP: Calculate people's age from date of birth

88 PHP: How to get only date part from date time

89 PHP: Calculate a future date from a given date

90 Using Variable Variables in PHP: A Deep Dive

91 How to Fix PHP Notice: Undefined Variable

92 How to set up PHP Composer in Windows

93 How to Fix PHP Warning: Headers Already Sent – Cannot Modify Header Information

94 3 Ways to validate credit cards in PHP (with examples)

95 How to Set Up PHP Composer in MacOS

96 How to set up and configure PHP Composer in Ubuntu

97 PHP: How to programmatically post to Twitter

98 Fixing PHP Fatal error: Allowed memory size exhausted

99 Composer Error: Your PHP version does not satisfy that of your Composer dependencies

100 PHP Composer: How to install a specific version of a package

101 Fixing Composer error: PHP extension ‘fileinfo’ is missing

102 PHP Composer error: Your requirements could not be resolved to an installable set of packages

103 [Solved] PHP Composer Warning: openssl extension is missing

104 [Solved] Composer error: PHP extension zip is missing

105 PHP Composer: How to Upgrade Packages to New Versions

106 PHP: How to Extract all Headings from HTML Source (2 Ways)

107 PHP Composer error: Could not open input file ‘composer.phar’

108 PHP Composer Error: Cannot Allocate Memory - Solutions and Best Practices

109 How to Choose PHP Version Used by Composer (with Examples)

110 Fixing PHP Composer error: ‘mbstring’ is missing

111 Composer error: PHP extension ext-intl * is missing

112 Solving PHP Composer error: requires ext_curl

113 How to Clear PHP Composer Cache

114 Fixing composer.json error – failed to open stream: Permission denied

115 Pandas DataFrame.value_counts() method: Explained with examples

116 Constructor Property Promotion in PHP: Tutorial & Examples

117 PHP: Using DocBlock comments to annotate variables

118 Union Types in PHP: A practical guide (5 examples)

119 Understanding mixed types in PHP (5 examples)

120 Static Return Type in PHP: Explained with examples

121 Nullable (Optional) Types in PHP: A practical guide (5 examples)

122 Type Declarations for Class Properties in PHP (5 examples)

123 Explore Attributes (Annotations) in Modern PHP (5 examples)

124 An introduction to WeakMap in PHP (6 examples)

125 PHP: How to implement type checking in a function (PHP 8+)

126 Using 'never' return type in PHP (PHP 8.1+)

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments