3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = trim('false'); echo $str . "\n"; if ($str) { echo "option 1: not empty\n"; } if (strlen($str)) { echo "option 2: not empty\n"; } if (!empty($str)) { echo "option 3: not empty\n"; } if ($str !== '') { echo "option 4: not empty\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
false option 1: not empty option 2: not empty option 3: not empty option 4: not 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:
42.4 ms | 401 KiB | 8 Q