3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "hello\0world"; echo 'Input:', var_dump($string); parse_str($string, $values); echo "Output:\n"; $count = 0; foreach($values as $key => $value) { echo var_export(++$count), ': ', var_dump($key), ' => ', var_dump($value), "\n"; } printf("done, %d variable(s)\n", $count);
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
Input:string(11) "helloworld" Output: 1: string(5) "hello" => string(0) "" done, 1 variable(s)
Output for hhvm-3.10.0 - 3.12.0
Input:string(11) "helloworld" Output: 11: string(5) "hello" => string(0) "" done, 1 variable(s)