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("" );
            	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;
      "Ipg.getHours",responder, params.datesa);
                onemoment ="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);	
                avltimes.dataProvider = avtimes;
            	var narray:Array = new Array();	
            	probdesc.visible = true;
            	lbl0.visible = true;
            	acb = new ArrayCollection(narray);
            	avltimes.dataProvider = acb;
                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
				avtimes = new ArrayCollection;
				// 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] = [];
						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

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.

I don't think so, I know Java created FX library but not for conversion only for creating SWF via Java.
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.

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.
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

From novice to tech pro — start learning today.