You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: isset() on a static property no longer compiles: "Cannot use isset() on the result of an expression" #101
When a class uses isset(self::$prop) on a static property, the rewritten file does not compile:
Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in src/Holder.php on line 11
It happens with or without a docblock on the property, and also with inline_vars.properties => false. We hit it on a common memoisation pattern (if (!isset(self::$cache)) { self::$cache = ...; }) and it takes the whole test run down, since it is a compile error.
Two files plus composer.json, default config (no typephp.php):
Activity
fdaviddpt commentedon Oct 4, 2026
Playground repro: https://typephp-php.github.io/docs/playground#code=N4IgLglmA2CmIC4QQM4tmAFASgAQHsA7XAQ1xTBMgGNcAHAJ3ztgbAE8QAaEa-AE3hIAPAH46ACzoAdQrMIkAtrBR0S1WLgCCdOgG5Zs6tBJpcACXzRBDWcFm5H9BhABuVTRSoRaoii8IAc1wAEgVlXABeXEIAV2hoAzliJzpYgCNoH1wAM1jCakgiXECMHARyMADAhyd7FKcnCBzcTABCVHQsdGgchAQwpVhsPHrG8acevoHwzWip-uNTFCSJxwBfWomGDFiGYgWZodWnTcIz2VhqCXxWwlgAdwsrGxxsAFoAPlKsbC5caQgXAAeQA0tJDCAktxeEQchBAohQLAFJlYPxEFVYrAeAjCPgdgAVBjqWAAEVgdDAEkQACYAKw8EgMEnsABqJCy-G8REQIDyCRh-h8YAASrt9gBxFGsHwASUI7hcJAKQixOJAO1UVzAADlvK5YLr4iZ0hAshxMQxsTwtSxCnLAviiSRAigrTaQIpXT4AApMFhsdjikj8d0IHKc9C4whZe4chjh0CMZisSAqD0a0r3FzUcPqnjUTmmuD560alBFkyJzNMlkkdhlz34dIAKx1Tdg627QA