3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function friskamax_is_not_empty_string( $var ) { return $var !== ''; } function mbake_sanitize_int( $value ) { if ( friskamax_is_not_empty_string( $value ) ) { return ( int ) $value; } } echo mbake_sanitize_int( '' );
Output for 4.3.0 - 7.2.0