<?php
class Dir {
public function __construct($dir) {
$this->dir = @opendir($dir); // Different resource everytime
}
}
var_dump(new Dir('/tmp') == new Dir('/tmp'));
// Actual failure
var_dump(opendir('/tmp') == opendir('/tmp'));
Deprecated: Creation of dynamic property Dir::$dir is deprecated in /in/7P5IW on line 5
Deprecated: Creation of dynamic property Dir::$dir is deprecated in /in/7P5IW on line 5
bool(false)
bool(false)
<br />
<b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/in/7P5IW</b> on line <b>4</b><br />
Process exited with code 255.
<br />
<b>Parse error</b>: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/in/7P5IW</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br />
<b>Parse error</b>: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in <b>/in/7P5IW</b> on line <b>4</b><br />
Process exited with code 255.