3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ "On", "Off" ]; foreach ($tests as $test) { $result = [ "test" => $test, "boolval" => boolval($test), "FILTER_VALIDATE_BOOLEAN" => filter_var($test, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) ]; $result["agreement"] = $result["boolval"] === $result["FILTER_VALIDATE_BOOLEAN"]; echo json_encode($result, JSON_PRETTY_PRINT), "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
{ "test": "On", "boolval": true, "FILTER_VALIDATE_BOOLEAN": true, "agreement": true } { "test": "Off", "boolval": true, "FILTER_VALIDATE_BOOLEAN": false, "agreement": 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:
62.05 ms | 401 KiB | 8 Q