0

What data type would I use if I want to return a resource within a function?

This isn't allowed and causes a fatal error:

function test():resource{...}
NaN
  • 517
  • 1
  • 5
  • 12
  • What is your PHP version ? What is the returned resource ? – Syscall Feb 06 '21 at 07:51
  • @Syscall, It's 7.4 and the resource returned should be from `odbc_connect` – NaN Feb 06 '21 at 22:09
  • Does this answer your question? [PHP 7 and strict "resource" types](https://stackoverflow.com/questions/38429595/php-7-and-strict-resource-types) – Syscall Feb 07 '21 at 07:23

0 Answers0