Git Product home page Git Product logo

runkit_object_id's Introduction

runkit_object_id (by the runkit7 project)

(Also provides a native implementation of spl_object_id)

For the safest function in runkit(7). This implements runkit_object_id() : ?int, which is similar to spl_object_hash() : string, but returns an integer instead of a string. The runkit_object_id() is faster if you need to take the ids of a large number of objects, and avoids the memory overhead of storing extra strings.

By default, this provides a native alias (for PHP <= 7.1) for spl_object_id, which is a native part of PHP 7.2. Add --enable-runkit-spl_object-id=no to the configure options to disable this.

Both runkit_object_id($obj) and spl_object_hash($obj) return identifiers that are unique for the lifetime of the object. After the object is garbage collected, that identifier can/will be used again.

Supports php 5.3+ and php 7.0+.

See runkit_object_id-api.php for function stubs, and an alternate (slower) pure PHP implementation.

Build Status Build Status (Windows)

Motivation

An integer object id has been a requested function for a while. spl_object_id() is getting added to PHP 7.2, but there's nothing for php <= 7.1

Installation

Similar to runkit7 installation steps, but using this repo instead.

If runkit (extension=runkit.so) is installed and enabled, then disable this module.

runkit_object_id's People

Contributors

tysonandre avatar tysonandre-tmg avatar

Watchers

 avatar  avatar  avatar

runkit_object_id's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.