scalar_objects is a PHP extension that adds experimental method-call support for primitive values. It lets developers register handler classes for primitive types such as strings, arrays, integers, booleans, floats, null values, and resources. After registration, a primitive value can call methods through object-like syntax, such as calling a length method on a string. The project is mainly a proof of concept for designing cleaner primitive-type APIs in PHP. It allows API ideas to be prototyped in userland before any proposal for deeper language integration. Overall, it is most useful for PHP language experimentation, API design research, and exploring how object-style operations on scalar values could work.

Features

  • PHP extension for primitive method calls
  • Handler registration for primitive type APIs
  • Support for string, array, int, float, bool, null, and resource handlers
  • Userland prototyping for future API design
  • Object-style syntax for scalar operations
  • Unix build instructions and Windows DLL installation path

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow scalar_objects

scalar_objects Web Site

Other Useful Business Software
Secure File Transfer for Windows with Cerberus by Redwood Icon
Secure File Transfer for Windows with Cerberus by Redwood

Protect and share files over FTP/S, SFTP, HTTPS and SCP with the #1 rated Windows file transfer server.

Cerberus supports unlimited users and connections on a single IP, with built-in encryption, 2FA, and a browser-based web client — all deployable in under 15 minutes with a 25-day free trial.
Try for Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of scalar_objects!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

3 days ago