```
>>> (bool)"1";
=> true
>>> (bool)"0";
=> false
>>> (bool)"false"
=> true
```(there are plenty of other things like that; the default call-by-value is also unexpected)
Also: Laravel has plenty of "magic" ie things are intercepted via runtime reflection and then rerouted into something that hopefully "does-the-right-thing". It obfuscates control flow, causes unexpected side-effects and confuses IDEs and developers alike.
Even the popular frameworks have combinations of subawesome code and silly ideas. Just the latest example I ran into:
```
int append(string $path, string $data) /* the signature of the Filesystem facade */
/* the implementation in FilesystemAdapter: */
public function append($path, $data, $separator = PHP_EOL)
{
if ($this->fileExists($path)) {
return $this->put($path, $this->get($path).$separator.$data);
}
return $this->put($path, $data);
}
```
- It's not correct as it will add (ffs why?) a newline in between the files.
- Performance wise, this is bloody awful.
- however, you *can* specify the separator in any call as the facade interface is just documentation and is bypassed via reflection (but that confuses your IDE)