3v4l.org

run code in 300+ PHP versions simultaneously
<?php $int = 0; echo 'is ', var_export($int, true), ' empty? ', var_export(empty($int)), "\n"; $str = (string)$int; echo 'is ', var_export($str, true), ' empty? ', var_export(empty($str)), "\n"; $bool = (bool)$str; echo 'is ', var_export($bool, true), ' empty? ', var_export(empty($bool)), "\n";

preferences:
35.78 ms | 402 KiB | 5 Q