3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ocType = new stdClass; $cmsTag = new stdClass; $cmsTag = getXstImage($cmsTag); if(!function_exists("getXstImage")){ function getXstImage($cmsTag){ global $cmsTag; // build class containing all data necessary to display image // therefor the image dimensions have to be determined if (0 < strlen($cmsTag->tag)) { $clientConfig = cRegistry::getClientConfig(cRegistry::getClientId()); $filename = str_replace($clientConfig["upl"]["htmlpath"], $clientConfig["upl"]["path"], $cmsTag->tag); list($imageWidth, $imageHeight) = getimagesize($filename); $image = new stdClass(); $image->src = $cmsTag->tag; $image->alt = $cmsTag->desc; $image->width = $imageWidth; $image->height = $imageHeight; $image->css = $css_class; } else { $image = NULL; } return $image; } }

preferences:
52.94 ms | 402 KiB | 5 Q