3v4l.org

run code in 300+ PHP versions simultaneously
<?php $condition = ['one', 'two']; $key = key($condition); echo "The key is: " . $key . PHP_EOL; echo 'Without strict comparison:' . PHP_EOL; var_dump(in_array($key, ['a', 'b'])); echo 'With strict comparison:' . PHP_EOL; var_dump(in_array($key, ['a', 'b'], true)); echo 'Non-strict comparison of string to zero:' . PHP_EOL; var_dump(0 == 'a');
Output for git.master, git.master_jit, rfc.property-hooks
The key is: 0 Without strict comparison: bool(false) With strict comparison: bool(false) Non-strict comparison of string to zero: bool(false)

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:
59.82 ms | 401 KiB | 8 Q