<commit_before>require File.expand_path("../../Abstract/abstract-php", __FILE__)

class Php71 < AbstractPhp
  init
  desc "PHP Version 7.1"
  bottle do
    sha256 "d001b1c444d5edd8b0c8a9838dfad6c16f3c21d2e622f26a41678ef8d720c59e" => :el_capitan
    sha256 "a323eb93c4503940b67f4d6c9b7fc3adbd9f429d67d6834441468f80a00ff526" => :yosemite
    sha256 "b269071358750fee4389b12323625c96197ced18020c76fa5e0b9e30237064fb" => :mavericks
  end

  include AbstractPhpVersion::Php71Defs

  url PHP_SRC_TARBALL
  sha256 PHP_CHECKSUM[:sha256]
  version PHP_VERSION

  head PHP_GITHUB_URL, :branch => PHP_BRANCH

  def install_args
    args = super

    # dtrace is not compatible with phpdbg: https://github.com/krakjoe/phpdbg/issues/38
    if build.without? "phpdbg"
      args << "--enable-dtrace"
      args << "--disable-phpdbg"
    else
      args << "--enable-phpdbg"

      if build.with? "debug"
        args << "--enable-phpdbg-debug"
      end
    end

    args << "--enable-zend-signals"
  end

  def php_version<commit_msg>php71: update 7.1.0-alpha.2 bottle.<commit_after>require File.expand_path("../../Abstract/abstract-php", __FILE__)

class Php71 < AbstractPhp
  init
  desc "PHP Version 7.1"
  bottle do
    revision 1
    sha256 "96b4071410af2049cefe51accc5d387cc1d1e73938930abdb253b302c3310fb4" => :el_capitan
    sha256 "4c22b9c95b8138fcd85f977177f00ef1e2ba142a824d3dbf17c1318fc0d3cd9c" => :yosemite
    sha256 "b60c79abf3d74189f3811b97c9ee9eed0e4b05f2eab58a617201a417f5c77b13" => :mavericks
  end

  include AbstractPhpVersion::Php71Defs

  url PHP_SRC_TARBALL
  sha256 PHP_CHECKSUM[:sha256]
  version PHP_VERSION

  head PHP_GITHUB_URL, :branch => PHP_BRANCH

  def install_args
    args = super

    # dtrace is not compatible with phpdbg: https://github.com/krakjoe/phpdbg/issues/38
    if build.without? "phpdbg"
      args << "--enable-dtrace"
      args << "--disable-phpdbg"
    else
      args << "--enable-phpdbg"

      if build.with? "debug"
        args << "--enable-phpdbg-debug"
      end
    end

    args << "--enable-zend-signals"
  end

  def php_version
{'fraction_non_alphanumeric': 0.10004810004810005, 'fraction_numerical': 0.14285714285714285, 'mean_word_length': 3.531590413943355, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2706985', 'n_tokens_mistral': 988, 'n_tokens_neox': 827, 'n_words': 140}