|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-02-24 13:50 UTC] mp at nanasoft dot hu
Description: ------------ When a require_once call causes other files to be loaded, the ReflectionClass object of any of those classes loaded from an extra file via the __autoload method returns the classes' start line and end line incorrectly from the ReflectionClass::getStartLine() and ReflectionClass::getEndLine() methods. I think the start line and the end line values come from the class that caused the extra files to load. Expected result: ---------------- The correct start line and end line values should be returned. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 23:00:01 2025 UTC |
In my case the end line is incorrectly reported (+1). Unfortunatelly it's very hard to replicate. Whenever I try to isolate it, it starts working. Windows, PHP 7.1.5 (cli) (built: May 9 2017 19:52:16) ( ZTS MSVC14 (Visual C++ 2015) x86 ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.5, Copyright (c) 1999-2017, by Zend Technologies Disabling opcache fixes the issue and endLine is correctly reported. Opcache related settings: opcache.blacklist_filename => no value => no value opcache.consistency_checks => 0 => 0 opcache.dups_fix => Off => Off opcache.enable => On => On opcache.enable_cli => On => On opcache.enable_file_override => Off => Off opcache.error_log => no value => no value opcache.fast_shutdown => 0 => 0 opcache.file_cache => no value => no value opcache.file_cache_consistency_checks => 1 => 1 opcache.file_cache_fallback => 1 => 1 opcache.file_cache_only => 0 => 0 opcache.file_update_protection => 2 => 2 opcache.force_restart_timeout => 180 => 180 opcache.inherited_hack => On => On opcache.interned_strings_buffer => 8 => 8 opcache.log_verbosity_level => 1 => 1 opcache.max_accelerated_files => 10000 => 10000 opcache.max_file_size => 0 => 0 opcache.max_wasted_percentage => 5 => 5 opcache.memory_consumption => 128 => 128 opcache.mmap_base => no value => no value opcache.opt_debug_level => 0 => 0 opcache.optimization_level => 0x7FFFBFFF => 0x7FFFBFFF opcache.preferred_memory_model => no value => no value opcache.protect_memory => 0 => 0 opcache.restrict_api => no value => no value opcache.revalidate_freq => 2 => 2 opcache.revalidate_path => Off => Off opcache.save_comments => 1 => 1 opcache.use_cwd => On => On opcache.validate_permission => Off => Off opcache.validate_timestamps => On => On