3v4l.org

run code in 500+ PHP versions simultaneously
<?php $_empty1 = sprintf('', "abc"); $_empty2 = sprintf('%0.0s', "abc"); $_empty3 = sprintf('%*.0s', 0, "abc"); $_empty4 = sprintf('%0.*s', 0, "abc"); $_empty5 = sprintf('%*.*s', 0, 0, "abc"); /** @psalm-trace $_empty1, $_empty2, $_empty3, $_empty4, $_empty5 */; var_dump($_empty1. $_empty2. $_empty3. $_empty4. $_empty5 === "");
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
bool(true)

preferences:
85.19 ms | 1096 KiB | 4 Q