Skip to Content
PHPCODE
September 9, 2021
get location from ip address javascript using php
Using geolocation, you can find out where a user is in relation to the world.…
August 12, 2018
Type Hinting
<?php interface test { public function doSomething(); } class ABC implements test{ public function doSomething()…
August 12, 2018
Namespaces
<?php namespace def { class xyz { public function __construct() { echo “XYZ from DEF…
August 12, 2018
Access Levels in Traits
<?php trait abc { private function xyz() { echo “XYZ method from trait abc”; }…
August 12, 2018
Handling Conflicts in Traits
<?php trait one { public function test() { echo “TEST method from one Trait”; }…
August 12, 2018
Method Overriding in Traits
<?php class Base { public function abc() { echo “ABC method from Base class.”; }…
August 12, 2018
Traits Introduction
<?php //xampp version 5.4 avaible traits class abc { public function test() { echo “test…
August 12, 2018
Polymorphism in php
Step 1 :Created Polymorphism this code hire <?php function __autoload($class) { include_once “classes/$class.php”; } function…
August 12, 2018
Dependency Injection
<?php class Logger { public function log($message) { echo “Logging message: $message”; } } class…
August 11, 2018
Late Static Binding in php
<?php class DB { protected static $table=’basetable’; public function select() { echo “SELECT * FROM…
PHPCODE © 2024