How to protect PHP script

In dotnet, there is something to create .dll files to protect the code. So the code can be used but not seen. Is there something like that to protect the script? Or is there any possibility to create a .dll file for our code so that we only share the .dll file and not the actual code.