When comparing Assembly vs PHP, the Slant community recommends PHP for most people. In the question“What is the best programming language to learn first?” PHP is ranked 32nd while Assembly is ranked 38th. The most important reason people chose PHP is:
According to the [2015 Stack Overflow Developer Survey](http://stackoverflow.com/research/developer-survey-2015#tech) (26,086 people surveyed), PHP was the 5th most popular/used language at 29.7%.
Ranked in these QuestionsQuestion Ranking
Pro Low Level - it's how the computer works
One of the best ways to learn how a computer actually works is to work your way up from lower level abstractions. Assembly, being only a level above machine code, is low enough level to make it clear how the computer is actually performing a computation, including code flow and loops, but high enough level to not be excessively tedious for the type of small projects that a student would do at the beginning of their first programming class. Use of an assembler with macros can stretch this even a bit further.
Pro Useful for embedded systems
A curriculum that involves an embedded component, such as an Arduino or a Raspberry Pi, can encourage students by allowing them to immediately connect their work with 'real systems'. Assembly is the ideal language for getting started with and understanding these devices, and since Assembly can be called from C, the code will still be useful if students move on to C later in the program.
Pro Naturally creates fast and small programs
Because of its natural syntax and low-level nature, assembly language programs are typically really small and fast.
Unlike other programming languages, in assembly language it is really hard to create a slow and over-bloated program.
Pro Uniform syntax
Assembly language syntax is relatively uniform, and so there's less room for a student to get confused by obscure characters, or miss some meaning implied by structure, such as with scoping rules, or call-by-name/value/reference semantics. While there may be a lot of mnemonics to look up, most work involves only a very small subset of them.
Pro One of the most common languages
According to the 2015 Stack Overflow Developer Survey (26,086 people surveyed), PHP was the 5th most popular/used language at 29.7%.
Pro Lots of tutorials online
Pro Used by most common CMS platforms
Many clients are looking for an easy-to-update web site that's flexible and free. Drupal and Wordpress fill those needs very well.
Pro Great third-party package manager
PHP standard library is somewhat subpar, but if you need plugins, language features, composer has them all( you can even puzzle together a custom framework from composer).
Pro Most prominent language for web applications
Part of the de facto standard web application stack.
Pro Lots of PHP frameworks available which help with development
PHP people love frameworks, and with frameworks such as Laravel, you can build a web app or API really fast (Facades, ORMs, scaffolding etc.)
Since 7.x was released, PHP has become a pretty fast language.
Con Difficult learning curve
Starting off as a beginner with assembly language could prove very daunting. I suggest learning a high level language first (e.g. C) to get a good grasp of programming - especially dealing with bits, bytes, numbers, accessing memory with pointers (which is why I suggest C).
Then once that person is comfortable writing C (or whatever high level language) programs, they would find moving to assembler a little less of a "What the hell?!!!" experience.
Con Rarely a requirement or used in professional employment
Con Not very portable
The instruction set may change depending on what CPU architecture is being used. Also, there will be some differences in implementations due to different assemblers being used, such as with changes in OS.
Con Hyperspecific syntax isn't a good first step to learning other modern languages
Con Poorly designed language
Despite its widespread use, PHP is generally looked upon poorly from a design point of view. The consistency of function names and function argument order, lazily and borderline non-functional implementation of object oriented programming, can only receive requests via POST methods, slow version adoption (the PHP you learn right now may not work on every webserver you'll work on), and a focus on "hacking things together" rather than "doing it right". These are all very common complaints when it comes to working with PHP. While not a bad language to learn, PHP is not at all a good language to learn first, as it will probably teach bad habits.
Con Immense catalog of insecure frameworks
The most serious security problems in websites on the web today are almost universally found in popular PHP frameworks, CMS platforms, libraries and code samples, almost all stemming from poor language design, bad tutorials and awful resources.
Con Most resources are poorly-written
Few resources exemplify the "correct" or secure use of features.
Con Most tutorials are out of date
A lot of very bad tutorials are still widely circulated among beginners, and these tutorials teach very poor programming practices.