summaryrefslogtreecommitdiff
path: root/ext/spl/examples/autoload.inc
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-10-01 11:19:36 +0300
committerDmitry Stogov <dmitry@zend.com>2018-10-01 11:19:36 +0300
commit2d87b51ae9dafc4000830bdebd49d7665d0a4f6f (patch)
tree2610a5e2641e17ba8bdbcebc618a73c6dfcb8e13 /ext/spl/examples/autoload.inc
parent9d47cb4593972859d7bb8747f1f0b8ae56d7712e (diff)
parent4fc5833b3ebda3078911808d296e62d5baa9bf52 (diff)
downloadphp-git-2d87b51ae9dafc4000830bdebd49d7665d0a4f6f.tar.gz
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (29 commits) Fix the deplister rule to not ignore the .c file (Anatol) Update .gitignore to include the Windows deplister program (win32/build/deplister.c) Bug > Feature Request NEWS and UPGRADING Fixed bug #75479 Fix test Fix some tests and improve coverage for Windows in SPL Use already set variable Fix reflection arguments for sodium_memzero function Deprecate unbinding of $this of non-static methods Generalize compile_typename Fixed bug #76737 Fixed bug #72635 Remove and refactor ext/spl/examples Remove outdated soap examples Remove unused ext/bz2/php_bz2.def Remove redundant ce from reflection property_reference Only store zend_type inside reflection type_reference Fixed bug #76946 Bump versions for 7.1.24-dev ...
Diffstat (limited to 'ext/spl/examples/autoload.inc')
-rw-r--r--ext/spl/examples/autoload.inc50
1 files changed, 0 insertions, 50 deletions
diff --git a/ext/spl/examples/autoload.inc b/ext/spl/examples/autoload.inc
deleted file mode 100644
index 2ccd0d1be8..0000000000
--- a/ext/spl/examples/autoload.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/** @file autoload.inc
- * @ingroup Examples
- * @brief function __autoload
- * @author Marcus Boerger
- * @date 2003 - 2005
- *
- * SPL - Standard PHP Library
- */
-
-/** \internal
- * Tries to load class $classname from directory $dir.
- */
-function __load_class($classname, $dir)
-{
- $file = $dir . '/' . $classname . '.inc';
- if (file_exists($file))
- {
- require_once($file);
- return true;
- }
- return false;
-}
-
-/**
- * @brief Class loader for SPL example classes
- * @author Marcus Boerger
- * @version 1.0
- *
- * Loads classes automatically from include_path as given by ini or from
- * current directory of script or include file.
- */
-function __autoload($classname) {
- $classname = strtolower($classname);
- $inc = split(':', ini_get('include_path'));
- $inc[] = '.';
- $inc[] = dirname($_SERVER['PATH_TRANSLATED']);
- foreach($inc as $dir)
- {
- if (__load_class($classname, $dir))
- {
- fprintf(STDERR, 'Loading class('.$classname.")\n");
- return;
- }
- }
- fprintf(STDERR, 'Class not found ('.$classname.")\n");
-}
-
-?> \ No newline at end of file