3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(base64_decode("\0YW55dGhpbmc=", true)); var_dump(base64_decode("YW55dGhpbmc=\0", true)); var_dump(base64_decode("YW55\0dGhpbmc=", true));
based on A7qCT
Output for 7.0.10 - 7.0.33, 7.1.0 - 7.1.30, 7.2.0 - 7.2.33, 7.3.0 - 7.3.23, 7.4.0 - 7.4.11, 8.0.0alpha1 - rc2
bool(false) bool(false) bool(false)
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.9
string(0) "" string(8) "anything" string(3) "any"