⊗ppOpNsAR 106 of 107 menu

Autoloading Rules in OOP in PHP

The spl_autoload_register function is written only once at the beginning of the file. Then you can create as many objects of different classes as you like, the main thing is that their names follow the conventions.

The spl_autoload_register function is written only at the beginning of the file that is called via the browser's address bar. That is, if some class calls inside itself another class or inherits from someone, and the class itself is called in another file, then spl_autoload_register needs to be written only in this other file - it is not necessary to duplicate this function in the class file itself.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline