<?php class Foo { public function __toString() { return 'stringable'; } } $inputs = [null, false, true, 0, 1, new Foo()]; foreach ($inputs as $input) { $sfi = new SplFileInfo($input); print("-----\n"); var_export($input); print("\n"); var_export($sfi->getPathname()); print("\n"); var_export($sfi->getPath()); print("\n"); }
You have javascript disabled. You will not be able to edit any code.