3v4l.org

run code in 200+ PHP versions simultaneously
<?php function foo(string $string) { $string .= 'clément'; } $a = 'une valeur'; foo($a); var_dump($a);
based on u6RGj
Output for 7.2.0 - 7.4.2
string(10) "une valeur"