Toggle navigation
Genres
Frontend (2)
JavaScript (6)
Database (2)
Linux Server (3)
Web Apps (4)
Misc (4)
Search
List
New Tutorials
Last Modified Tutorials
</>
Code examples
code
smiko
backend
php
oop
classes_objects
100lateStatic.php
100lateStatic.php
<?php class Car { public static function run() { return static::getName(); } private static function getName() { return 'CAR'; } } class Toyota extends Car { public static function getName() { return 'TOYOTA'; } } echo Car::run(); //prosljedjuje Car kao static:: u run() metodu echo Toyota::run(); //prosljedjuje Toyota kao static:: u run() metodu ?>
Reload page
Preview
W3C validation
Edit Code