Hi, can someone explain me the difference between those 2 classes? Why to use satic calls instead of an new object?
class User
{
protected $users = array();
/**
* Create new user
*
* @param string $name Username
* @return array Users
*/
public function create($name)
{
$this->users[] = $name;
return $this->users;
}
}
$...
I am using PHP 5.2. If I new an object at one page, when will this object be destructed? Is the object destructed automatic at the time that user go to another .php page or I need to call __destructor explicitly?
...
A quick question.
Is there any function equivalent to DateTime::diff() in php 5.2?
My local server is php 5.3 and using DateTime::diff(). then I found that my live site uses php 5.2 and gives an error.
Fatal error: Call to undefined method DateTime::diff() in /var/www/some/other/dir/web/daikon/modules/projects/views/admin/log/admin_lo...
I have several live Drupal sites running on an Ubuntu server (10.04), Apache 2.2 with PHP 5.2.3-1. I recently started the work of setting up a test server that would be as close as possible to the live environment, but I stupidly didn't check the PHP version that Ubuntu installed when I did an apt-get install php. I've now had my test se...