Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Gettext basic test with en_US locale that should be on nearly every system --EXTE..

Decoded Output download

--TEST--
Gettext basic test with en_US locale that should be on nearly every system
--EXTENSIONS--
gettext
--SKIPIF--
<?php
    
    if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
        die("skip en_US.UTF-8 locale not supported.");
    }
?>
--FILE--
<?php

chdir(__DIR__);
putenv('LC_ALL=en_US.UTF-8');
setlocale(LC_ALL, 'en_US.UTF-8');
bindtextdomain ("messages", "./locale");
textdomain ("messages");
echo gettext("Basic test"), "
";
echo _("Basic test"), "
";

?>
--EXPECT--
A basic test
A basic test
--CREDITS--
Christian Weiske, [email protected]
PHP Testfest Berlin 2009-05-09

Did this file decode correctly?

Original Code

--TEST--
Gettext basic test with en_US locale that should be on nearly every system
--EXTENSIONS--
gettext
--SKIPIF--
<?php
    
    if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
        die("skip en_US.UTF-8 locale not supported.");
    }
?>
--FILE--
<?php

chdir(__DIR__);
putenv('LC_ALL=en_US.UTF-8');
setlocale(LC_ALL, 'en_US.UTF-8');
bindtextdomain ("messages", "./locale");
textdomain ("messages");
echo gettext("Basic test"), "\n";
echo _("Basic test"), "\n";

?>
--EXPECT--
A basic test
A basic test
--CREDITS--
Christian Weiske, [email protected]
PHP Testfest Berlin 2009-05-09

Function Calls

None

Variables

None

Stats

MD5 e095912bb82a6a90830d8b743788a08b
Eval Count 0
Decode Time 94 ms