this php

Solutions on MaxInterview for this php by the best coders in the world

showing results for - "this php"
Lisa
01 Jun 2018
1 <?php class Books 
2{ /* Member variables */ var $price; var $title; 
3  /* Member functions */ 
4 	function setPrice($par){ $this->price = $par; } 
5 	function getPrice(){ echo $this->price ."<br/>"; } 
6  	function setTitle($par){ $this->title = $par;} 
7 	function getTitle(){ echo $this->title ." <br/>"; } 
8} 
9?> 
Mía
23 Feb 2016
1 <?php class Person { public $name; function __construct( $name ) { $this->name = $name; } }; $jack = new Person('Jack'); echo $jack->name; 
Paola
16 Mar 2016
1 print gettype($this); //object print get_object_vars($this); //Array print is_array($this); //false print is_object($this); //true print_r($this); //dump of the objects inside it print count($this); //true print get_class($this); //YourProject\YourFile\YourClass print isset($this); //true print get_parent_class($this); //YourBundle\YourStuff\YourParentClass print gettype($this->container); //object