كود PHP:
Program xxx ;
Uses wincrt , Windos ;
Var
h,h1,PreviousS,s1,m,m1,CurrentS,ms1,ms : word ;
it:integer;
xs,xm, x:string ;
t:text ;
Begin
ScreenSize.x:=300 ;
ScreenSize.y:=200;
Assign(t,'c:\time.txt');
Rewrite (t);
GetTime(h1,m1,PreviousS,ms1);
Repeat
GetTime(h1,m1,CurrentS,ms1);
Str(m1 , xm );
Str(CurrentS ,xs ) ;
If not ( CurrentS = PreviousS ) then
Begin
PreviousS:=CurrentS ;
Clrscr;
If ( m1 < 10 ) then
Begin
xm:='0'+xm ;
end;
If not ( CurrentS >= 10 ) then
Begin
Clrscr;
xs:='0'+xs;
end ;
write('The Current time is :',h1,':',xm,':',xs);
Writeln(t,'- >:',h1,':',xm,':',xs);
Gotoxy(0,5);
Writeln('Press any key to stop Counting >');
end;
Until ( Keypressed);
Writeln;
Clrscr ;
Reset(t) ;
Writeln(' I Recorded The time While this Program was open >' );
Writeln;
While ( eof(t) = false ) do
begin
Readln(t,x) ;
Writeln(x);
end;
Close(t);
Writeln;
Writeln('ALL RIGHTS ARE RESERVED TO < Comunistul > ... ');
end.