3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = [&$a]; $c = $b; $b[0] = 2; echo "$b[0] $c[0]"; // 2 2
Output for 7.3.0 - 7.3.29, 7.4.0 - 7.4.21, 8.0.0 - 8.0.8
2 2

preferences:
154.14 ms | 459 KiB | 5 Q