3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array( 'string_empty' => '', 'string_bool_f' => 'false', 'string_bool_t' => 'true', 'int_0' => 0, 'int_1' => 1, 'int_neg' => -100, 'int_norm' => 100, 'array_empty' => [], 'array_null_val' => [null], ); foreach ($values as $name => $val) { $is_empty = empty($val) ? 'is' : 'isn\'t'; echo "$name $is_empty considered empty.".PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
string_empty is considered empty. string_bool_f isn't considered empty. string_bool_t isn't considered empty. int_0 is considered empty. int_1 isn't considered empty. int_neg isn't considered empty. int_norm isn't considered empty. array_empty is considered empty. array_null_val isn't considered empty.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.21 ms | 402 KiB | 8 Q