How the PHP include function works behind the scenes

Asked

Viewed 158 times

0

Let’s say I have two pages, one call teste.php and the other teste2.php.

On the page teste.php I have the following code:

...
$usuario = new Usuario();
$usuarios = $usuario->getUsuarios();
...

And on the page teste2.php I have the code:

...
include "teste.php";
...

When doing the page include teste.php on the page teste2.php what process is behind this? php serializes the page’s OBJ teste.php and while doing include it uses the unserialize Function() on that OBJ behind the scenes?

1 answer

0

There is no serialization of objects when using include. However, the PHP process the file and gives it a specific scope, depending on where includes the other article.

The documentation explains a lot about how the include works, different scopes, etc.

http://php.net/manual/en/function.include.php

  • I even looked at the documentation. But I believe it is incomplete. The program Burp Suite is alerting to 'Serialized Object in HTTP message' precisely in a q file does include a OBJ. :/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.