mirror of
https://github.com/igorsimdyanov/php8.git
synced 2025-08-06 11:10:42 +00:00
Глава 6: вычитка главы
This commit is contained in:
@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
require 'point.php';
|
require 'point.php';
|
||||||
|
|
||||||
$point = new Point;
|
$point = new Point;
|
||||||
|
|
||||||
$point->x = 5;
|
$point->x = 5;
|
||||||
$point->y = 3;
|
$point->y = 3;
|
||||||
|
|
||||||
echo $point->x; // 5
|
echo $point->x; // 5
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
require 'point.php';
|
require 'point.php';
|
||||||
|
|
||||||
$point = new Point;
|
$point = new Point;
|
||||||
|
|
||||||
$point->x = 3;
|
$point->x = 3;
|
||||||
$point->y = 7;
|
$point->y = 7;
|
||||||
|
|
||||||
// Уничтожение объекта
|
// Уничтожение объекта
|
||||||
unset($point);
|
unset($point);
|
||||||
echo $point->x; // PHP Warning: Undefined variable $point
|
echo $point->x; // PHP Warning: Undefined variable $point
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require 'point.php';
|
require 'point.php';
|
||||||
|
|
||||||
$point = new Point();
|
$point = new Point();
|
||||||
$point = 3;
|
$point = 3;
|
||||||
|
|
||||||
echo $point; // 3
|
echo $point; // 3
|
||||||
|
Reference in New Issue
Block a user