LonghornPHP 2026

Voting

: max(five, four)?
(Example: nine)

The Note You're Voting On

dev at codesatori dot com
9 years ago
Apparently the overwrite-option only registers as false if it's absent. If I specify it as false, it acts the same as true and overwrites. Then, 
<?php
if (empty($opts['overwrite'])) {
    unset($opts['overwrite']);
}
?>
...was the simple fix for my FTP stream wrapper class sporting default options. This is quite unexpected though; false means false even if I say so? Apparently PHP (7.0.2) just checks if the option exists, not its boolean value.

<< Back to user notes page

To Top