Revert "Revert "Fixed: Error when trying to access assigned variables in a partial in the PHP engine""

This reverts commit 020f2a896ae72f8cdac1c26baa97eda34f10104e.