3v4l.org

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