fork(4) download
  1. <?php
  2.  
  3. $REQUEST['nome'] = 'joao';
  4. $REQUEST["ra"] = 'teste';
  5. $REQUEST["gender"] = 'teste';
  6. $REQUEST["idade"] = 'teste';
  7. $REQUEST["endereco"] = 'teste';
  8. $REQUEST["telefone"] = 'teste';
  9. $REQUEST["email"] = 'teste';
  10.  
  11. $_SESSION['cadastro'] = [];
  12. $cads = count($_SESSION['cadastro']);
  13.  
  14. if($cads == 0){
  15. $_SESSION['cadastro'][0] = $REQUEST;
  16. }else{
  17. $new_cad = $cads + 1;
  18. $_SESSION['cadastro'][$new_cad] = $REQUEST;
  19. }
  20.  
  21. print_r($_SESSION);
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
0Array
(
    [cadastro] => Array
        (
            [0] => Array
                (
                    [nome] => joao
                    [ra] => teste
                    [gender] => teste
                    [idade] => teste
                    [endereco] => teste
                    [telefone] => teste
                    [email] => teste
                )

        )

)