3v4l.org

run code in 200+ PHP versions simultaneously
<?php $a = []; function foo(array $array) { $array[] = 'clément'; } foo($a); var_dump($a);
Output for 7.2.0 - 7.4.2
array(0) { }