3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function is_base64($s) { return (bool) preg_match('/^[a-zA-Z0-9\/\r\n+]*={0,2}$/', $s); } var_dump(is_base64("dfdf")); var_dump(is_base64("CkRldmljZSBOYW1lIC0gTW9kZWw6IDx1bmtub3duPiAtIEhVQVdFSSBIVUFXRUkgWTMwMC0wMTAwCk9wZXJhdGluZyBTeXN0ZW06IEFuZHJvaWQgT1MgNC4xLjEgLyBBUEktMTYgKEh1YXdlaVkzMDAtMDEwMC9DNDc5QjE5Nyk="));
Output for 4.3.0 - 7.2.0
bool(true) bool(true)