class in php

PHP
<?php
class Foo {
    public $aMemberVar = 'aMemberVar Member Variable';
    public $aFuncName = 'aMemberFunc';
   
   
    function aMemberFunc() {
        print 'Inside `aMemberFunc()`';
    }
}

$foo = new Foo;

function getVarName()
{
     return 'aFuncName'; 
}

print $foo->{$foo->{getVarName()}}();

public className{
	public function __construct(){
    //CODE HERE
    }
}The  PHP Object-Oriented Programming concepts are:
Class 
Objects
Inheritance
Interface
Abstraction
Magic Methods$x = (object) [
    'a' => 'test',
    'b' => 'test2',
    'c' => 'test3'
];
var_dump($x);

/*
object(stdClass)#1 (3) {
  ["a"]=>
  string(4) "test"
  ["b"]=>
  string(5) "test2"
  ["c"]=>
  string(5) "test3"
}
*/class Bike {
    	function Bike() {
            $this->type = 'BMX';
    }
}

$blackSheep = new Bike();

print $blackSheep->type;$o= new \stdClass();
$o->a = 'new object';

OR

$o = (object) ['a' => 'new object'];
Source

Also in PHP: