3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getUserConsentsByUid(string $uid, array $filters = [], ?int $limit): array { } getUserConsentsByUid('uid', [], 20);
based on OalN6
Output for 7.1.0 - 7.3.0rc3
Fatal error: Uncaught TypeError: Return value of getUserConsentsByUid() must be of the type array, none returned in /in/InEOj:5 Stack trace: #0 /in/InEOj(8): getUserConsentsByUid('uid', Array, 20) #1 {main} thrown in /in/InEOj on line 5
Process exited with code 255.
Output for 5.6.38 - 7.0.28
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /in/InEOj on line 3
Process exited with code 255.