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:
191.42 ms | 1395 KiB | 57 Q