php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #20799 Able to call function when reaching a certain line in a certain file
Submitted: 2002-12-03 15:43 UTC Modified: 2013-07-12 13:06 UTC
From: powerblade at mail dot dk Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 4.2.3 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
42 - 40 = ?
Subscribe to this entry?

 
 [2002-12-03 15:43 UTC] powerblade at mail dot dk
The reason i need this feature is when people wants to make "hacks" for scripts. Then they often modify the scripts a bit, and add lines everywhere in the script. If you then distribute the hack, you need to tell them where in the script they add the lines. The problem is they already have other hacks installed, so it doesn't look the same. So i thought of a trigger_line() function. load the function with a parameter of filename, line number and function to run, then when it reaches that file/line it runs the function, to do what it needs to do. Then it's easy to have a bunch of hacks to a script, without modifying the code. This would be very very usefull. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-12 13:06 UTC] maarten@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues
 [2013-07-12 13:06 UTC] maarten@php.net
No response in 11 years, bad idea (application framework should offer proper hooks), and also outdated since PHP 5 offers full OO features.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 15:01:30 2024 UTC