# encoded php files bug

- Thread: https://externals.io/message/3371
- Original archive: https://news-web.php.net/php.internals/3371
- Started by walt boring on 2003-07-11T23:26:58+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #3371 — walt boring — 2003-07-11T23:26:58+00:00

URL: https://externals.io/message/3371#3371

Howdy,
  I have the latest version of the encoder and optimizer installed and am running
php 4.3.2.  I have a simple test script below which shows that encoded files 
complain that __CLASS__ and __FUNCTION__ are undefined.

$ php ~/EncoderBug2-enc.php
 
Notice: Use of undefined constant __CLASS__ - assumed '__CLASS__' in
/home/waboring/EncoderBug2-enc.php on line 13
 
Notice: Use of undefined constant __FUNCTION__ - assumed '__FUNCTION__' in
/home/dl/EncoderBug2-enc.php on line 13
file=/home/waboring/EncoderBug2-enc.php, line=12, class=__CLASS__, func=__FUNCTION__


Source/test file:
<?php
 
class EncBug1 {
 
    function bug1() {
        return "file=" . __FILE__ . ", line=" . __LINE__ .
            ", class=" . __CLASS__ . ", func=" . __FUNCTION__;
    }
}
 
echo EncBug1::bug1() . "\n";
 
?

---

## #3377 — Derick Rethans — 2003-07-12T07:05:50+00:00

URL: https://externals.io/message/3371#3377 · In reply to: #3371

> Howdy,
>   I have the latest version of the encoder and optimizer installed and am running

Please file these bugs with the Zend people, it's not a PHP problem.

Derick

-- 
"Interpreting what the GPL actually means is a job best left to those
                    that read the future by examining animal entrails."
-------------------------------------------------------------------------
 Derick Rethans                                 http://derickrethans.nl/ 
 International PHP Magazine                          http://php-mag.net/
