Skip to content
Advertisement

this keyword inside slim framework closure

recently i started to learn API in PHP, i start to learning basic stuffs related to API then i decided to learn a framework and i choose slim microframework so i was reading the Dependency Container documentation and i saw this example

JavaScript

});

here this keyword refers to Container object so i want to know how it is possible to refer an object with this keyword in PHP closure?

Advertisement

Answer

after couple of hours searching i got my answer so i want to share it

JavaScript

https://codesamplez.com/programming/php-closure-tutorial

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement