Is it possible to convert AS3 code to PHP?

I realize that there is no automotated way of doing this.  I have built some AS3 functions that use AMFPHP.  I am re-designing a new form and I need to achieve the same results.  Is it possible to take this code and easily convert it to PHP?  I have provided the remote and the time block functions below. Basically the scripts are checking to see what blocks of time are available.
This is the remote function.
   public function getHours():void{//retrieves truck data
               
            	gateway = new RemotingConnection("http://www.cyberhornet.com/amfphpbeta/gateway.php" );
            	var responder:Responder = new Responder(ongetHours);
                var params:Object = new Object;
                 var sdate:Object = new Object;
                 sdate = (dchoose.selectedDate.getFullYear()) +
                 "-" + (dchoose.selectedDate.getMonth()+1) +            
                 "-" + (dchoose.selectedDate.getDate());
                 params.datesa = sdate;
                gateway.call("Ipg.getHours",responder, params.datesa);
                onemoment = Alert.show("One moment please...","Information");
               
                
                }

            public function ongetHours(result:Array):void
            {
            	
            	
            	if(result != null){
                trace("it is not null");
                probdesc.visible = true;
                lbl0.visible = true;
            	ac = new ArrayCollection(result);	
                application1_initializeHandler();
                avltimes.dataProvider = avtimes;
                PopUpManager.removePopUp(this.onemoment);
            	}
            	else
            	{
            	var narray:Array = new Array();	
            	probdesc.visible = true;
            	lbl0.visible = true;
            	narray.push({stime:"08:00",etime:"10:00",custno:"Mr.Test"});
            	narray.push({stime:"10:00",etime:"12:00",custno:"Mr.Test"});
            	narray.push({stime:"12:00",etime:"14:00",custno:"Mr.Test"});
            	narray.push({stime:"14:00",etime:"16:00",custno:"Mr.Test"});
            	narray.push({stime:"16:00",etime:"18:00",custno:"Mr.Test"});
            	trace(narray);
            	acb = new ArrayCollection(narray);
            	//application1_initializeHandler();
            	avltimes.dataProvider = acb;
                //Alert.show("Error");
                PopUpManager.removePopUp(this.onemoment);
                probdesc.enabled = true;
             }
            }  

This is the time block function.

  public var avtimes: ArrayCollection;
			// The beginning of the work day, in HH:MM format
			private static const WORKDAY_START:String = "08:00:00";
			// The end of the work day, in HH:MM format
			private static const WORKDAY_END:String = "18:00:00";
			// The number of hours to find for each time slot between employee time slots
			private static const INTERVAL_HOUR_COUNT:int = 2;
			
			public function application1_initializeHandler():void
			{
				
				ac.refresh();
				avtimes = new ArrayCollection;
				//initDP();
				// First step, sort all the time slots by employee
				var employeeSlots:Object = {};
				for each (var timeSlot:Object in ac) {
					var custno:String = timeSlot.custno;
					if (!employeeSlots[custno]) employeeSlots[custno] = [];
					    employeeSlots[custno].push({
						starttime: addZero(timeSlot.starttime),
						endtime: addZero(timeSlot.endtime)
					});
				}
				// Second step, find all two hour intervals between each custno's time slot
				for (var employeeName:String in employeeSlots) {
					var employeeTimeSlots:Array = employeeSlots[employeeName];
					// Add in the first and last time stamps
					employeeTimeSlots.unshift({endtime: WORKDAY_START});
					employeeTimeSlots.push({starttime: WORKDAY_END});
					// Find all the time differences
					for (var i:int = 0; i < employeeTimeSlots.length-1; i++) {
						// The end hours of the current time slot
						var endDate:Date = new Date(0, 0, 0, int(employeeTimeSlots[i].endtime.substr(0, 2)),
							int(employeeTimeSlots[i].endtime.substr(3, 2)), 0, 0);
						// The beginning hours of the next time slot
						var nextStartDate:Date = new Date(0, 0, 0, int(employeeTimeSlots[i+1].starttime.substr(0, 2)),
							int(employeeTimeSlots[i+1].starttime.substr(3, 2)), 0, 0);
						// The hours in between the time slots
						var availableHours:Number = Number((nextStartDate.getTime() - endDate.getTime())) / (1000 * 60 * 60);
						// For every two hours that are available between these time slots
						
						for (var hourInterval:int = 0; availableHours - hourInterval >= INTERVAL_HOUR_COUNT; hourInterval += INTERVAL_HOUR_COUNT) {
							// Trace the available time slot
							trace(employeeName, "=", addZero((endDate.hours + hourInterval) + ":" + endDate.minutes), 
							"to", addZero((endDate.hours + hourInterval + INTERVAL_HOUR_COUNT) + ":" + endDate.minutes));
			           
			               avtimes.addItem({emp:employeeName,stime:addZero((endDate.hours + hourInterval) + ":" + endDate.minutes),etime:addZero((endDate.hours + hourInterval + INTERVAL_HOUR_COUNT) + ":" + endDate.minutes)});
			               
						}
						
						
					}
					 
				}
				
			}
			
			
		
			private function addZero(num:*):String {
				// Create an array, if string is in "xx:xx" format, the array will be ["xx", "xx"], otherwise it will be ["xx"]
				var arr:Array = String(num).indexOf(":") == -1 ? [num] : String(num).split(":");
				for (var i:int = 0; i < arr.length; i++) // Add an "0" if the string is only one character
					if (arr[i].length == 1) arr[i] = "0" + arr[i];
				return arr.join(":");
			
			}

Open in new window

aduvallAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dgofmanCommented:
I don't think so, I know Java created FX library but not for conversion only for creating SWF via Java.
0
hankknightCommented:
The code can be converted but the conversion process cannot be automated.  It would need to be done by a programmer who knows how to program with both languages.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aduvallAuthor Commented:
That is what I needed to know.  I just did not want to waste my time with something that probably was not possible.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.