Skip to content

Commit 148b51c

Browse files
authored
Fix indents
1 parent dd262d2 commit 148b51c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/types.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ By default, PHP will pass types by value.
3030
However, PHP allows for variables and references returned from functions to be passed and referred to by reference by prefacing variables with `&`.
3131
```php
3232
<?php
33-
function foo(&$bar) {
34-
$bar++;
33+
function foo(&$bar) {
34+
$bar++;
3535
}
3636
$baz = 5;
3737
foo();
@@ -44,7 +44,7 @@ Will yield `6`.
4444
Python has no explicit rules for declaring how variable types are passed. If an object, tuple, array, etc. is passed in Python the object's reference will be passed rather than its value.
4545
```python
4646
def foo(bar):
47-
bar.append(3)
47+
bar.append(3)
4848
baz = [0, 1, 2]
4949

5050
>>>print(baz)
@@ -59,8 +59,8 @@ foo(baz)
5959
However when passing strings or numbers, Python will behave as if they are passed by value. For example, when passing a number:
6060
```python
6161
def foo(bar):
62-
bar+=1
63-
print("Bar from inside foo: %d"%bar)
62+
bar+=1
63+
print("Bar from inside foo: %d"%bar)
6464
baz = 4
6565

6666
>>>print(baz)

0 commit comments

Comments
 (0)