anchor.diff:        { name = "zip";
           buildInputs = [ libzip pcre' ];
           configureFlags = [ "--with-zip" ]
  -          ++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]
  -          ++ lib.optional (lib.versionOlder php.version "7.3") [ "--with-libzip" ];
  +          ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]
  +          ++ lib.optionals (lib.versionOlder php.version "7.3") [ "--with-libzip" ];
           doCheck = false; }
         { name = "zlib";
           buildInputs = [ zlib ];
  
positive.code:         NIX_CFLAGS_COMPILE = [ "-I../.." "-DHAVE_DOM" ];
          configureFlags = [ "--enable-xmlreader" ]
            # Required to build on darwin.
            ++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
        { name = "xmlrpc";
          buildInputs = [ libxml2 libiconv ];
          # xmlrpc was unbundled in 8.0 https://php.watch/versions/8.0/xmlrpc
          enable = lib.versionOlder php.version "8.0";
          configureFlags = [ "--with-xmlrpc" ]
            # Required to build on darwin.
            ++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
        { name = "xmlwriter";
          buildInputs = [ libxml2 ];
          configureFlags = [ "--enable-xmlwriter" ]
            # Required to build on darwin.
            ++ lib.optional (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; }
        { name = "xsl";
          buildInputs = [ libxslt libxml2 ];
          doCheck = lib.versionOlder php.version "8.0";
  
negative.code:         buildInputs = [ libxml2 ];
          configureFlags = [ "--enable-soap" ]
            # Required to build on darwin.
            ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ];
          doCheck = false; }
        { name = "sockets"; doCheck = false; }
        { name = "sodium"; buildInputs = [ libsodium ]; }
  