

It’s the web server-not the web browser-that can interact with a PHP interpreter. It doesn’t know what to do with scripts and isn’t built to interpret PHP. And, you can’t just add a PHP interpreter to your browser. PHP scripts-which you’ll soon be writing-have to be interpreted by the PHP interpreter program, called php.
Top php for mac download#
When you download a web browser, you get HTML, CSS, and JavaScript, but you do not get PHP. Things aren’t always the same in every browser, and it’s up to you-not your users-to handle inconsistencies.įigure 1-3 shows you how JavaScript fits in (hint: just as HTML and CSS do).Īnd here’s where things change from the easy, browser-centric view of the world. What does all this mean to you? Test your code-JavaScript, PHP, or otherwise-in as many browsers as you can.
Top php for mac code#
So, even if you have two browsers that implement the same version of the JavaScript specification, the code in that implementation isn’t identical there are usually differences. That means that each browser has to write code that matches that specification so that they can say, “Yes, you can run JavaScript in our browser!”įurthermore, each browser does things a bit differently, and that’s why a website feature that works perfectly in Firefox might not quite work perfectly in Internet Explorer, and vice versa. Rather, it’s a specification: a document that defines how things should work to be considered as JavaScript. And, if you have multiple versions of a single browser-like Firefox 3.6.3 for testing with older Linux-based systems and the most current version (14something-or-other as of late), they each have a different JavaScript installation.Įven though JavaScript doesn’t get updated very often, those multiple installations usually translate into multiple versions of JavaScript, because JavaScript isn’t a product that is distributed by a central organization to browser developers. Add Chrome or Opera to the mix, and you’ve got a few more installations. Suppose that you have Internet Explorer and Firefox you’ve got the JavaScript installation that came with Internet Explorer and the one that came with Firefox. Think about it: if JavaScript is built in to your browser, and you have more than one browser, you actually have multiple installations of JavaScript on your computer.

UNDER THE HOOD: You Probably Have Multiple Versions of JavaScript Already!
Top php for mac upgrade#
Just as you can’t upgrade your HTML installation outside of your browser, you can’t upgrade your JavaScript installation outside of your browser. In fact, if a new version of JavaScript were to appear-something that rarely happens these days-you’d need to download a new version of your browser to get that version of JavaScript. In other words, support for JavaScript is part and parcel of your web browser.

Whether it was simple phone number validation, more advanced jQuery functions that turned boring gray boxes into animated buttons and elements into tabs, or even the new HTML5 canvas object, within which you could build entire JavaScript-based 3D games, your pages suddenly had new life with JavaScript.īut just as with HTML and CSS, JavaScript is at heart a web technology, and even more specifically, a browser-based technology. Suddenly, you weren’t limited to elements that never moved and text that never changed. Next up in the pantheon of web technologies that every designer and fledgling programmer needs to learn: JavaScript.

Top php for mac software#
JavaScript Adds Complexity, but Not Software Again, no extra software needed.Īt this point, even though you’re using only two technologies-HTML and CSS-you need only a single program to handle those technologies: the web browser. That’s because, once again, the web browser is completely capable of not just rendering HTML, but applying all those CSS styles to the page, too. You might even have a few style sheets for the benefit of people viewing your website on mobile devices or printing out a page: īut you can still double-click that HTML file, and your browser knows what to do (see Figure 1-2). Then, at some point, some well-meaning web designer slapped your hand and insisted that you start writing all your CSS in external style sheets, and referencing those files in the head of your HTML, like this: Using the style attribute and tags in your HTML document, you could change fonts, add striping to your table rows, and generally spice up otherwise boring text. If you keep thinking back, you probably added some styling to your HTML pages. No extra software or configuration is necessary. Figure 1-1. Web browsers know all they need to know in order to load and display an HTML page.
