3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isReserved($string = '') { $reserved_pattern = "/\b((a(bstract|nd|rray|s))|(c(a(llable|se|tch)|l(ass|one)|on(st|tinue)))|(d(e(clare|fault)|ie|o))|(e(cho|lse(if)?|mpty|nd(declare|for(each)|if|switch|while)|val|x(it|tends)))|(f(inal|or(each)?|unction))|(g(lobal|oto))|(i(f|mplements|n(clude(_once)?|st(anceof|eadof)|terface)|sset))|(n(amespace|ew))|(p(r(i(nt|vate)|otected)|ublic))|(re(quire(_once)?|turn))|(s(tatic|witch))|(t(hrow|r(ait|y)))|(u(nset|se))|(__halt_compiler|break|list|(x)?or|var|while))\b/"; return preg_match($reserved_pattern, $string); } echo 'static'; echo PHP_EOL; echo isReserved('static'); echo PHP_EOL; echo PHP_EOL; echo 'hello'; echo PHP_EOL; echo isReserved('hello');
Output for git.master, git.master_jit, rfc.property-hooks
static 1 hello 0

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:
26.1 ms | 405 KiB | 5 Q