Does including a file with lots of functions slow down PHP applications?

1 Answer

Answer :

It is always better to short the calls to the server, so it is a good practice to keep it in one file and one call. But also the the size of the file been called sometimes slows down more than having individual calls. To find out the happy middle I would use Firebug plugin in Firefox to find the time periods of the requests to the server. There is also PHPSpeedy that makes the requests significantly faster.

Related questions

Description : Is it possible to store PHP scripts in the cloud?

Last Answer : answer:Yes Simplest example would be to grab the script from a service, stick it in a variable and eval it. Could you provide an example of why you’d want to? I can’t think of a good reason to do it offhand.

Description : Which is better between PHP and ASP.net?

Last Answer : answer:I prefer PHP. It is well documented and very portable. ASP is non starter for me since I refuse to use IIS. I like Ruby and Python too. But when I have to start a project from scratch I use PHP and CodeIgniter.

Description : What's your favorite PHP integrated development environment (IDE)?

Last Answer : If I did PHP development, I’d probably use Coda: http://www.panic.com/coda/

Description : What's the best way to deploy a PHP application?

Last Answer : answer:debian package At a previous job I had to install/maintain a site written in CakePHP. I made it into a debian package. “aptitude install projectname” and you’re done (although I guess that is technically “touching the server”) Send me a PM and I can give you the details.

Description : PHP problem with && and possibly a malfuntioning array?

Last Answer : answer:Unfortunately the examples above don't really shed a lot of light without some additional information. Maybe we can help with some troubleshooting tips in general? A couple of things that come to mind ... is where you're expecting it. Good luck with it, I hope it all comes together.

Description : Which windows application for writing PHP codes?

Last Answer : answer:Don’t know about compiling php? and debugging is also foreign to me. But Notepad++ is awesome.

Description : If I already know basic PHP/MySQL, what else should I learn to use Google App Engine?

Last Answer : answer:I am not an expert, I just started reading up on this myself, but here are a couple of starting points on data storage. Rather than a separately maintained SQL database, ... .com/appengine/articles/datastore/overview.html http://code.google.com/appengine/docs/python/datastore/overview.html

Description : PHP echo number of instances if specific word?

Last Answer : make a while loop that goes through the contents of the array. prior to the array define a counting variable and give it the value 0. during each loop, increase the value by 1 if the word “and” is encountered

Description : Make an archive-like page in PHP?

Last Answer : Hi Davey, Here is some quick and dirty code for your showarticlesfor($year)' function which should get the job done (NOTE: I am assuming you are using MySQL as your DBMS): function ... few breaks, and finally by the records (the while loop). References: MySQL DATE_FORMAT PHP mysql_fetch_assoc()

Description : How would I check if an XML element exists in PHP?

Last Answer : Wrap it in an if that checks for the existence first if($status->item(0)) { $eventStatus = $status->item(0)>getAttributeNode( value )->value; } and run from there, I haven't actually run your ... and does just about everything you'll want (then you can use the DOM stuff to fill in the blanks)

Description : How would I perform this operation on a string in PHP?

Last Answer : That isn’t XML, that’s HTML. Can you not grab the data in a format where times are stamps?

Description : [PHP] Forgot Password Help?

Last Answer : You could try using the built in PHP crypt() function, you pass the string and a salt you want to encrypt, then to decrypt it use the decrypt() function and the same salt. That should give you the same password back. Though really you should try to push for a randomly generated password on reset.

Description : Referencing a class from another class [PHP]?

Last Answer : Great question! I wish I knew.

Description : Cloning Objects in PHP?

Last Answer : I usually use it when I'm at a midpoint that I'll be using for several objects. How about a oversimplified example just to illustrate the point? If I'm programming a Christmas story and have ... formatted request that I'll be reusing, and then clone the XML object before filling in the particulars.

Description : I'm in PHP right now. Will a transition to Objective-C be relatively easy, or do you think I should try other languages first?

Last Answer : answer:Objective-C is a compiled language, strong typed, then is different to Php in many ways. Since 2.0 version, Obj-C has its own garbage-collector for memory management. I don't try to ... want to do with Objective-C ? Cocoa framework is really interesting, you should take a look at it !

Description : What is the best php framework?

Last Answer : I have found cake to be the most portable and easy to install. If I had to choose a MVC PHP framework I would go with Cake.

Description : Cut a string into pieces (PHP! ;-) )

Last Answer : You could use substr while looping up to the length of the string and using array_push to build your $string_array.

Description : What's the best editor for PHP/Javascript work?

Last Answer : Vim

Description : Anybody know how I can integrate .zip files with PHP?

Last Answer : http://www.net2ftp.com/ allows you to do this. You could dig through the source (you can download it there) and figure out how they did it. Or you could just install net2ftp and have them use that instead.

Description : Free PHP Web Server for Dreamweaver?

Last Answer : answer:This is probably your best bet for getting PHP, Apache, and MySQL running easily. http://www.apachefriends.org/en/xampp.html It works well on most operating systems. I can't help with Dreamweaver ... add that xampp runs on your computer. No need for a external server. It is great for testing.

Description : External Link to PHP module execute twice?

Last Answer : answer:I'm not sure I understand the question correctly, but if I do: it sounds like whatever program you're embedding your link in ( email or word document ) is loading the URL more than once. It' ... has been moved, and only raises an error if the appropriate row can't be found in either table.

Description : How can I quickly and easily shut down all non-essential applications and processes in Windows 7 64bit?

Last Answer : in before delete system 32

Description : Is there a website that shows all the English words, idioms, etc ever invented, including archaic, unofficial, and newest words that have just been invented?

Last Answer : The problem with such a lexicon would be that there have been a lot of slang, dialect, idioms, and unofficial words that 99% of people have never heard of. Besides that, the English language is ... pretty good vocabulary. Hopefully, someone will recommend some. I am unable to do this at the moment.

Description : Can you help me find an App that can help one make App's? (any platform, including pen and paper, details inside)

Last Answer : answer:I'm not sure if it's quite what you're looking for, but my buddy makes AppCooker. You can use it with AppTaster to create mockups and make them play. I can't speak to their efficacy personally because ... charge $75-125/hour. If that's the route you end up wanting to take, feel free to PM me.

Description : Has anyone used Apple's SDK to create applications for iPhone?

Last Answer : answer:I have written a few apps. They were very basic and I would never release them to the public. I'm not that confident. If you have experience with Xcode and Objective C you should go for ... learning curve. And everyone starts somewhere. Give it a whirl. The only thing you lose is some time.

Description : What do those who work with different applications of multimedia say ?

Last Answer : Those who work with different applications of multimedia are called multimedia content developers.

Description : I need C troubleshooting: When i include a library do i have to do something more in order to have its functions work in my script?

Last Answer : Are you getting any other errors, like “math.h” not found? Actually, IIRC, not finding an include is just a warning…

Description : What are the benefits of using user defined functions in the program ?

Last Answer : Answer : In C-Program, the functions that the program describes according to its own needs in the Main () function are called user defined functions or user defined functions. The main advantage of the defined ... you can edit and insert some new data. As a result, the user benefits from the work.

Description : What are the functions of Printf () and Getch () function ?

Last Answer : The most commonly used function as an output statement in C language is printf (), which can be used to display various types of data (such as int, Char, float, etc.), including strings or strings ... programming . That is, both print () and getch () act as essential functions for C programming .

Description : Describe the functions of stack pointer and program counter of 8085. 

Last Answer : Stack pointer: 1. It is a 16 bit register which is used to store the address of topmost filled memory location of stack memory. 2. SP always points current top of stack. 3. If data is ... of memory and in 8085 the address of memory is 16 bit. Hence program counter is 16 bit register.

Description : State the functions of following pins of 8085 1) SOD 2) HLDA

Last Answer : 1) SOD: Serial Output data SOD pin is used to transmit data serially from accumulator to the external devices connected to the pin.  2) HLDA: Microprocessor generates HLDA signal to acknowledge requesting device after HOLD signal.

Description : State the functions of temporary registers of 8085 microprocessor.

Last Answer : Temp Register (8 bits) is also called as operand register as it is used by μp for storing one of the operands during an operation and also for storing the result of any execution temproary.

Description : Do you know webhosting server including with these details: free, about 1-2 gigabytes, php script OK, mysql OK, no adds on site?

Last Answer : Hosting a free Wordpress blog. Interesting. Did you try wordpress.com? Most hosts aren’t going to offer those serviced ad-free for free. I can’t think of a single one. Everyone needs a business model. And even if I found one, I certainly wouldn’t trust it for stability and security.

Description : GAE contains the several runtime environments including : JAVA, Python, _______ & a) C# & MySQL b) Net & Ruby c) PHP & GO d) Closure & Scala

Last Answer : PHP & GO

Description : What would be the .exe file for a Visual Basic program?

Last Answer : The exe in the bin folder within the (startup) project.

Description : How do I get pythonw run in the background in a .cmd file?

Last Answer : answer:Use a vbs file to run it invisibly, but you won’t be able to se it in task manager either. Should work with .cmd or anything else really. Set WshShell = CreateObject(“WScript.Shell”) WshShell.Run chr(34) & “yourbatchfile.bat” & Chr(34), 0 Set WshShell = Nothing

Description : How to solve this problem I have with a restore (backup) file I made in SQL Server 2008?

Last Answer : try to see if you have volume optimization enabled, it prevents certain changes from happening and really gives the user a hell of alot more trouble than it is worth.

Description : How to make an impressive Frotoflio file for a startup company?

Last Answer : First, you should probably spell portfolio correctly. Next? Use your imagination! There are all kinds of websites out there that will give you tips and hints but it is ultimately your design. How ... yourself? There's probably nothing that I could tell you differently than what's on those links.

Description : How to open a .vbs file from a .bat?

Last Answer : Assuming you have Windows 2000, XP, Vista, or Windows 7, try the following: cscript /nologo filename.vbs If your script uses WScript.Echo or simular subroutines, you’ll want to use cscript rather than wscript, otherwise I seem to recall that you get message boxes for each Echo subroutine call.

Description : Why do so many restaurants websites offer their menu as a PDF file?

Last Answer : PDF is a pretty universal format. This way people can download their Chili’s and Ruby Tuesday Menu and go to it at any point when they want to order take out.

Description : what is the jboss .sar file for?

Last Answer : www.google.com

Description : How can I open a text file in javascript?

Last Answer : Do you mean open a file from the file system? That’s not possible using JavaScript within web browsers due to security restrictions (imagine if that warez site you “stumbled onto” could access your file system…ouch!), but it is possible within some environments, like Apple’s Dashboard.

Description : Does GoDaddy have some PHP functions disabled by default?

Last Answer : Doesn’t look that way, but I can’t really tell. Your host does appear to suck.

Description : Any ideas for simple, always useful PHP functions?

Last Answer : A regular expression to check if an e-mail address is valid. Tons of examples out there but it gets your hands dirty with a few necessary techniques.

Description : professional way of making a config file php -Php

Last Answer : NEED ANSWER

Description : ____ software creates a mirror image of the entire hard disk, including the operating system, applications, files and data. a) Operating system b) Backup software c) Utility programs d) Driver imaging e) None of these

Last Answer : b) Backup software

Description : Which of the following is a core management feature offered by most cloud management service products? a) Support of different cloud types b) Creation and provisioning of different types of cloud ... and uptime, response time, resource quota usage, and other characteristics d) All of the mentioned

Last Answer : All of the mentioned

Description : Is it easy/possible to connect the iphone to a big screen like a tv or a pc monitor and use all its functions like that, including the apps and games...

Last Answer : absolutely not unless you have a touch screen tv even then-no you might be able to watch movies on it on a tv. but that’s about it.

Description : What organ has many functions including producing bile and synthesizing carbohydrates and fats.?

Last Answer : Need answer

Description : Agricultural and Processed Food Products Export Development Authority (APEDA), which is mandated with export promotion of scheduled products including fruits, vegetables, poultry, meat, dairy etc, ... Industries c. Ministry of Agriculture and Farmers Welfare d. Ministry of Commerce and Industry

Last Answer : d. Ministry of Commerce and Industry