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…
August 11, 2018
Static Members in php
<?php class abc { public static $data=’test data’; public static function xyz() { echo ‘xyz…
August 11, 2018
Interfaces in php
<?php interface abc { public function test(); public function xyz(); } class def implements abc…
August 11, 2018
Abstract Classes in php
<?php abstract class BaseEmployee { protected $firstname; protected $lastname; public function getFullName() { return $this->firstname.…
August 11, 2018
Encapsulation in php
<?php class TV { protected $model; private $volume; public function volumeUp() { $this->volume++; } public…
August 11, 2018
Inherirance and overriding in php
Inheritance and overriding in PHP <?php class TV { public $model; public $volume; function volumeUp()…
August 11, 2018
Object & Classes in php
<?php class TV { public $model=’xyz’; public $volume=1; function volumeUp() { $this->volume++; } function volumeDown()…
August 10, 2018
OOPS IN PHP
Object Oriented Programming System (1) Object & Classes in php (2) Inherirance in php (3)…
PHPCODE © 2023