Re: Re: [PHP-DEV] [proposal + pull request] Replace logo GUIDs with data URIs

From: Date: Mon, 16 Jul 2012 01:55:33 +0000
Subject: Re: Re: [PHP-DEV] [proposal + pull request] Replace logo GUIDs with data URIs
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 2012-07-15 09:48, Stas Malyshev wrote:
Hi!
And I actually know of websites using the functions to display the logo.. Is there some way we could provide a BC function for it somehow? Maybe rather then removing the functions, make then return the data uris?
Having the functions to get the images sounds like a good idea, some sites may want to use them to display the logos. However, I don't think we should use the same function, as then deciding what the function actually does is complicated. I'd rather prefer doing something like: if(function_exists('php_logo_guid')) { $url = "/index.php?=".php_logo_guid(); } else if(function_exists('php_logo_url')) { $url = php_logo_url(); } if(!empty($url)) echo "<img src=\"$url\" alt=\"php logo\">"; it's clear what each function gives me then.
There are three of these functions: one for the PHP logo, one for the Zend logo, and one easter egg. If php_logo_guid()/php_logo_url() could take an argument ('php', 'zend', 'easteregg') all three could be handled by the one function. By itself this wouldn't change anything because the other functions would need to stay around for BC - at least for a while. But it opens up the possibility of extending the mechanism to the authors of third-party extensions: a ready source of site badges, and a visual identifier on phpinfo() pages.

Thread (8 messages)

« previous php.internals (#61270) next »