mirror of
https://github.com/igorsimdyanov/php8.git
synced 2025-08-06 11:10:42 +00:00
Глава 14: существование метода
This commit is contained in:
8
methods/method_exists.php
Normal file
8
methods/method_exists.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
require_once 'point.php';
|
||||
|
||||
$point = new Point;
|
||||
|
||||
if (method_exists($point, 'say')) {
|
||||
echo $point->say('PHP');
|
||||
}
|
Reference in New Issue
Block a user