rgb192
asked on
value, (stream and resource)
<?php
class Animal{
public function __construct(){
$this->created=time();
$this->logfile_handle=fopen('log.txt','w');
}
public function __destruct(){
fclose($this->logfile_handle);
}
}
$c=new Animal();
Running this code in a debugger,
in the constructor
$this->logfile value=2, type=stream
in the destructor
$this->logfile value=2, type=resource
why value =2
what is the difference between stream and resource
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.