What is Php: Definition and 77 Discussions

PHP is a general-purpose scripting language especially suited to web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP reference implementation is now produced by The PHP Group. PHP originally stood for Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext Preprocessor.PHP code is usually processed on a web server by a PHP interpreter implemented as a module, a daemon or as a Common Gateway Interface (CGI) executable. On a web server, the result of the interpreted and executed PHP code – which may be any type of data, such as generated HTML or binary image data – would form the whole or part of an HTTP response. Various web template systems, web content management systems, and web frameworks exist which can be employed to orchestrate or facilitate the generation of that response. Additionally, PHP can be used for many programming tasks outside of the web context, such as standalone graphical applications and robotic drone control. PHP code can also be directly executed from the command line.
The standard PHP interpreter, powered by the Zend Engine, is free software released under the PHP License. PHP has been widely ported and can be deployed on most web servers on almost every operating system and platform, free of charge.The PHP language evolved without a written formal specification or standard until 2014, with the original implementation acting as the de facto standard which other implementations aimed to follow. Since 2014, work has gone on to create a formal PHP specification.W3Techs reports that, as of April 2021, "PHP is used by 79.2% of all the websites whose server-side programming language we know."

View More On Wikipedia.org
  1. Brief-Wishbone

    How to install PHP 8.x on centos 7?

    https://baransel.dev/post/how-to-install-php8-on-centos/ I've followed tutorials like this w/o avail. Everything works but when at last I do php -v, I see different version of php not 8.x.
  2. ergospherical

    Implementing secure login with Swift and a PHP API

    I'm hosting a database containing usernames and password hashes, and have written a little PHP API which accepts HTTP post requests (sent from an iOS application via Alamofire for Swift) containing two parameters, username & password, checks against the database & returns some JSON data...
  3. evinda

    MHB How can I implement a website using HTML and CSS without functionality?

    Hello! (Wave) I wanted to ask you if you are familiar with html, css, javascript and php... What is it about? 🤔 Here is for example an exercise: Implement in HTML and CSS the site that is shown below (the specifications are marked with red). The site will be without functionality. How would...
  4. gind_id


    for reference you can see JS in formulajs.info/functions. lognormdist use by call : formulajs.LOGNORMDIST(value, mean, stdev, true) logpearsondist use by call : formulajs.NORMSDIST(z, true) anybody can help?
  5. J

    PHP What programming language is used to store Bank Acct's/money?

    is it PHP-MySQL? In websites accounts of users tend to be stored in servers, and on these servers they store the data in some syntax and use PHP, RUBY or something else to add/change the information. Is it the same in bank accounts? In what format is banking information stored?
  6. D

    PHP Correlate VBS and PHP for Server Use

    Hello ! I have a php code that I'd like to use as a vbs one. But I don't know exacly how to do so. Could you help me please ? Actually, my vbs script will read a file line by line, take the first word, put it in 'LastName' and after the space, take the "FirstName". But if you reverse the Last...
  7. kolleamm

    PHP How does PHP work with HTML files?

    For example instead of uploading an index.html to a server, would I just use index.php instead? Basically I want to be able to use PHP code to make my page more interactive.
  8. A

    Java How to communicate between javascript and php?

    Hi, I am having problems integrating HTML, Javascript and PHP. I am using the instructions at this website to transfer data from PHP to Javascript: http://www.dyn-web.com/tutorials/php-js/scalar.php and have set up the following simple code to simply transfer a PHP array to Javascript but I...
  9. topsquark

    MHB PHP Static Variables: Why Doesn't It Reset?

    The code is supposed to generate 0 1 2 My question is this: If we declare $x = 0 in the function then why doesn't it reset to 0 every time we run the function? -Dan
  10. Dave Ritche

    PHP PHP Script Problem: Troubleshoot the Error

    Hello everyone! I have designed a page set all it's input to the php Post variable.The form's method is set to POST and action to process.php which is the script i created.Both the script and the page are in htsocs directory.when i submit the form,the contents of the script simply appear in the...
  11. Dave Ritche

    PHP Are HTML and CSS files necessary in the HTDOCS folder for PHP to work in XAMPP?

    Hello everyone.. I am learning php and I'm new to php.I don't know much about it. i watched a tutuorial on it that told me i were to put my scripts into the HTDOCS folder. My question is that is it necessary to my html and css files into HTDOCS folder?Will it work? I am running xampp.. thanks.
  12. Dave Ritche

    PHP Understanding PHP: What is It & Why Do We Need It?

    I'm really stuck at knowing about PHP.. What will happen without using PHP on your website? I know it's server side but why we need it?to process forms?how PF uses PHP?
  13. C

    PHP HTML, php and css code in ebook, proper formatting?

    Hi, I want to write an ebook on CSS, HTML and php, and I'm using a RTF copy/paste plugin to my code editor so i can copy and paste code directly into MS Word from my code editor. I'm just wondering: Can i write the whole book in MS Word and then directly upload it to amazon, for ebook readers...
  14. V

    Java Which Programming Language is Better for Web Development: PHP or Java?

    Dear Friends, I am new here and I would like to ask you for an advise. I have the opportunity to start a scholarship with a good school with Cambridge International Certificate. At this school I have opportunity to choose one of two modules: PHP Web Development or Java Development. I worked...
  15. AliGh

    PHP How can I decode multiple layers of encoded php code?

    My cousin gave me this file The commands eval(gzinflate(base64_decode())); decodes the entered code and run it as a php code . The problem is that its not the only decoding command there are several of this command in the code . I used this command for the code and put the result in a...
  16. Stephanus

    PHP Learning Web Programming: MySQL & PHP for Complex Websites

    Dear PF Forum, I want to learn web programming, but there are specifics information that I need to know. What is the most famous database in web programming? My SQL? Is it true that PF Forum database is MySQL? If this is true, then the conclusion is MySQL can handle millions of post, hundreds...
  17. AliGh

    C# Can C# and PHP be used together for web development?

    It has been a few weeks since i started practicing programming seriously . I am kind of new to object-oriented programming I have been working with C# till now . I have started working with php now and playing with web languages (css , html , javascript) How many languages have you worked with...
  18. lonely_nucleus

    JavaScript What scripts do websites like unitednuclear.com use?

    I recently finished a course of html and css at codeacademy.com and I think I learned a lot from that but I do not feel prepared to make websites that can, for example, load another page when a button is clicked. Overall I want to know what type of languages are used to program sites like...
  19. Silicon Waffle

    PHP PHP: Deleted but still remains

    using namespace std; class A { int i; public: A(); void Set(int& i){this->i=i;} void Print(){cout<<i<<endl;} }; int main() { int *i=new int; A ra; i=10; ra.Set(*i); delete i; ra.Print(); } I think after delete i, the value in Set will also be deleted. Isn't...
  20. DaveC426913

    International PHP software diploma - worth?

    A friend of a friend in E. Europe (Macedonia) wants to learn programming (PHP/MySQL) at a business college and hopes eventually to come here in work. It has been my (possibly highly ignorant) understanding that, as far as Western corporations are concerned, diplomas from European are...
  21. Jay1

    MHB A PHP Function To Perform Nth-Order Lagrange Interpolation

    The following Lagrange interpolation function is extremely useful. It can be used in just about any branch of science. I use it extensively in astronomical computations for such things as finding the dates and times of the seasons over thousands of years and phases of the moon at any given...
  22. Jay1

    MHB Computing The Arbitrary-Precision Value Of N-Factorial In PHP

    The general integer factorial can be expressed by the equation: $$N! = \prod_{x~=~1}^N {x} = {1 \cdot 2 \cdot 3 \cdot ~~...~~ \cdot N}$$ This simply means that N-factorial is the sequential product of all integers from 1 to N. Below is a simple PHP function to compute the arbitrary-precision...
  23. Jay1

    MHB Computing The Arbitrary-Precision Nth Root Of Positive (X) In PHP

    PHP has some powerful arbitrary-precision (BC or binary calculator) arithmetic functions which seem to be greatly underused and only consist of the basic arithmetic operations, a square root function, a mod function and an integer power function. However, those basic operations can be used to...
  24. W

    PHP Mastering PHP and MySQL: A Beginner's Guide

    I want to learn about and PHP and MysQuL. Someone tell me How to learn it?
  25. J

    PHP Using PHP and cURL to submit POST requests to a website

    Here's the setup: I'm trying to write a PHP script to spam my buddy's website. He has given me full permission to try and do so. I have a very rudimentary understanding of HTTP protocols and am probably doing something wrong, because my attempt hasn't been working. Here's my PHP script...
  26. Borek

    PHP Limiting Output from Unmaintainable PHP Code

    I have a site made in PHP eons ago by someone I no longer have contact with. Lately site was attacked with a SQL injection attempt. Input is sanitized, so there is no immediate danger for the database, but this attack exposed vulnerability - if value of one the parameters is not from the...
  27. Femme_physics

    PHP My php code skips a user request please look inside

    Hey folks! Wow...been a while since I posted here. So this ought to be a simple script I'm running in Command Prompt, but it completely skips the part where it asks the user to enter a number (after asking how much would you like to withdraw (or deposit) ) What gives? <?php...
  28. N

    PHP HTML and PHP issue: display HTML form variables using PHP echo

    Heeeeeeellllllllllllllooooooooooooo, I have a question about HTML and PHP: Firstly, I am using Apache2 and PHP5 (I think) and running it as a localhost. I created a simple HTML form that sends the variables via post to a PHP file; there are two variables with the names "nickname" and...
  29. S

    Why Isn't My PHP Comment System Saving Data to MySQL Database?

    i am making a comment system using dreamweaver and mysql , and the data i wrote it in the text area didnt not save in the mysql _db , below the index page contain the general fourm to let the user write comment and post_comment.php to send the data can you help me why the data didnt send...
  30. Chemicist

    PHP Does anyone in here write PHP?

    I'm seeing all the awesome languages - Java, C, C++, Python, etc., but I'm not seeing any of the web-languages. I've yet to see a recent thread on ASP.NET or PHP, or much of anything like that. So, does anyone here know PHP?
  31. R

    PHP Advice on how to set column widths in php

    Postby Robbie8 » Mon Sep 03, 2012 7:44 pm Hi, I am using a php view to show a table of all the entrants in my projects with their number, name, rounds and points. I have two projects Project One and Two which have their results displayed in tables. The width of the columns for the values in...
  32. S

    Mastering PHP Math: Solving a Tricky Example in a Tutorial

    I'm going through a php tutorial right now and this math example below is driving me nuts. The exmaple was "((1 + 2 + $var1) * $var2) / 2 - 5", and all the rest of the code below is just me trying to figure it out. The answer ends up being "7", but to me it looks like PHP is sayding "24 / -3...
  33. E

    PHP PHP programming, image processing

    Hello! So this is minimally image processing, but I didn't know what else to name this thread. I'm working on a project and basically, I have this image (see attached file) that's provided to me. That's all I have to work with. The first column of colored pads represents my test pad...
  34. B

    PHP WEBSITE HIJACKED - Php code infected - HELP?

    WEBSITE HIJACKED - Php code infected! - HELP!? Hey All, I've got a major *$%#@ problem. I'm freaking out here. Check this out. On my website, I have a way to allow visitors... to become distributors and sell my product as well. When they become a distributor, it creates a subdomain for...
  35. B

    PHP Preventing SQL Injection in PHP Forms

    Hello All, First and foremost, thanks for the help in the past. I've got a new issue and I think it's going to be fairly easy! (fingeres crossed) OK, I'm implementing SecurImage (Phpcaptcha.org) onto my website. I've got everything installed and working correctly except for error...
  36. B

    PHP Solving PHP Issue with FireBellyLawnCare.com CMS

    Good Evening All! Well... that registration was fun. I'm red/green colorblind (I guessed green and got it right!). Anyways... I've got a problem (other than my color blindness). My website, www.FireBellyLawnCare.com, is up and running. The designer... sadly... is out of contact. I would...
  37. C

    PHP str_replace function problem

    I have this PHP code to edit all HTML text to be displayed so that it won't appear as HTML but as standard text. <?php function htmlformat($sinput){ $newphrase = str_replace("<", "&lt;", $sinput); $newphrase = str_replace(">", "&gt;", $newphrase); $newphrase =...
  38. C

    Java Is there a javascript or php code to remove browsing history?

    I want to remove my clients browsing history every time they access new pages from my website. is there any code, i keep searching the net and i can't find one.
  39. J

    PHP PHP Constant Arrays: Is It Possible?

    I was wondering if was possible to create a constant array in php so it doesn't have to be reinitialized each time you enter a function. I guess one solution is to make it global but from a code maintenance perspective it makes since to put the array in with the function that uses it.
  40. T

    Can I Use WordPress with My ISP? Understanding PHP and MySQL Support

    I would like to start blogging using WordPress. I've heard that my ISP needs to support PHP and MySQL in order for this to work? I have no idea what either is but I have seen a few examples of small test-files (info.php) I can upload to my site and attemp to view them in order to find out if my...
  41. M

    PHP How Can I Replace My Static Website with a Dynamic Website Using PHP & MySQL?

    Hi, I already have a static website, and now I am trying to design a dynamic website. I used Apache, PHP, and MySQL and setup on my computer (hostname = localhost) and tested my member directory database. It worked fine that I can add, edit and delete, and update the data from table. I...
  42. Math Is Hard

    PHP How does PHP's session_start() function work?

    I'm a little confused about how PHP's session_start() function works. There's a tutorial I am reading here: http://www.tizag.com/phpT/phpsessions.php Here's an example they give of a counter script: <?php session_start(); if(isset($_SESSION['views'])) $_SESSION['views'] =...
  43. J

    PHP PHP -OO or Functional for speed/ knowledge demonstration?

    My second PHP question this week...:smile: I'm writing a PHP app which includes things such as form validation and database interaction. So far, almost everything has been written procedurally. However, I started playing around with PHP's OO stuff, and it's cool. Problem is, this app is being...
  44. O

    PHP Coding Help for CubeCart 3.0.17

    I would like to learn some PHP and I would like some advice on where to start, what I would like to do is the following: Customers to visit the store and only be able to view Regular Prices of the Products. I would like to hide the Special/Sale Prices for certain Products (and be able to...
  45. J

    PHP PHP - Wrong datatype for second argument

    PHP - "Wrong datatype for second argument" So I build this class in my library file (assume that I have all the PHP tags and stuff)... class errorchecker { var $error; function errorsearch($error) { if (in_array($error, $pb)){ echo '<div class="error">'.$error.'</div>'; } }...
  46. M

    PHP Flash, PHP: Font sizes don't match

    Has anyone noticed that the font size for Flash and the font size for GD images in PHP don't give the same text size?
  47. H

    C/C++ Should I Learn PHP Before C++ for University?

    Hi, I was thinking of learning c++ as it would help me in my first year at university. However, someone told me that i should learn php first as it is easier and then learn php. Is that true? If not then are there any good tutorials on the internet for C++? Thanks.
  48. S

    PHP  PHP Syntax Error: Unexpected '>' Character

    <?php require("header.php"); $sql = "select entries. * , categories.cat FROM entries, categories WHERE entries.cat_id = categories.id ORDER BY dateposted DESC LIMIT 1;"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result); echo "<h2><a href='viewentry.php?id=" ...
  49. Hootenanny

    PHP Using PHP eregi Function - Solve XML XSD Pattern Definition

    Hi all, I have this xml xsd pattern defintion; [A-Z,0-9]{5}[0-9][0,1,5,6][0-9]([0][1-9]|[1-2][0-9]|[3][0,1])[0-9][A-Z,0-9]{3}[A-Z]{2} and I need to convert it into an ereg regular expression to valid some input from a form. I've been at this for hours but can't seem to get anywhere...
  50. P

    PHP Help with php and this part of the code ?

    Ok here is the code below, I need to know what I need to change in this code for it to be able to be a clickable link... I have many layouts and want to add more but with so many pages, its a bit hard to go through 49 pages just to add one page. I already submitted this problem to web design...