The codex has been updated for Sports Bench 2.0 which is slated for an early September release. This is to help those who have made their own customizations get ready for the 2.0 release which will be radically different from a code perspective. Learn more about the changes you can expect with the code in Sports Bench 2.0.

BaseballPlayer::get_ERA( $earned_runs, $innings_pitched, $innings_per_game )

Returns the ERA for a player.


  • int $earned_runs — The number of earned runs given up.
  • float $innings_pitched — The number of innings pitched.
  • int $innings_per_game — The number of innings per game.


  • float | string — The ERA for the player.

Since: 2.0


  • /includes/classes/sports/baseball/baseball-player.php — 54