फ़ंक्शन spl_autoload_functions

फ़ंक्शन spl_autoload_functions spl_autoload_register के साथ पंजीकृत सभी ऑटोलोड फ़ंक्शन की सरणी लौटाता है। यदि कोई ऑटोलोडर पंजीकृत नहीं हैं, तो फ़ंक्शन एक खाली सरणी लौटाएगा।

वाक्य - विन्यास

phpspl_autoload_functions();

उदाहरण

बिना पंजीकरण के पंजीकृत ऑटोलोडर की सूची की जाँच करें:

php<?php
  $res = spl_autoload_functions();
  print_r($res);
?>

कोड निष्पादन का परिणाम:

php[]

उदाहरण

एक ऑटोलोडर पंजीकृत करें और परिणाम की जाँच करें:

php<?php
  function my_autoload($class) {
    include $class . '.php';
  }
  
  spl_autoload_register('my_autoload');
  $res = spl_autoload_functions();
  print_r($res);
?>

कोड निष्पादन का परिणाम:

php['my_autoload']

उदाहरण

कई पंजीकृत ऑटोलोडर की जाँच करें:

php<?php
  function autoload1($class) {
    // कार्यान्वयन 1
  }
  
  function autoload2($class) {
    // कार्यान्वयन 2
  }
  
  spl_autoload_register('autoload1');
  spl_autoload_register('autoload2');
  $res = spl_autoload_functions();
  print_r($res);
?>

कोड निष्पादन का परिणाम:

php['autoload1', 'autoload2']

यह भी देखें

  • फ़ंक्शन spl_autoload_register,
    जो एक ऑटोलोडर पंजीकृत करता है
  • फ़ंक्शन spl_autoload_unregister,
    जो एक ऑटोलोडर हटाता है
  • फ़ंक्शन spl_autoload_call,
    जो ऑटोलोडर को कॉल करता है
  • फ़ंक्शन class_exists,
    जो कक्षा की जाँच करता है