Re: Spaghetti code...

From: Date: Tue, 11 Jul 2000 15:41:12 +0000
Subject: Re: Spaghetti code...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-5932@lists.php.net to get a copy of this message
Lol, i think you've go tthe wrong idea entirely: I wasn't asking about goto and the like because i wanted to make really illegible code, I was just curious if those functions existed. But thanks for your response, I didn't know about variable variables, so overall i benefitted from your response, thanks! Ed "Rasmus Lerdorf" <rasmus@php.net> wrote in message news:Pine.LNX.4.21.0007102128200.1685-100000@thinkpad.php.net... > > Hey, I was looking in the manual and I couldn't find good ol' spaghetti-code > > functions like goto or whatever.. Are they not in PHP? or did I look them > > over somewhere? > > > > (yes, yes i know they are evil incarnate and nobody likes them and wants > > them band in all 50 states, but I'm still curious...) > > No 'goto' but you do get break and continue, and both of these can take a > numerical argument specifying how many levels they should escape out > of. That can make some really nice spaghetti. So can the variable > variables. Or the variable variable variable variables... Or perhaps > variable variable variable functions? > > eg. > > function e() { echo "Hello World"; } > $a = "b"; > $b = "c"; > $c = "d"; > $d = "e"; > $$$$a(); > > -Rasmus > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#5932) next »