3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo( (string $username, string $email, string $password, (string $country, string $zip) $address) $user_information ): void { echo $user_information['address']['country']; // same as echo $address['country']; // same as echo $country; } foo({ username: 'azjezz', email: 'foo@bar', password: '123545', address: { country: 'TN', zip: '89R31RR' } });
Output for 8.0.1 - 8.0.17, 8.1.0 - 8.1.4
Parse error: syntax error, unexpected token "(", expecting variable in /in/AilRL on line 4
Process exited with code 255.
Output for 7.4.0 - 7.4.28
Parse error: syntax error, unexpected '(', expecting variable (T_VARIABLE) in /in/AilRL on line 4
Process exited with code 255.

preferences:
150.05 ms | 1288 KiB | 6 Q