mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Update php.html.markdown
octal 019 and few syntax edits
This commit is contained in:
parent
0fb7f0077e
commit
c88262d9d1
@ -48,9 +48,9 @@ $boolean = true; // or TRUE or True
|
|||||||
$boolean = false; // or FALSE or False
|
$boolean = false; // or FALSE or False
|
||||||
|
|
||||||
// Integers
|
// Integers
|
||||||
$int1 = 19; // => 19
|
$int1 = 12; // => 12
|
||||||
$int2 = -19; // => -19
|
$int2 = -12; // => -12
|
||||||
$int3 = 019; // => 15 (a leading 0 denotes an octal number)
|
$int3 = 012; // => 10 (a leading 0 denotes an octal number)
|
||||||
$int4 = 0x0F; // => 15 (a leading 0x denotes a hex literal)
|
$int4 = 0x0F; // => 15 (a leading 0x denotes a hex literal)
|
||||||
|
|
||||||
// Floats (aka doubles)
|
// Floats (aka doubles)
|
||||||
@ -381,9 +381,6 @@ echo $function_name(1, 2); // => 3
|
|||||||
* Includes
|
* Includes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
```
|
|
||||||
```php
|
|
||||||
<?php
|
<?php
|
||||||
// PHP within included files must also begin with a PHP open tag.
|
// PHP within included files must also begin with a PHP open tag.
|
||||||
|
|
||||||
@ -597,9 +594,6 @@ $cls->myTraitMethod(); // Prints "I have MyTrait"
|
|||||||
// This section is separate, because a namespace declaration
|
// This section is separate, because a namespace declaration
|
||||||
// must be the first statement in a file. Let's pretend that is not the case
|
// must be the first statement in a file. Let's pretend that is not the case
|
||||||
|
|
||||||
/*
|
|
||||||
```
|
|
||||||
```php
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// By default, classes exist in the global namespace, and can
|
// By default, classes exist in the global namespace, and can
|
||||||
|
Loading…
Reference in New Issue
Block a user