There is PHP interpreter available at lab computers. Works like a Python interpreter.
You may have php installed locally (do not install now!) or run using an online sandbox (onlinephp.io, onecompiler.com, ... ).
Copy content PHP code. Add code so the file can be executed and produce the desired output.
The objective is to implement a simple class for a shopping cart.
Consider use of __toString.
Copy PHP code. Add code so the file can be executed and produce the desired output. The objectives are:
Copy PHP code. Add code so the file can be executed and produce the desired output.
The objective is to provide a user of the User class with the ability to save the class content into a JSON and a string. Implement the Writer interface and create writer for String and JSON. Implement a factory method (createWriter) for those classes.
You may need json_encode, ucfirst.
Extend existing PHP code. Modify code so the file can be executed and produce the desired output.
The objective is to monitor invocation of class methods. There are two difficulty levels.
Leave an anonymous feedback.