Language-level substr; call stack dump

From: Date: Mon, 26 Jun 2000 18:47:15 +0000
Subject: Language-level substr; call stack dump
Groups: php.general 
Request: Send a blank email to php-general+get-3167@lists.php.net to get a copy of this message
Hi, I'm looking for two features from PHP. The first, I think, requires language retooling; the second may be possible, but I'm not sure how. Language-level substr: It would be handly to eliminate the substr function, replacing it with a language level implementation. For instance, these two statements should be equivalent: $foo = substr( $string, $start, $length ); $foo = $string[$start..$start+$length]; The reason I ask is because it's not too often that I want offset plus length; more often, I want a start and end string, making it the case that these would be equivalent: $foo = substr( $string, $start, $end - $start ); $foo = $string[$start..$end]; Call stack dump: As much as I hate to admit it, in larger projects I sometimes can't quite figure out how I got to where I am in my code. A single function may get called from a number of others, and I'd like to know which one called me. I see that there is a debugger protocol that contains this information, but I see no way to dump it from within PHP, ala: Function MyFunc( $foo = "bar" ) { global $PHPDebugger; if( $foo == "morebar" ) $PHPDebugger.PrintCallStack(); } Please Cc the -devel list if anyone working on the PHP code itself considers either of these useful. If I overlooked something, just reply to me directly. =) thanks, Christopher

« previous php.general (#3167) next »