mirror of
https://github.com/igorsimdyanov/php8.git
synced 2025-08-06 11:10:42 +00:00
Merge pull request #150 from igorsimdyanov/11_proofreading
Глава 11: корректура
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
<?php
|
||||
$arr = [1, 2, 3, 4, 5];
|
||||
$sum = array_sum($arr);
|
||||
echo $sum; // 15
|
||||
echo array_sum($arr); // 15
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$arr = ['one' => '1', 'two' => '2', 'two' => '3'];
|
||||
echo $arr['one']; // 1
|
||||
echo '<br />'; // Перевод строки
|
||||
echo '<br />';
|
||||
echo $arr['two']; // 3
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$fst = ['one', 'two'];
|
||||
$snd = ['three', 'four', 'five'];
|
||||
$fst = [0 => 'one', 1 => 'two'];
|
||||
$snd = [0 => 'three', 1 => 'four', 2 => 'five'];
|
||||
$sum = $fst + $snd;
|
||||
echo '<pre>';
|
||||
print_r($sum);
|
||||
|
Reference in New Issue
Block a user