OOP PHP Garip tanımsız yöntemi

0 Cevap php

Can someone tell me why I am getting undefined method print_hash() error?

Ben şu dersim var

    class EmailManager{
 private $replytoArray;
 private $receiverArray;
 private $fromArray;

 function __construct(){
  $replytoArray = array();
  $receiverArray = array();
  $fromArray = array();
 }
 function addReceiver($k){
  if(!in_array($k, $receiverArray)){
   $receiverArray[] = $k;
   return true;
  }
  return false;
 }
 function addReplyTo($k){
  if(!in_array($k, $replytoArray)){
   $replytoArray[] = $k;
   return true;
  }
  return false;
 }
 function debug(){
  print_hash($replytoArray);
  print_hash($receiverArray);
 }
 function print_hash($k){
  echo "<pre>";
  print_r($k);
  echo "</pre></br>";
 }
}

Ve ben bu yüzden test etmeye çalıştı her şeyin gayet iyi olduğundan emin olmak istiyorum

    <?php
 error_reporting(E_ALL);
 ini_set("display_errors",1);
 require_once("EmailManager.php");

 $em = new EmailManager();
 $em->debug();
 //$em->addReceiver("blabla@hotmail.com");
?>

0 Cevap