if ($a) { if ($b) { &S1; } else { &S2; } } else { if ($c) { &S3; } else { &S4; } } #### +-----(b)->[S1]--+ | | +-----(a)->[test b]--+ |--+ | | | | | +-(not-b)->[S2]--+ | [test a]--| |-->[end] | +-----(c)->[S3]--+ | | | | | +-(not-a)->[test c]--+ |--+ | | +-(not-c)->[S4]--+ #### +-----(b)->[S1]-+ | | +-----(a)->[test b]-+ +---->[S5]-+ | | | | | +-(not-b)->[S2]---+ | [test a]-+ | | +->[end] | | | | | +-----(c)->[S3]-+ | | | | +-->[S6]-+ +-(not-a)->[test c]-+ | | | +-(not-c)->[S4]---+ #### +-----(b)->[S1]->[S5]-+ | | +-----(a)->[test b]--+ |--+ | | | | | +-(not-b)->[S2]->[S6]-+ | [test a]--| |-->[end] | +-----(c)->[S3]->[S5]-+ | | | | | +-(not-a)->[test c]--+ |--+ | | +-(not-c)->[S4]->[S6]-+