Skip to main content

Posts

RESTful API in PHP - Know a little

RESTful (Representational State Transfer) API is an architectural style for designing networked applications. It follows a set of constraints to make it scalable, maintainable, and loosely coupled.  RESTful APIs are stateless and use standard HTTP methods (GET, POST, PUT, DELETE) for communication. Key principles of RESTful APIs: Resource-Based:  Resources (data or services) are identified by URIs (Uniform Resource Identifiers) and are manipulated using standard HTTP methods. Uniform Interface:  A consistent and standardized way to interact with resources. This includes the use of standard HTTP methods, representation of resources (e.g., JSON or XML), and hypermedia as the engine of application state (HATEOAS). Stateless:  Each request from a client to a server contains all the information needed to understand and process the request. The server doesn't store any client state between requests. Client-Server Architecture:  Separation of concerns between the clie...

21 PHP Interview Questions (Mid Senior Level )

Here are some PHP interview questions suitable for someone with 8 years of experience:   1. Explain the difference between include , require , include_once , and require_once in PHP. In PHP, include, require, include_once, and require_once are used to include and evaluate external files in a PHP script. Here are the differences between them: The include statement is used to include and evaluate a specified file during the execution of the script. If the file is not found, a warning is issued, but the script continues to execute. The require statement is similar to include but with a key difference. If the specified file is not found, a fatal error is issued, and script execution is halted. The include_once statement includes and evaluates the specified file, but it ensures that the file is included only once during the execution of the script. If the file has already been included, it will not be included again. The require_once statement is similar to include_once but with ...