3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FileService { /** * FileService constructor. * @param callable $getFile * @param callable $putFile * @param callable $deleteFile * @param callable $moveFile * @param callable $listFiles */ public function __construct( public callable $getFile, public callable $putFile, public callable $deleteFile, public callable $moveFile, public callable $listFiles, ) { } }
Output for 8.0.0 - 8.0.3
Fatal error: Property FileService::$getFile cannot have type callable in /in/J0eMp on line 13
Process exited with code 255.
Output for 7.3.0 - 7.3.28, 7.4.0 - 7.4.16
Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE) in /in/J0eMp on line 14
Process exited with code 255.

preferences:
32.58 ms | 410 KiB | 5 Q