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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: powerblade at mail dot dk
New email:
PHP Version: OS:

 

 [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: Sat Apr 20 02:01:29 2024 UTC