<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */
 
  $package= 'xp.runtime';
 
  uses('util.cmd.Console');

  /**
   * Displays XP version and runtime information
   *
   * @purpose  Tool
   */
  class xpruntimeEvaluate extends Object {
    
    /**
     * Main
     *
     * @param   string[] args
     */
    public static function main(array $args) {

      // Read sourcecode from STDIN if no further argument is given
      if (0 === sizeof($args)) {
        $src= file_get_contents('php://stdin');
      } else {
        $src= $args[0];
      }
      $src= trim($src, ' ;').';';

      // Perform
      $argv= array(xp::nameOf(__CLASS__)) + $args;
      $argc= sizeof($argv);
      exit(eval($src));
    }
  }
?><commit_msg>- Use return instead of exit() - same effect<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */
 
  $package= 'xp.runtime';
 
  uses('util.cmd.Console');

  /**
   * Displays XP version and runtime information
   *
   * @purpose  Tool
   */
  class xpruntimeEvaluate extends Object {
    
    /**
     * Main
     *
     * @param   string[] args
     */
    public static function main(array $args) {

      // Read sourcecode from STDIN if no further argument is given
      if (0 === sizeof($args)) {
        $src= file_get_contents('php://stdin');
      } else {
        $src= $args[0];
      }
      $src= trim($src, ' ;').';';

      // Perform
      $argv= array(xp::nameOf(__CLASS__)) + $args;
      $argc= sizeof($argv);
      return eval($src);
    }
  }
?>
{'fraction_non_alphanumeric': 0.16108247422680413, 'fraction_numerical': 0.002577319587628866, 'mean_word_length': 2.0570866141732282, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '3394220', 'n_tokens_mistral': 525, 'n_tokens_neox': 499, 'n_words': 130}