Click here to Skip to main content
15,877,051 members
Home / Discussions / Web Development
   

Web Development

 
PinnedHow to get an answer to your question Pin
Chris Maunder4-Sep-10 2:25
cofounderChris Maunder4-Sep-10 2:25 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder12-Jul-09 22:40
cofounderChris Maunder12-Jul-09 22:40 
QuestionWhat is generally the current best method for storing uploaded documents? Pin
we5inelgr6-Mar-24 15:06
we5inelgr6-Mar-24 15:06 
AnswerRe: What is generally the current best method for storing uploaded documents? Pin
Bohdan Stupak7-Mar-24 5:45
professionalBohdan Stupak7-Mar-24 5:45 
GeneralRe: What is generally the current best method for storing uploaded documents? Pin
we5inelgr7-Mar-24 9:05
we5inelgr7-Mar-24 9:05 
GeneralRe: What is generally the current best method for storing uploaded documents? Pin
jschell8-Mar-24 11:40
jschell8-Mar-24 11:40 
AnswerRe: What is generally the current best method for storing uploaded documents? Pin
jschell8-Mar-24 11:47
jschell8-Mar-24 11:47 
AnswerRe: What is generally the current best method for storing uploaded documents? Pin
Andre Oosthuizen9-Mar-24 0:47
mveAndre Oosthuizen9-Mar-24 0:47 
QuestionLooking for a working working sample google maps on blazor web app with loading markers from database Pin
urx194124-Jan-24 23:19
urx194124-Jan-24 23:19 
AnswerRe: Looking for a working working sample google maps on blazor web app with loading markers from database Pin
jschell25-Jan-24 4:36
jschell25-Jan-24 4:36 
GeneralRe: Looking for a working working sample google maps on blazor web app with loading markers from database Pin
michael floeter25-Jan-24 21:29
michael floeter25-Jan-24 21:29 
GeneralRe: Looking for a working working sample google maps on blazor web app with loading markers from database Pin
jschell30-Jan-24 4:51
jschell30-Jan-24 4:51 
QuestionSetting a CORS header, and allowing my Javascript modules that are inlined Pin
jkirkerx24-Jan-24 10:30
professionaljkirkerx24-Jan-24 10:30 
AnswerCleaned up my dart board, and got the modules error cleared at least, this will take time, not easy Pin
jkirkerx24-Jan-24 11:26
professionaljkirkerx24-Jan-24 11:26 
GeneralRe: The problem is somewhere else Pin
jkirkerx24-Jan-24 13:06
professionaljkirkerx24-Jan-24 13:06 
AnswerRe: Solved, that was a can of worms to sort out Pin
jkirkerx25-Jan-24 12:13
professionaljkirkerx25-Jan-24 12:13 
QuestionJS Arrow functions this & setTimeout scope Pin
Member 1618344416-Jan-24 1:46
Member 1618344416-Jan-24 1:46 
AnswerRe: JS Arrow functions this & setTimeout scope Pin
Jeremy Falcon25-Jan-24 4:31
professionalJeremy Falcon25-Jan-24 4:31 
QuestionWordPress for Windows Pin
Richard Andrew x647-Jan-24 4:24
professionalRichard Andrew x647-Jan-24 4:24 
AnswerRe: WordPress for Windows Pin
jschell8-Jan-24 5:52
jschell8-Jan-24 5:52 
GeneralRe: WordPress for Windows Pin
Richard Andrew x648-Jan-24 13:49
professionalRichard Andrew x648-Jan-24 13:49 
Questionhow PHP works Pin
mike741126-Dec-23 10:24
mike741126-Dec-23 10:24 
AnswerRe: how PHP works Pin
Richard MacCutchan26-Dec-23 21:47
mveRichard MacCutchan26-Dec-23 21:47 
GeneralRe: how PHP works Pin
trønderen27-Dec-23 8:09
trønderen27-Dec-23 8:09 
There is not a clear, absolute distinction. Old style interpreters would interpret the statements of a loop from source code on every iteration of the loop, and similar with other constructs.

To speed up execution, interpreters began (at least 25 years ago, maybe earlier) when analyzing a statement, to leave the analysis in a memory cache. So for a loop, the analysis was done the first time through. Following iterations skipped the analysis step, and rather picked up the analysis from the cache.

As this became more common, the analysis results became more formalized into some variant of P-code, suitable for direct interpretation. When done as a separate step, for an entire program or program module (e.g. the classic Pascal compiler from ETH Zürich), it is always called a compiler. So when the php runtime system does the same thing for a loop, you might say that it is a compiler, compiling that loop.

Another change over time: The first interpreters to save analysis results for later use did it line by line, or statement by statement. More recent interpreters compile larger units, e.g. a complete method, in order to apply optimizations such as moving invariants out of loops, calculating common expressions once only etc.

If the generated code follows a well defined grammar, the runtime compiler may save it to a file or cache. Compare it to dotNet: The IL code(*) of an assembly is compiled to binary machine code by the "jitter" (Just In Time compiler) first time it is run. The jitter also saves the binary code in a (persistent) disk cache that is usually not seen by neither programmer nor user; it is in a file space managed by the jitter alone. Next time the same assembly is run, the jitter first looks in its cache: If an already compiled version is found there, it is loaded, and the JIT compiling is bypassed.

A similar (persistent) caching (of P-code) might be employed by an interpreter. It should not affect the source language - the same source may be interpreted on one machine, compiled to P-code on the fly on every execution on another machine, while a third machine may have an interpreter looking in its cache for an already compiled variant.

This may be applied to a lot of different languages: You could make an interpreter to P-code on the fly, for subsequent immediate interpretation by an interpreter. Usually, you think of Java as a compiled language, but if you integrate JVM with the compiler, they might appear externally just as 'interpreted' as, say, PHP.

(*) dotNet IL code and P-code are at comparable abstraction level. The difference is that P-code is designed to be directly interpreted by a virtual machine; it is complete and ready for running, like a binary machine code (although not the machine code of the real machine you are running). IL code has a lot more 'loose ends' that must be tied up; there are more final decisions to be taken, but then there is more freedom when generating final binary machine code for that specific real machine. You cannot move this binary code to another machine; it may have a CPU missing a few instruction set options (the jitter makes binary code to make use of anything that is available), or maybe a completely different binary instruction set. P-code (usually) can be moved to other machines of arbitrary architecture and instruction set.

Note that P-code (or bytecode) is not a single firmly defined format. There are different P-codes, Java bytecode is not identical to the classical Pascal P4-code (although it is said to be heavily inspired by P4).
Religious freedom is the freedom to say that two plus two make five.

GeneralRe: how PHP works Pin
Richard MacCutchan27-Dec-23 21:19
mveRichard MacCutchan27-Dec-23 21:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.