3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump((bool) ""); // bool(false) var_dump((bool) 1); // bool(true) var_dump((bool) -2); // bool(true) var_dump((bool) "foo"); // bool(true) var_dump((bool) 2.3e5); // bool(true) var_dump((bool) array(12)); // bool(true) var_dump((bool) array()); // bool(false) var_dump((bool) "false"); // bool(true)

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch master
bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) bool(false) bool(true)
Output for branch master_jit
bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) bool(false) bool(true)
Output for branch partials
bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) bool(false) bool(true)
Output for branch literals
bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) bool(false) bool(true)
Output for branch enumerations
bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) bool(false) bool(true)

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