3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $ini = <<<INI NUMBER = 1 TEXT = "1" DEFINED_INTEGER_CONSTANT = FOO DEFINED_BOOLEAN_CONSTANT = BAR UNDEFINED_CONSTANT = BAZ INI; define("FOO", 123); define("BAR", true); $ini_file = parse_ini_string($ini, false, INI_SCANNER_TYPED); foreach($ini_file as $key => $value) { define($key, $value); } var_dump(NUMBER); // => int(1) var_dump(TEXT); // => string(1) "1" var_dump(DEFINED_INTEGER_CONSTANT); // => string(3) "123" var_dump(DEFINED_BOOLEAN_CONSTANT); // => "1" var_dump(UNDEFINED_CONSTANT); // => "BAZ"
Output for git.master, git.master_jit, rfc.property-hooks
int(1) string(1) "1" string(3) "123" string(1) "1" string(3) "BAZ"

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.13 ms | 401 KiB | 8 Q