3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getUserConsentsByUid(string $uid, array $filters = [], int $limit = 20) { var_dump($limit); } getUserConsentsByUid('uid', [], null);
based on FOYRt
Output for 7.3.0alpha1 - 7.3.0rc3
Fatal error: Uncaught TypeError: Argument 3 passed to getUserConsentsByUid() must be of the type int, null given, called in /in/SPMEK on line 9 and defined in /in/SPMEK:3 Stack trace: #0 /in/SPMEK(9): getUserConsentsByUid('uid', Array, NULL) #1 {main} thrown in /in/SPMEK on line 3
Process exited with code 255.
Output for 7.0.28 - 7.2.11
Fatal error: Uncaught TypeError: Argument 3 passed to getUserConsentsByUid() must be of the type integer, null given, called in /in/SPMEK on line 9 and defined in /in/SPMEK:3 Stack trace: #0 /in/SPMEK(9): getUserConsentsByUid('uid', Array, NULL) #1 {main} thrown in /in/SPMEK on line 3
Process exited with code 255.
Output for 5.6.38
Fatal error: Default value for parameters with a class type hint can only be NULL in /in/SPMEK on line 3
Process exited with code 255.