Lua is a small scripting language. It is a research team at the Pontifical Catholic University of Rio de Janeiro in Brazil, composed of Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo and developed in 1993. It is designed to be embedded in applications to provide them with flexible extensions and customization capabilities. Lua is written in standard C and can be compiled and run on almost all operating systems and platforms. Lua does not provide a powerful library, which is determined by its positioning. Therefore, Lua is not suitable as a language for developing stand-alone applications. Lua has a concurrent JIT project that provides just-in-time compilation capabilities on specific platforms.
Lua scripts can be easily called by C/C code, and can also call C/C functions in turn, which makes Lua widely used in applications. Not only as an extension script, but also as an ordinary configuration file, replacing XML, ini and other file formats, and is easier to understand and maintain.
Let’s experience the first Lua program!
The first Lua program
Lua is written in standard C. The code is simple and beautiful, and can be compiled and run on almost all operating systems and platforms. A complete Lua interpreter only costs 200k. Among all current script engines, Lua is the fastest. All this determines that Lua is the best choice for embedded scripts.
Tips: Our Lua tutorials will help you learn Lua knowledge from beginner to advanced. If you have any questions, please go to the PHP Chinese website Lua Community to ask your question, and enthusiastic netizens will answer it for you.
Lua features
Lightweight
- Extensible
- Other features
- Game development
- Independent application script ## Web application scripts
- Extensions and database plug-ins such as: MySQL Proxy and MySQL WorkBench
- Security systems such as intrusion detection systems
- Content covered by this Lua tutorial manual
This Lua tutorial covers all basic and advanced knowledge of Lua, including basic Lua syntax, Lua process control, Lua functions, Lua operators, and Lua characters Basic and advanced knowledge of Lua such as strings, Lua arrays, Lua iterators, Lua error handling, Lua object-oriented, etc.
Tips: Each chapter of this tutorial contains many Lua examples. You can directly click the "Run Example" button to view the results online. These examples will help you better understand and use Lua language.
Latest chapter
- Lua 数据库访问 2016-10-20
- Lua 面向对象 2016-10-18
- Lua 垃圾回收 2016-10-18
- Lua 调试(Debug) 2016-10-18
- Lua 错误处理 2016-10-18
- Lua 文件 I/O 2016-10-18
- Lua 协同程序(coroutine) 2016-10-18
- Lua 元表(Metatable) 2016-10-18
Related courses
- The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course) 2022-02-17
- Let's briefly talk about starting a business in PHP 2023-01-04
- Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things 2018-01-25
- Login verification and classic message board 2018-03-02
- Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum] 2022-06-28
- Quick Start Node.JS Full Version 2022-09-30
- Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance) 2022-12-08
- Horse soldier spring video tutorial 2022-04-12