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