3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = ''; $code = ''; for ($i = 0; isset($input[$i]); $i++) { $code .= $code ? '.' : ''; $code .= sprintf('(function($str, $pos) { $length = (function($str) { for ($l = 0; isset($str[$l]); $l++) {} return $l - 1; })($str); return $str[$length - $pos]; })(%s, %u)', var_export($input, true), $i); } $code = sprintf('return %s;', $code); var_dump($code); var_dump(eval($code));
Output for git.master, git.master_jit, rfc.property-hooks
string(8) "return ;" NULL

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