3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = ['nome' => 'Paolo']; $default = ['nome' => '' ]; $_POST = array_replace( $default, $_POST ); $nome = $_POST['nome']; echo $nome;
Output for 7.3.0 - 7.3.29, 7.4.0 - 7.4.21, 8.0.0 - 8.0.8
Paolo

preferences:
132.13 ms | 459 KiB | 5 Q