3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function trackingItemId(int $trackingItemId): array { return [ 'trackingItemId' => $trackingItemId, ]; } trackingItemId();
Output for 7.1.0 - 7.2.6
Fatal error: Uncaught ArgumentCountError: Too few arguments to function trackingItemId(), 0 passed in /in/hLBNT on line 10 and exactly 1 expected in /in/hLBNT:3 Stack trace: #0 /in/hLBNT(10): trackingItemId() #1 {main} thrown in /in/hLBNT on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught TypeError: Argument 1 passed to trackingItemId() must be of the type integer, none given, called in /in/hLBNT on line 10 and defined in /in/hLBNT:3 Stack trace: #0 /in/hLBNT(10): trackingItemId() #1 {main} thrown in /in/hLBNT on line 3
Process exited with code 255.
Output for hhvm-3.15.4
Warning: trackingItemId() expects exactly 1 parameter, 0 given in /in/hLBNT on line 8
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/hLBNT on line 3
Process exited with code 255.