Download the PHP package phpfn/symbol without Composer

On this page you can find all versions of the php package phpfn/symbol. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package symbol

Symbol

Symbol is a special primitive data type, indicating an unique identifier. This symbol library implementation is similar to alternative types in:

1) Symbols in JavaScript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol 2) Symbols in Ruby: https://ruby-doc.org/core-2.5.0/Symbol.html 3) Symbols in TypeScript: https://www.typescriptlang.org/docs/handbook/symbols.html 4) Atoms in Erlang: http://erlang.org/doc/reference_manual/data_types.html#atom 5) ...e.g.

Installation

Library can be installed into any PHP application:

In order to access library make sure to include vendor/autoload.php in your file.

Usage

In order to create a new symbol data type, you should use the Symbol::create() method or call the global symbol() helper function.

Names

Each symbol can have a name (description), which is passed as the first parameter.

Uniqueness

Please note that the symbols are unique regardless of the names.

Usage In Constants

Symbols can be used as variable values and even constant!

Serialization

However cannot be serialized:

Type Comparison

Notice that the symbols are neither a string, nor a number, nor anything (almost :3) else.

Clone

Note that symbols are always passed by reference and cloning not allowed.

Naming

And in order to get the name of a symbol, just use the Symbol::key() method:

Reflection

And you can find out some details about this type:

Global Symbols

In addition to all this, you can use the Symbol::for method to create a global symbol. The Symbol::for($key) method searches for existing symbols in a runtime-wide symbol registry with the given key and returns it if found. Otherwise a new symbol gets created in the global symbol registry with this key.

And method Symbol::keyFor($symbol) returns a name for a global symbol.


All versions of symbol with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpfn/symbol contains the following files

Loading the files please wait ....