ID:               28315
 User updated by:  j dot uribe at globalforma dot com
 Reported By:      j dot uribe at globalforma dot com
 Status:           Bogus
 Bug Type:         Zend Engine 2 problem
 Operating System: Windows XP
 PHP Version:      5.0.0RC2
 New Comment:

OK, i have do so, and it works but seems to be a strange problem when a
function mapped into array is called from a class, furthermore i
already have made those changes and now it works fine.Thx.


Previous Comments:
------------------------------------------------------------------------

[2004-05-21 21:33:45] [EMAIL PROTECTED]

Erm, I misinterpreted your script's intent. (Had to make some changes
for it to make sense on this end.)

The method you're using for calling functions is not appropriate. 
Based on your data structure, you'd need to use eval().  But since
eval() is generally a poor approach to any problem, I'd sooner
recommend modifying your array scructure to contain function names
separare from parameter lists.

In any event this is a question for the support list
[EMAIL PROTECTED]



------------------------------------------------------------------------

[2004-05-21 21:28:56] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


The short portion of code you posted works fine from here.

------------------------------------------------------------------------

[2004-05-07 16:13:34] j dot uribe at globalforma dot com

Description:
------------
The compiler gives me an error when i exec a code




Reproduce code:
---------------
echo(LMS::$dataModelCore[$_POST['lmsget']]());

Part of the class is:
        class LMS{
                public static $dataModelCore=array(
                                                                                
"cmi.core.student_id"=>'coreStudentID($tipo,$valor="")',
                                                                                
"cmi.core.student_name"=>'coreStudentName($tipo,$valor="")',
                                                                                
"cmo.core.lesson_location"=>'coreLessonLocation($tipo,$valor="")',
                                                                                
"cmi.core.credit"=>'coreCredit($tipo,$valor="")',
                                                                                
"cmi.core.lesson_status"=>'coreLessonStatus($tipo,$valor="")',
                                                                                
"cmi.core.entry"=>'coreEntry($tipo,$valor="")',
                                                                                
"cmi.core.score"=>
                                                                                       
 array(  
                                                                                       
                 "cmi.core.score.raw"=>'coreScoreRaw($tipo,$valor="")',
                                                                                       
                 "cmi.core.score.max"=>'coreScoreMax($tipo,$valor="")',
                                                                                       
                 "cmi.core.score.min"=>'coreScoreMin($tipo,$valor="")',
                                                                                       
         ),
                                                                                
"cmi.core.total_time"=>'coreTotalTime($tipo,$valor="")',
                                                                                
"cmi.core.lesson_mode"=>'coreLessonMode($tipo,$valor="")',
                                                                                
"cmi.core.exit"=>'coreExit($tipo,$valor="")',
                                                                                
"cmi.core.session_time"=>'coreSessionTime($tipo,$valor="")',
                                                                );

            static function suspendData($tipo,$valor=""){
                echo "Suspend Data";
            }
            static function launchData($tipo,$valor=""){
                echo "Launch Data";
            }

...
...
)

Expected result:
----------------
I expected execute the function asociate whith the value of the array.





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28315&edit=1

Reply via email to