Skip to content

Instantly share code, notes, and snippets.

@DianaSchef
Created August 7, 2025 08:12
Show Gist options
  • Select an option

  • Save DianaSchef/0c4f8e2414dd55c2a2ae93734296b824 to your computer and use it in GitHub Desktop.

Select an option

Save DianaSchef/0c4f8e2414dd55c2a2ae93734296b824 to your computer and use it in GitHub Desktop.
<?php
require_once 'vendor/autoload.php';
$functions = spl_autoload_functions();
foreach ($functions as $function) {
if ($function instanceof \Closure) {
$reflection = new ReflectionFunction($function);
// check if autoloader closure is from laminas zendframework bridge
if (str_contains($reflection->getFileName(), 'laminas-zendframework-bridge')) {
spl_autoload_unregister($function);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment