php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28315 Fatal error: Internal compiler error - please report!
Submitted: 2004-05-07 16:13 UTC Modified: 2004-05-24 09:09 UTC
From: j dot uribe at globalforma dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.0RC2 OS: Windows XP
Private report: No CVE-ID: None
 [2004-05-07 16:13 UTC] 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.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-21 21:28 UTC] pollita@php.net
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-21 21:33 UTC] pollita@php.net
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 php-general@lists.php.net


 [2004-05-24 09:09 UTC] j dot uribe at globalforma dot com
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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 06 07:00:02 2025 UTC