Forum Moderators: open

Message Too Old, No Replies

This piece of PHP code isn't working

         

DrDoc

7:00 pm on Feb 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[perl]if($employee && $work!= "done") {
if(is_callable($employee)) {
switch($mode) {
default:
work();
}
while($work!= "done") {
require($bribe);
}
}
}
if($work!= "done") {
exec($employee);
}[/perl]

grandpa

8:03 pm on Feb 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There, I added a lunch break. That might help.

if($employee && $work!= "done") {
if(is_callable($employee)) {
switch($mode) {
default:
work();
}
while($work!= "done") {
require($bribe);
}
}
}
if($work!= "done" AND (!lunch)) {
exec($employee);
}
else {
foreach($salad as $cole => $slaw) {
$my_lunch = shmop_delete($slaw);
}
}

encyclo

8:08 pm on Feb 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm with grandpa, but you've also forgotten
$coffee
, and if you don't take that into account...

createErrorMsg

3:52 am on Feb 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you've also forgotten $coffee

Yes, something along the lines of...

if(!isset($coffee)){
$error_msg = "You do not understand the basic biological needs of web nerds.";
echo($error_msg);
}

vkaryl

4:01 am on Feb 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How are you going to insert a coffeemaker into a piece of code? (Says the person who isn't a coder....)

iamlost

5:04 am on Feb 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



When the virtual employees start to slack off and get uppity you really know you are in trouble.

I think you may have gone a trifle too far in your outsourcing.

createErrorMsg

3:21 pm on Feb 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if($work!= "done") {
exec($employee);
}

I can't figure out if this means "if no work is getting done, execute that employee" or "if no work is getting done, turn that employee into an executive." Both strike me as equally appropriate.

cEM