in the following code if I uncomment the print statement the code works fine.. prints '11' but after commenting it shows error of memory dump. How is it possible... php version 5.5.9
public static function checkFinalLayerConditions($profileObj,$layerToShow,$interestsPending,$getTotalLayers) {
$profileid = $profileObj->getPROFILEID();
$picObj= new PictureService($profileObj);
$havePhoto= $picObj->isProfilePhotoPresent();print($layerToShow);
while (1) { //print($layerToshow);
if ($layerToShow) {
$show = 0;print($layerToShow); die();
switch ($layerToShow) {
case '1': if ($havePhoto == null)
$show=1;
break;
case '2': if ($profileObj->getDetail("","","FAMILYINFO")[FAMILYINFO]=='')
$show=1;
break;
case '3': if ($interestsPending > 0)
$show=1;
break;
default : break;
}