I've following piece of code

```
$path = $resource['path'];
if (strpos($path, base_url()) == 0) {
    $path = FCPATH. substr($path, strlen(base_url()));
}
echo '<pre>';
$x = '/home/gofrendi/public_html/No-CMS/themes/ubuntu/assets/default/script.js';
var_dump($path);
var_dump($x==$path);
var_dump('/home/gofrendi/public_html/No-CMS/themes/ubuntu/assets/default/script.js' == $path);
echo '</pre>';

```

I'm sure that $path consists of `/home/gofrendi/public_html/No-CMS/themes/ubuntu/assets/default/script.js`

And this is what I get:

```
string(82) "/home/gofrendi/public_html/No-CMS/themes/ubuntu/assets/default/script.js"
bool(false)
bool(false)

```

Seems that the comparison simply failed. What's wrong here? PHP bug or my mistake?

**EDIT:**
I also gladly show you the result of this code:

```
echo '<pre>';
$x = '/home/gofrendi/public_html/No-CMS/themes/ubuntu/assets/default/script.js';
var_dump($path);
var_dump($x);
var_dump($x==$x);
var_dump($x==$path);
var_dump('/home/gofrendi/public_html/No-CMS/themes/ubuntu/assets/default/script.js' == $path);
echo '</pre>';

```

The result is:

```
string(82) "/home/gofrendi/public_html/No-CMS/themes/ubuntu/assets/default/script.js"
string(72) "/home/gofrendi/public_html/No-CMS/themes/ubuntu/assets/default/script.js"
bool(true)
bool(false)
bool(false)

```

**EDIT AGAIN:**
Resolved, I do some str\_replace for templating system that change `{{ used_theme }}` into currently used theme. The used theme is 'ubuntu' which has 6 character length, while {{ used\_theme }} has 10 character length.
The str\_replace performed after the code executed. This also change the var\_dump result, which make such an unexpected behavior.
Thanks for everyone's help.