mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-22 21:52:31 +03:00
Fix spelling error concatinated -> concatenated
This commit is contained in:
parent
dd8abee4b4
commit
0ab2ec2d73
@ -43,8 +43,8 @@ $integer = 0123; // octal number (equivalent to 83 decimal)
|
|||||||
$integer = 0x1A; // hexadecimal number (equivalent to 26 decimal)
|
$integer = 0x1A; // hexadecimal number (equivalent to 26 decimal)
|
||||||
|
|
||||||
// Floats (aka doubles)
|
// Floats (aka doubles)
|
||||||
$float = 1.234;
|
$float = 1.234;
|
||||||
$float = 1.2e3;
|
$float = 1.2e3;
|
||||||
$float = 7E-10;
|
$float = 7E-10;
|
||||||
|
|
||||||
// Arithmetic
|
// Arithmetic
|
||||||
@ -74,7 +74,7 @@ $sgl_quotes
|
|||||||
END; // Nowdoc syntax is available in PHP 5.3.0
|
END; // Nowdoc syntax is available in PHP 5.3.0
|
||||||
|
|
||||||
// Manipulation
|
// Manipulation
|
||||||
$concatinated = $sgl_quotes + $dbl_quotes;
|
$concatenated = $sgl_quotes + $dbl_quotes;
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compound
|
### Compound
|
||||||
@ -237,7 +237,7 @@ while ($i < 5) {
|
|||||||
if ($i == 3) {
|
if ($i == 3) {
|
||||||
break; // Exit out of the while loop and continue.
|
break; // Exit out of the while loop and continue.
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $i++;
|
echo $i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ while ($i < 5) {
|
|||||||
if ($i == 3) {
|
if ($i == 3) {
|
||||||
continue; // Skip this iteration of the loop
|
continue; // Skip this iteration of the loop
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $i++;
|
echo $i++;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -338,11 +338,11 @@ Classes are insantiated with the ```new``` keyword. Functions are referred to as
|
|||||||
class MyClass {
|
class MyClass {
|
||||||
function myFunction() {
|
function myFunction() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function function youCannotOverrideMe()
|
function function youCannotOverrideMe()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function myStaticMethod()
|
public static function myStaticMethod()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -362,12 +362,12 @@ PHP offers some [magic methods](http://www.php.net/manual/en/language.oop5.magic
|
|||||||
```php
|
```php
|
||||||
class MyClass {
|
class MyClass {
|
||||||
private $property;
|
private $property;
|
||||||
|
|
||||||
public function __get($key)
|
public function __get($key)
|
||||||
{
|
{
|
||||||
return $this->$key;
|
return $this->$key;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __set($key, $value)
|
public function __set($key, $value)
|
||||||
{
|
{
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
@ -471,4 +471,4 @@ Visit the [official PHP documentation](http://www.php.net/manual/) for reference
|
|||||||
|
|
||||||
If you're interested in up-to-date best practices, visit [PHP The Right Way](http://www.phptherightway.com/).
|
If you're interested in up-to-date best practices, visit [PHP The Right Way](http://www.phptherightway.com/).
|
||||||
|
|
||||||
If you're coming from a language with good package management, check out [Composer](http://getcomposer.org/).
|
If you're coming from a language with good package management, check out [Composer](http://getcomposer.org/).
|
||||||
|
Loading…
Reference in New Issue
Block a user