How in php resources are transferred (one of the 8 data types), by reference or by value?

Is it in the documentation?

  • and take and check? ) - BOPOH
  • give an example - Invision
  • @Invision There is no example, rather there is a theory. But, I will be glad if you give an example. The question was addressed to me: in php there are 8 data types, which of them are passed by value, which ones by reference? My answer was - objects are passed by reference, the rest are by value. To which I was asked a question - how are resources transferred? I Suspect it depends on the type of resource .. - jekaby
  • php 8 does not exist - Invision
  • @Invision Talk about 8 types of data))) - jekaby

1 answer 1

Resource is a special variable containing a link to an external resource.

http://php.net/manual/ru/language.types.resource.php

  • Does this mean that the question is not correct? How should I answer it? - jekaby 4:21 pm
  • Correct, variable referring to the resource is passed by reference - Marsel Arduanov
  • Always so for all resources? Plus, but I can not mark the best. To answer was complete, I would like examples and arguments. - jekaby pm