3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'a' . chr(0) . 'bc'; $string = str_replace(chr(0), '\\'.'0', $string); preg_match('/^' . $string . '$/', ($string = str_replace('\\'.'0', chr(0), $string)), $v); $v = rarray($v); $d = array(); var_dump(human_redable($v), human_redable($string), preg_last_error()); function rarray(&$a) { $b = is_array($a); if($b === true) { $b = null; unset($b); return $a; } $c = array(); $a = $b = null; unset($a, $b); return $c; } //numeric array function human_redable(&$a) { $b = is_scalar($a); if($b === true) { $a = urlencode($a); $b = null; unset($b); return $a; } elseif(($b = is_array($a)) === true) { $d = array(); foreach($a as $k => &$v) { $d[$k] = urlencode($v); } $a = $b = $k = $v = null; unset($a, $b, $k, $v); return $d; } return false; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> string(6) "a%00bc" } string(6) "a%00bc" int(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:
66.26 ms | 401 KiB | 8 Q