A PHP internals pre-RFC discussion proposes 'runtime modules' — request-lifetime named units with their own class/function/constant symbol tables — to achieve package-level symbol isolation in a way that maps naturally to Composer dependencies. Each Composer package would run in its own module, seeing only its own symbols, PHP built-ins, and direct dependencies. The thread explores a minimal API (module_add_dependency, module_run), debates naming ('modules' vs 'containers'), and digs into the hardest design challenge: how objects passed between isolated contexts should behave with respect to instanceof, get_class, and type identity when the same class name exists in multiple versions across containers.

57m read timeFrom externals.io
Post cover image
118 Impressions