Jump to content

[SOLVED] A Simple question - about objects


niranjnn01

Recommended Posts

<?php
class test {
public $var1;
public $var2;

function testlol($var) {
	$this->var1 = $var;
	$this->var2 = 'haha';
}
}
$myClass = new test;
$myClass->testlol("hi");
print_r($myClass);
?>

 

Will show:

  Quote
test Object ( [var1] => hi [var2] => haha)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.